From a26e231b46ac6433f6500ddc9ed6b466cf38cc21 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Fri, 25 Jun 2021 19:05:29 +0300 Subject: =?UTF-8?q?Conversion=20Qt3=E2=86=92TQt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mavridis Philippe --- src/config/config.cpp | 92 +++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'src/config/config.cpp') diff --git a/src/config/config.cpp b/src/config/config.cpp index bc70aa6..7ff53f7 100644 --- a/src/config/config.cpp +++ b/src/config/config.cpp @@ -25,15 +25,15 @@ //#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -50,8 +50,8 @@ #include "config.h" #include "configdialog.h" -SUSE2Config::SUSE2Config(KConfig *config, QWidget *parent) - : QObject(parent), m_config(0), m_dialog(0) +SUSE2Config::SUSE2Config(KConfig *config, TQWidget *parent) + : TQObject(parent), m_config(0), m_dialog(0) { m_parent = parent; // create the configuration object @@ -83,10 +83,10 @@ SUSE2Config::SUSE2Config(KConfig *config, QWidget *parent) connect(m_dialog->redCloseButton, SIGNAL(toggled(bool)), SIGNAL(changed())); connect(m_dialog->iconSize, SIGNAL(valueChanged(int)), SIGNAL(changed())); connect(m_dialog->customIconColors, SIGNAL(toggled(bool)), SIGNAL(changed())); - connect(m_dialog->activeFgColor, SIGNAL(changed(const QColor &)), SIGNAL(changed())); - connect(m_dialog->activeBgColor, SIGNAL(changed(const QColor &)), SIGNAL(changed())); - connect(m_dialog->inactiveFgColor, SIGNAL(changed(const QColor &)), SIGNAL(changed())); - connect(m_dialog->inactiveBgColor, SIGNAL(changed(const QColor &)), SIGNAL(changed())); + connect(m_dialog->activeFgColor, SIGNAL(changed(const TQColor &)), SIGNAL(changed())); + connect(m_dialog->activeBgColor, SIGNAL(changed(const TQColor &)), SIGNAL(changed())); + connect(m_dialog->inactiveFgColor, SIGNAL(changed(const TQColor &)), SIGNAL(changed())); + connect(m_dialog->inactiveBgColor, SIGNAL(changed(const TQColor &)), SIGNAL(changed())); connect(m_dialog->iconShadow, SIGNAL(toggled(bool)), SIGNAL(changed())); connect(m_dialog->titleBarLogo, SIGNAL(toggled(bool)), SIGNAL(changed())); @@ -106,12 +106,12 @@ void SUSE2Config::load(KConfig *) { m_config->setGroup("General"); - QString alignValue = m_config->readEntry("TitleAlignment", "AlignLeft"); - QRadioButton *alignButton = (QRadioButton*)m_dialog->titleAlign->child(alignValue.latin1()); + TQString alignValue = m_config->readEntry("TitleAlignment", "AlignLeft"); + TQRadioButton *alignButton = (TQRadioButton*)m_dialog->titleAlign->child(alignValue.latin1()); if (alignButton) alignButton->setChecked(true); - QString roundValue = m_config->readEntry("RoundCorners", "NotMaximized"); - QRadioButton *roundButton = (QRadioButton*)m_dialog->roundCorners->child(roundValue.latin1()); + TQString roundValue = m_config->readEntry("RoundCorners", "NotMaximized"); + TQRadioButton *roundButton = (TQRadioButton*)m_dialog->roundCorners->child(roundValue.latin1()); if (roundButton) roundButton->setChecked(true); bool menuClose = m_config->readBoolEntry("CloseOnMenuDoubleClick", false); @@ -147,20 +147,20 @@ void SUSE2Config::load(KConfig *) bool customIconColors = m_config->readBoolEntry("CustomIconColors", false); m_dialog->customIconColors->setChecked(customIconColors); - QColor afgcolor = QColor(10, 20, 40); - QColor aFgColor = m_config->readColorEntry("AFgColor", &afgcolor); + TQColor afgcolor = TQColor(10, 20, 40); + TQColor aFgColor = m_config->readColorEntry("AFgColor", &afgcolor); m_dialog->activeFgColor->setColor(aFgColor); - QColor abgcolor = QColor(210, 220, 240); - QColor aBgColor = m_config->readColorEntry("ABgColor", &abgcolor); + TQColor abgcolor = TQColor(210, 220, 240); + TQColor aBgColor = m_config->readColorEntry("ABgColor", &abgcolor); m_dialog->activeBgColor->setColor(aBgColor); - QColor ifgcolor = QColor(40, 40, 40); - QColor iFgColor = m_config->readColorEntry("IFgColor", &ifgcolor); + TQColor ifgcolor = TQColor(40, 40, 40); + TQColor iFgColor = m_config->readColorEntry("IFgColor", &ifgcolor); m_dialog->inactiveFgColor->setColor(iFgColor); - QColor ibgcolor = QColor(240, 240, 240); - QColor iBgColor = m_config->readColorEntry("AFgColor", &ibgcolor); + TQColor ibgcolor = TQColor(240, 240, 240); + TQColor iBgColor = m_config->readColorEntry("AFgColor", &ibgcolor); m_dialog->inactiveBgColor->setColor(iBgColor); bool iconShadow = m_config->readBoolEntry("IconShadow", true); @@ -172,10 +172,10 @@ void SUSE2Config::load(KConfig *) int titleBarLogoOffset = m_config->readNumEntry("TitleBarLogoOffset", 3); m_dialog->titleBarLogoOffset->setValue(titleBarLogoOffset); - QString titleBarImage = locate("data", "kwin/pics/titlebar_decor.png"); + TQString titleBarImage = locate("data", "kwin/pics/titlebar_decor.png"); titlebarLogoURL = m_config->readEntry("TitleBarLogoURL", titleBarImage); - QImage tmpLogo = QImage::QImage(titlebarLogoURL); - m_dialog->logoImage->setPixmap(QPixmap(tmpLogo.smoothScale(120, 20, QImage::ScaleMin))); + TQImage tmpLogo = TQImage::TQImage(titlebarLogoURL); + m_dialog->logoImage->setPixmap(TQPixmap(tmpLogo.smoothScale(120, 20, TQImage::ScaleMin))); } @@ -183,10 +183,10 @@ void SUSE2Config::save(KConfig *) const { m_config->setGroup("General"); - QRadioButton *alignButton = (QRadioButton*)m_dialog->titleAlign->selected(); - if (alignButton) m_config->writeEntry("TitleAlignment", QString(alignButton->name())); - QRadioButton *roundButton = (QRadioButton*)m_dialog->roundCorners->selected(); - if (roundButton) m_config->writeEntry("RoundCorners", QString(roundButton->name())); + TQRadioButton *alignButton = (TQRadioButton*)m_dialog->titleAlign->selected(); + if (alignButton) m_config->writeEntry("TitleAlignment", TQString(alignButton->name())); + TQRadioButton *roundButton = (TQRadioButton*)m_dialog->roundCorners->selected(); + if (roundButton) m_config->writeEntry("RoundCorners", TQString(roundButton->name())); m_config->writeEntry("CloseOnMenuDoubleClick", m_dialog->menuClose->isChecked()); m_config->writeEntry("TitleShadow", m_dialog->titleShadow->isChecked()); m_config->writeEntry("AddSpace", m_dialog->addSpace->value()); @@ -207,15 +207,15 @@ void SUSE2Config::save(KConfig *) const m_config->writeEntry("TitleBarLogo", m_dialog->titleBarLogo->isChecked()); m_config->writeEntry("TitleBarLogoOffset", m_dialog->titleBarLogoOffset->value()); - m_config->writeEntry("TitleBarLogoURL", QString(titlebarLogoURL)); + m_config->writeEntry("TitleBarLogoURL", TQString(titlebarLogoURL)); m_config->sync(); } void SUSE2Config::defaults() { - QRadioButton *alignButton = (QRadioButton*)m_dialog->titleAlign->child("AlignLeft"); + TQRadioButton *alignButton = (TQRadioButton*)m_dialog->titleAlign->child("AlignLeft"); if (alignButton) alignButton->setChecked(true); - QRadioButton *roundButton = (QRadioButton*)m_dialog->roundCorners->child("NotMaximized"); + TQRadioButton *roundButton = (TQRadioButton*)m_dialog->roundCorners->child("NotMaximized"); if (roundButton) roundButton->setChecked(true); m_dialog->menuClose->setChecked(false); m_dialog->titleShadow->setChecked(true); @@ -229,17 +229,17 @@ void SUSE2Config::defaults() m_dialog->redCloseButton->setChecked(false); m_dialog->iconSize->setValue(45); m_dialog->customIconColors->setChecked(false); - m_dialog->activeFgColor->setColor(QColor(10, 20, 40)); - m_dialog->activeBgColor->setColor(QColor(210, 220, 240)); - m_dialog->inactiveFgColor->setColor(QColor(40, 40, 40)); - m_dialog->inactiveBgColor->setColor(QColor(240, 240, 240)); + m_dialog->activeFgColor->setColor(TQColor(10, 20, 40)); + m_dialog->activeBgColor->setColor(TQColor(210, 220, 240)); + m_dialog->inactiveFgColor->setColor(TQColor(40, 40, 40)); + m_dialog->inactiveBgColor->setColor(TQColor(240, 240, 240)); m_dialog->iconShadow->setChecked(true); m_dialog->titleBarLogo->setChecked(false); m_dialog->titleBarLogoOffset->setValue(3); titlebarLogoURL = locate("data", "kwin/pics/titlebar_decor.png"); - QImage tmpLogo = QImage::QImage(titlebarLogoURL); - m_dialog->logoImage->setPixmap(QPixmap(tmpLogo.smoothScale(120, 20, QImage::ScaleMin))); + TQImage tmpLogo = TQImage::TQImage(titlebarLogoURL); + m_dialog->logoImage->setPixmap(TQPixmap(tmpLogo.smoothScale(120, 20, TQImage::ScaleMin))); } void SUSE2Config::toggleIconSettings(bool checked) const @@ -262,8 +262,8 @@ void SUSE2Config::selectImage() KFileItem tmpFileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, logoURL); if (!logoURL.isEmpty() && tmpFileItem.isFile() && tmpFileItem.isReadable()) { titlebarLogoURL = logoURL.path(); - QImage tmpLogo = QImage::QImage(titlebarLogoURL); - m_dialog->logoImage->setPixmap(QPixmap(tmpLogo.smoothScale(120, 20, QImage::ScaleMin))); + TQImage tmpLogo = TQImage::TQImage(titlebarLogoURL); + m_dialog->logoImage->setPixmap(TQPixmap(tmpLogo.smoothScale(120, 20, TQImage::ScaleMin))); emit changed(); } } @@ -274,7 +274,7 @@ void SUSE2Config::selectImage() extern "C" { - KDE_EXPORT QObject *allocate_config(KConfig *config, QWidget *parent) { + KDE_EXPORT TQObject *allocate_config(KConfig *config, TQWidget *parent) { return (new SUSE2Config(config, parent)); } } -- cgit v1.2.1