diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-04-08 03:06:39 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-04-08 03:06:39 +0200 |
commit | 96603e8acb744f86139b900e45d030ad684b6a4d (patch) | |
tree | bc983a53582ffe8f32e3fa9320eff557f239ea01 /client/config/config.cpp | |
parent | 5d3112684ba2b692a07b0328ad308c402276e51e (diff) | |
download | tde-style-domino-96603e8acb744f86139b900e45d030ad684b6a4d.tar.gz tde-style-domino-96603e8acb744f86139b900e45d030ad684b6a4d.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'client/config/config.cpp')
-rw-r--r-- | client/config/config.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/client/config/config.cpp b/client/config/config.cpp index d7648f0..482c1df 100644 --- a/client/config/config.cpp +++ b/client/config/config.cpp @@ -23,15 +23,15 @@ #include "config.h" #include <kglobal.h> #include <klocale.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qgroupbox.h> -#include <qsettings.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqgroupbox.h> +#include <tqsettings.h> extern "C" { - KDE_EXPORT QObject* allocate_config( KConfig* config, QWidget* parent ) + KDE_EXPORT TQObject* allocate_config( KConfig* config, TQWidget* parent ) { return(new DominoConfig(config, parent)); } @@ -40,81 +40,81 @@ extern "C" // NOTE: // 'config' is a pointer to the kwindecoration modules open kwin config, // and is by default set to the "Style" group. -// 'parent' is the parent of the QObject, which is a VBox inside the +// 'parent' is the parent of the TQObject, which is a VBox inside the // Configure tab in kwindecoration -DominoConfig::DominoConfig( KConfig* config, QWidget* parent ) - : QObject( parent ) +DominoConfig::DominoConfig( KConfig* config, TQWidget* parent ) + : TQObject( parent ) { conf = new KConfig("kwindominorc"); KGlobal::locale()->insertCatalogue("kwin_clients"); - vBox = new QVBox( parent ); + vBox = new TQVBox( parent ); - customBorderColor = new QCheckBox( i18n("Custom border color"), vBox ); - QHBox *hbox1 = new QHBox(vBox); - hbox1->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) ); + customBorderColor = new TQCheckBox( i18n("Custom border color"), vBox ); + TQHBox *hbox1 = new TQHBox(vBox); + hbox1->layout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) ); borderColor = new KColorButton(hbox1); - customButtonColor = new QCheckBox( i18n("Custom button color"), vBox ); - QHBox *hbox2 = new QHBox(vBox); - hbox2->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) ); + customButtonColor = new TQCheckBox( i18n("Custom button color"), vBox ); + TQHBox *hbox2 = new TQHBox(vBox); + hbox2->layout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) ); buttonColor = new KColorButton(hbox2); - customButtonIconColor = new QCheckBox( i18n("Custom button icon color"), vBox ); - QHBox *hbox3 = new QHBox(vBox); - hbox3->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) ); + customButtonIconColor = new TQCheckBox( i18n("Custom button icon color"), vBox ); + TQHBox *hbox3 = new TQHBox(vBox); + hbox3->layout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) ); buttonIconColor = new KColorButton(hbox3); - customGradientColors = new QCheckBox( i18n("Custom gradient colors"), vBox); - QHBox *hbox4 = new QHBox(vBox); - hbox4->layout()->addItem(new QSpacerItem(22, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) ); + customGradientColors = new TQCheckBox( i18n("Custom gradient colors"), vBox); + TQHBox *hbox4 = new TQHBox(vBox); + hbox4->layout()->addItem(new TQSpacerItem(22, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) ); - QVBox *vbox1 = new QVBox(hbox4); - new QLabel( i18n("Top gradient color"), vbox1); + TQVBox *vbox1 = new TQVBox(hbox4); + new TQLabel( i18n("Top gradient color"), vbox1); topGradientColor = new KColorButton(vbox1); - new QLabel(i18n("Bottom gradient color"), vbox1); + new TQLabel(i18n("Bottom gradient color"), vbox1); bottomGradientColor = new KColorButton(vbox1); - showInactiveButtons = new QCheckBox( i18n("Show inactive buttons"), vBox ); - showButtonIcons = new QCheckBox( i18n("Show button icons"), vBox ); - darkFrame = new QCheckBox( i18n("Dark window frame"), vBox ); + showInactiveButtons = new TQCheckBox( i18n("Show inactive buttons"), vBox ); + showButtonIcons = new TQCheckBox( i18n("Show button icons"), vBox ); + darkFrame = new TQCheckBox( i18n("Dark window frame"), vBox ); /////////////////////////////////////// - QGroupBox* colorGb = new QGroupBox(vBox); + TQGroupBox* colorGb = new TQGroupBox(vBox); colorGb->setTitle(i18n("Button contour colors:")); - colorGb->setColumnLayout(0, Qt::Vertical ); + colorGb->setColumnLayout(0, TQt::Vertical ); colorGb->layout()->setSpacing( 6 ); colorGb->layout()->setMargin( 11 ); - QGridLayout* gbLayout = new QGridLayout( colorGb->layout(), 4, 2 ); - gbLayout->setAlignment( Qt::AlignTop ); + TQGridLayout* gbLayout = new TQGridLayout( colorGb->layout(), 4, 2 ); + gbLayout->setAlignment( TQt::AlignTop ); - QLabel* labelSC = new QLabel(i18n("Standard color:"), colorGb); + TQLabel* labelSC = new TQLabel(i18n("Standard color:"), colorGb); buttonContourColor = new KColorButton(colorGb); - buttonContourColor->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); - QLabel* labelMC = new QLabel(i18n("Mouseover color:"), colorGb); + buttonContourColor->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum); + TQLabel* labelMC = new TQLabel(i18n("Mouseover color:"), colorGb); buttonMouseOverContourColor = new KColorButton(colorGb); - QLabel* labelPC = new QLabel(i18n("Pressed color:"), colorGb); + TQLabel* labelPC = new TQLabel(i18n("Pressed color:"), colorGb); buttonPressedContourColor = new KColorButton(colorGb); - useDominoStyleContourColors = new QCheckBox( i18n("Use domino style contour colors"), colorGb ); + useDominoStyleContourColors = new TQCheckBox( i18n("Use domino style contour colors"), colorGb ); gbLayout->addMultiCellWidget(useDominoStyleContourColors, 0, 0, 0, 1); gbLayout->addWidget(labelSC, 1, 0); - gbLayout->addItem(new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Minimum) ); + gbLayout->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); gbLayout->addWidget(buttonContourColor, 1, 1); gbLayout->addWidget(labelMC, 2, 0); - gbLayout->addItem(new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Minimum) ); + gbLayout->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); gbLayout->addWidget(buttonMouseOverContourColor, 2, 1); gbLayout->addWidget(labelPC, 3, 0); - gbLayout->addItem(new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Minimum) ); + gbLayout->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); gbLayout->addWidget(buttonPressedContourColor, 3, 1); @@ -139,17 +139,17 @@ DominoConfig::DominoConfig( KConfig* config, QWidget* parent ) connect(customButtonIconColor, SIGNAL(toggled(bool)), buttonIconColor, SLOT(setEnabled(bool))); connect(customGradientColors, SIGNAL(clicked()), this, SLOT(slotSelectionChanged())); - connect(topGradientColor, SIGNAL(changed(const QColor&)), this, SLOT(slotSelectionChanged())); - connect(bottomGradientColor, SIGNAL(changed(const QColor&)), this, SLOT(slotSelectionChanged())); + connect(topGradientColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged())); + connect(bottomGradientColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged())); connect(customBorderColor, SIGNAL(clicked()), this, SLOT(slotSelectionChanged())); - connect(borderColor, SIGNAL(changed(const QColor&)), this, SLOT(slotSelectionChanged())); + connect(borderColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged())); connect(customButtonColor, SIGNAL(clicked()), this, SLOT(slotSelectionChanged())); - connect(buttonColor, SIGNAL(changed(const QColor&)), this, SLOT(slotSelectionChanged())); + connect(buttonColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged())); connect(customButtonIconColor, SIGNAL(clicked()), this, SLOT(slotSelectionChanged())); - connect(buttonIconColor, SIGNAL(changed(const QColor&)), this, SLOT(slotSelectionChanged())); + connect(buttonIconColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged())); connect(showInactiveButtons, SIGNAL(clicked()), this, SLOT(slotSelectionChanged())); connect(showButtonIcons, SIGNAL(clicked()), this, SLOT(slotSelectionChanged())); @@ -157,9 +157,9 @@ DominoConfig::DominoConfig( KConfig* config, QWidget* parent ) connect(useDominoStyleContourColors, SIGNAL(clicked()), this, SLOT(loadButtonContourColors())); connect(useDominoStyleContourColors, SIGNAL(clicked()), this, SLOT(slotSelectionChanged())); - connect(buttonContourColor, SIGNAL(changed(const QColor&)), this, SLOT(slotSelectionChanged())); - connect(buttonMouseOverContourColor, SIGNAL(changed(const QColor&)), this, SLOT(slotSelectionChanged())); - connect(buttonPressedContourColor, SIGNAL(changed(const QColor&)), this, SLOT(slotSelectionChanged())); + connect(buttonContourColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged())); + connect(buttonMouseOverContourColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged())); + connect(buttonPressedContourColor, SIGNAL(changed(const TQColor&)), this, SLOT(slotSelectionChanged())); // Make the widgets visible in kwindecoration valueChanged @@ -245,7 +245,7 @@ void DominoConfig::save(KConfig*) void DominoConfig::defaults() { - QColor background = vBox->paletteBackgroundColor(); + TQColor background = vBox->paletteBackgroundColor(); customBorderColor->setChecked(true); borderColor->setColor("#777B7F"); @@ -269,9 +269,9 @@ void DominoConfig::defaults() void DominoConfig::loadButtonContourColors() { - QColor background = vBox->paletteBackgroundColor(); + TQColor background = vBox->paletteBackgroundColor(); if(useDominoStyleContourColors->isChecked()) { - QSettings s; + TQSettings s; buttonContourColor->setColor(s.readEntry("/domino/Settings/buttonContourColor", background.dark(250).name())); buttonMouseOverContourColor->setColor(s.readEntry("/domino/Settings/buttonMouseOverContourColor", background.dark(250).name())); buttonPressedContourColor->setColor(s.readEntry("/domino/Settings/buttonPressedContourColor", background.dark(250).name())); |