TQt4 port the Lipstik style

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-style-lipstik@1234205 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent b5b99fa4d2
commit 1d95710a43

@ -28,126 +28,126 @@ DEALINGS IN THE SOFTWARE.
*/ */
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qhbox.h> #include <tqhbox.h>
#include <qsettings.h> #include <tqsettings.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <kglobal.h> #include <kglobal.h>
#include <klocale.h> #include <klocale.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
#include <qtabwidget.h> #include <tqtabwidget.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qgrid.h> #include <tqgrid.h>
#include "lipstikconf.h" #include "lipstikconf.h"
extern "C" extern "C"
{ {
QWidget* allocate_kstyle_config(QWidget* parent) TQWidget* allocate_kstyle_config(TQWidget* tqparent)
{ {
KGlobal::locale()->insertCatalogue("kstyle_lipstik_config"); KGlobal::locale()->insertCatalogue("kstyle_lipstik_config");
return new LipstikStyleConfig(parent); return new LipstikStyleConfig(tqparent);
} }
} }
LipstikStyleConfig::LipstikStyleConfig(QWidget* parent): QWidget(parent) LipstikStyleConfig::LipstikStyleConfig(TQWidget* tqparent): TQWidget(tqparent)
{ {
QVBoxLayout* layout = new QVBoxLayout(this, 0, 0); TQVBoxLayout* tqlayout = new TQVBoxLayout(this, 0, 0);
QGridLayout* tabLayout = new QGridLayout(this, 2, 1, 10); TQGridLayout* tabLayout = new TQGridLayout(this, 2, 1, 10);
KGlobal::locale()->insertCatalogue("kstyle_lipstik_config"); KGlobal::locale()->insertCatalogue("kstyle_lipstik_config");
///Init tabs ///Init tabs
QTabWidget *tabWidget = new QTabWidget(this); TQTabWidget *tabWidget = new TQTabWidget(this);
layout->addWidget(tabWidget); tqlayout->addWidget(tabWidget);
///Init tab1 ///Init tab1
QWidget *page1 = new QWidget(tabWidget); TQWidget *page1 = new TQWidget(tabWidget);
layout = new QVBoxLayout(page1); tqlayout = new TQVBoxLayout(page1);
tabWidget->insertTab(page1, i18n("Configuration")); tabWidget->insertTab(page1, i18n("Configuration"));
layout->addLayout(tabLayout); tqlayout->addLayout(tabLayout);
///General group ///General group
QVGroupBox *generalGrp = new QVGroupBox(i18n("General"), page1); TQVGroupBox *generalGrp = new TQVGroupBox(i18n("General"), page1);
reverseGradients = new QCheckBox(i18n("Plastik gradients"), generalGrp ); reverseGradients = new TQCheckBox(i18n("Plastik gradients"), generalGrp );
drawTriangularExpander = new QCheckBox(i18n("Triangular tree expander"), generalGrp); drawTriangularExpander = new TQCheckBox(i18n("Triangular tree expander"), generalGrp);
drawStatusBarFrame = new QCheckBox(i18n("Draw status bar frame"), generalGrp); drawStatusBarFrame = new TQCheckBox(i18n("Draw status bar frame"), generalGrp);
animateProgressBar = new QCheckBox(i18n("Animate progress bars"), generalGrp); animateProgressBar = new TQCheckBox(i18n("Animate progress bars"), generalGrp);
flatHeaders = new QCheckBox(i18n("Flatten column headers"), generalGrp); flatHeaders = new TQCheckBox(i18n("Flatten column headers"), generalGrp);
tickCheckMark = new QCheckBox(i18n("Use a tick for checkmarks"), generalGrp); tickCheckMark = new TQCheckBox(i18n("Use a tick for checkmarks"), generalGrp);
tabLayout->addWidget(generalGrp,0,0,0); tabLayout->addWidget(generalGrp,0,0,0);
///Toolbar group ///Toolbar group
QVGroupBox *toolbarGrp = new QVGroupBox(i18n("Toolbars"), page1); TQVGroupBox *toolbarGrp = new TQVGroupBox(i18n("Toolbars"), page1);
QLabel* toolBarSpacingLabel; TQLabel* toolBarSpacingLabel;
drawToolBarSeparator = new QCheckBox(i18n("Draw separators"), toolbarGrp); drawToolBarSeparator = new TQCheckBox(i18n("Draw separators"), toolbarGrp);
drawToolBarItemSeparator = new QCheckBox(i18n("Draw item separators"), toolbarGrp); drawToolBarItemSeparator = new TQCheckBox(i18n("Draw item separators"), toolbarGrp);
drawToolBarHandle = new QCheckBox(i18n("Draw handles"), toolbarGrp); drawToolBarHandle = new TQCheckBox(i18n("Draw handles"), toolbarGrp);
drawToolBarGradient = new QCheckBox(i18n("Draw gradients"), toolbarGrp); drawToolBarGradient = new TQCheckBox(i18n("Draw gradients"), toolbarGrp);
invertBarGrad = new QCheckBox(i18n("Invert gradients"), toolbarGrp); invertBarGrad = new TQCheckBox(i18n("Invert gradients"), toolbarGrp);
toolBarSpacingLabel = new QLabel(toolbarGrp); toolBarSpacingLabel = new TQLabel(toolbarGrp);
toolBarSpacingLabel->setText(i18n("Items spacing :")); toolBarSpacingLabel->setText(i18n("Items spacing :"));
toolBarSpacing = new QSpinBox ( 0, 6, 1, toolbarGrp ); toolBarSpacing = new TQSpinBox ( 0, 6, 1, toolbarGrp );
tabLayout->addWidget(toolbarGrp,0,1,0); tabLayout->addWidget(toolbarGrp,0,1,0);
///Menus group ///Menus group
QVGroupBox *menusGrp = new QVGroupBox(i18n("Menus"), page1); TQVGroupBox *menusGrp = new TQVGroupBox(i18n("Menus"), page1);
QLabel* menuSpacingLabel; TQLabel* menuSpacingLabel;
alterMenuGradients = new QCheckBox(i18n("Button-like menu gradients"), menusGrp); alterMenuGradients = new TQCheckBox(i18n("Button-like menu gradients"), menusGrp);
sharperMenuGradient = new QCheckBox(i18n("Sharper menu gradients"), menusGrp); sharperMenuGradient = new TQCheckBox(i18n("Sharper menu gradients"), menusGrp);
menuLeftSideBar = new QCheckBox(i18n("Menu Stripe"), menusGrp); menuLeftSideBar = new TQCheckBox(i18n("Menu Stripe"), menusGrp);
flatStripe = new QCheckBox(i18n("Flatten Stripe"), menusGrp); flatStripe = new TQCheckBox(i18n("Flatten Stripe"), menusGrp);
customMenuStripeColor = new QCheckBox(i18n("Custom Stripe color :"), menusGrp); customMenuStripeColor = new TQCheckBox(i18n("Custom Stripe color :"), menusGrp);
QHBox *menuColorBox = new QHBox(menusGrp); TQHBox *menuColorBox = new TQHBox(menusGrp);
menuColorBox->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) ); menuColorBox->tqlayout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
menuStripeColor = new KColorButton(menuColorBox); menuStripeColor = new KColorButton(menuColorBox);
menuSpacingLabel = new QLabel(menusGrp); menuSpacingLabel = new TQLabel(menusGrp);
menuSpacingLabel->setText(i18n("Menu spacing :")); menuSpacingLabel->setText(i18n("Menu spacing :"));
menuSpacing = new QSpinBox ( 0, 8, 1, menusGrp ); menuSpacing = new TQSpinBox ( 0, 8, 1, menusGrp );
tabLayout->addWidget(menusGrp,1,0,0); tabLayout->addWidget(menusGrp,1,0,0);
///Scrollbar group ///Scrollbar group
QVGroupBox *scrollGrp = new QVGroupBox(i18n("Scrollbars and Sliders"), page1); TQVGroupBox *scrollGrp = new TQVGroupBox(i18n("Scrollbars and Sliders"), page1);
QLabel* scrollBarStyleLabel; TQLabel* scrollBarStyleLabel;
QLabel* scrollBarWidthLabel; TQLabel* scrollBarWidthLabel;
QLabel* sliderStyleLabel; TQLabel* sliderStyleLabel;
paintGroove = new QCheckBox(i18n("Draw Scrollbar grooves"), scrollGrp); paintGroove = new TQCheckBox(i18n("Draw Scrollbar grooves"), scrollGrp);
scrollBarStyleLabel = new QLabel(scrollGrp); scrollBarStyleLabel = new TQLabel(scrollGrp);
scrollBarStyleLabel->setText(i18n("Scrollbar style : ")); scrollBarStyleLabel->setText(i18n("Scrollbar style : "));
scrollBarStyle = new QComboBox(i18n("Scrollbar style"), scrollGrp); scrollBarStyle = new TQComboBox(i18n("Scrollbar style"), scrollGrp);
scrollBarStyle->setEditable(false); scrollBarStyle->setEditable(false);
scrollBarStyle->insertItem("Windows style"); scrollBarStyle->insertItem("Windows style");
scrollBarStyle->insertItem("Platinum style"); scrollBarStyle->insertItem("Platinum style");
scrollBarStyle->insertItem("KDE style"); scrollBarStyle->insertItem("KDE style");
scrollBarStyle->insertItem("Next style"); scrollBarStyle->insertItem("Next style");
scrollBarWidthLabel = new QLabel(scrollGrp); scrollBarWidthLabel = new TQLabel(scrollGrp);
scrollBarWidthLabel->setText(i18n("Scrollbar width : ")); scrollBarWidthLabel->setText(i18n("Scrollbar width : "));
scrollBarWidth = new QComboBox(i18n("Scrollbar width"), scrollGrp); scrollBarWidth = new TQComboBox(i18n("Scrollbar width"), scrollGrp);
scrollBarWidth->setEditable(false); scrollBarWidth->setEditable(false);
scrollBarWidth->insertItem("Small"); scrollBarWidth->insertItem("Small");
scrollBarWidth->insertItem("Normal"); scrollBarWidth->insertItem("Normal");
scrollBarWidth->insertItem("Large"); scrollBarWidth->insertItem("Large");
sliderStyleLabel = new QLabel(scrollGrp); sliderStyleLabel = new TQLabel(scrollGrp);
sliderStyleLabel->setText(i18n("Slider handle size : ")); sliderStyleLabel->setText(i18n("Slider handle size : "));
sliderStyle = new QComboBox(i18n("Slider handle size"), scrollGrp); sliderStyle = new TQComboBox(i18n("Slider handle size"), scrollGrp);
sliderStyle->setEditable(false); sliderStyle->setEditable(false);
sliderStyle->insertItem("Small"); sliderStyle->insertItem("Small");
sliderStyle->insertItem("Medium"); sliderStyle->insertItem("Medium");
@ -156,143 +156,143 @@ LipstikStyleConfig::LipstikStyleConfig(QWidget* parent): QWidget(parent)
tabLayout->addWidget(scrollGrp,1,1,0); tabLayout->addWidget(scrollGrp,1,1,0);
///Highlighting group ///Highlighting group
QVGroupBox *lightGrp = new QVGroupBox(i18n("Highlighting"), page1); TQVGroupBox *lightGrp = new TQVGroupBox(i18n("Highlighting"), page1);
drawFocusRect = new QCheckBox(i18n("Colored focus rectangle"), lightGrp); drawFocusRect = new TQCheckBox(i18n("Colored focus rectangle"), lightGrp);
comboboxColored = new QCheckBox(i18n("Colored comboboxes handles"), lightGrp); comboboxColored = new TQCheckBox(i18n("Colored comboboxes handles"), lightGrp);
coloredMenuBar = new QCheckBox(i18n("Colored menu bar items"), lightGrp); coloredMenuBar = new TQCheckBox(i18n("Colored menu bar items"), lightGrp);
drawTabHighlight = new QCheckBox(i18n("Highlight active tab"), lightGrp); drawTabHighlight = new TQCheckBox(i18n("Highlight active tab"), lightGrp);
inputFocusHighlight = new QCheckBox(i18n("Highlight focused input fields"), lightGrp); inputFocusHighlight = new TQCheckBox(i18n("Highlight focused input fields"), lightGrp);
tabLayout->addWidget(lightGrp,0,2,0); tabLayout->addWidget(lightGrp,0,2,0);
///Other colors group ///Other colors group
QVGroupBox *otherGrp = new QVGroupBox(i18n("Custom colors"), page1); TQVGroupBox *otherGrp = new TQVGroupBox(i18n("Custom colors"), page1);
customFocusHighlightColor = new QCheckBox(i18n("Input fields highlight :"), otherGrp); customFocusHighlightColor = new TQCheckBox(i18n("Input fields highlight :"), otherGrp);
QHBox *hbox1 = new QHBox(otherGrp); TQHBox *hbox1 = new TQHBox(otherGrp);
hbox1->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) ); hbox1->tqlayout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
focusHighlightColor = new KColorButton(hbox1); focusHighlightColor = new KColorButton(hbox1);
customOverHighlightColor = new QCheckBox(i18n("Mouse hover highlight :"), otherGrp); customOverHighlightColor = new TQCheckBox(i18n("Mouse hover highlight :"), otherGrp);
QHBox *hbox2 = new QHBox(otherGrp); TQHBox *hbox2 = new TQHBox(otherGrp);
hbox2->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) ); hbox2->tqlayout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
overHighlightColor = new KColorButton(hbox2); overHighlightColor = new KColorButton(hbox2);
customCheckMarkColor = new QCheckBox(i18n("Checkmark/Radiobuttons :"), otherGrp); customCheckMarkColor = new TQCheckBox(i18n("Checkmark/Radiobuttons :"), otherGrp);
QHBox *hbox3 = new QHBox(otherGrp); TQHBox *hbox3 = new TQHBox(otherGrp);
hbox3->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) ); hbox3->tqlayout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
checkMarkColor = new KColorButton(hbox3); checkMarkColor = new KColorButton(hbox3);
customTabHighlightColor = new QCheckBox(i18n("Active tab highlight :"), otherGrp); customTabHighlightColor = new TQCheckBox(i18n("Active tab highlight :"), otherGrp);
QHBox *hbox4 = new QHBox(otherGrp); TQHBox *hbox4 = new TQHBox(otherGrp);
hbox4->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) ); hbox4->tqlayout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
tabHighlightColor = new KColorButton(hbox4); tabHighlightColor = new KColorButton(hbox4);
tabLayout->addWidget(otherGrp,1,2,0); tabLayout->addWidget(otherGrp,1,2,0);
///Init tab2 ///Init tab2
QWidget *page2 = new QWidget(tabWidget); TQWidget *page2 = new TQWidget(tabWidget);
QLabel* lipstikLabel; TQLabel* lipstikLabel;
QLabel* authorLabel; TQLabel* authorLabel;
QLabel* authorAddressLabel; TQLabel* authorAddressLabel;
QLabel* authorWebLabel; TQLabel* authorWebLabel;
QLabel* plastikLabel; TQLabel* plastikLabel;
QLabel* alsoLabel; TQLabel* alsoLabel;
QLabel* cuLabel; TQLabel* cuLabel;
QLabel* dnLabel; TQLabel* dnLabel;
QLabel* pqLabel; TQLabel* pqLabel;
QLabel* cxLabel; TQLabel* cxLabel;
QLabel* kpLabel; TQLabel* kpLabel;
QLabel* blLabel; TQLabel* blLabel;
QLabel* ksLabel; TQLabel* ksLabel;
QLabel* peLabel; TQLabel* peLabel;
QLabel* bastianLabel; TQLabel* bastianLabel;
QLabel* pcbsdLabel; TQLabel* pcbsdLabel;
QLabel* othersLabel; TQLabel* othersLabel;
layout = new QVBoxLayout(page2, 10, -1); tqlayout = new TQVBoxLayout(page2, 10, -1);
tabWidget->insertTab(page2, i18n("About")); tabWidget->insertTab(page2, i18n("About"));
lipstikLabel = new QLabel(page2); lipstikLabel = new TQLabel(page2);
lipstikLabel->setText(i18n("Lipstik 2.2.3")); lipstikLabel->setText(i18n("Lipstik 2.2.3"));
lipstikLabel->setFrameStyle( QFrame::StyledPanel | QFrame::Raised ); lipstikLabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised );
authorLabel = new QLabel(page2); authorLabel = new TQLabel(page2);
authorLabel->setText(i18n(" Copyright 2004-2005-2006-2007 (C) Patrice Tremblay (Poplix)")); authorLabel->setText(i18n(" Copyright 2004-2005-2006-2007 (C) Patrice Tremblay (Poplix)"));
authorAddressLabel = new QLabel(page2); authorAddressLabel = new TQLabel(page2);
authorAddressLabel->setText(i18n(" poplixos@gmail.com")); authorAddressLabel->setText(i18n(" poplixos@gmail.com"));
authorWebLabel = new QLabel(page2); authorWebLabel = new TQLabel(page2);
authorWebLabel->setText(i18n(" http://poplix.homelinux.com/lipstik")); authorWebLabel->setText(i18n(" http://poplix.homelinux.com/lipstik"));
plastikLabel = new QLabel(page2); plastikLabel = new TQLabel(page2);
plastikLabel->setText(i18n("Based on plastik [thanks to Sandro Giessl]")); plastikLabel->setText(i18n("Based on plastik [thanks to Sandro Giessl]"));
alsoLabel = new QLabel(page2); alsoLabel = new TQLabel(page2);
alsoLabel->setText(i18n("Also based on :")); alsoLabel->setText(i18n("Also based on :"));
cuLabel = new QLabel(page2); cuLabel = new TQLabel(page2);
cuLabel->setText(i18n(" QtCurve [thanks to Craig Drummond],")); cuLabel->setText(i18n(" TQtCurve [thanks to Craig Drummond],"));
dnLabel = new QLabel(page2); dnLabel = new TQLabel(page2);
dnLabel->setText(i18n(" DotNET [thanks to Chris Lee],")); dnLabel->setText(i18n(" DotNET [thanks to Chris Lee],"));
pqLabel = new QLabel(page2); pqLabel = new TQLabel(page2);
pqLabel->setText(i18n(" PlastikQ [thanks to Martin Beck],")); pqLabel->setText(i18n(" PlastikQ [thanks to Martin Beck],"));
cxLabel = new QLabel(page2); cxLabel = new TQLabel(page2);
cxLabel->setText(i18n(" Comix [thanks to Jens Luetkens],")); cxLabel->setText(i18n(" Comix [thanks to Jens Luetkens],"));
kpLabel = new QLabel(page2); kpLabel = new TQLabel(page2);
kpLabel->setText(i18n(" Krisp [thanks to Keith Meehl],")); kpLabel->setText(i18n(" Krisp [thanks to Keith Meehl],"));
blLabel = new QLabel(page2); blLabel = new TQLabel(page2);
blLabel->setText(i18n(" Ballistik [thanks to Florian Merz],")); blLabel->setText(i18n(" Ballistik [thanks to Florian Merz],"));
ksLabel = new QLabel(page2); ksLabel = new TQLabel(page2);
ksLabel->setText(i18n(" Kerastik [thanks to Victor Perez Q],")); ksLabel->setText(i18n(" Kerastik [thanks to Victor Perez Q],"));
peLabel = new QLabel(page2); peLabel = new TQLabel(page2);
peLabel->setText(i18n(" Polyester [thanks to Marco Martin].")); peLabel->setText(i18n(" Polyester [thanks to Marco Martin]."));
bastianLabel = new QLabel(page2); bastianLabel = new TQLabel(page2);
bastianLabel->setText(i18n("Thanks to Bastian Venthur, the Debian maintainer of kde-style-lipstik.")); bastianLabel->setText(i18n("Thanks to Bastian Venthur, the Debian maintainer of kde-style-lipstik."));
pcbsdLabel = new QLabel(page2); pcbsdLabel = new TQLabel(page2);
pcbsdLabel->setText(i18n("Thanks to Charles A. Landemaine, of PC-BSD, for the feature suggestion.")); pcbsdLabel->setText(i18n("Thanks to Charles A. Landemaine, of PC-BSD, for the feature suggestion."));
othersLabel = new QLabel(page2); othersLabel = new TQLabel(page2);
othersLabel->setText(i18n("Special thanks to Dominique and all the kde-look.org users.")); othersLabel->setText(i18n("Special thanks to Dominique and all the kde-look.org users."));
layout->add(lipstikLabel); tqlayout->add(lipstikLabel);
layout->add(authorLabel); tqlayout->add(authorLabel);
layout->add(authorAddressLabel); tqlayout->add(authorAddressLabel);
layout->add(authorWebLabel); tqlayout->add(authorWebLabel);
layout->addSpacing(10); tqlayout->addSpacing(10);
layout->add(plastikLabel); tqlayout->add(plastikLabel);
layout->addSpacing(10); tqlayout->addSpacing(10);
layout->add(alsoLabel); tqlayout->add(alsoLabel);
layout->add(cuLabel); tqlayout->add(cuLabel);
layout->add(dnLabel); tqlayout->add(dnLabel);
layout->add(pqLabel); tqlayout->add(pqLabel);
layout->add(cxLabel); tqlayout->add(cxLabel);
layout->add(kpLabel); tqlayout->add(kpLabel);
layout->add(blLabel); tqlayout->add(blLabel);
layout->add(ksLabel); tqlayout->add(ksLabel);
layout->add(peLabel); tqlayout->add(peLabel);
layout->addSpacing(10); tqlayout->addSpacing(10);
layout->add(bastianLabel); tqlayout->add(bastianLabel);
layout->add(pcbsdLabel); tqlayout->add(pcbsdLabel);
layout->add(othersLabel); tqlayout->add(othersLabel);
///Populate! ///Populate!
QSettings s; TQSettings s;
origReverseGradients = s.readBoolEntry("/lipstikstyle/Settings/reverseGradients", false); origReverseGradients = s.readBoolEntry("/lipstikstyle/Settings/reverseGradients", false);
reverseGradients->setChecked(origReverseGradients); reverseGradients->setChecked(origReverseGradients);
@ -375,69 +375,69 @@ LipstikStyleConfig::LipstikStyleConfig(QWidget* parent): QWidget(parent)
origCustomOverHighlightColor = s.readBoolEntry("/lipstikstyle/Settings/customOverHighlightColor", false); origCustomOverHighlightColor = s.readBoolEntry("/lipstikstyle/Settings/customOverHighlightColor", false);
customOverHighlightColor->setChecked(origCustomOverHighlightColor); customOverHighlightColor->setChecked(origCustomOverHighlightColor);
origOverHighlightColor = s.readEntry("/lipstikstyle/Settings/overHighlightColor", "/Qt/KWinPalette/activeBackground"); origOverHighlightColor = s.readEntry("/lipstikstyle/Settings/overHighlightColor", "/TQt/KWinPalette/activeBackground");
overHighlightColor->setColor(origOverHighlightColor); overHighlightColor->setColor(origOverHighlightColor);
origCustomMenuStripeColor = s.readBoolEntry("/lipstikstyle/Settings/customMenuStripeColor", false); origCustomMenuStripeColor = s.readBoolEntry("/lipstikstyle/Settings/customMenuStripeColor", false);
customMenuStripeColor->setChecked(origCustomMenuStripeColor); customMenuStripeColor->setChecked(origCustomMenuStripeColor);
origMenuStripeColor = s.readEntry("/lipstikstyle/Settings/menuStripeColor", "/Qt/KWinPalette/activeBackground"); origMenuStripeColor = s.readEntry("/lipstikstyle/Settings/menuStripeColor", "/TQt/KWinPalette/activeBackground");
menuStripeColor->setColor(origMenuStripeColor); menuStripeColor->setColor(origMenuStripeColor);
origCustomFocusHighlightColor = s.readBoolEntry("/lipstikstyle/Settings/customFocusHighlightColor", false); origCustomFocusHighlightColor = s.readBoolEntry("/lipstikstyle/Settings/customFocusHighlightColor", false);
customFocusHighlightColor->setChecked(origCustomFocusHighlightColor); customFocusHighlightColor->setChecked(origCustomFocusHighlightColor);
origFocusHighlightColor = s.readEntry("/lipstikstyle/Settings/focusHighlightColor", "/Qt/KWinPalette/activeBackground"); origFocusHighlightColor = s.readEntry("/lipstikstyle/Settings/focusHighlightColor", "/TQt/KWinPalette/activeBackground");
focusHighlightColor->setColor(origFocusHighlightColor); focusHighlightColor->setColor(origFocusHighlightColor);
origCustomCheckMarkColor = s.readBoolEntry("/lipstikstyle/Settings/customCheckMarkColor", false); origCustomCheckMarkColor = s.readBoolEntry("/lipstikstyle/Settings/customCheckMarkColor", false);
customCheckMarkColor->setChecked(origCustomCheckMarkColor); customCheckMarkColor->setChecked(origCustomCheckMarkColor);
origCheckMarkColor = s.readEntry("/lipstikstyle/Settings/checkMarkColor", "/Qt/KWinPalette/activeBackground"); origCheckMarkColor = s.readEntry("/lipstikstyle/Settings/checkMarkColor", "/TQt/KWinPalette/activeBackground");
checkMarkColor->setColor(origCheckMarkColor); checkMarkColor->setColor(origCheckMarkColor);
origCustomTabHighlightColor = s.readBoolEntry("/lipstikstyle/Settings/customTabHighlightColor", false); origCustomTabHighlightColor = s.readBoolEntry("/lipstikstyle/Settings/customTabHighlightColor", false);
customTabHighlightColor->setChecked(origCustomTabHighlightColor); customTabHighlightColor->setChecked(origCustomTabHighlightColor);
origTabHighlightColor = s.readEntry("/lipstikstyle/Settings/tabHighlightColor", "/Qt/KWinPalette/activeBackground"); origTabHighlightColor = s.readEntry("/lipstikstyle/Settings/tabHighlightColor", "/TQt/KWinPalette/activeBackground");
tabHighlightColor->setColor(origTabHighlightColor); tabHighlightColor->setColor(origTabHighlightColor);
connect(reverseGradients, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(reverseGradients, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(paintGroove, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(paintGroove, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(sharperMenuGradient, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(sharperMenuGradient, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(alterMenuGradients, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(alterMenuGradients, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(menuLeftSideBar, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(menuLeftSideBar, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(flatStripe, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(flatStripe, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(drawStatusBarFrame, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(drawStatusBarFrame, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(drawToolBarHandle, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(drawToolBarHandle, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(comboboxColored, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(comboboxColored, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(coloredMenuBar, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(coloredMenuBar, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(drawTabHighlight, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(drawTabHighlight, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(menuSpacing, SIGNAL( valueChanged(int) ), SLOT( updateChanged() ) ); connect(menuSpacing, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updateChanged() ) );
connect(toolBarSpacing, SIGNAL( valueChanged(int) ), SLOT( updateChanged() ) ); connect(toolBarSpacing, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updateChanged() ) );
connect(scrollBarStyle, SIGNAL( activated(int) ), SLOT( updateChanged() ) ); connect(scrollBarStyle, TQT_SIGNAL( activated(int) ), TQT_SLOT( updateChanged() ) );
connect(scrollBarWidth, SIGNAL( activated(int) ), SLOT( updateChanged() ) ); connect(scrollBarWidth, TQT_SIGNAL( activated(int) ), TQT_SLOT( updateChanged() ) );
connect(sliderStyle, SIGNAL( activated(int) ), SLOT( updateChanged() ) ); connect(sliderStyle, TQT_SIGNAL( activated(int) ), TQT_SLOT( updateChanged() ) );
connect(animateProgressBar, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(animateProgressBar, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(drawToolBarSeparator, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(drawToolBarSeparator, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(drawToolBarGradient, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(drawToolBarGradient, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(invertBarGrad, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(invertBarGrad, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(drawToolBarItemSeparator, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(drawToolBarItemSeparator, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(drawFocusRect, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(drawFocusRect, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(flatHeaders, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(flatHeaders, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(tickCheckMark, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(tickCheckMark, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(drawTriangularExpander, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(drawTriangularExpander, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(inputFocusHighlight, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(inputFocusHighlight, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(customOverHighlightColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(customOverHighlightColor, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(overHighlightColor, SIGNAL( pressed() ), SLOT( updateChanged() ) ); connect(overHighlightColor, TQT_SIGNAL( pressed() ), TQT_SLOT( updateChanged() ) );
connect(customMenuStripeColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(customMenuStripeColor, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(menuStripeColor, SIGNAL( pressed() ), SLOT( updateChanged() ) ); connect(menuStripeColor, TQT_SIGNAL( pressed() ), TQT_SLOT( updateChanged() ) );
connect(customFocusHighlightColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(customFocusHighlightColor, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(focusHighlightColor, SIGNAL( pressed() ), SLOT( updateChanged() ) ); connect(focusHighlightColor, TQT_SIGNAL( pressed() ), TQT_SLOT( updateChanged() ) );
connect(customCheckMarkColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(customCheckMarkColor, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(checkMarkColor, SIGNAL( pressed() ), SLOT( updateChanged() ) ); connect(checkMarkColor, TQT_SIGNAL( pressed() ), TQT_SLOT( updateChanged() ) );
connect(customTabHighlightColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(customTabHighlightColor, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
connect(tabHighlightColor, SIGNAL( pressed() ), SLOT( updateChanged() ) ); connect(tabHighlightColor, TQT_SIGNAL( pressed() ), TQT_SLOT( updateChanged() ) );
//Menu Stripe //Menu Stripe
if ( menuLeftSideBar->isChecked() ) { if ( menuLeftSideBar->isChecked() ) {
@ -496,7 +496,7 @@ LipstikStyleConfig::~LipstikStyleConfig()
void LipstikStyleConfig::save() void LipstikStyleConfig::save()
{ {
QSettings s; TQSettings s;
s.writeEntry("/lipstikstyle/Settings/reverseGradients", reverseGradients->isChecked()); s.writeEntry("/lipstikstyle/Settings/reverseGradients", reverseGradients->isChecked());
s.writeEntry("/lipstikstyle/Settings/paintGroove", paintGroove->isChecked()); s.writeEntry("/lipstikstyle/Settings/paintGroove", paintGroove->isChecked());
s.writeEntry("/lipstikstyle/Settings/sharperMenuGradient", sharperMenuGradient->isChecked()); s.writeEntry("/lipstikstyle/Settings/sharperMenuGradient", sharperMenuGradient->isChecked());
@ -524,15 +524,15 @@ void LipstikStyleConfig::save()
s.writeEntry("/lipstikstyle/Settings/drawTriangularExpander", drawTriangularExpander->isChecked()); s.writeEntry("/lipstikstyle/Settings/drawTriangularExpander", drawTriangularExpander->isChecked());
s.writeEntry("/lipstikstyle/Settings/inputFocusHighlight", inputFocusHighlight->isChecked()); s.writeEntry("/lipstikstyle/Settings/inputFocusHighlight", inputFocusHighlight->isChecked());
s.writeEntry("/lipstikstyle/Settings/customOverHighlightColor", customOverHighlightColor->isChecked()); s.writeEntry("/lipstikstyle/Settings/customOverHighlightColor", customOverHighlightColor->isChecked());
s.writeEntry("/lipstikstyle/Settings/overHighlightColor", QColor(overHighlightColor->color()).name()); s.writeEntry("/lipstikstyle/Settings/overHighlightColor", TQColor(overHighlightColor->color()).name());
s.writeEntry("/lipstikstyle/Settings/customMenuStripeColor", customMenuStripeColor->isChecked()); s.writeEntry("/lipstikstyle/Settings/customMenuStripeColor", customMenuStripeColor->isChecked());
s.writeEntry("/lipstikstyle/Settings/menuStripeColor", QColor(menuStripeColor->color()).name()); s.writeEntry("/lipstikstyle/Settings/menuStripeColor", TQColor(menuStripeColor->color()).name());
s.writeEntry("/lipstikstyle/Settings/customFocusHighlightColor", customFocusHighlightColor->isChecked()); s.writeEntry("/lipstikstyle/Settings/customFocusHighlightColor", customFocusHighlightColor->isChecked());
s.writeEntry("/lipstikstyle/Settings/focusHighlightColor", QColor(focusHighlightColor->color()).name()); s.writeEntry("/lipstikstyle/Settings/focusHighlightColor", TQColor(focusHighlightColor->color()).name());
s.writeEntry("/lipstikstyle/Settings/customCheckMarkColor", customCheckMarkColor->isChecked()); s.writeEntry("/lipstikstyle/Settings/customCheckMarkColor", customCheckMarkColor->isChecked());
s.writeEntry("/lipstikstyle/Settings/checkMarkColor", QColor(checkMarkColor->color()).name()); s.writeEntry("/lipstikstyle/Settings/checkMarkColor", TQColor(checkMarkColor->color()).name());
s.writeEntry("/lipstikstyle/Settings/customTabHighlightColor", customTabHighlightColor->isChecked()); s.writeEntry("/lipstikstyle/Settings/customTabHighlightColor", customTabHighlightColor->isChecked());
s.writeEntry("/lipstikstyle/Settings/tabHighlightColor", QColor(tabHighlightColor->color()).name()); s.writeEntry("/lipstikstyle/Settings/tabHighlightColor", TQColor(tabHighlightColor->color()).name());
} }
void LipstikStyleConfig::defaults() void LipstikStyleConfig::defaults()
@ -564,15 +564,15 @@ void LipstikStyleConfig::defaults()
drawTriangularExpander->setChecked(false); drawTriangularExpander->setChecked(false);
inputFocusHighlight->setChecked(true); inputFocusHighlight->setChecked(true);
customOverHighlightColor->setChecked(false); customOverHighlightColor->setChecked(false);
overHighlightColor->setColor("/Qt/KWinPalette/activeBackground"); overHighlightColor->setColor("/TQt/KWinPalette/activeBackground");
customMenuStripeColor->setChecked(false); customMenuStripeColor->setChecked(false);
menuStripeColor->setColor("/Qt/KWinPalette/activeBackground"); menuStripeColor->setColor("/TQt/KWinPalette/activeBackground");
customFocusHighlightColor->setChecked(false); customFocusHighlightColor->setChecked(false);
focusHighlightColor->setColor("/Qt/KWinPalette/activeBackground"); focusHighlightColor->setColor("/TQt/KWinPalette/activeBackground");
customCheckMarkColor->setChecked(false); customCheckMarkColor->setChecked(false);
checkMarkColor->setColor("/Qt/KWinPalette/activeBackground"); checkMarkColor->setColor("/TQt/KWinPalette/activeBackground");
customTabHighlightColor->setChecked(false); customTabHighlightColor->setChecked(false);
tabHighlightColor->setColor("/Qt/KWinPalette/activeBackground"); tabHighlightColor->setColor("/TQt/KWinPalette/activeBackground");
//updateChanged would be done by setChecked already //updateChanged would be done by setChecked already
} }
@ -677,23 +677,23 @@ void LipstikStyleConfig::updateChanged()
} }
//Scrollbar types //Scrollbar types
QString LipstikStyleConfig::scrollBarType( int listnr ) TQString LipstikStyleConfig::scrollBarType( int listnr )
{ {
switch ( listnr ) { switch ( listnr ) {
case 0: case 0:
return QString("WindowsStyleScrollBar"); return TQString("WindowsStyleScrollBar");
case 1: case 1:
return QString("PlatinumStyleScrollBar"); return TQString("PlatinumStyleScrollBar");
case 2: case 2:
return QString("ThreeButtonScrollBar"); return TQString("ThreeButtonScrollBar");
case 3: case 3:
return QString("NextStyleScrollBar"); return TQString("NextStyleScrollBar");
default: default:
return QString("PlatinumStyleScrollBar"); return TQString("PlatinumStyleScrollBar");
} }
} }
int LipstikStyleConfig::scrollBarItem( QString kSBType ) int LipstikStyleConfig::scrollBarItem( TQString kSBType )
{ {
if( !strcmp(kSBType,"WindowsStyleScrollBar") ) if( !strcmp(kSBType,"WindowsStyleScrollBar") )
return 0; return 0;
@ -708,21 +708,21 @@ int LipstikStyleConfig::scrollBarItem( QString kSBType )
} }
//Scrollbar Widths //Scrollbar Widths
QString LipstikStyleConfig::scrollBarWidthType( int widthListnr ) TQString LipstikStyleConfig::scrollBarWidthType( int widthListnr )
{ {
switch ( widthListnr ) { switch ( widthListnr ) {
case 0: case 0:
return QString("Small"); return TQString("Small");
case 1: case 1:
return QString("Normal"); return TQString("Normal");
case 2: case 2:
return QString("Large"); return TQString("Large");
default: default:
return QString("Small"); return TQString("Small");
} }
} }
int LipstikStyleConfig::scrollBarWidthItem( QString kSBWidthType ) int LipstikStyleConfig::scrollBarWidthItem( TQString kSBWidthType )
{ {
if( !strcmp(kSBWidthType,"Small") ) if( !strcmp(kSBWidthType,"Small") )
return 0; return 0;
@ -735,7 +735,7 @@ int LipstikStyleConfig::scrollBarWidthItem( QString kSBWidthType )
} }
//Slider types //Slider types
int LipstikStyleConfig::sliderItem( QString kSliderType ) int LipstikStyleConfig::sliderItem( TQString kSliderType )
{ {
if( !strcmp(kSliderType,"sliderPlastikStyle") ) if( !strcmp(kSliderType,"sliderPlastikStyle") )
return 0; return 0;
@ -747,17 +747,17 @@ int LipstikStyleConfig::sliderItem( QString kSliderType )
return 2; return 2;
} }
QString LipstikStyleConfig::sliderType( int sliderlistnr ) TQString LipstikStyleConfig::sliderType( int sliderlistnr )
{ {
switch ( sliderlistnr ) { switch ( sliderlistnr ) {
case 0: case 0:
return QString("sliderPlastikStyle"); return TQString("sliderPlastikStyle");
case 1: case 1:
return QString("sliderLipstikStyle"); return TQString("sliderLipstikStyle");
case 2: case 2:
return QString("sliderGtkStyle"); return TQString("sliderGtkStyle");
default: default:
return QString("sliderGtkStyle"); return TQString("sliderGtkStyle");
} }
} }

@ -31,13 +31,14 @@ DEALINGS IN THE SOFTWARE.
#ifndef LIPSTIK_CONF_H #ifndef LIPSTIK_CONF_H
#define LIPSTIK_CONF_H #define LIPSTIK_CONF_H
class QCheckBox; class TQCheckBox;
class LipstikStyleConfig: public QWidget class LipstikStyleConfig: public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
LipstikStyleConfig(QWidget* parent); LipstikStyleConfig(TQWidget* tqparent);
~LipstikStyleConfig(); ~LipstikStyleConfig();
//This signal and the next two slots are the plugin //This signal and the next two slots are the plugin
@ -56,57 +57,57 @@ protected slots:
protected: protected:
//We store settings directly in widgets to //We store settings directly in widgets to
//avoid the hassle of sync'ing things //avoid the hassle of sync'ing things
QCheckBox* animateProgressBar; TQCheckBox* animateProgressBar;
QCheckBox* reverseGradients; TQCheckBox* reverseGradients;
QString scrollBarType( int listnr ); TQString scrollBarType( int listnr );
int scrollBarItem( QString kSBType ); int scrollBarItem( TQString kSBType );
QComboBox* scrollBarStyle; TQComboBox* scrollBarStyle;
QString scrollBarWidthType( int widthListnr ); TQString scrollBarWidthType( int widthListnr );
int scrollBarWidthItem( QString kSBWidth ); int scrollBarWidthItem( TQString kSBWidth );
QComboBox* scrollBarWidth; TQComboBox* scrollBarWidth;
QString sliderType( int sliderlistnr ); TQString sliderType( int sliderlistnr );
int sliderItem( QString kSliderType ); int sliderItem( TQString kSliderType );
QComboBox* sliderStyle; TQComboBox* sliderStyle;
QSpinBox* menuSpacing; TQSpinBox* menuSpacing;
QSpinBox* toolBarSpacing; TQSpinBox* toolBarSpacing;
QCheckBox* paintGroove; TQCheckBox* paintGroove;
QCheckBox* sharperMenuGradient; TQCheckBox* sharperMenuGradient;
QCheckBox* alterMenuGradients; TQCheckBox* alterMenuGradients;
QCheckBox* menuLeftSideBar; TQCheckBox* menuLeftSideBar;
QCheckBox* drawStatusBarFrame; TQCheckBox* drawStatusBarFrame;
QCheckBox* drawToolBarHandle; TQCheckBox* drawToolBarHandle;
QCheckBox* comboboxColored; TQCheckBox* comboboxColored;
QCheckBox* coloredMenuBar; TQCheckBox* coloredMenuBar;
QCheckBox* kickerHighlight; TQCheckBox* kickerHighlight;
QCheckBox* drawTabHighlight; TQCheckBox* drawTabHighlight;
QCheckBox* flatStripe; TQCheckBox* flatStripe;
QCheckBox* compressedMenus; TQCheckBox* compressedMenus;
QCheckBox* drawToolBarSeparator; TQCheckBox* drawToolBarSeparator;
QCheckBox* drawToolBarGradient; TQCheckBox* drawToolBarGradient;
QCheckBox* invertBarGrad; TQCheckBox* invertBarGrad;
QCheckBox* drawToolBarItemSeparator; TQCheckBox* drawToolBarItemSeparator;
QCheckBox* drawFocusRect; TQCheckBox* drawFocusRect;
QCheckBox* newKickerButtons; TQCheckBox* newKickerButtons;
QCheckBox* flatHeaders; TQCheckBox* flatHeaders;
QCheckBox* tickCheckMark; TQCheckBox* tickCheckMark;
QCheckBox* drawTriangularExpander; TQCheckBox* drawTriangularExpander;
QCheckBox* inputFocusHighlight; TQCheckBox* inputFocusHighlight;
QCheckBox* customOverHighlightColor; TQCheckBox* customOverHighlightColor;
KColorButton* overHighlightColor; KColorButton* overHighlightColor;
QCheckBox* customMenuStripeColor; TQCheckBox* customMenuStripeColor;
KColorButton* menuStripeColor; KColorButton* menuStripeColor;
QCheckBox* customFocusHighlightColor; TQCheckBox* customFocusHighlightColor;
KColorButton* focusHighlightColor; KColorButton* focusHighlightColor;
QCheckBox* customCheckMarkColor; TQCheckBox* customCheckMarkColor;
KColorButton* checkMarkColor; KColorButton* checkMarkColor;
QCheckBox* customTabHighlightColor; TQCheckBox* customTabHighlightColor;
KColorButton* tabHighlightColor; KColorButton* tabHighlightColor;
//Original settings, for accurate dirtiness tracking //Original settings, for accurate dirtiness tracking
@ -135,20 +136,20 @@ protected:
bool origDrawTriangularExpander; bool origDrawTriangularExpander;
bool origInputFocusHighlight; bool origInputFocusHighlight;
bool origCustomOverHighlightColor; bool origCustomOverHighlightColor;
QColor origOverHighlightColor; TQColor origOverHighlightColor;
bool origCustomMenuStripeColor; bool origCustomMenuStripeColor;
QColor origMenuStripeColor; TQColor origMenuStripeColor;
bool origCustomFocusHighlightColor; bool origCustomFocusHighlightColor;
QColor origFocusHighlightColor; TQColor origFocusHighlightColor;
bool origCustomCheckMarkColor; bool origCustomCheckMarkColor;
QColor origCheckMarkColor; TQColor origCheckMarkColor;
bool origCustomTabHighlightColor; bool origCustomTabHighlightColor;
QColor origTabHighlightColor; TQColor origTabHighlightColor;
QString origScrollBarStyle; TQString origScrollBarStyle;
QString origScrollBarWidth; TQString origScrollBarWidth;
QString origSliderStyle; TQString origSliderStyle;
int origMenuSpacing; int origMenuSpacing;
int origToolBarSpacing; int origToolBarSpacing;

File diff suppressed because it is too large Load Diff

@ -19,7 +19,7 @@
(c) 2002,2003 Maksim Orlovich <mo002j@mail.rochester.edu> (c) 2002,2003 Maksim Orlovich <mo002j@mail.rochester.edu>
based on the KDE3 HighColor Style based on the KDE3 HighColor Style
Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org> Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
(C) 2001-2002 Fredrik Höglund <fredrik@kde.org> (C) 2001-2002 Fredrik H<EFBFBD>glund <fredrik@kde.org>
Drawing routines adapted from the KDE2 HCStyle, Drawing routines adapted from the KDE2 HCStyle,
Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org> Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
(C) 2000 Dirk Mueller <mueller@kde.org> (C) 2000 Dirk Mueller <mueller@kde.org>
@ -46,92 +46,93 @@
#define __LIPSTIK_H #define __LIPSTIK_H
#include <kstyle.h> #include <kstyle.h>
#include <qbitmap.h> #include <tqbitmap.h>
#include <qintcache.h> #include <tqintcache.h>
#define u_arrow -4,1, 2,1, -3,0, 1,0, -2,-1, 0,-1, -1,-2 #define u_arrow -4,1, 2,1, -3,0, 1,0, -2,-1, 0,-1, -1,-2
#define d_arrow -4,-2, 2,-2, -3,-1, 1,-1, -2,0, 0,0, -1,1 #define d_arrow -4,-2, 2,-2, -3,-1, 1,-1, -2,0, 0,0, -1,1
#define l_arrow 0,-3, 0,3,-1,-2,-1,2,-2,-1,-2,1,-3,0 #define l_arrow 0,-3, 0,3,-1,-2,-1,2,-2,-1,-2,1,-3,0
#define r_arrow -2,-3,-2,3,-1,-2, -1,2,0,-1,0,1,1,0 #define r_arrow -2,-3,-2,3,-1,-2, -1,2,0,-1,0,1,1,0
#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2) #define TQCOORDARRLEN(x) sizeof(x)/(sizeof(TQCOORD)*2)
class QSettings; class TQSettings;
class QTab; class TQTab;
class QTimer; class TQTimer;
class LipstikStyle : public KStyle class LipstikStyle : public KStyle
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
LipstikStyle(); LipstikStyle();
virtual ~LipstikStyle(); virtual ~LipstikStyle();
void polish(QApplication* app ); void polish(TQApplication* app );
void polish(QWidget* widget ); void polish(TQWidget* widget );
void unPolish(QWidget* widget ); void unPolish(TQWidget* widget );
void drawKStylePrimitive(KStylePrimitive kpe, void drawKStylePrimitive(KStylePrimitive kpe,
QPainter* p, TQPainter* p,
const QWidget* widget, const TQWidget* widget,
const QRect &r, const TQRect &r,
const QColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const QStyleOption& = QStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::Default ) const;
void drawPrimitive(PrimitiveElement pe, void tqdrawPrimitive(PrimitiveElement pe,
QPainter *p, TQPainter *p,
const QRect &r, const TQRect &r,
const QColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const QStyleOption &opt = QStyleOption::Default ) const; const TQStyleOption &opt = TQStyleOption::Default ) const;
void drawControl(ControlElement element, void tqdrawControl(ControlElement element,
QPainter *p, TQPainter *p,
const QWidget *widget, const TQWidget *widget,
const QRect &r, const TQRect &r,
const QColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const QStyleOption& = QStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::Default ) const;
void drawControlMask( ControlElement, QPainter *, const QWidget *, const QRect &, const QStyleOption &) const; void tqdrawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const;
void drawComplexControl(ComplexControl control, void tqdrawComplexControl(ComplexControl control,
QPainter *p, TQPainter *p,
const QWidget *widget, const TQWidget *widget,
const QRect &r, const TQRect &r,
const QColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
SCFlags controls = SC_All, SCFlags controls = SC_All,
SCFlags active = SC_None, SCFlags active = SC_None,
const QStyleOption& = QStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::Default ) const;
int pixelMetric(PixelMetric m, int tqpixelMetric(PixelMetric m,
const QWidget *widget = 0 ) const; const TQWidget *widget = 0 ) const;
QRect subRect(SubRect r, TQRect subRect(SubRect r,
const QWidget *widget ) const; const TQWidget *widget ) const;
QRect querySubControlMetrics(ComplexControl control, TQRect querySubControlMetrics(ComplexControl control,
const QWidget *widget, const TQWidget *widget,
SubControl subcontrol, SubControl subcontrol,
const QStyleOption &opt = QStyleOption::Default ) const; const TQStyleOption &opt = TQStyleOption::Default ) const;
void drawComplexControlMask(QStyle::ComplexControl c, void tqdrawComplexControlMask(TQStyle::ComplexControl c,
QPainter *p, TQPainter *p,
const QWidget *w, const TQWidget *w,
const QRect &r, const TQRect &r,
const QStyleOption &o=QStyleOption::Default) const; const TQStyleOption &o=TQStyleOption::Default) const;
QSize sizeFromContents(QStyle::ContentsType t, TQSize tqsizeFromContents(TQStyle::ContentsType t,
const QWidget *w, const TQWidget *w,
const QSize &s, const TQSize &s,
const QStyleOption &o) const; const TQStyleOption &o) const;
int styleHint(StyleHint, const QWidget * = 0, int tqstyleHint(StyleHint, const TQWidget * = 0,
const QStyleOption & = QStyleOption::Default, const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const; TQStyleHintReturn * = 0 ) const;
protected: protected:
enum TabPosition enum TabPosition
@ -191,66 +192,66 @@ protected:
Draw_AlphaBlend = 0x00020000 Draw_AlphaBlend = 0x00020000
}; };
void renderContour(QPainter *p, void renderContour(TQPainter *p,
const QRect &r, const TQRect &r,
const QColor &backgroundColor, const TQColor &backgroundColor,
const QColor &contourColor, const TQColor &contourColor,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom| const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const; Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
void renderMask(QPainter *p, void renderMask(TQPainter *p,
const QRect &r, const TQRect &r,
const QColor &color, const TQColor &color,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom| const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const; Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
void renderSurface(QPainter *p, void renderSurface(TQPainter *p,
const QRect &r, const TQRect &r,
const QColor &backgroundColor, const TQColor &backgroundColor,
const QColor &buttonColor, const TQColor &buttonColor,
const QColor &highlightColor, const TQColor &highlightColor,
int intensity = 5, int intensity = 5,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom| const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight| Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight|
Is_Horizontal) const; Is_Horizontal) const;
inline void renderPixel(QPainter *p, inline void renderPixel(TQPainter *p,
const QPoint &pos, const TQPoint &pos,
const int alpha, const int alpha,
const QColor &color, const TQColor &color,
const QColor &background = QColor(), const TQColor &background = TQColor(),
bool fullAlphaBlend = true) const; bool fullAlphaBlend = true) const;
void renderButton(QPainter *p, void renderButton(TQPainter *p,
const QRect &r, const TQRect &r,
const QColorGroup &g, const TQColorGroup &g,
bool sunken = false, bool sunken = false,
bool mouseOver = false, bool mouseOver = false,
bool horizontal = true, bool horizontal = true,
bool enabled = true, bool enabled = true,
bool khtmlMode = false) const; bool khtmlMode = false) const;
void renderPanel(QPainter *p, void renderPanel(TQPainter *p,
const QRect &r, const TQRect &r,
const QColorGroup &g, const TQColorGroup &g,
const bool pseudo3d = true, const bool pseudo3d = true,
const bool sunken = true) const; const bool sunken = true) const;
void renderDot(QPainter *p, void renderDot(TQPainter *p,
const QPoint &point, const TQPoint &point,
const QColor &baseColor, const TQColor &baseColor,
const bool thick = false, const bool thick = false,
const bool sunken = false) const; const bool sunken = false) const;
void renderGradient(QPainter *p, void renderGradient(TQPainter *p,
const QRect &r, const TQRect &r,
const QColor &c1, const TQColor &c1,
const QColor &c2, const TQColor &c2,
bool horizontal = true) const; bool horizontal = true) const;
void renderTab(QPainter *p, void renderTab(TQPainter *p,
const QRect &r, const TQRect &r,
const QColorGroup &g, const TQColorGroup &g,
bool mouseOver = false, bool mouseOver = false,
const bool selected = false, const bool selected = false,
const bool bottom = false, const bool bottom = false,
@ -258,21 +259,21 @@ protected:
const bool triangular = false, const bool triangular = false,
const bool cornerWidget = false) const; const bool cornerWidget = false) const;
virtual void renderMenuBlendPixmap( KPixmap& pix, const QColorGroup& cg, virtual void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup& cg,
const QPopupMenu* popup ) const; const TQPopupMenu* popup ) const;
bool eventFilter(QObject *, QEvent *); bool eventFilter(TQObject *, TQEvent *);
QWidget* hoverWidget; TQWidget* hoverWidget;
protected slots: protected slots:
void khtmlWidgetDestroyed(QObject* w); void khtmlWidgetDestroyed(TQObject* w);
//Animation slots. //Animation slots.
void updateProgressPos(); void updateProgressPos();
void progressBarDestroyed(QObject* bar); void progressBarDestroyed(TQObject* bar);
inline QColor getColor(const QColorGroup &cg, const ColorType t, const bool enabled = true)const; inline TQColor getColor(const TQColorGroup &cg, const ColorType t, const bool enabled = true)const;
inline QColor getColor(const QColorGroup &cg, const ColorType t, const WidgetState s)const; inline TQColor getColor(const TQColorGroup &cg, const ColorType t, const WidgetState s)const;
private: private:
// Disable copy constructor and = operator // Disable copy constructor and = operator
LipstikStyle( const LipstikStyle & ); LipstikStyle( const LipstikStyle & );
@ -313,25 +314,25 @@ private:
bool _tickCheckMark; bool _tickCheckMark;
bool _flatStripe; bool _flatStripe;
QString _scrollBarStyle; TQString _scrollBarStyle;
QString _scrollBarWidth; TQString _scrollBarWidth;
QString _sliderStyle; TQString _sliderStyle;
QColor _overHighlightColor; TQColor _overHighlightColor;
QColor _focusHighlightColor; TQColor _focusHighlightColor;
QColor _checkMarkColor; TQColor _checkMarkColor;
QColor _tabHighlightColor; TQColor _tabHighlightColor;
QColor _menuStripeColor; TQColor _menuStripeColor;
QColor _defaultMenuStripeColor; TQColor _defaultMenuStripeColor;
// QColor _arrowColor; // TQColor _arrowColor;
QTab *hoverTab; TQTab *hoverTab;
// track khtml widgets. // track khtml widgets.
QMap<const QWidget*,bool> khtmlWidgets; TQMap<const TQWidget*,bool> khtmlWidgets;
//Animation support. //Animation support.
QMap<QWidget*, int> progAnimWidgets; TQMap<TQWidget*, int> progAnimWidgets;
// pixmap cache. // pixmap cache.
enum CacheEntryType { enum CacheEntryType {
@ -344,14 +345,14 @@ private:
CacheEntryType type; CacheEntryType type;
int width; int width;
int height; int height;
QRgb c1Rgb; TQRgb c1Rgb;
QRgb c2Rgb; TQRgb c2Rgb;
bool horizontal; bool horizontal;
QPixmap* pixmap; TQPixmap* pixmap;
CacheEntry(CacheEntryType t, int w, int h, QRgb c1, QRgb c2 = 0, CacheEntry(CacheEntryType t, int w, int h, TQRgb c1, TQRgb c2 = 0,
bool hor = false, QPixmap* p = 0 ): bool hor = false, TQPixmap* p = 0 ):
type(t), width(w), height(h), c1Rgb(c1), c2Rgb(c2), horizontal(hor), pixmap(p) type(t), width(w), height(h), c1Rgb(c1), c2Rgb(c2), horizontal(hor), pixmap(p)
{} {}
@ -362,7 +363,7 @@ private:
int key() int key()
{ {
// create an int key from the properties which is used to refer to entries in the QIntCache. // create an int key from the properties which is used to refer to entries in the TQIntCache.
// the result may not be 100% correct as we don't have so much space in one integer -- use // the result may not be 100% correct as we don't have so much space in one integer -- use
// == operator after find to make sure we got the right one. :) // == operator after find to make sure we got the right one. :)
return horizontal ^ (type<<1) ^ (width<<5) ^ (height<<10) ^ (c1Rgb<<19) ^ (c2Rgb<<22); return horizontal ^ (type<<1) ^ (width<<5) ^ (height<<10) ^ (c1Rgb<<19) ^ (c2Rgb<<22);
@ -387,18 +388,18 @@ private:
return match; return match;
} }
}; };
QIntCache<CacheEntry> *pixmapCache; TQIntCache<CacheEntry> *pixmapCache;
// For renderFocusRect // For renderFocusRect
mutable QBitmap *verticalDots; mutable TQBitmap *verticalDots;
mutable QBitmap *horizontalDots; mutable TQBitmap *horizontalDots;
// For KPE_ListViewBranch // For KPE_ListViewBranch
mutable QBitmap *verticalLine; mutable TQBitmap *verticalLine;
mutable QBitmap *horizontalLine; mutable TQBitmap *horizontalLine;
// For progress bar animation // For progress bar animation
QTimer *animationTimer; TQTimer *animationTimer;
}; };
#endif // __LIPSTIK_H #endif // __LIPSTIK_H

@ -16,23 +16,23 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
#include <qcolor.h> #include <tqcolor.h>
#include "misc.h" #include "misc.h"
QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int a) TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const int a)
{ {
// normal button... // normal button...
QRgb rgb = bgColor.rgb(); TQRgb rgb = bgColor.rgb();
QRgb rgb_b = fgColor.rgb(); TQRgb rgb_b = fgColor.rgb();
int alpha = a; int alpha = a;
if(alpha>255) alpha = 255; if(alpha>255) alpha = 255;
if(alpha<0) alpha = 0; if(alpha<0) alpha = 0;
int inv_alpha = 255 - alpha; int inv_alpha = 255 - alpha;
QColor result = QColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255, TQColor result = TQColor( tqRgb(tqRed(rgb_b)*inv_alpha/255 + tqRed(rgb)*alpha/255,
qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255, tqGreen(rgb_b)*inv_alpha/255 + tqGreen(rgb)*alpha/255,
qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) ); tqBlue(rgb_b)*inv_alpha/255 + tqBlue(rgb)*alpha/255) );
return result; return result;
} }

@ -19,6 +19,6 @@
#ifndef __MISC_H #ifndef __MISC_H
#define __MISC_H #define __MISC_H
QColor alphaBlendColors(const QColor &backgroundColor, const QColor &foregroundColor, const int alpha); TQColor alphaBlendColors(const TQColor &backgroundColor, const TQColor &foregroundColor, const int alpha);
#endif // __MISC_H #endif // __MISC_H

Loading…
Cancel
Save