Revert style and class names to QtCurve

Fix FTBFS on Qt3
pull/1/head
Slávek Banko 12 years ago
parent 9d466f4825
commit 821d7de7df

@ -2,7 +2,7 @@
#define __COMMON_H__ #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_DARK_ALPHA(X) (X.value()/800.0) // 0.25
#define SUNKEN_BEVEL_LIGHT_ALPHA(X) (X.value()/500.0) // 0.40 #define SUNKEN_BEVEL_LIGHT_ALPHA(X) (X.value()/500.0) // 0.40
#define MENU_SIZE_ATOM "_TQTCURVE_MENUBAR_SIZE_" #define MENU_SIZE_ATOM "_QTCURVE_MENUBAR_SIZE_"
#define STATUSBAR_ATOM "_TQTCURVE_STATUSBAR_" #define STATUSBAR_ATOM "_QTCURVE_STATUSBAR_"
#define TITLEBAR_SIZE_ATOM "_TQTCURVE_TITLEBAR_SIZE_" #define TITLEBAR_SIZE_ATOM "_QTCURVE_TITLEBAR_SIZE_"
#define ACTIVE_WINDOW_ATOM "_TQTCURVE_ACTIVE_WINDOW_" #define ACTIVE_WINDOW_ATOM "_QTCURVE_ACTIVE_WINDOW_"
#define TOGGLE_MENUBAR_ATOM "_TQTCURVE_TOGGLE_MENUBAR_" #define TOGGLE_MENUBAR_ATOM "_QTCURVE_TOGGLE_MENUBAR_"
#define TOGGLE_STATUSBAR_ATOM "_TQTCURVE_TOGGLE_STATUSBAR_" #define TOGGLE_STATUSBAR_ATOM "_QTCURVE_TOGGLE_STATUSBAR_"
#define OPACITY_ATOM "_TQTCURVE_OPACITY_" #define OPACITY_ATOM "_QTCURVE_OPACITY_"
#define BGND_ATOM "_TQTCURVE_BGND_" #define BGND_ATOM "_QTCURVE_BGND_"
#define BLEND_TITLEBAR (opts.menubarAppearance==opts.titlebarAppearance && opts.menubarAppearance==opts.inactiveTitlebarAppearance && \ #define BLEND_TITLEBAR (opts.menubarAppearance==opts.titlebarAppearance && opts.menubarAppearance==opts.inactiveTitlebarAppearance && \
!(opts.windowBorder&WINDOW_BORDER_BLEND_TITLEBAR) && SHADE_WINDOW_BORDER==opts.shadeMenubars && opts.windowDrag) !(opts.windowBorder&WINDOW_BORDER_BLEND_TITLEBAR) && SHADE_WINDOW_BORDER==opts.shadeMenubars && opts.windowDrag)
@ -456,8 +456,8 @@ typedef enum
#endif #endif
#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000)) #if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
#define TQTCURVE_PREVIEW_CONFIG "QTCURVE_PREVIEW_CONFIG" #define QTCURVE_PREVIEW_CONFIG "QTCURVE_PREVIEW_CONFIG"
#define TQTCURVE_PREVIEW_CONFIG_FULL "QTCURVE_PREVIEW_CONFIG_FULL" #define QTCURVE_PREVIEW_CONFIG_FULL "QTCURVE_PREVIEW_CONFIG_FULL"
typedef enum typedef enum
{ {

@ -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 "); baseEncoded.prepend("trying to create local folder ");
perror(baseEncoded.constData()); perror(baseEncoded.constData());
#else #else
perror("trying to create TQtCurve config folder "); perror("trying to create QtCurve config folder ");
#endif #endif
return false; // Couldn't create it :-( return false; // Couldn't create it :-(
} }

@ -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
---- ----

@ -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
---- ----

@ -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) TQWidget * allocate_kstyle_config(TQWidget *parent)
{ {
KGlobal::locale()->insertCatalogue("qtcurve"); KGlobal::locale()->insertCatalogue("qtcurve");
return new TQtCurveConfig(parent); return new QtCurveConfig(parent);
} }
} }
@ -260,7 +260,7 @@ class CGradItem : public TQListViewItem
double prev; double prev;
}; };
CGradientPreview::CGradientPreview(TQtCurveConfig *c, TQWidget *p) CGradientPreview::CGradientPreview(QtCurveConfig *c, TQWidget *p)
: TQWidget(p), : TQWidget(p),
cfg(c) cfg(c)
{ {
@ -561,8 +561,8 @@ static void insertLvLinesEntries(TQComboBox *combo)
combo->insertItem(i18n("Old style (TDE and Gtk2 different)")); combo->insertItem(i18n("Old style (TDE and Gtk2 different)"));
} }
TQtCurveConfig::TQtCurveConfig(TQWidget *parent) QtCurveConfig::QtCurveConfig(TQWidget *parent)
: TQtCurveConfigBase(parent), : QtCurveConfigBase(parent),
#ifdef TQTC_STYLE_SUPPORT #ifdef TQTC_STYLE_SUPPORT
exportDialog(NULL), exportDialog(NULL),
#endif #endif
@ -793,11 +793,11 @@ TQtCurveConfig::TQtCurveConfig(TQWidget *parent)
resize(600, 400); 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)); TQStringList files(KGlobal::dirs()->findAllResources("data", "QtCurve/*"EXTENSION, false, true));
@ -813,7 +813,7 @@ void TQtCurveConfig::loadStyles(TQPopupMenu *menu)
this, SLOT(setStyle(int)))]=*it; this, SLOT(setStyle(int)))]=*it;
} }
void TQtCurveConfig::save() void QtCurveConfig::save()
{ {
Options opts=currentStyle; Options opts=currentStyle;
@ -836,26 +836,26 @@ void TQtCurveConfig::save()
cfg->setForceGlobal(useGlobals); cfg->setForceGlobal(useGlobals);
} }
void TQtCurveConfig::defaults() void QtCurveConfig::defaults()
{ {
setWidgetOptions(defaultStyle); setWidgetOptions(defaultStyle);
if (settingsChanged()) if (settingsChanged())
emit changed(true); emit changed(true);
} }
void TQtCurveConfig::setStyle(int s) void QtCurveConfig::setStyle(int s)
{ {
loadStyle(styles[s]); loadStyle(styles[s]);
} }
void TQtCurveConfig::emboldenToggled() void QtCurveConfig::emboldenToggled()
{ {
if(!embolden->isChecked() && IND_NONE==defBtnIndicator->currentItem()) if(!embolden->isChecked() && IND_NONE==defBtnIndicator->currentItem())
defBtnIndicator->setCurrentItem(IND_TINT); defBtnIndicator->setCurrentItem(IND_TINT);
updateChanged(); updateChanged();
} }
void TQtCurveConfig::defBtnIndicatorChanged() void QtCurveConfig::defBtnIndicatorChanged()
{ {
if(IND_NONE==defBtnIndicator->currentItem() && !embolden->isChecked()) if(IND_NONE==defBtnIndicator->currentItem() && !embolden->isChecked())
embolden->setChecked(true); embolden->setChecked(true);
@ -868,7 +868,7 @@ void TQtCurveConfig::defBtnIndicatorChanged()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::buttonEffectChanged() void QtCurveConfig::buttonEffectChanged()
{ {
if(EFFECT_NONE==buttonEffect->currentItem()) if(EFFECT_NONE==buttonEffect->currentItem())
{ {
@ -881,7 +881,7 @@ void TQtCurveConfig::buttonEffectChanged()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::coloredMouseOverChanged() void QtCurveConfig::coloredMouseOverChanged()
{ {
if(MO_GLOW==coloredMouseOver->currentItem() && if(MO_GLOW==coloredMouseOver->currentItem() &&
EFFECT_NONE==buttonEffect->currentItem()) EFFECT_NONE==buttonEffect->currentItem())
@ -890,51 +890,51 @@ void TQtCurveConfig::coloredMouseOverChanged()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::shadeSlidersChanged() void QtCurveConfig::shadeSlidersChanged()
{ {
customSlidersColor->setEnabled(SHADE_CUSTOM==shadeSliders->currentItem()); customSlidersColor->setEnabled(SHADE_CUSTOM==shadeSliders->currentItem());
updateChanged(); updateChanged();
} }
void TQtCurveConfig::shadeMenubarsChanged() void QtCurveConfig::shadeMenubarsChanged()
{ {
customMenubarsColor->setEnabled(SHADE_CUSTOM==shadeMenubars->currentItem()); customMenubarsColor->setEnabled(SHADE_CUSTOM==shadeMenubars->currentItem());
updateChanged(); updateChanged();
} }
void TQtCurveConfig::shadeCheckRadioChanged() void QtCurveConfig::shadeCheckRadioChanged()
{ {
customCheckRadioColor->setEnabled(SHADE_CUSTOM==shadeCheckRadio->currentItem()); customCheckRadioColor->setEnabled(SHADE_CUSTOM==shadeCheckRadio->currentItem());
updateChanged(); updateChanged();
} }
void TQtCurveConfig::customMenuTextColorChanged() void QtCurveConfig::customMenuTextColorChanged()
{ {
customMenuNormTextColor->setEnabled(customMenuTextColor->isChecked()); customMenuNormTextColor->setEnabled(customMenuTextColor->isChecked());
customMenuSelTextColor->setEnabled(customMenuTextColor->isChecked()); customMenuSelTextColor->setEnabled(customMenuTextColor->isChecked());
updateChanged(); updateChanged();
} }
void TQtCurveConfig::menuStripeChanged() void QtCurveConfig::menuStripeChanged()
{ {
customMenuStripeColor->setEnabled(SHADE_CUSTOM==menuStripe->currentItem()); customMenuStripeColor->setEnabled(SHADE_CUSTOM==menuStripe->currentItem());
menuStripeAppearance->setEnabled(SHADE_NONE!=menuStripe->currentItem()); menuStripeAppearance->setEnabled(SHADE_NONE!=menuStripe->currentItem());
updateChanged(); updateChanged();
} }
void TQtCurveConfig::comboBtnChanged() void QtCurveConfig::comboBtnChanged()
{ {
customComboBtnColor->setEnabled(SHADE_CUSTOM==comboBtn->currentItem()); customComboBtnColor->setEnabled(SHADE_CUSTOM==comboBtn->currentItem());
updateChanged(); updateChanged();
} }
void TQtCurveConfig::sortedLvChanged() void QtCurveConfig::sortedLvChanged()
{ {
customSortedLvColor->setEnabled(SHADE_CUSTOM==sortedLv->currentItem()); customSortedLvColor->setEnabled(SHADE_CUSTOM==sortedLv->currentItem());
updateChanged(); updateChanged();
} }
void TQtCurveConfig::stripedProgressChanged() void QtCurveConfig::stripedProgressChanged()
{ {
bool allowAnimation=STRIPE_NONE!=stripedProgress->currentItem() && bool allowAnimation=STRIPE_NONE!=stripedProgress->currentItem() &&
STRIPE_FADE!=stripedProgress->currentItem(); STRIPE_FADE!=stripedProgress->currentItem();
@ -945,7 +945,7 @@ void TQtCurveConfig::stripedProgressChanged()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::activeTabAppearanceChanged() void QtCurveConfig::activeTabAppearanceChanged()
{ {
int current(activeTabAppearance->currentItem()); int current(activeTabAppearance->currentItem());
bool disableCol(APPEARANCE_FLAT==current && APPEARANCE_RAISED==current); bool disableCol(APPEARANCE_FLAT==current && APPEARANCE_RAISED==current);
@ -956,7 +956,7 @@ void TQtCurveConfig::activeTabAppearanceChanged()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::tabMoChanged() void QtCurveConfig::tabMoChanged()
{ {
if(TAB_MO_GLOW==tabMouseOver->currentItem()) if(TAB_MO_GLOW==tabMouseOver->currentItem())
roundAllTabs->setChecked(true); roundAllTabs->setChecked(true);
@ -964,14 +964,14 @@ void TQtCurveConfig::tabMoChanged()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::shadingChanged() void QtCurveConfig::shadingChanged()
{ {
updateChanged(); updateChanged();
if(gradPreview) if(gradPreview)
gradPreview->repaint(); gradPreview->repaint();
} }
void TQtCurveConfig::passwordCharClicked() void QtCurveConfig::passwordCharClicked()
{ {
int cur(toInt(passwordChar->text())); int cur(toInt(passwordChar->text()));
CharSelectDialog dlg(this, cur); CharSelectDialog dlg(this, cur);
@ -983,7 +983,7 @@ void TQtCurveConfig::passwordCharClicked()
} }
} }
void TQtCurveConfig::unifySpinBtnsToggled() void QtCurveConfig::unifySpinBtnsToggled()
{ {
if(unifySpinBtns->isChecked()) if(unifySpinBtns->isChecked())
unifySpin->setChecked(false); unifySpin->setChecked(false);
@ -991,7 +991,7 @@ void TQtCurveConfig::unifySpinBtnsToggled()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::unifySpinToggled() void QtCurveConfig::unifySpinToggled()
{ {
if(unifySpin->isChecked()) if(unifySpin->isChecked())
unifySpinBtns->setChecked(false); unifySpinBtns->setChecked(false);
@ -999,14 +999,14 @@ void TQtCurveConfig::unifySpinToggled()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::sliderThumbChanged() void QtCurveConfig::sliderThumbChanged()
{ {
if(LINE_NONE!=sliderThumbs->currentItem() && sliderWidth->value()<DEFAULT_SLIDER_WIDTH) if(LINE_NONE!=sliderThumbs->currentItem() && sliderWidth->value()<DEFAULT_SLIDER_WIDTH)
sliderWidth->setValue(DEFAULT_SLIDER_WIDTH); sliderWidth->setValue(DEFAULT_SLIDER_WIDTH);
updateChanged(); updateChanged();
} }
void TQtCurveConfig::sliderWidthChanged() void QtCurveConfig::sliderWidthChanged()
{ {
if(0==sliderWidth->value()%2) if(0==sliderWidth->value()%2)
sliderWidth->setValue(sliderWidth->value()+1); sliderWidth->setValue(sliderWidth->value()+1);
@ -1016,7 +1016,7 @@ void TQtCurveConfig::sliderWidthChanged()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::setupStack() void QtCurveConfig::setupStack()
{ {
int i=0; int i=0;
lastCategory=new CStackItem(stackList, i18n("General"), i++); lastCategory=new CStackItem(stackList, i18n("General"), i++);
@ -1044,7 +1044,7 @@ void TQtCurveConfig::setupStack()
connect(stackList, SIGNAL(selectionChanged()), SLOT(changeStack())); connect(stackList, SIGNAL(selectionChanged()), SLOT(changeStack()));
} }
void TQtCurveConfig::changeStack() void QtCurveConfig::changeStack()
{ {
CStackItem *item=(CStackItem *)(stackList->selectedItem()); CStackItem *item=(CStackItem *)(stackList->selectedItem());
@ -1064,7 +1064,7 @@ void TQtCurveConfig::changeStack()
stack->raiseWidget(item->stack()); stack->raiseWidget(item->stack());
} }
void TQtCurveConfig::gradChanged(int i) void QtCurveConfig::gradChanged(int i)
{ {
GradientCont::const_iterator it(customGradient.find((EAppearance)i)); GradientCont::const_iterator it(customGradient.find((EAppearance)i));
@ -1091,7 +1091,7 @@ void TQtCurveConfig::gradChanged(int i)
gradBorder->setEnabled(NUM_CUSTOM_GRAD!=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()); 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()); 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(); TQListViewItem *cur=gradStops->selectedItem();
@ -1197,7 +1197,7 @@ void TQtCurveConfig::removeGradStop()
} }
} }
void TQtCurveConfig::updateGradStop() void QtCurveConfig::updateGradStop()
{ {
TQListViewItem *i=gradStops->selectedItem(); TQListViewItem *i=gradStops->selectedItem();
@ -1225,7 +1225,7 @@ void TQtCurveConfig::updateGradStop()
addGradStop(); addGradStop();
} }
void TQtCurveConfig::stopSelected() void QtCurveConfig::stopSelected()
{ {
TQListViewItem *i=gradStops->selectedItem(); 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) for(int i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i)
gradCombo->insertItem(i18n("Custom gradient %1").arg((i-APPEARANCE_CUSTOM1)+1)); gradCombo->insertItem(i18n("Custom gradient %1").arg((i-APPEARANCE_CUSTOM1)+1));
@ -1281,7 +1281,7 @@ void TQtCurveConfig::setupGradientsTab()
connect(gradStops, SIGNAL(selectionChanged()), SLOT(stopSelected())); connect(gradStops, SIGNAL(selectionChanged()), SLOT(stopSelected()));
} }
void TQtCurveConfig::setupShadesTab() void QtCurveConfig::setupShadesTab()
{ {
int shade(0); int shade(0);
@ -1294,14 +1294,14 @@ void TQtCurveConfig::setupShadesTab()
connect(customShading, SIGNAL(toggled(bool)), SLOT(updateChanged())); 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); w->setRange(0.0, 2.0, 0.05, false);
connect(w, SIGNAL(valueChanged(double)), SLOT(updateChanged())); connect(w, SIGNAL(valueChanged(double)), SLOT(updateChanged()));
shadeVals[shade]=w; shadeVals[shade]=w;
} }
void TQtCurveConfig::populateShades(const Options &opts) void QtCurveConfig::populateShades(const Options &opts)
{ {
SHADES SHADES
int contrast=TQSettings().readNumEntry("/Qt/KDE/contrast", 7); int contrast=TQSettings().readNumEntry("/Qt/KDE/contrast", 7);
@ -1320,7 +1320,7 @@ void TQtCurveConfig::populateShades(const Options &opts)
[i]); [i]);
} }
bool TQtCurveConfig::diffShades(const Options &opts) bool QtCurveConfig::diffShades(const Options &opts)
{ {
if( (!USE_CUSTOM_SHADES(opts) && customShading->isChecked()) || if( (!USE_CUSTOM_SHADES(opts) && customShading->isChecked()) ||
(USE_CUSTOM_SHADES(opts) && !customShading->isChecked()) ) (USE_CUSTOM_SHADES(opts) && !customShading->isChecked()) )
@ -1336,7 +1336,7 @@ bool TQtCurveConfig::diffShades(const Options &opts)
return false; return false;
} }
void TQtCurveConfig::setPasswordChar(int ch) void QtCurveConfig::setPasswordChar(int ch)
{ {
TQString str; TQString str;
TQTextOStream s(&str); TQTextOStream s(&str);
@ -1346,20 +1346,20 @@ void TQtCurveConfig::setPasswordChar(int ch)
passwordChar->setText(str); passwordChar->setText(str);
} }
void TQtCurveConfig::updateChanged() void QtCurveConfig::updateChanged()
{ {
if (settingsChanged()) if (settingsChanged())
emit changed(true); emit changed(true);
} }
void TQtCurveConfig::focusChanged() void QtCurveConfig::focusChanged()
{ {
if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem()) if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem())
round->setCurrentItem(ROUND_EXTRA); round->setCurrentItem(ROUND_EXTRA);
updateChanged(); updateChanged();
} }
void TQtCurveConfig::roundChanged() void QtCurveConfig::roundChanged()
{ {
if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem()) if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem())
focus->setCurrentItem(FOCUS_LINE); focus->setCurrentItem(FOCUS_LINE);
@ -1369,7 +1369,7 @@ void TQtCurveConfig::roundChanged()
updateChanged(); updateChanged();
} }
void TQtCurveConfig::importStyle() void QtCurveConfig::importStyle()
{ {
TQString file(KFileDialog::getOpenFileName(TQString::null, TQString file(KFileDialog::getOpenFileName(TQString::null,
i18n("*"EXTENSION"|QtCurve Settings Files\n" i18n("*"EXTENSION"|QtCurve Settings Files\n"
@ -1380,7 +1380,7 @@ void TQtCurveConfig::importStyle()
loadStyle(file); loadStyle(file);
} }
void TQtCurveConfig::exportStyle() void QtCurveConfig::exportStyle()
{ {
TQString file(KFileDialog::getSaveFileName(TQString::null, i18n("*"EXTENSION"|QtCurve Settings Files"), this)); 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 #ifdef TQTC_STYLE_SUPPORT
if(!exportDialog) if(!exportDialog)
@ -1415,7 +1415,7 @@ void TQtCurveConfig::exportTheme()
#endif #endif
} }
void TQtCurveConfig::loadStyle(const TQString &file) void QtCurveConfig::loadStyle(const TQString &file)
{ {
Options opts; 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.round=(ERound)round->currentItem();
opts.toolbarBorders=(ETBarBorder)toolbarBorders->currentItem(); opts.toolbarBorders=(ETBarBorder)toolbarBorders->currentItem();
@ -1560,7 +1560,7 @@ void TQtCurveConfig::setOptions(Options &opts)
opts.customShades[0]=0; opts.customShades[0]=0;
} }
void TQtCurveConfig::setWidgetOptions(const Options &opts) void QtCurveConfig::setWidgetOptions(const Options &opts)
{ {
round->setCurrentItem(opts.round); round->setCurrentItem(opts.round);
scrollbarType->setCurrentItem(opts.scrollbarType); scrollbarType->setCurrentItem(opts.scrollbarType);
@ -1703,7 +1703,7 @@ void TQtCurveConfig::setWidgetOptions(const Options &opts)
populateShades(opts); populateShades(opts);
} }
int TQtCurveConfig::getSquareFlags() int QtCurveConfig::getSquareFlags()
{ {
int square(0); int square(0);
/* /*
@ -1719,7 +1719,7 @@ int TQtCurveConfig::getSquareFlags()
return square; return square;
} }
int TQtCurveConfig::getWindowBorderFlags() int QtCurveConfig::getWindowBorderFlags()
{ {
int flags(0); int flags(0);
@ -1734,7 +1734,7 @@ int TQtCurveConfig::getWindowBorderFlags()
return flags; return flags;
} }
bool TQtCurveConfig::settingsChanged() bool QtCurveConfig::settingsChanged()
{ {
return round->currentItem()!=currentStyle.round || return round->currentItem()!=currentStyle.round ||
toolbarBorders->currentItem()!=currentStyle.toolbarBorders || toolbarBorders->currentItem()!=currentStyle.toolbarBorders ||

@ -2,7 +2,7 @@
#define __QTCURVECONFIG_H__ #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; class CExportThemeDialog;
#endif #endif
class CStackItem; class CStackItem;
class TQtCurveConfig; class QtCurveConfig;
class CGradientPreview : public TQWidget class CGradientPreview : public TQWidget
{ {
@ -45,7 +45,7 @@ class CGradientPreview : public TQWidget
public: public:
CGradientPreview(TQtCurveConfig *c, TQWidget *p); CGradientPreview(QtCurveConfig *c, TQWidget *p);
TQSize sizeHint() const; TQSize sizeHint() const;
TQSize minimumSizeHint() const; TQSize minimumSizeHint() const;
@ -58,20 +58,20 @@ class CGradientPreview : public TQWidget
private: private:
TQtCurveConfig *cfg; QtCurveConfig *cfg;
TQColor color; TQColor color;
GradientStopCont stops; GradientStopCont stops;
}; };
class TQtCurveConfig : public TQtCurveConfigBase class QtCurveConfig : public QtCurveConfigBase
{ {
Q_OBJECT Q_OBJECT
public: public:
TQtCurveConfig(TQWidget *parent); QtCurveConfig(TQWidget *parent);
virtual ~TQtCurveConfig(); virtual ~QtCurveConfig();
EShading currentShading() const { return (EShading)shading->currentItem(); } EShading currentShading() const { return (EShading)shading->currentItem(); }

@ -1,8 +1,8 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>TQtCurveConfigBase</class> <class>QtCurveConfigBase</class>
<widget class="TQWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>TQtCurveConfigBase</cstring> <cstring>QtCurveConfigBase</cstring>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>

@ -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 <X11/Xatom.h> #include <X11/Xatom.h>
#include "qtc_fixx11h.h" #include "qtc_fixx11h.h"
#ifndef HAVE_REAL_TQT
#define TQTitleBar QTitleBar
#endif
static const Atom constNetMoveResize = XInternAtom(tqt_xdisplay(), "_NET_WM_MOVERESIZE", False); static const Atom constNetMoveResize = XInternAtom(tqt_xdisplay(), "_NET_WM_MOVERESIZE", False);
static const TQWidget * getTopLevel(const TQWidget *widget) static const TQWidget * getTopLevel(const TQWidget *widget)
{ {
@ -338,16 +342,16 @@ static TQString themeFile(const TQString &dir, const TQString &n, bool trinity=t
} }
#endif #endif
class TQtCurveStylePlugin : public TQStylePlugin class QtCurveStylePlugin : public TQStylePlugin
{ {
public: public:
TQtCurveStylePlugin() : TQStylePlugin() { } QtCurveStylePlugin() : TQStylePlugin() { }
TQStringList keys() const TQStringList keys() const
{ {
TQStringList list; TQStringList list;
list << "TQtCurve"; list << "QtCurve";
#ifdef TQTC_STYLE_SUPPORT #ifdef TQTC_STYLE_SUPPORT
getStyles(kdeHome(useTQt3Settings()), list); getStyles(kdeHome(useTQt3Settings()), list);
@ -362,16 +366,16 @@ class TQtCurveStylePlugin : public TQStylePlugin
TQStyle * create(const TQString &s) TQStyle * create(const TQString &s)
{ {
return "qtcurve"==s.lower() return "qtcurve"==s.lower()
? new TQtCurveStyle ? new QtCurveStyle
#ifdef TQTC_STYLE_SUPPORT #ifdef TQTC_STYLE_SUPPORT
: 0==s.find(THEME_PREFIX) : 0==s.find(THEME_PREFIX)
? new TQtCurveStyle(s) ? new QtCurveStyle(s)
#endif #endif
: 0; : 0;
} }
}; };
TQ_EXPORT_PLUGIN(TQtCurveStylePlugin) TQ_EXPORT_PLUGIN(QtCurveStylePlugin)
#define SKIP_TASKBAR (APP_SKIP_TASKBAR==itsThemedApp || APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp) #define SKIP_TASKBAR (APP_SKIP_TASKBAR==itsThemedApp || APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp)
@ -806,9 +810,9 @@ static void drawArrow(TQPainter *p, const TQRect &r, const TQColor &col, TQStyle
} }
#ifdef TQTC_STYLE_SUPPORT #ifdef TQTC_STYLE_SUPPORT
TQtCurveStyle::TQtCurveStyle(const TQString &name) QtCurveStyle::QtCurveStyle(const TQString &name)
#else #else
TQtCurveStyle::TQtCurveStyle() QtCurveStyle::QtCurveStyle()
#endif #endif
: BASE_STYLE(AllowMenuTransparency, WindowsStyleScrollBar), : BASE_STYLE(AllowMenuTransparency, WindowsStyleScrollBar),
itsSliderCols(0L), itsSliderCols(0L),
@ -1111,7 +1115,7 @@ TQtCurveStyle::TQtCurveStyle()
setSbType(); setSbType();
} }
TQtCurveStyle::~TQtCurveStyle() QtCurveStyle::~QtCurveStyle()
{ {
if(itsSidebarButtonsCols!=itsSliderCols && if(itsSidebarButtonsCols!=itsSliderCols &&
itsSidebarButtonsCols!=itsDefBtnCols) itsSidebarButtonsCols!=itsDefBtnCols)
@ -1154,7 +1158,7 @@ static TQString getFile(const TQString &f)
return d; return d;
} }
void TQtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr) void QtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
{ {
if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
TQApplication *app = reinterpret_cast<TQApplication*>(ptr); TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
@ -1162,7 +1166,7 @@ void TQtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlE
TQString appName(getFile(app->argv()[0])); TQString appName(getFile(app->argv()[0]));
if(NULL!=getenv("QTCURVE_DEBUG")) 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) if ("kicker"==appName || "appletproxy"==appName)
{ {
@ -1249,7 +1253,7 @@ void TQtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlE
} }
} }
void TQtCurveStyle::polish(TQPalette &pal) void QtCurveStyle::polish(TQPalette &pal)
{ {
if(APP_MACTOR==itsThemedApp && itsMactorPal && if(APP_MACTOR==itsThemedApp && itsMactorPal &&
pal.active().background()!=itsMactorPal->active().background()) pal.active().background()!=itsMactorPal->active().background())
@ -1431,7 +1435,7 @@ static TQColor disable(const TQColor &col, const TQColor &bgnd)
return c; 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()); TQColor mid(old.mid());
@ -1462,7 +1466,7 @@ TQColorGroup TQtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColor
static const char * kdeToolbarWidget="kde toolbar widget"; static const char * kdeToolbarWidget="kde toolbar widget";
void TQtCurveStyle::polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr) void QtCurveStyle::polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
{ {
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@ -1847,7 +1851,7 @@ void TQtCurveStyle::polish(TQStyleControlElementData ceData, ControlElementFlags
BASE_STYLE::polish(ceData, elementFlags, ptr); BASE_STYLE::polish(ceData, elementFlags, ptr);
} }
void TQtCurveStyle::unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr) void QtCurveStyle::unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
{ {
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@ -1992,7 +1996,7 @@ static void sendXEvent(TQDialog *dlg, const char *msg)
SubstructureRedirectMask | SubstructureNotifyMask, &xev); SubstructureRedirectMask | SubstructureNotifyMask, &xev);
} }
bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg) bool QtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
{ {
Window win; Window win;
@ -2004,7 +2008,7 @@ bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
return false; return false;
} }
bool TQtCurveStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) bool QtCurveStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
{ {
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
TQObject* object = reinterpret_cast<TQObject*>(source); TQObject* object = reinterpret_cast<TQObject*>(source);
@ -2467,7 +2471,7 @@ bool TQtCurveStyle::objectEventHandler( TQStyleControlElementData ceData, Contro
return BASE_STYLE::objectEventHandler(ceData, elementFlags, source, event); return BASE_STYLE::objectEventHandler(ceData, elementFlags, source, 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, const TQColorGroup &cg, SFlags flags,
int round, const TQColor &fill, const TQColor *custom, int round, const TQColor &fill, const TQColor *custom,
bool doBorder, bool doCorners, EWidget w) const bool doBorder, bool doCorners, EWidget w) const
@ -2690,7 +2694,7 @@ void TQtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRe
p->restore(); 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) if(itsMouseOverCols || itsDefBtnCols || cols)
{ {
@ -2725,7 +2729,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; square=square || ROUND_NONE==opts.round;
@ -2762,7 +2766,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, SFlags flags, int round, const TQColor *custom, EWidget w, bool doCorners,
EBorder borderProfile, bool blendBorderColors, int borderVal) const EBorder borderProfile, bool blendBorderColors, int borderVal) const
{ {
@ -3016,7 +3020,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 SubControl button) const
{ {
if(!sunken) if(!sunken)
@ -3024,7 +3028,7 @@ void TQtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const
drawWindowIcon(painter, color, r, sunken, margin, button); 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); TQRect rect(r);
@ -3107,7 +3111,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 SFlags flags, EntryColor coloration, int round, EWidget w) const
{ {
const TQColor *use(ENTRY_MOUSE_OVER==coloration && itsMouseOverCols const TQColor *use(ENTRY_MOUSE_OVER==coloration && itsMouseOverCols
@ -3169,7 +3173,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 TQ_PrimitiveElement pe, bool small, bool checkActive) const
{ {
const TQColor &col(flags&Style_Enabled const TQColor &col(flags&Style_Enabled
@ -3181,7 +3185,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); ::drawArrow(p, r, p->pen().style()==TQPen::NoPen ? col : TQColor(p->pen().color()), pe, opts, small);
} }
void TQtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r, void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r,
const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const
{ {
switch(pe) switch(pe)
@ -4125,7 +4129,7 @@ void TQtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, TQStyleC
widget->parentWidget() && ::tqqt_cast<TQListBox *>(widget->parentWidget()) && widget->parentWidget() && ::tqqt_cast<TQListBox *>(widget->parentWidget()) &&
widget->parentWidget()->parentWidget() && ::tqqt_cast<TQComboBox *>(widget->parentWidget()->parentWidget())) widget->parentWidget()->parentWidget() && ::tqqt_cast<TQComboBox *>(widget->parentWidget()->parentWidget()))
{ {
struct TQtCurveListBoxItem : public TQListBoxItem struct QtCurveListBoxItem : public TQListBoxItem
{ {
void paintContents(TQPainter *p) void paintContents(TQPainter *p)
{ {
@ -4134,7 +4138,7 @@ void TQtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, TQStyleC
}; };
TQListBox *box=(TQListBox *)widget->parentWidget(); TQListBox *box=(TQListBox *)widget->parentWidget();
TQtCurveListBoxItem *item=(TQtCurveListBoxItem *)(box->item(box->currentItem())); QtCurveListBoxItem *item=(QtCurveListBoxItem *)(box->item(box->currentItem()));
if(item) if(item)
{ {
@ -4353,7 +4357,7 @@ static TQString elliditide(const TQString &text, const TQFontMetrics &fontMetric
return title; return title;
} }
void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQRect &r, const TQColorGroup &cg, SFlags flags,
const TQStyleOption &opt, const TQWidget *widget) const const TQStyleOption &opt, const TQWidget *widget) const
{ {
@ -4510,7 +4514,7 @@ void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, TQSty
} }
} }
void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQRect &r, const TQColorGroup &cg, SFlags flags,
const TQStyleOption &data, const TQWidget *widget) const const TQStyleOption &data, const TQWidget *widget) const
{ {
@ -5432,7 +5436,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, TQStyleCon
} }
} }
void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, void QtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const
{ {
switch(control) switch(control)
@ -5458,7 +5462,7 @@ void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, TQStyl
} }
} }
void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, void QtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags,
const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const
{ {
switch (control) switch (control)
@ -5473,7 +5477,7 @@ void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p,
} }
} }
TQRect TQtCurveStyle::subRect(SubRect subrect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget)const TQRect QtCurveStyle::subRect(SubRect subrect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget)const
{ {
TQRect rect, TQRect rect,
wrect(widget->rect()); wrect(widget->rect());
@ -5530,7 +5534,7 @@ class TQTitleBar : public TQWidget
TQWidget *window() const; TQWidget *window() const;
}; };
void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQRect &r, const TQColorGroup &cg, SFlags flags,
SCFlags controls, SCFlags active, SCFlags controls, SCFlags active,
const TQStyleOption &data, const TQWidget *widget) const const TQStyleOption &data, const TQWidget *widget) const
@ -6344,7 +6348,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQS
case CC_Slider: case CC_Slider:
// //
// Note: Can't use KStyle's drawing routine, as this doesnt work for sliders on gradient // 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 // 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 // the background, etc, if on a toolbar - and that is handled in eventFilter
{ {
@ -6520,7 +6524,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQS
} }
} }
TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, TQStyleControlElementData ceData, ControlElementFlags elementFlags, TQRect QtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
SubControl sc, const TQStyleOption &data, const TQWidget *widget) const SubControl sc, const TQStyleOption &data, const TQWidget *widget) const
{ {
bool reverse(TQApplication::reverseLayout()); bool reverse(TQApplication::reverseLayout());
@ -6815,7 +6819,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, TQStyleC
return BASE_STYLE::querySubControlMetrics(control, ceData, elementFlags, sc, data, widget); return BASE_STYLE::querySubControlMetrics(control, ceData, elementFlags, sc, data, widget);
} }
int TQtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const int QtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{ {
switch(metric) switch(metric)
{ {
@ -6905,7 +6909,7 @@ int TQtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceD
} }
} }
int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{ {
switch(kpm) switch(kpm)
{ {
@ -6916,7 +6920,7 @@ int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData
} }
} }
TQSize TQtCurveStyle::sizeFromContents(ContentsType contents, TQStyleControlElementData ceData, ControlElementFlags elementFlags, TQSize QtCurveStyle::sizeFromContents(ContentsType contents, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQSize &contentsSize, const TQStyleOption &data, const TQWidget *widget) const const TQSize &contentsSize, const TQStyleOption &data, const TQWidget *widget) const
{ {
switch(contents) switch(contents)
@ -7028,7 +7032,7 @@ TQSize TQtCurveStyle::sizeFromContents(ContentsType contents, TQStyleControlElem
return BASE_STYLE::sizeFromContents(contents, ceData, elementFlags, contentsSize, data, widget); return BASE_STYLE::sizeFromContents(contents, ceData, elementFlags, contentsSize, data, widget);
} }
int TQtCurveStyle::styleHint(StyleHint stylehint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &option, int QtCurveStyle::styleHint(StyleHint stylehint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &option,
TQStyleHintReturn *returnData, const TQWidget *widget) const TQStyleHintReturn *returnData, const TQWidget *widget) const
{ {
switch(stylehint) switch(stylehint)
@ -7075,7 +7079,7 @@ int TQtCurveStyle::styleHint(StyleHint stylehint, TQStyleControlElementData ceDa
} }
} }
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 const TQPixmap *pixmap, const TQString &text, int len, const TQColor *penColor) const
{ {
TQRect r2(r); TQRect r2(r);
@ -7189,7 +7193,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 bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const
{ {
int fill=opts.useHighlightForMenu && (!mbi || itsHighlightCols==cols) ? ORIGINAL_SHADE : 4, int fill=opts.useHighlightForMenu && (!mbi || itsHighlightCols==cols) ? ORIGINAL_SHADE : 4,
@ -7246,7 +7250,7 @@ void TQtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const
drawBevelGradient(cols[fill], p, r, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM); 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 int round, const TQWidget *widget) const
{ {
if(rx.width()<1) if(rx.width()<1)
@ -7339,7 +7343,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) if(IS_FLAT(bevApp) && opts.colorSelTab && sel)
bevApp=APPEARANCE_GRADIENT; bevApp=APPEARANCE_GRADIENT;
@ -7387,7 +7391,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); const Gradient *grad=getGradient(app, &opts);
@ -7456,7 +7460,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 TQPainter *p, TQRect const &r, bool horiz) const
{ {
if(r.width()>0 && r.height()>0) if(r.width()>0 && r.height()>0)
@ -7505,7 +7509,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 SFlags flags, bool slider) const
{ {
int min(MIN_SLIDER_SIZE(opts.sliderThumbs)); int min(MIN_SLIDER_SIZE(opts.sliderThumbs));
@ -7560,7 +7564,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 SFlags flags, TQSlider *slider, bool tb) const
{ {
bool horiz(SLIDER_TRIANGULAR==opts.sliderStyle ? r.height()>r.width() : r.width()>r.height()); bool horiz(SLIDER_TRIANGULAR==opts.sliderStyle ? r.height()>r.width() : r.width()>r.height());
@ -7751,7 +7755,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 SFlags flags, const TQWidget *widget) const
{ {
const TQSlider *sliderWidget((const TQSlider *)widget); const TQSlider *sliderWidget((const TQSlider *)widget);
@ -7813,7 +7817,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 bool menu, bool horiz) const
{ {
if(menu && APPEARANCE_STRIPED==opts.bgndAppearance && IS_FLAT(opts.menubarAppearance) && SHADE_NONE==opts.shadeMenubars) if(menu && APPEARANCE_STRIPED==opts.bgndAppearance && IS_FLAT(opts.menubarAppearance) && SHADE_NONE==opts.shadeMenubars)
@ -7829,7 +7833,7 @@ void TQtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, c
drawBevelGradient(color, p, rx, horiz, false, app); 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 ELine handles) const
{ {
if(r.width()<2 || r.height()<2) if(r.width()<2 || r.height()<2)
@ -7881,7 +7885,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])); TQColor col1(midColor(cg.background(), itsMouseOverCols[ORIGINAL_SHADE]));
TQRect r2(r); TQRect r2(r);
@ -7893,7 +7897,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)); 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 SHADES
@ -7909,7 +7913,7 @@ void TQtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const
vals[ORIGINAL_SHADE]=base; 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]) if(cg.button()!=itsButtonCols[ORIGINAL_SHADE])
{ {
@ -7920,14 +7924,14 @@ const TQColor * TQtCurveStyle::buttonColors(const TQColorGroup &cg) const
return itsButtonCols; 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)) return opts.crColor && flags&Style_Enabled && (flags&Style_On || !(flags&Style_Off))
? itsCheckRadioSelCols ? itsCheckRadioSelCols
: buttonColors(cg); : 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) return (flags&Style_Enabled)
? SHADE_NONE!=opts.shadeSliders &&itsSliderCols && (!opts.colorSliderMouseOver || flags&Style_MouseOver) ? SHADE_NONE!=opts.shadeSliders &&itsSliderCols && (!opts.colorSliderMouseOver || flags&Style_MouseOver)
@ -7936,7 +7940,7 @@ const TQColor * TQtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags
: itsBackgroundCols; : itsBackgroundCols;
} }
const TQColor * TQtCurveStyle::backgroundColors(const TQColor &c) const const TQColor * QtCurveStyle::backgroundColors(const TQColor &c) const
{ {
if(c!=itsBackgroundCols[ORIGINAL_SHADE]) if(c!=itsBackgroundCols[ORIGINAL_SHADE])
{ {
@ -7947,13 +7951,13 @@ const TQColor * TQtCurveStyle::backgroundColors(const TQColor &c) const
return itsBackgroundCols; 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 return itsMouseOverCols && opts.coloredMouseOver && flags&Style_MouseOver
? itsMouseOverCols : use; ? itsMouseOverCols : use;
} }
const TQColor * TQtCurveStyle::getSidebarButtons() const const TQColor * QtCurveStyle::getSidebarButtons() const
{ {
if(!itsSidebarButtonsCols) if(!itsSidebarButtonsCols)
{ {
@ -7972,7 +7976,7 @@ const TQColor * TQtCurveStyle::getSidebarButtons() const
return itsSidebarButtonsCols; return itsSidebarButtonsCols;
} }
void TQtCurveStyle::setMenuColors(const TQColorGroup &cg) void QtCurveStyle::setMenuColors(const TQColorGroup &cg)
{ {
switch(opts.shadeMenubars) switch(opts.shadeMenubars)
{ {
@ -7999,7 +8003,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 return SHADE_WINDOW_BORDER==opts.shadeMenubars
? getMdiColors(cg, active) ? getMdiColors(cg, active)
@ -8008,7 +8012,7 @@ const TQColor * TQtCurveStyle::menuColors(const TQColorGroup &cg, bool active) c
: itsMenubarCols; : itsMenubarCols;
} }
void TQtCurveStyle::setDecorationColors(bool init) void QtCurveStyle::setDecorationColors(bool init)
{ {
if(!readKdeGlobals() && !init) if(!readKdeGlobals() && !init)
return; return;
@ -8022,7 +8026,7 @@ void TQtCurveStyle::setDecorationColors(bool init)
shadeColors(kdeSettings.focus, itsFocusCols); 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) if(!itsActiveMdiColors)
{ {
@ -8147,7 +8151,7 @@ const TQColor * TQtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active)
} }
#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS #ifdef SET_MDI_WINDOW_BUTTON_POSITIONS
void TQtCurveStyle::readMdiPositions() const void QtCurveStyle::readMdiPositions() const
{ {
if(0==itsMdiButtons[0].size() && 0==itsMdiButtons[1].size()) if(0==itsMdiButtons[0].size() && 0==itsMdiButtons[1].size())
{ {
@ -8220,7 +8224,7 @@ void TQtCurveStyle::readMdiPositions() const
} }
#endif #endif
bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos) bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
{ {
if(!itsHoverWidget || !itsHoverWidget->isShown() || !itsHoverWidget->isVisible()) if(!itsHoverWidget || !itsHoverWidget->isShown() || !itsHoverWidget->isVisible())
return false; return false;
@ -8446,7 +8450,7 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos)
return false; 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) return !(flags&Style_Enabled)
? use[darker ? 2 : ORIGINAL_SHADE] ? use[darker ? 2 : ORIGINAL_SHADE]
@ -8461,7 +8465,7 @@ const TQColor & TQtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr
: use[darker ? 2 : ORIGINAL_SHADE]; : 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 return current
? use[ORIGINAL_SHADE] ? use[ORIGINAL_SHADE]
@ -8470,7 +8474,7 @@ const TQColor & TQtCurveStyle::getTabFill(bool current, bool highlight, const TQ
: use[2]; : use[2];
} }
const TQColor & TQtCurveStyle::menuStripeCol() const const TQColor & QtCurveStyle::menuStripeCol() const
{ {
switch(opts.menuStripe) switch(opts.menuStripe)
{ {
@ -8496,7 +8500,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) if(flags&MENU_ITEM)
return flags&Style_Enabled && flags&Style_Active && opts.useHighlightForMenu return flags&Style_Enabled && flags&Style_Active && opts.useHighlightForMenu
@ -8510,7 +8514,7 @@ const TQColor & TQtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &c
: cg.text(); : cg.text();
} }
TQColor TQtCurveStyle::shade(const TQColor &a, float k) const TQColor QtCurveStyle::shade(const TQColor &a, float k) const
{ {
TQColor mod; TQColor mod;
@ -8518,12 +8522,12 @@ TQColor TQtCurveStyle::shade(const TQColor &a, float k) const
return mod; 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); ::shade(&opts, ca, cb, k);
} }
TQPixmap * TQtCurveStyle::getPixelPixmap(const TQColor col) const TQPixmap * QtCurveStyle::getPixelPixmap(const TQColor col) const
{ {
TQRgb rgb(col.rgb()); TQRgb rgb(col.rgb());
TQString key(createKey(rgb)); TQString key(createKey(rgb));
@ -8545,7 +8549,7 @@ TQPixmap * TQtCurveStyle::getPixelPixmap(const TQColor col) const
return pix; return pix;
} }
TQPixmap * TQtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) const TQPixmap * QtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) const
{ {
TQRgb rgb(col.rgb()); TQRgb rgb(col.rgb());
TQString key(createKey(rgb, forWindow ? 'S' : 's')); TQString key(createKey(rgb, forWindow ? 'S' : 's'));
@ -8601,13 +8605,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); 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); 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); 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()); TQRgb rgb(col.rgb());
TQString key(createKey(rgb, p)); TQString key(createKey(rgb, p));
@ -8668,7 +8672,7 @@ TQPixmap * TQtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade)
return pix; return pix;
} }
void TQtCurveStyle::setSbType() void QtCurveStyle::setSbType()
{ {
switch(opts.scrollbarType) switch(opts.scrollbarType)
{ {
@ -8688,7 +8692,7 @@ void TQtCurveStyle::setSbType()
} }
} }
void TQtCurveStyle::resetHover() void QtCurveStyle::resetHover()
{ {
itsIsSpecialHover=false; itsIsSpecialHover=false;
itsOldPos.setX(-1); itsOldPos.setX(-1);
@ -8707,7 +8711,7 @@ struct TQtcMenuBar : public TQMenuBar
} }
}; };
bool TQtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos) bool QtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
{ {
return opts.windowDrag && return opts.windowDrag &&
(//qobject_cast<TQDialog*>(o) || (//qobject_cast<TQDialog*>(o) ||
@ -8725,7 +8729,7 @@ bool TQtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
); );
} }
void TQtCurveStyle::updateProgressPos() void QtCurveStyle::updateProgressPos()
{ {
// Taken from lipstik! // Taken from lipstik!
TQMap<TQWidget*, int>::iterator it(itsProgAnimWidgets.begin()), TQMap<TQWidget*, int>::iterator it(itsProgAnimWidgets.begin()),
@ -8752,12 +8756,12 @@ void TQtCurveStyle::updateProgressPos()
itsAnimationTimer->stop(); itsAnimationTimer->stop();
} }
void TQtCurveStyle::progressBarDestroyed(TQObject *bar) void QtCurveStyle::progressBarDestroyed(TQObject *bar)
{ {
itsProgAnimWidgets.remove(TQT_TQWIDGET(bar)); itsProgAnimWidgets.remove(TQT_TQWIDGET(bar));
} }
void TQtCurveStyle::sliderThumbMoved(int) void QtCurveStyle::sliderThumbMoved(int)
{ {
TQSlider *slider(::tqqt_cast<TQSlider*>(sender())); TQSlider *slider(::tqqt_cast<TQSlider*>(sender()));
@ -8765,12 +8769,12 @@ void TQtCurveStyle::sliderThumbMoved(int)
slider->update(); slider->update();
} }
void TQtCurveStyle::khtmlWidgetDestroyed(TQObject *o) void QtCurveStyle::khtmlWidgetDestroyed(TQObject *o)
{ {
itsKhtmlWidgets.remove(TQT_TQWIDGET_CONST(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)) if(TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(itsHoverWidget))
resetHover(); resetHover();

@ -1,8 +1,8 @@
#ifndef __TQTCURVE_H__ #ifndef __QTCURVE_H__
#define __TQTCURVE_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 #define BASE_STYLE KStyle
#endif #endif
class TQtCurveStyle : public BASE_STYLE class QtCurveStyle : public BASE_STYLE
{ {
Q_OBJECT Q_OBJECT
@ -127,12 +127,12 @@ class TQtCurveStyle : public BASE_STYLE
}; };
#ifdef TQTC_STYLE_SUPPORT #ifdef TQTC_STYLE_SUPPORT
TQtCurveStyle(const TQString &name=TQString()); QtCurveStyle(const TQString &name=TQString());
#else #else
TQtCurveStyle(); QtCurveStyle();
#endif #endif
virtual ~TQtCurveStyle(); virtual ~QtCurveStyle();
void applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *); void applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
void polish(TQPalette &pal); void polish(TQPalette &pal);

Loading…
Cancel
Save