diff --git a/common/common.h b/common/common.h index 26bf82f..7797a3c 100644 --- a/common/common.h +++ b/common/common.h @@ -2,7 +2,7 @@ #define __COMMON_H__ /* - TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- @@ -182,14 +182,14 @@ enum #define SUNKEN_BEVEL_DARK_ALPHA(X) (X.value()/800.0) // 0.25 #define SUNKEN_BEVEL_LIGHT_ALPHA(X) (X.value()/500.0) // 0.40 -#define MENU_SIZE_ATOM "_TQTCURVE_MENUBAR_SIZE_" -#define STATUSBAR_ATOM "_TQTCURVE_STATUSBAR_" -#define TITLEBAR_SIZE_ATOM "_TQTCURVE_TITLEBAR_SIZE_" -#define ACTIVE_WINDOW_ATOM "_TQTCURVE_ACTIVE_WINDOW_" -#define TOGGLE_MENUBAR_ATOM "_TQTCURVE_TOGGLE_MENUBAR_" -#define TOGGLE_STATUSBAR_ATOM "_TQTCURVE_TOGGLE_STATUSBAR_" -#define OPACITY_ATOM "_TQTCURVE_OPACITY_" -#define BGND_ATOM "_TQTCURVE_BGND_" +#define MENU_SIZE_ATOM "_QTCURVE_MENUBAR_SIZE_" +#define STATUSBAR_ATOM "_QTCURVE_STATUSBAR_" +#define TITLEBAR_SIZE_ATOM "_QTCURVE_TITLEBAR_SIZE_" +#define ACTIVE_WINDOW_ATOM "_QTCURVE_ACTIVE_WINDOW_" +#define TOGGLE_MENUBAR_ATOM "_QTCURVE_TOGGLE_MENUBAR_" +#define TOGGLE_STATUSBAR_ATOM "_QTCURVE_TOGGLE_STATUSBAR_" +#define OPACITY_ATOM "_QTCURVE_OPACITY_" +#define BGND_ATOM "_QTCURVE_BGND_" #define BLEND_TITLEBAR (opts.menubarAppearance==opts.titlebarAppearance && opts.menubarAppearance==opts.inactiveTitlebarAppearance && \ !(opts.windowBorder&WINDOW_BORDER_BLEND_TITLEBAR) && SHADE_WINDOW_BORDER==opts.shadeMenubars && opts.windowDrag) @@ -456,8 +456,8 @@ typedef enum #endif #if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000)) -#define TQTCURVE_PREVIEW_CONFIG "QTCURVE_PREVIEW_CONFIG" -#define TQTCURVE_PREVIEW_CONFIG_FULL "QTCURVE_PREVIEW_CONFIG_FULL" +#define QTCURVE_PREVIEW_CONFIG "QTCURVE_PREVIEW_CONFIG" +#define QTCURVE_PREVIEW_CONFIG_FULL "QTCURVE_PREVIEW_CONFIG_FULL" typedef enum { diff --git a/common/config_file.c b/common/config_file.c index 77c3feb..bef1305 100644 --- a/common/config_file.c +++ b/common/config_file.c @@ -1,5 +1,5 @@ /* - TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- @@ -618,7 +618,7 @@ static bool makeDir(const TQString& dir, int mode) baseEncoded.prepend("trying to create local folder "); perror(baseEncoded.constData()); #else - perror("trying to create TQtCurve config folder "); + perror("trying to create QtCurve config folder "); #endif return false; // Couldn't create it :-( } diff --git a/common/config_file.c-orig b/common/config_file.c-orig index 772e4e7..26cfce8 100644 --- a/common/config_file.c-orig +++ b/common/config_file.c-orig @@ -1,5 +1,5 @@ /* - TQtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk + QtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk ---- diff --git a/config/exportthemedialog.cpp b/config/exportthemedialog.cpp index 1c683bb..8496654 100644 --- a/config/exportthemedialog.cpp +++ b/config/exportthemedialog.cpp @@ -1,5 +1,5 @@ /* - TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- diff --git a/config/qtcurveconfig.cpp b/config/qtcurveconfig.cpp index aa19c0d..020bcd1 100644 --- a/config/qtcurveconfig.cpp +++ b/config/qtcurveconfig.cpp @@ -1,5 +1,5 @@ /* - TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- @@ -65,7 +65,7 @@ extern "C" TQWidget * allocate_kstyle_config(TQWidget *parent) { KGlobal::locale()->insertCatalogue("qtcurve"); - return new TQtCurveConfig(parent); + return new QtCurveConfig(parent); } } @@ -260,7 +260,7 @@ class CGradItem : public TQListViewItem double prev; }; -CGradientPreview::CGradientPreview(TQtCurveConfig *c, TQWidget *p) +CGradientPreview::CGradientPreview(QtCurveConfig *c, TQWidget *p) : TQWidget(p), cfg(c) { @@ -561,8 +561,8 @@ static void insertLvLinesEntries(TQComboBox *combo) combo->insertItem(i18n("Old style (KDE and Gtk2 different)")); } -TQtCurveConfig::TQtCurveConfig(TQWidget *parent) - : TQtCurveConfigBase(parent), +QtCurveConfig::QtCurveConfig(TQWidget *parent) + : QtCurveConfigBase(parent), #ifdef TQTC_STYLE_SUPPORT exportDialog(NULL), #endif @@ -793,11 +793,11 @@ TQtCurveConfig::TQtCurveConfig(TQWidget *parent) resize(600, 400); } -TQtCurveConfig::~TQtCurveConfig() +QtCurveConfig::~QtCurveConfig() { } -void TQtCurveConfig::loadStyles(TQPopupMenu *menu) +void QtCurveConfig::loadStyles(TQPopupMenu *menu) { TQStringList files(KGlobal::dirs()->findAllResources("data", "QtCurve/*"EXTENSION, false, true)); @@ -813,7 +813,7 @@ void TQtCurveConfig::loadStyles(TQPopupMenu *menu) this, SLOT(setStyle(int)))]=*it; } -void TQtCurveConfig::save() +void QtCurveConfig::save() { Options opts=currentStyle; @@ -836,26 +836,26 @@ void TQtCurveConfig::save() cfg->setForceGlobal(useGlobals); } -void TQtCurveConfig::defaults() +void QtCurveConfig::defaults() { setWidgetOptions(defaultStyle); if (settingsChanged()) emit changed(true); } -void TQtCurveConfig::setStyle(int s) +void QtCurveConfig::setStyle(int s) { loadStyle(styles[s]); } -void TQtCurveConfig::emboldenToggled() +void QtCurveConfig::emboldenToggled() { if(!embolden->isChecked() && IND_NONE==defBtnIndicator->currentItem()) defBtnIndicator->setCurrentItem(IND_TINT); updateChanged(); } -void TQtCurveConfig::defBtnIndicatorChanged() +void QtCurveConfig::defBtnIndicatorChanged() { if(IND_NONE==defBtnIndicator->currentItem() && !embolden->isChecked()) embolden->setChecked(true); @@ -868,7 +868,7 @@ void TQtCurveConfig::defBtnIndicatorChanged() updateChanged(); } -void TQtCurveConfig::buttonEffectChanged() +void QtCurveConfig::buttonEffectChanged() { if(EFFECT_NONE==buttonEffect->currentItem()) { @@ -881,7 +881,7 @@ void TQtCurveConfig::buttonEffectChanged() updateChanged(); } -void TQtCurveConfig::coloredMouseOverChanged() +void QtCurveConfig::coloredMouseOverChanged() { if(MO_GLOW==coloredMouseOver->currentItem() && EFFECT_NONE==buttonEffect->currentItem()) @@ -890,51 +890,51 @@ void TQtCurveConfig::coloredMouseOverChanged() updateChanged(); } -void TQtCurveConfig::shadeSlidersChanged() +void QtCurveConfig::shadeSlidersChanged() { customSlidersColor->setEnabled(SHADE_CUSTOM==shadeSliders->currentItem()); updateChanged(); } -void TQtCurveConfig::shadeMenubarsChanged() +void QtCurveConfig::shadeMenubarsChanged() { customMenubarsColor->setEnabled(SHADE_CUSTOM==shadeMenubars->currentItem()); updateChanged(); } -void TQtCurveConfig::shadeCheckRadioChanged() +void QtCurveConfig::shadeCheckRadioChanged() { customCheckRadioColor->setEnabled(SHADE_CUSTOM==shadeCheckRadio->currentItem()); updateChanged(); } -void TQtCurveConfig::customMenuTextColorChanged() +void QtCurveConfig::customMenuTextColorChanged() { customMenuNormTextColor->setEnabled(customMenuTextColor->isChecked()); customMenuSelTextColor->setEnabled(customMenuTextColor->isChecked()); updateChanged(); } -void TQtCurveConfig::menuStripeChanged() +void QtCurveConfig::menuStripeChanged() { customMenuStripeColor->setEnabled(SHADE_CUSTOM==menuStripe->currentItem()); menuStripeAppearance->setEnabled(SHADE_NONE!=menuStripe->currentItem()); updateChanged(); } -void TQtCurveConfig::comboBtnChanged() +void QtCurveConfig::comboBtnChanged() { customComboBtnColor->setEnabled(SHADE_CUSTOM==comboBtn->currentItem()); updateChanged(); } -void TQtCurveConfig::sortedLvChanged() +void QtCurveConfig::sortedLvChanged() { customSortedLvColor->setEnabled(SHADE_CUSTOM==sortedLv->currentItem()); updateChanged(); } -void TQtCurveConfig::stripedProgressChanged() +void QtCurveConfig::stripedProgressChanged() { bool allowAnimation=STRIPE_NONE!=stripedProgress->currentItem() && STRIPE_FADE!=stripedProgress->currentItem(); @@ -945,7 +945,7 @@ void TQtCurveConfig::stripedProgressChanged() updateChanged(); } -void TQtCurveConfig::activeTabAppearanceChanged() +void QtCurveConfig::activeTabAppearanceChanged() { int current(activeTabAppearance->currentItem()); bool disableCol(APPEARANCE_FLAT==current && APPEARANCE_RAISED==current); @@ -956,7 +956,7 @@ void TQtCurveConfig::activeTabAppearanceChanged() updateChanged(); } -void TQtCurveConfig::tabMoChanged() +void QtCurveConfig::tabMoChanged() { if(TAB_MO_GLOW==tabMouseOver->currentItem()) roundAllTabs->setChecked(true); @@ -964,14 +964,14 @@ void TQtCurveConfig::tabMoChanged() updateChanged(); } -void TQtCurveConfig::shadingChanged() +void QtCurveConfig::shadingChanged() { updateChanged(); if(gradPreview) gradPreview->repaint(); } -void TQtCurveConfig::passwordCharClicked() +void QtCurveConfig::passwordCharClicked() { int cur(toInt(passwordChar->text())); CharSelectDialog dlg(this, cur); @@ -983,7 +983,7 @@ void TQtCurveConfig::passwordCharClicked() } } -void TQtCurveConfig::unifySpinBtnsToggled() +void QtCurveConfig::unifySpinBtnsToggled() { if(unifySpinBtns->isChecked()) unifySpin->setChecked(false); @@ -991,7 +991,7 @@ void TQtCurveConfig::unifySpinBtnsToggled() updateChanged(); } -void TQtCurveConfig::unifySpinToggled() +void QtCurveConfig::unifySpinToggled() { if(unifySpin->isChecked()) unifySpinBtns->setChecked(false); @@ -999,14 +999,14 @@ void TQtCurveConfig::unifySpinToggled() updateChanged(); } -void TQtCurveConfig::sliderThumbChanged() +void QtCurveConfig::sliderThumbChanged() { if(LINE_NONE!=sliderThumbs->currentItem() && sliderWidth->value()setValue(DEFAULT_SLIDER_WIDTH); updateChanged(); } -void TQtCurveConfig::sliderWidthChanged() +void QtCurveConfig::sliderWidthChanged() { if(0==sliderWidth->value()%2) sliderWidth->setValue(sliderWidth->value()+1); @@ -1016,7 +1016,7 @@ void TQtCurveConfig::sliderWidthChanged() updateChanged(); } -void TQtCurveConfig::setupStack() +void QtCurveConfig::setupStack() { int i=0; lastCategory=new CStackItem(stackList, i18n("General"), i++); @@ -1044,7 +1044,7 @@ void TQtCurveConfig::setupStack() connect(stackList, SIGNAL(selectionChanged()), SLOT(changeStack())); } -void TQtCurveConfig::changeStack() +void QtCurveConfig::changeStack() { CStackItem *item=(CStackItem *)(stackList->selectedItem()); @@ -1064,7 +1064,7 @@ void TQtCurveConfig::changeStack() stack->raiseWidget(item->stack()); } -void TQtCurveConfig::gradChanged(int i) +void QtCurveConfig::gradChanged(int i) { GradientCont::const_iterator it(customGradient.find((EAppearance)i)); @@ -1091,7 +1091,7 @@ void TQtCurveConfig::gradChanged(int i) gradBorder->setEnabled(NUM_CUSTOM_GRAD!=i); } -void TQtCurveConfig::itemChanged(TQListViewItem *i, int col) +void QtCurveConfig::itemChanged(TQListViewItem *i, int col) { GradientCont::iterator it=customGradient.find((EAppearance)gradCombo->currentItem()); @@ -1116,7 +1116,7 @@ void TQtCurveConfig::itemChanged(TQListViewItem *i, int col) } } -void TQtCurveConfig::addGradStop() +void QtCurveConfig::addGradStop() { GradientCont::iterator cg=customGradient.find((EAppearance)gradCombo->currentItem()); @@ -1168,7 +1168,7 @@ void TQtCurveConfig::addGradStop() } } -void TQtCurveConfig::removeGradStop() +void QtCurveConfig::removeGradStop() { TQListViewItem *cur=gradStops->selectedItem(); @@ -1197,7 +1197,7 @@ void TQtCurveConfig::removeGradStop() } } -void TQtCurveConfig::updateGradStop() +void QtCurveConfig::updateGradStop() { TQListViewItem *i=gradStops->selectedItem(); @@ -1225,7 +1225,7 @@ void TQtCurveConfig::updateGradStop() addGradStop(); } -void TQtCurveConfig::stopSelected() +void QtCurveConfig::stopSelected() { TQListViewItem *i=gradStops->selectedItem(); @@ -1244,7 +1244,7 @@ void TQtCurveConfig::stopSelected() } } -void TQtCurveConfig::setupGradientsTab() +void QtCurveConfig::setupGradientsTab() { for(int i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i) gradCombo->insertItem(i18n("Custom gradient %1").arg((i-APPEARANCE_CUSTOM1)+1)); @@ -1281,7 +1281,7 @@ void TQtCurveConfig::setupGradientsTab() connect(gradStops, SIGNAL(selectionChanged()), SLOT(stopSelected())); } -void TQtCurveConfig::setupShadesTab() +void QtCurveConfig::setupShadesTab() { int shade(0); @@ -1294,14 +1294,14 @@ void TQtCurveConfig::setupShadesTab() connect(customShading, SIGNAL(toggled(bool)), SLOT(updateChanged())); } -void TQtCurveConfig::setupShade(KDoubleNumInput *w, int shade) +void QtCurveConfig::setupShade(KDoubleNumInput *w, int shade) { w->setRange(0.0, 2.0, 0.05, false); connect(w, SIGNAL(valueChanged(double)), SLOT(updateChanged())); shadeVals[shade]=w; } -void TQtCurveConfig::populateShades(const Options &opts) +void QtCurveConfig::populateShades(const Options &opts) { SHADES int contrast=TQSettings().readNumEntry("/Qt/KDE/contrast", 7); @@ -1320,7 +1320,7 @@ void TQtCurveConfig::populateShades(const Options &opts) [i]); } -bool TQtCurveConfig::diffShades(const Options &opts) +bool QtCurveConfig::diffShades(const Options &opts) { if( (!USE_CUSTOM_SHADES(opts) && customShading->isChecked()) || (USE_CUSTOM_SHADES(opts) && !customShading->isChecked()) ) @@ -1336,7 +1336,7 @@ bool TQtCurveConfig::diffShades(const Options &opts) return false; } -void TQtCurveConfig::setPasswordChar(int ch) +void QtCurveConfig::setPasswordChar(int ch) { TQString str; TQTextOStream s(&str); @@ -1346,20 +1346,20 @@ void TQtCurveConfig::setPasswordChar(int ch) passwordChar->setText(str); } -void TQtCurveConfig::updateChanged() +void QtCurveConfig::updateChanged() { if (settingsChanged()) emit changed(true); } -void TQtCurveConfig::focusChanged() +void QtCurveConfig::focusChanged() { if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem()) round->setCurrentItem(ROUND_EXTRA); updateChanged(); } -void TQtCurveConfig::roundChanged() +void QtCurveConfig::roundChanged() { if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem()) focus->setCurrentItem(FOCUS_LINE); @@ -1369,7 +1369,7 @@ void TQtCurveConfig::roundChanged() updateChanged(); } -void TQtCurveConfig::importStyle() +void QtCurveConfig::importStyle() { TQString file(KFileDialog::getOpenFileName(TQString::null, i18n("*"EXTENSION"|QtCurve Settings Files\n" @@ -1380,7 +1380,7 @@ void TQtCurveConfig::importStyle() loadStyle(file); } -void TQtCurveConfig::exportStyle() +void QtCurveConfig::exportStyle() { TQString file(KFileDialog::getSaveFileName(TQString::null, i18n("*"EXTENSION"|QtCurve Settings Files"), this)); @@ -1402,7 +1402,7 @@ void TQtCurveConfig::exportStyle() } } -void TQtCurveConfig::exportTheme() +void QtCurveConfig::exportTheme() { #ifdef TQTC_STYLE_SUPPORT if(!exportDialog) @@ -1415,7 +1415,7 @@ void TQtCurveConfig::exportTheme() #endif } -void TQtCurveConfig::loadStyle(const TQString &file) +void QtCurveConfig::loadStyle(const TQString &file) { Options opts; @@ -1427,7 +1427,7 @@ void TQtCurveConfig::loadStyle(const TQString &file) } } -void TQtCurveConfig::setOptions(Options &opts) +void QtCurveConfig::setOptions(Options &opts) { opts.round=(ERound)round->currentItem(); opts.toolbarBorders=(ETBarBorder)toolbarBorders->currentItem(); @@ -1560,7 +1560,7 @@ void TQtCurveConfig::setOptions(Options &opts) opts.customShades[0]=0; } -void TQtCurveConfig::setWidgetOptions(const Options &opts) +void QtCurveConfig::setWidgetOptions(const Options &opts) { round->setCurrentItem(opts.round); scrollbarType->setCurrentItem(opts.scrollbarType); @@ -1703,7 +1703,7 @@ void TQtCurveConfig::setWidgetOptions(const Options &opts) populateShades(opts); } -int TQtCurveConfig::getSquareFlags() +int QtCurveConfig::getSquareFlags() { int square(0); /* @@ -1719,7 +1719,7 @@ int TQtCurveConfig::getSquareFlags() return square; } -int TQtCurveConfig::getWindowBorderFlags() +int QtCurveConfig::getWindowBorderFlags() { int flags(0); @@ -1734,7 +1734,7 @@ int TQtCurveConfig::getWindowBorderFlags() return flags; } -bool TQtCurveConfig::settingsChanged() +bool QtCurveConfig::settingsChanged() { return round->currentItem()!=currentStyle.round || toolbarBorders->currentItem()!=currentStyle.toolbarBorders || diff --git a/config/qtcurveconfig.h b/config/qtcurveconfig.h index 7843136..68c60a9 100644 --- a/config/qtcurveconfig.h +++ b/config/qtcurveconfig.h @@ -2,7 +2,7 @@ #define __QTCURVECONFIG_H__ /* - TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- @@ -36,7 +36,7 @@ class KDoubleNumInput; class CExportThemeDialog; #endif class CStackItem; -class TQtCurveConfig; +class QtCurveConfig; class CGradientPreview : public TQWidget { @@ -45,7 +45,7 @@ class CGradientPreview : public TQWidget public: - CGradientPreview(TQtCurveConfig *c, TQWidget *p); + CGradientPreview(QtCurveConfig *c, TQWidget *p); TQSize sizeHint() const; TQSize minimumSizeHint() const; @@ -58,20 +58,20 @@ class CGradientPreview : public TQWidget private: - TQtCurveConfig *cfg; + QtCurveConfig *cfg; TQColor color; GradientStopCont stops; }; -class TQtCurveConfig : public TQtCurveConfigBase +class QtCurveConfig : public QtCurveConfigBase { Q_OBJECT TQ_OBJECT public: - TQtCurveConfig(TQWidget *parent); - virtual ~TQtCurveConfig(); + QtCurveConfig(TQWidget *parent); + virtual ~QtCurveConfig(); EShading currentShading() const { return (EShading)shading->currentItem(); } diff --git a/config/qtcurveconfigbase.ui b/config/qtcurveconfigbase.ui index f07016d..6128767 100644 --- a/config/qtcurveconfigbase.ui +++ b/config/qtcurveconfigbase.ui @@ -1,8 +1,8 @@ -TQtCurveConfigBase +QtCurveConfigBase - TQtCurveConfigBase + QtCurveConfigBase diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp index 58e696b..a6570bc 100644 --- a/style/qtcurve.cpp +++ b/style/qtcurve.cpp @@ -1,5 +1,5 @@ /* - TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- @@ -125,6 +125,10 @@ dimension, so as to draw the scrollbar at the correct size. #include #include "qtc_fixx11h.h" +#ifndef HAVE_REAL_TQT +#define TQTitleBar QTitleBar +#endif + static const Atom constNetMoveResize = XInternAtom(qt_xdisplay(), "_NET_WM_MOVERESIZE", False); static const TQWidget * getTopLevel(const TQWidget *widget) { @@ -338,16 +342,16 @@ static TQString themeFile(const TQString &dir, const TQString &n, bool trinity=t } #endif -class TQtCurveStylePlugin : public TQStylePlugin +class QtCurveStylePlugin : public TQStylePlugin { public: - TQtCurveStylePlugin() : TQStylePlugin() { } + QtCurveStylePlugin() : TQStylePlugin() { } TQStringList keys() const { TQStringList list; - list << "TQtCurve"; + list << "QtCurve"; #ifdef TQTC_STYLE_SUPPORT getStyles(kdeHome(useTQt3Settings()), list); @@ -362,16 +366,16 @@ class TQtCurveStylePlugin : public TQStylePlugin TQStyle * create(const TQString &s) { return "qtcurve"==s.lower() - ? new TQtCurveStyle + ? new QtCurveStyle #ifdef TQTC_STYLE_SUPPORT : 0==s.find(THEME_PREFIX) - ? new TQtCurveStyle(s) + ? new QtCurveStyle(s) #endif : 0; } }; -TQ_EXPORT_PLUGIN(TQtCurveStylePlugin) +TQ_EXPORT_PLUGIN(QtCurveStylePlugin) #define SKIP_TASKBAR (APP_SKIP_TASKBAR==itsThemedApp || APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp) @@ -803,9 +807,9 @@ static void drawArrow(TQPainter *p, const TQRect &r, const TQColor &col, TQStyle } #ifdef TQTC_STYLE_SUPPORT -TQtCurveStyle::TQtCurveStyle(const TQString &name) +QtCurveStyle::QtCurveStyle(const TQString &name) #else -TQtCurveStyle::TQtCurveStyle() +QtCurveStyle::QtCurveStyle() #endif : BASE_STYLE(AllowMenuTransparency, WindowsStyleScrollBar), itsSliderCols(0L), @@ -1108,7 +1112,7 @@ TQtCurveStyle::TQtCurveStyle() setSbType(); } -TQtCurveStyle::~TQtCurveStyle() +QtCurveStyle::~QtCurveStyle() { if(itsSidebarButtonsCols!=itsSliderCols && itsSidebarButtonsCols!=itsDefBtnCols) @@ -1151,12 +1155,12 @@ static TQString getFile(const TQString &f) return d; } -void TQtCurveStyle::polish(TQApplication *app) +void QtCurveStyle::polish(TQApplication *app) { TQString appName(getFile(app->argv()[0])); if(NULL!=getenv("QTCURVE_DEBUG")) - std::cout << "TQtCurve: Application name: \"" << appName.latin1() << "\"\n"; + std::cout << "QtCurve: Application name: \"" << appName.latin1() << "\"\n"; if ("kicker"==appName || "appletproxy"==appName) { @@ -1242,7 +1246,7 @@ void TQtCurveStyle::polish(TQApplication *app) #endif } -void TQtCurveStyle::polish(TQPalette &pal) +void QtCurveStyle::polish(TQPalette &pal) { if(APP_MACTOR==itsThemedApp && itsMactorPal && pal.active().background()!=itsMactorPal->active().background()) @@ -1414,7 +1418,7 @@ static TQColor disable(const TQColor &col, const TQColor &bgnd) return c; } -TQColorGroup TQtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis) +TQColorGroup QtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis) { TQColor mid(old.mid()); @@ -1445,7 +1449,7 @@ TQColorGroup TQtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColor static const char * kdeToolbarWidget="kde toolbar widget"; -void TQtCurveStyle::polish(TQWidget *widget) +void QtCurveStyle::polish(TQWidget *widget) { bool enableFilter(opts.highlightFactor || opts.coloredMouseOver); @@ -1823,7 +1827,7 @@ void TQtCurveStyle::polish(TQWidget *widget) BASE_STYLE::polish(widget); } -void TQtCurveStyle::unPolish(TQWidget *widget) +void QtCurveStyle::unPolish(TQWidget *widget) { if(isFormWidget(widget)) itsKhtmlWidgets.remove(widget); @@ -1962,7 +1966,7 @@ static void sendXEvent(TQDialog *dlg, const char *msg) SubstructureRedirectMask | SubstructureNotifyMask, &xev); } -bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg) +bool QtCurveStyle::appIsNotEmbedded(TQDialog *dlg) { Window win; @@ -1974,7 +1978,7 @@ bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg) return false; } -bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) +bool QtCurveStyle::eventFilter(TQObject *object, TQEvent *event) { if(itsHoverWidget && TQT_BASE_OBJECT(object)==TQT_BASE_OBJECT(itsHoverWidget) && (TQEvent::Destroy==event->type() || TQEvent::Hide==event->type())) resetHover(); @@ -2430,7 +2434,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) return BASE_STYLE::eventFilter(object, event); } -void TQtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig, +void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig, const TQColorGroup &cg, SFlags flags, int round, const TQColor &fill, const TQColor *custom, bool doBorder, bool doCorners, EWidget w) const @@ -2651,7 +2655,7 @@ void TQtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRe p->restore(); } -void TQtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols) const +void QtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols) const { if(itsMouseOverCols || itsDefBtnCols || cols) { @@ -2686,7 +2690,7 @@ void TQtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup & } } -void TQtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised, bool square) const +void QtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised, bool square) const { square=square || ROUND_NONE==opts.round; @@ -2723,7 +2727,7 @@ void TQtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup & } } -void TQtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg, +void QtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, const TQColor *custom, EWidget w, bool doCorners, EBorder borderProfile, bool blendBorderColors, int borderVal) const { @@ -2973,7 +2977,7 @@ void TQtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect & } } -void TQtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const TQColor &shadow, const TQRect &r, bool sunken, int margin, +void QtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const TQColor &shadow, const TQRect &r, bool sunken, int margin, SubControl button) const { if(!sunken) @@ -2981,7 +2985,7 @@ void TQtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const drawWindowIcon(painter, color, r, sunken, margin, button); } -void TQtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, const TQRect &r, bool sunken, int margin, SubControl button) const +void QtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, const TQRect &r, bool sunken, int margin, SubControl button) const { TQRect rect(r); @@ -3064,7 +3068,7 @@ void TQtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, con } } -void TQtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, +void QtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, SFlags flags, EntryColor coloration, int round, EWidget w) const { const TQColor *use(ENTRY_MOUSE_OVER==coloration && itsMouseOverCols @@ -3123,7 +3127,7 @@ void TQtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColor } } -void TQtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, +void QtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, TQ_PrimitiveElement pe, bool small, bool checkActive) const { const TQColor &col(flags&Style_Enabled @@ -3135,7 +3139,7 @@ void TQtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup ::drawArrow(p, r, p->pen().style()==TQPen::NoPen ? col : TQColor(p->pen().color()), pe, opts, small); } -void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQRect &r, +void QtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const { switch(pe) @@ -4078,7 +4082,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) && widget->parentWidget()->parentWidget() && ::tqqt_cast(widget->parentWidget()->parentWidget())) { - struct TQtCurveListBoxItem : public TQListBoxItem + struct QtCurveListBoxItem : public TQListBoxItem { void paintContents(TQPainter *p) { @@ -4087,7 +4091,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const }; TQListBox *box=(TQListBox *)widget->parentWidget(); - TQtCurveListBoxItem *item=(TQtCurveListBoxItem *)(box->item(box->currentItem())); + QtCurveListBoxItem *item=(QtCurveListBoxItem *)(box->item(box->currentItem())); if(item) { @@ -4306,7 +4310,7 @@ static TQString elliditide(const TQString &text, const TQFontMetrics &fontMetric return title; } -void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const TQWidget *widget, +void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt) const { @@ -4460,7 +4464,7 @@ void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const } } -void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWidget *widget, +void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const { @@ -5379,7 +5383,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi } } -void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget, +void QtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const { switch(control) @@ -5405,7 +5409,7 @@ void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const } } -void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, +void QtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const { switch (control) @@ -5420,7 +5424,7 @@ void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, } } -TQRect TQtCurveStyle::subRect(SubRect subrect, const TQWidget *widget)const +TQRect QtCurveStyle::subRect(SubRect subrect, const TQWidget *widget)const { TQRect rect, wrect(widget->rect()); @@ -5477,7 +5481,7 @@ class TQTitleBar : public TQWidget TQWidget *window() const; }; -void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget, +void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, SCFlags controls, SCFlags active, const TQStyleOption &data) const @@ -6266,7 +6270,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con case CC_Slider: // // Note: Can't use KStyle's drawing routine, as this doesnt work for sliders on gradient - // toolbars. It also draws groove, focus, slider - wherease TQtCurve needs groove, + // toolbars. It also draws groove, focus, slider - wherease QtCurve needs groove, // slider, focus. We also ony double-buffer if not on a toolbar, as we dont know // the background, etc, if on a toolbar - and that is handled in eventFilter { @@ -6442,7 +6446,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con } } -TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQWidget *widget, +TQRect QtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQWidget *widget, SubControl sc, const TQStyleOption &data) const { bool reverse(TQApplication::reverseLayout()); @@ -6737,7 +6741,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ return BASE_STYLE::querySubControlMetrics(control, widget, sc, data); } -int TQtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const +int QtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const { switch(metric) { @@ -6827,7 +6831,7 @@ int TQtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const } } -int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const +int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const { switch(kpm) { @@ -6838,7 +6842,7 @@ int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) c } } -TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget *widget, +TQSize QtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget *widget, const TQSize &contentsSize, const TQStyleOption &data) const { switch(contents) @@ -6950,7 +6954,7 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget * return BASE_STYLE::tqsizeFromContents(contents, widget, contentsSize, data); } -int TQtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, +int QtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn *returnData) const { switch(stylehint) @@ -6997,7 +7001,7 @@ int TQtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const } } -void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled, +void QtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled, const TQPixmap *pixmap, const TQString &text, int len, const TQColor *penColor) const { TQRect r2(r); @@ -7111,7 +7115,7 @@ void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQC } } -void TQtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, +void QtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const { int fill=opts.useHighlightForMenu && (!mbi || itsHighlightCols==cols) ? ORIGINAL_SHADE : 4, @@ -7168,7 +7172,7 @@ void TQtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const drawBevelGradient(cols[fill], p, r, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM); } -void TQtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, SFlags flags, +void QtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, SFlags flags, int round, const TQWidget *widget) const { if(rx.width()<1) @@ -7262,7 +7266,7 @@ void TQtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGr } } -void TQtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const +void QtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const { if(IS_FLAT(bevApp) && opts.colorSelTab && sel) bevApp=APPEARANCE_GRADIENT; @@ -7310,7 +7314,7 @@ void TQtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const T } } -void TQtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, const TQRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const +void QtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, const TQRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const { const Gradient *grad=getGradient(app, &opts); @@ -7379,7 +7383,7 @@ void TQtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, con } } -void TQtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot, +void QtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot, TQPainter *p, TQRect const &r, bool horiz) const { if(r.width()>0 && r.height()>0) @@ -7428,7 +7432,7 @@ void TQtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot, } } -void TQtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const TQColorGroup &cg, +void QtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const TQColorGroup &cg, SFlags flags, bool slider) const { int min(MIN_SLIDER_SIZE(opts.sliderThumbs)); @@ -7483,7 +7487,7 @@ void TQtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const T } } -void TQtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, +void QtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, TQSlider *slider, bool tb) const { bool horiz(SLIDER_TRIANGULAR==opts.sliderStyle ? r.height()>r.width() : r.width()>r.height()); @@ -7668,7 +7672,7 @@ void TQtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColo } } -void TQtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg, +void QtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQWidget *widget) const { const TQSlider *sliderWidget((const TQSlider *)widget); @@ -7730,7 +7734,7 @@ void TQtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColo } } -void TQtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg, +void QtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool menu, bool horiz) const { if(menu && APPEARANCE_STRIPED==opts.bgndAppearance && IS_FLAT(opts.menubarAppearance) && SHADE_NONE==opts.shadeMenubars) @@ -7746,7 +7750,7 @@ void TQtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, c drawBevelGradient(color, p, rx, horiz, false, app); } -void TQtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb, +void QtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb, ELine handles) const { if(r.width()<2 || r.height()<2) @@ -7798,7 +7802,7 @@ void TQtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flag } } -void TQtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const +void QtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const { TQColor col1(midColor(cg.background(), itsMouseOverCols[ORIGINAL_SHADE])); TQRect r2(r); @@ -7810,7 +7814,7 @@ void TQtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGr p->drawLine(r2.x(), r2.y(), r2.x()+(horiz ? r2.width()-1 : 0), r2.y()+(horiz ? 0 : r2.height()-1)); } -void TQtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const +void QtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const { SHADES @@ -7826,7 +7830,7 @@ void TQtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const vals[ORIGINAL_SHADE]=base; } -const TQColor * TQtCurveStyle::buttonColors(const TQColorGroup &cg) const +const TQColor * QtCurveStyle::buttonColors(const TQColorGroup &cg) const { if(cg.button()!=itsButtonCols[ORIGINAL_SHADE]) { @@ -7837,14 +7841,14 @@ const TQColor * TQtCurveStyle::buttonColors(const TQColorGroup &cg) const return itsButtonCols; } -const TQColor * TQtCurveStyle::checkRadioColors(const TQColorGroup &cg, SFlags flags) const +const TQColor * QtCurveStyle::checkRadioColors(const TQColorGroup &cg, SFlags flags) const { return opts.crColor && flags&Style_Enabled && (flags&Style_On || !(flags&Style_Off)) ? itsCheckRadioSelCols : buttonColors(cg); } -const TQColor * TQtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags flags) const +const TQColor * QtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags flags) const { return (flags&Style_Enabled) ? SHADE_NONE!=opts.shadeSliders &&itsSliderCols && (!opts.colorSliderMouseOver || flags&Style_MouseOver) @@ -7853,7 +7857,7 @@ const TQColor * TQtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags : itsBackgroundCols; } -const TQColor * TQtCurveStyle::backgroundColors(const TQColor &c) const +const TQColor * QtCurveStyle::backgroundColors(const TQColor &c) const { if(c!=itsBackgroundCols[ORIGINAL_SHADE]) { @@ -7864,13 +7868,13 @@ const TQColor * TQtCurveStyle::backgroundColors(const TQColor &c) const return itsBackgroundCols; } -const TQColor * TQtCurveStyle::borderColors(SFlags flags, const TQColor *use) const +const TQColor * QtCurveStyle::borderColors(SFlags flags, const TQColor *use) const { return itsMouseOverCols && opts.coloredMouseOver && flags&Style_MouseOver ? itsMouseOverCols : use; } -const TQColor * TQtCurveStyle::getSidebarButtons() const +const TQColor * QtCurveStyle::getSidebarButtons() const { if(!itsSidebarButtonsCols) { @@ -7889,7 +7893,7 @@ const TQColor * TQtCurveStyle::getSidebarButtons() const return itsSidebarButtonsCols; } -void TQtCurveStyle::setMenuColors(const TQColorGroup &cg) +void QtCurveStyle::setMenuColors(const TQColorGroup &cg) { switch(opts.shadeMenubars) { @@ -7916,7 +7920,7 @@ void TQtCurveStyle::setMenuColors(const TQColorGroup &cg) } } -const TQColor * TQtCurveStyle::menuColors(const TQColorGroup &cg, bool active) const +const TQColor * QtCurveStyle::menuColors(const TQColorGroup &cg, bool active) const { return SHADE_WINDOW_BORDER==opts.shadeMenubars ? getMdiColors(cg, active) @@ -7925,7 +7929,7 @@ const TQColor * TQtCurveStyle::menuColors(const TQColorGroup &cg, bool active) c : itsMenubarCols; } -void TQtCurveStyle::setDecorationColors(bool init) +void QtCurveStyle::setDecorationColors(bool init) { if(!readKdeGlobals() && !init) return; @@ -7939,7 +7943,7 @@ void TQtCurveStyle::setDecorationColors(bool init) shadeColors(kdeSettings.focus, itsFocusCols); } -const TQColor * TQtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active) const +const TQColor * QtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active) const { if(!itsActiveMdiColors) { @@ -8064,7 +8068,7 @@ const TQColor * TQtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active) } #ifdef SET_MDI_WINDOW_BUTTON_POSITIONS -void TQtCurveStyle::readMdiPositions() const +void QtCurveStyle::readMdiPositions() const { if(0==itsMdiButtons[0].size() && 0==itsMdiButtons[1].size()) { @@ -8137,7 +8141,7 @@ void TQtCurveStyle::readMdiPositions() const } #endif -bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos) +bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos) { if(!itsHoverWidget || !itsHoverWidget->isShown() || !itsHoverWidget->isVisible()) return false; @@ -8357,7 +8361,7 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos) return false; } -const TQColor & TQtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr, bool darker) const +const TQColor & QtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr, bool darker) const { return !(flags&Style_Enabled) ? use[darker ? 2 : ORIGINAL_SHADE] @@ -8372,7 +8376,7 @@ const TQColor & TQtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr : use[darker ? 2 : ORIGINAL_SHADE]; } -const TQColor & TQtCurveStyle::getTabFill(bool current, bool highlight, const TQColor *use) const +const TQColor & QtCurveStyle::getTabFill(bool current, bool highlight, const TQColor *use) const { return current ? use[ORIGINAL_SHADE] @@ -8381,7 +8385,7 @@ const TQColor & TQtCurveStyle::getTabFill(bool current, bool highlight, const TQ : use[2]; } -const TQColor & TQtCurveStyle::menuStripeCol() const +const TQColor & QtCurveStyle::menuStripeCol() const { switch(opts.menuStripe) { @@ -8407,7 +8411,7 @@ const TQColor & TQtCurveStyle::menuStripeCol() const } } -const TQColor & TQtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &cg) const +const TQColor & QtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &cg) const { if(flags&MENU_ITEM) return flags&Style_Enabled && flags&Style_Active && opts.useHighlightForMenu @@ -8421,7 +8425,7 @@ const TQColor & TQtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &c : cg.text(); } -TQColor TQtCurveStyle::shade(const TQColor &a, float k) const +TQColor QtCurveStyle::shade(const TQColor &a, float k) const { TQColor mod; @@ -8429,12 +8433,12 @@ TQColor TQtCurveStyle::shade(const TQColor &a, float k) const return mod; } -void TQtCurveStyle::shade(const color &ca, color *cb, double k) const +void QtCurveStyle::shade(const color &ca, color *cb, double k) const { ::shade(&opts, ca, cb, k); } -TQPixmap * TQtCurveStyle::getPixelPixmap(const TQColor col) const +TQPixmap * QtCurveStyle::getPixelPixmap(const TQColor col) const { TQRgb rgb(col.rgb()); TQString key(createKey(rgb)); @@ -8456,7 +8460,7 @@ TQPixmap * TQtCurveStyle::getPixelPixmap(const TQColor col) const return pix; } -TQPixmap * TQtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) const +TQPixmap * QtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) const { TQRgb rgb(col.rgb()); TQString key(createKey(rgb, forWindow ? 'S' : 's')); @@ -8512,13 +8516,13 @@ static void recolour(TQImage &img, const TQColor &col, double shade) adjustPix(img.bits(), 4, img.width(), img.height(), img.bytesPerLine(), col.red(), col.green(), col.blue(), shade); } -void TQtCurveStyle::drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const +void QtCurveStyle::drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const { TQPixmap *pix=getPixmap(cols[STD_BORDER], PIX_DOT, 0.9); p->drawPixmap(r.x()+((r.width()-pix->width())>>1), r.y()+((r.height()-pix->height())>>1), *pix); } -TQPixmap * TQtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade) const +TQPixmap * QtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade) const { TQRgb rgb(col.rgb()); TQString key(createKey(rgb, p)); @@ -8579,7 +8583,7 @@ TQPixmap * TQtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade) return pix; } -void TQtCurveStyle::setSbType() +void QtCurveStyle::setSbType() { switch(opts.scrollbarType) { @@ -8599,7 +8603,7 @@ void TQtCurveStyle::setSbType() } } -void TQtCurveStyle::resetHover() +void QtCurveStyle::resetHover() { itsIsSpecialHover=false; itsOldPos.setX(-1); @@ -8618,7 +8622,7 @@ struct TQtcMenuBar : public TQMenuBar } }; -bool TQtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos) +bool QtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos) { return opts.windowDrag && (//qobject_cast(o) || @@ -8636,7 +8640,7 @@ bool TQtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos) ); } -void TQtCurveStyle::updateProgressPos() +void QtCurveStyle::updateProgressPos() { // Taken from lipstik! TQMap::iterator it(itsProgAnimWidgets.begin()), @@ -8663,12 +8667,12 @@ void TQtCurveStyle::updateProgressPos() itsAnimationTimer->stop(); } -void TQtCurveStyle::progressBarDestroyed(TQObject *bar) +void QtCurveStyle::progressBarDestroyed(TQObject *bar) { itsProgAnimWidgets.remove(TQT_TQWIDGET(bar)); } -void TQtCurveStyle::sliderThumbMoved(int) +void QtCurveStyle::sliderThumbMoved(int) { TQSlider *slider(::tqqt_cast(sender())); @@ -8676,12 +8680,12 @@ void TQtCurveStyle::sliderThumbMoved(int) slider->update(); } -void TQtCurveStyle::khtmlWidgetDestroyed(TQObject *o) +void QtCurveStyle::khtmlWidgetDestroyed(TQObject *o) { itsKhtmlWidgets.remove(TQT_TQWIDGET_CONST(o)); } -void TQtCurveStyle::hoverWidgetDestroyed(TQObject *o) +void QtCurveStyle::hoverWidgetDestroyed(TQObject *o) { if(TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(itsHoverWidget)) resetHover(); diff --git a/style/qtcurve.h b/style/qtcurve.h index 738af9c..539fc43 100644 --- a/style/qtcurve.h +++ b/style/qtcurve.h @@ -1,8 +1,8 @@ -#ifndef __TQTCURVE_H__ -#define __TQTCURVE_H__ +#ifndef __QTCURVE_H__ +#define __QTCURVE_H__ /* - TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- @@ -74,7 +74,7 @@ class TQSlider; #define BASE_STYLE KStyle #endif -class TQtCurveStyle : public BASE_STYLE +class QtCurveStyle : public BASE_STYLE { Q_OBJECT TQ_OBJECT @@ -127,12 +127,12 @@ class TQtCurveStyle : public BASE_STYLE }; #ifdef TQTC_STYLE_SUPPORT - TQtCurveStyle(const TQString &name=TQString()); + QtCurveStyle(const TQString &name=TQString()); #else - TQtCurveStyle(); + QtCurveStyle(); #endif - virtual ~TQtCurveStyle(); + virtual ~QtCurveStyle(); void polish(TQApplication *app); void polish(TQPalette &pal);