diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:42 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:42 -0600 |
commit | 77252ab600ddb54c54afda4182db0b62e6734ae8 (patch) | |
tree | 0e6627fd5db46b782d6c8fec3c9c34090c20ca35 /style | |
parent | b98d1ff3de3e501c2a08b61433937cc7bfcc97dc (diff) | |
download | tde-style-qtcurve-77252ab600ddb54c54afda4182db0b62e6734ae8.tar.gz tde-style-qtcurve-77252ab600ddb54c54afda4182db0b62e6734ae8.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit b98d1ff3de3e501c2a08b61433937cc7bfcc97dc.
Diffstat (limited to 'style')
-rw-r--r-- | style/qtc_fixx11h.h | 28 | ||||
-rw-r--r-- | style/qtc_kstyle.cpp | 48 | ||||
-rw-r--r-- | style/qtc_kstyle.h | 10 | ||||
-rw-r--r-- | style/qtcurve.cpp | 336 | ||||
-rw-r--r-- | style/qtcurve.h | 14 |
5 files changed, 218 insertions, 218 deletions
diff --git a/style/qtc_fixx11h.h b/style/qtc_fixx11h.h index 572870a..efa125a 100644 --- a/style/qtc_fixx11h.h +++ b/style/qtc_fixx11h.h @@ -168,25 +168,25 @@ const int GrayScale = XGrayScale; #endif // Affects: Should be without side effects. -#ifdef Status -#ifndef FIXX11H_Status -#define FIXX11H_Status -typedef Status XStatus; -#undef Status -typedef XStatus Status; +#ifdef tqStatus +#ifndef FIXX11H_tqStatus +#define FIXX11H_tqStatus +typedef tqStatus XtqStatus; +#undef tqStatus +typedef XtqStatus tqStatus; #endif -#undef Status +#undef tqStatus #endif // Affects: Should be without side effects. -#ifdef CursorShape -#ifndef FIXX11H_CursorShape -#define FIXX11H_CursorShape -const int XCursorShape = CursorShape; -#undef CursorShape -const int CursorShape = CursorShape; +#ifdef tqCursorShape +#ifndef FIXX11H_tqCursorShape +#define FIXX11H_tqCursorShape +const int XtqCursorShape = tqCursorShape; +#undef tqCursorShape +const int tqCursorShape = tqCursorShape; #endif -#undef CursorShape +#undef tqCursorShape #endif // template ---> diff --git a/style/qtc_kstyle.cpp b/style/qtc_kstyle.cpp index 22f2584..910ec7c 100644 --- a/style/qtc_kstyle.cpp +++ b/style/qtc_kstyle.cpp @@ -124,8 +124,8 @@ void TQtCKStyle::polish( TQWidget* widget ) if ( d->useFilledFrameWorkaround ) { if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { - TQFrame::Shape shape = frame->frameShape(); - if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) + TQFrame::Shape tqshape = frame->frameShape(); + if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) widget->installEventFilter(this); } } @@ -137,8 +137,8 @@ void TQtCKStyle::unPolish( TQWidget* widget ) if ( d->useFilledFrameWorkaround ) { if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { - TQFrame::Shape shape = frame->frameShape(); - if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) + TQFrame::Shape tqshape = frame->frameShape(); + if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) widget->removeEventFilter(this); } } @@ -423,7 +423,7 @@ void TQtCKStyle::drawPrimitive( PrimitiveElement pe, -void TQtCKStyle::drawControl( ControlElement element, +void TQtCKStyle::tqdrawControl( ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -437,7 +437,7 @@ void TQtCKStyle::drawControl( ControlElement element, // ------------------------------------------------------------------------ case CE_TabBarTab: { const TQTabBar* tb = (const TQTabBar*) widget; - TQTabBar::Shape tbs = tb->shape(); + TQTabBar::Shape tbs = tb->tqshape(); bool selected = flags & Style_Selected; int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right(); @@ -721,7 +721,7 @@ void TQtCKStyle::drawControl( ControlElement element, } default: - TQCommonStyle::drawControl(element, p, widget, r, cg, flags, opt); + TQCommonStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); } } @@ -748,7 +748,7 @@ TQRect TQtCKStyle::subRect(SubRect r, const TQWidget* widget) const } -int TQtCKStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const +int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const { switch(m) { @@ -769,7 +769,7 @@ int TQtCKStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const && widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) return widget->fontMetrics().lineSpacing(); else - return TQCommonStyle::pixelMetric(m, widget); + return TQCommonStyle::tqpixelMetric(m, widget); } // TABS @@ -779,8 +779,8 @@ int TQtCKStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabVSpace: { const TQTabBar * tb = (const TQTabBar *) widget; - if ( tb->shape() == TQTabBar::RoundedAbove || - tb->shape() == TQTabBar::RoundedBelow ) + if ( tb->tqshape() == TQTabBar::RoundedAbove || + tb->tqshape() == TQTabBar::RoundedBelow ) return 10; else return 4; @@ -788,7 +788,7 @@ int TQtCKStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabOverlap: { const TQTabBar* tb = (const TQTabBar*)widget; - TQTabBar::Shape tbs = tb->shape(); + TQTabBar::Shape tbs = tb->tqshape(); if ( (tbs == TQTabBar::RoundedAbove) || (tbs == TQTabBar::RoundedBelow) ) @@ -853,10 +853,10 @@ int TQtCKStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const return 0; case PM_PopupMenuScrollerHeight: - return pixelMetric( PM_ScrollBarExtent, 0); + return tqpixelMetric( PM_ScrollBarExtent, 0); default: - return TQCommonStyle::pixelMetric( m, widget ); + return TQCommonStyle::tqpixelMetric( m, widget ); } } @@ -873,7 +873,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void TQtCKStyle::drawComplexControl( ComplexControl control, +void TQtCKStyle::tqdrawComplexControl( ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -996,7 +996,7 @@ void TQtCKStyle::drawComplexControl( ComplexControl control, // Draw the tickmarks if (controls & SC_SliderTickmarks) - TQCommonStyle::drawComplexControl(control, &p2, widget, + TQCommonStyle::tqdrawComplexControl(control, &p2, widget, r, cg, flags, SC_SliderTickmarks, active, opt); // Draw the slider handle @@ -1022,7 +1022,7 @@ void TQtCKStyle::drawComplexControl( ComplexControl control, // Paint the icon and text. if ( controls & SC_ListView ) - TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); // If we're have a branch or are expanded... if ( controls & (SC_ListViewBranch | SC_ListViewExpand) ) @@ -1162,7 +1162,7 @@ void TQtCKStyle::drawComplexControl( ComplexControl control, } default: - TQCommonStyle::drawComplexControl( control, p, widget, r, cg, + TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); break; } @@ -1201,7 +1201,7 @@ TQRect TQtCKStyle::querySubControlMetrics( ComplexControl control, const TQScrollBar *sb = (const TQScrollBar*)widget; bool horizontal = sb->orientation() == Qt::Horizontal; int sliderstart = sb->sliderStart(); - int sbextent = pixelMetric(PM_ScrollBarExtent, widget); + int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget); int maxlen = (horizontal ? sb->width() : sb->height()) - (sbextent * (threeButtonScrollBar ? 3 : 2)); int sliderlen; @@ -1212,7 +1212,7 @@ TQRect TQtCKStyle::querySubControlMetrics( ComplexControl control, uint range = sb->maxValue() - sb->minValue(); sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep()); - int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -1602,7 +1602,7 @@ TQPixmap TQtCKStyle::stylePixmap( StylePixmap stylepixmap, } -int TQtCKStyle::styleHint( StyleHint sh, const TQWidget* w, +int TQtCKStyle::tqstyleHint( StyleHint sh, const TQWidget* w, const TQStyleOption &opt, TQStyleHintReturn* shr) const { switch (sh) @@ -1617,7 +1617,7 @@ int TQtCKStyle::styleHint( StyleHint sh, const TQWidget* w, return d->menuAltKeyNavigation ? 1 : 0; case SH_PopupMenu_SubMenuPopupDelay: - if ( styleHint( SH_PopupMenu_SloppySubMenus, w ) ) + if ( tqstyleHint( SH_PopupMenu_SloppySubMenus, w ) ) return TQMIN( 100, d->popupMenuDelay ); else return d->popupMenuDelay; @@ -1653,7 +1653,7 @@ int TQtCKStyle::styleHint( StyleHint sh, const TQWidget* w, } default: - return TQCommonStyle::styleHint(sh, w, opt, shr); + return TQCommonStyle::tqstyleHint(sh, w, opt, shr); } } @@ -1666,7 +1666,7 @@ bool TQtCKStyle::eventFilter( TQObject* object, TQEvent* event ) // ensure that the filled frame contents are properly painted. // We essentially modify the paintEvent's rect to include the // panel border, which also paints the widget's interior. - // This is nasty, but I see no other way to properly repaint + // This is nasty, but I see no other way to properly tqrepaint // filled frames in all TQMenuBars and TQToolBars. // -- Karol. TQFrame *frame = 0; diff --git a/style/qtc_kstyle.h b/style/qtc_kstyle.h index 51243f7..8b3bc8c 100644 --- a/style/qtc_kstyle.h +++ b/style/qtc_kstyle.h @@ -224,7 +224,7 @@ class TQtCKStyle: public TQCommonStyle * * @see KStyle::KStylePrimitive * @see TQStyle::drawPrimitive - * @see TQStyle::drawComplexControl + * @see TQStyle::tqdrawComplexControl */ virtual void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, @@ -262,7 +262,7 @@ class TQtCKStyle: public TQCommonStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControl( ControlElement element, + void tqdrawControl( ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -270,7 +270,7 @@ class TQtCKStyle: public TQCommonStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawComplexControl( ComplexControl control, + void tqdrawComplexControl( ComplexControl control, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -290,7 +290,7 @@ class TQtCKStyle: public TQCommonStyle SubControl sc, const TQStyleOption& = TQStyleOption::Default ) const; - int pixelMetric( PixelMetric m, + int tqpixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; TQRect subRect( SubRect r, @@ -300,7 +300,7 @@ class TQtCKStyle: public TQCommonStyle const TQWidget* widget = 0, const TQStyleOption& = TQStyleOption::Default ) const; - int styleHint( StyleHint sh, + int tqstyleHint( StyleHint sh, const TQWidget* w = 0, const TQStyleOption &opt = TQStyleOption::Default, TQStyleHintReturn* shr = 0 ) const; diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp index 8c302db..84853da 100644 --- a/style/qtcurve.cpp +++ b/style/qtcurve.cpp @@ -53,7 +53,7 @@ KHTML Srollbars: For some reason Scrollbars in KHTML seem to lose the bottom/left pixels. As if KHTML expects -the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the pixelMetric +the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the tqpixelMetric function will return 1 scrollbar with 1 greater than standard for form widgets, or where widget==0L In the CC_ScrollBar draw code, the rects used for each component are shrunk by 1, in the appropriate @@ -69,7 +69,7 @@ dimension, so as to draw the scrollbar at the correct size. #include <tqmenubar.h> #include <tqapplication.h> #include <tqpainter.h> -#include <palette.h> +#include <tqpalette.h> #include <tqframe.h> #include <tqpushbutton.h> #include <tqdrawutil.h> @@ -91,7 +91,7 @@ dimension, so as to draw the scrollbar at the correct size. #include <tqheader.h> #include <tqwidgetstack.h> #include <tqsplitter.h> -#include <textedit.h> +#include <tqtextedit.h> #include <tqlabel.h> #include <tqlistbox.h> #include <tqhbox.h> @@ -511,7 +511,7 @@ static bool readKdeGlobals() return false; - TQColor highlight(TQApplication::palette().active().highlight()); + TQColor highlight(TQApplication::tqpalette().active().highlight()); bool inactiveEnabled(false), changeSelectionColor(false), useTQt3(useTQt3Settings()); @@ -867,9 +867,9 @@ TQtCurveStyle::TQtCurveStyle() itsPixmapCache.setAutoDelete(true); - shadeColors(TQApplication::palette().active().highlight(), itsHighlightCols); - shadeColors(TQApplication::palette().active().background(), itsBackgroundCols); - shadeColors(TQApplication::palette().active().button(), itsButtonCols); + shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols); + shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols); + shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols); setDecorationColors(true); @@ -1073,7 +1073,7 @@ TQtCurveStyle::TQtCurveStyle() } } - setMenuColors(TQApplication::palette().active()); + setMenuColors(TQApplication::tqpalette().active()); if(USE_LIGHTER_POPUP_MENU) itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE], @@ -1088,12 +1088,12 @@ TQtCurveStyle::TQtCurveStyle() switch(opts.shadeCheckRadio) { default: - itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText() - : TQApplication::palette().active().text(); + itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText() + : TQApplication::tqpalette().active().text(); break; case SHADE_BLEND_SELECTED: case SHADE_SELECTED: - itsCheckRadioCol=TQApplication::palette().active().highlight(); + itsCheckRadioCol=TQApplication::tqpalette().active().highlight(); break; case SHADE_CUSTOM: itsCheckRadioCol=opts.customCheckRadioColor; @@ -1203,7 +1203,7 @@ void TQtCurveStyle::polish(TQApplication *app) else if ("mactor"==appName) { if(!itsMactorPal) - itsMactorPal=new TQPalette(TQApplication::palette()); + itsMactorPal=new TQPalette(TQApplication::tqpalette()); itsThemedApp=APP_MACTOR; } else @@ -1218,7 +1218,7 @@ void TQtCurveStyle::polish(TQApplication *app) // works around this... if(opts.useHighlightForMenu) { - TQMetaObject *meta=(TQMetaObject *)metaObject(); + TQMetaObject *meta=(TQMetaObject *)tqmetaObject(); #ifdef USE_QT4 #warning Qt4 does not allow the metaobject classname to be set (skipping) @@ -1291,18 +1291,18 @@ void TQtCurveStyle::polish(TQPalette &pal) if(kdeSettings.inactiveHighlight) { pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight, - tint(TQApplication::palette().active().background(), - TQApplication::palette().active().highlight(), 0.4)); + tint(TQApplication::tqpalette().active().background(), + TQApplication::tqpalette().active().highlight(), 0.4)); // KDE4 does not set text colour :-( //pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, pal.color(TQPalette::Active, TQColorGroup::Foreground)); } bool newMenu(newContrast || - itsHighlightCols[ORIGINAL_SHADE]!=TQApplication::palette().active().highlight()), + itsHighlightCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().highlight()), newGray(newContrast || - itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::palette().active().background()), + itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().background()), newButton(newContrast || - itsButtonCols[ORIGINAL_SHADE]!=TQApplication::palette().active().button()), + itsButtonCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().button()), newSlider(itsSliderCols && SHADE_BLEND_SELECTED==opts.shadeSliders && (newContrast || newButton || newMenu)), newDefBtn(itsDefBtnCols && /*( (IND_COLORED==opts.defBtnIndicator &&*/ @@ -1327,17 +1327,17 @@ void TQtCurveStyle::polish(TQPalette &pal) itsSortedLvColors!=itsProgressCols && itsCheckRadioSelCols!=itsProgressCols && (newContrast || newButton)); if(newGray) - shadeColors(TQApplication::palette().active().background(), itsBackgroundCols); + shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols); if(newButton) - shadeColors(TQApplication::palette().active().button(), itsButtonCols); + shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols); if(newMenu) - shadeColors(TQApplication::palette().active().highlight(), itsHighlightCols); + shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols); setDecorationColors(); - setMenuColors(TQApplication::palette().active()); + setMenuColors(TQApplication::tqpalette().active()); if(newSlider) shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsSliderCols); @@ -1385,12 +1385,12 @@ void TQtCurveStyle::polish(TQPalette &pal) switch(opts.shadeCheckRadio) { default: - itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText() - : TQApplication::palette().active().text(); + itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText() + : TQApplication::tqpalette().active().text(); break; case SHADE_SELECTED: case SHADE_BLEND_SELECTED: - itsCheckRadioCol=TQApplication::palette().active().highlight(); + itsCheckRadioCol=TQApplication::tqpalette().active().highlight(); break; case SHADE_CUSTOM: itsCheckRadioCol=opts.customCheckRadioColor; @@ -1466,7 +1466,7 @@ void TQtCurveStyle::polish(TQWidget *widget) if(widget->parentWidget() && ::tqqt_cast<TQScrollView *>(widget) && ::tqqt_cast<TQComboBox *>(widget->parentWidget())) { - TQPalette pal(widget->palette()); + TQPalette pal(widget->tqpalette()); #if 0 TQPalette orig(pal); #endif @@ -1477,7 +1477,7 @@ void TQtCurveStyle::polish(TQWidget *widget) act.setColor(TQColorGroup::Base, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]); act.setColor(TQColorGroup::Background, opts.gtkComboMenus ? USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE] - : TQApplication::palette().active().base()); + : TQApplication::tqpalette().active().base()); #endif act.setColor(TQColorGroup::Foreground, itsBackgroundCols[STD_BORDER]); @@ -1486,12 +1486,12 @@ void TQtCurveStyle::polish(TQWidget *widget) #if 0 //((TQScrollView *)widget)->setMargin(1); - const TQObjectList *children(widget->children()); + const TQObjectList *tqchildren(widget->tqchildren()); - if(children) + if(tqchildren) { - TQObjectList::Iterator it(children->begin()), - end(children->end()); + TQObjectList::Iterator it(tqchildren->begin()), + end(tqchildren->end()); for(; it!=end; ++it) if(::tqqt_cast<TQWidget *>(*it)) @@ -1606,7 +1606,7 @@ void TQtCurveStyle::polish(TQWidget *widget) emitMenuSize(widget, widget->rect().height()); if(SHADE_WINDOW_BORDER==opts.shadeMenubars) { - TQPalette pal(widget->palette()); + TQPalette pal(widget->tqpalette()); TQColorGroup act(pal.active()); TQColorGroup inact(pal.inactive()); @@ -1620,12 +1620,12 @@ void TQtCurveStyle::polish(TQWidget *widget) else if(opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars || (SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) { - TQPalette pal(widget->palette()); + TQPalette pal(widget->tqpalette()); TQColorGroup act(pal.active()); act.setColor(TQColorGroup::Foreground, opts.customMenuTextColor ? opts.customMenuNormTextColor - : TQApplication::palette().active().highlightedText()); + : TQApplication::tqpalette().active().highlightedText()); if(!opts.shadeMenubarOnlyWhenActive) { @@ -1724,10 +1724,10 @@ void TQtCurveStyle::polish(TQWidget *widget) } else if(::tqqt_cast<TQProgressBar *>(widget)) { - if(widget->palette().inactive().highlightedText()!=widget->palette().active().highlightedText()) + if(widget->tqpalette().inactive().highlightedText()!=widget->tqpalette().active().highlightedText()) { - TQPalette pal(widget->palette()); - pal.setInactive(widget->palette().active()); + TQPalette pal(widget->tqpalette()); + pal.setInactive(widget->tqpalette().active()); widget->setPalette(pal); } @@ -1750,7 +1750,7 @@ void TQtCurveStyle::polish(TQWidget *widget) // Thanks Comix! (because this was ugly from day one!) // NOTE: Check if we can set it earlier (before painting), cause // on slow machines we can see the repainting of the bar (from white to background...) - TQPalette pal(TQApplication::palette()); + TQPalette pal(TQApplication::tqpalette()); pal.setColor(TQColorGroup::Midlight, pal.active().background()); TQApplication::setPalette(pal); @@ -1811,7 +1811,7 @@ void TQtCurveStyle::polish(TQWidget *widget) ::tqqt_cast<TQTabWidget *>(widget->parentWidget()) && 0==qstrcmp(widget->name(), "tab pages")) { - TQPalette pal(widget->palette()); + TQPalette pal(widget->tqpalette()); pal.setColor(TQColorGroup::Background, shade(pal.active().background(), TO_FACTOR(opts.tabBgnd))); widget->setBackgroundMode(PaletteBackground); @@ -1889,7 +1889,7 @@ void TQtCurveStyle::unPolish(TQWidget *widget) widget->removeEventFilter(this); if(SHADE_WINDOW_BORDER==opts.shadeMenubars || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars || (SHADE_CUSTOM==opts.shadeMenubars &&TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) - widget->setPalette(TQApplication::palette()); + widget->setPalette(TQApplication::tqpalette()); } else if (widget->inherits("KToolBarSeparator")) { @@ -2005,7 +2005,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) *parent(TQT_TQWIDGET(object->parent())); if(IS_FLAT(opts.toolbarAppearance)) - TQPainter(widget).fillRect(widget->rect(), parent->colorGroup().background()); + TQPainter(widget).fillRect(widget->rect(), parent->tqcolorGroup().background()); else { int y_offset(widget->y()); @@ -2034,7 +2034,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) else bgndRect.addCoords(-1, 0, 1, 0); - drawMenuOrToolBarBackground(&p, bgndRect, parent->colorGroup(), false, horiz); + drawMenuOrToolBarBackground(&p, bgndRect, parent->tqcolorGroup(), false, horiz); } if(!::tqqt_cast<TQLineEdit*>(object) && !::tqqt_cast<TQTextEdit*>(object) && @@ -2045,7 +2045,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) else if (NO_FRAME(opts.groupBox) && TQEvent::Move==event->type() && isCheckBoxOfGroupBox(object)) { TQCheckBox *cb=static_cast<TQCheckBox *>(TQT_TQWIDGET(object)); - TQRect r(cb->geometry()); + TQRect r(cb->tqgeometry()); cb->removeEventFilter(this); if(TQApplication::reverseLayout()) @@ -2062,7 +2062,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) { TQWidget *widget=(TQWidget*)object; TQPainter painter(widget); - TQColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->palette().active().background()); + TQColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->tqpalette().active().background()); if(APPEARANCE_STRIPED==opts.menuBgndAppearance) painter.drawTiledPixmap(widget->rect(), *createStripePixmap(col, false)); @@ -2080,10 +2080,10 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) TQPainter painter(frame); if (TQFrame::VLine==frame->frameShape()) tqdrawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(), - frame->colorGroup(), Style_Horizontal); + frame->tqcolorGroup(), Style_Horizontal); else if (TQFrame::HLine==frame->frameShape()) tqdrawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(), - frame->colorGroup()); + frame->tqcolorGroup()); else return false; return true; // been drawn! @@ -2098,12 +2098,12 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) TQRect r(widget->rect()); int tbHeight(tb ? tb->height()-1 : 28); - if(tb && (TQTabBar::RoundedBelow == tb->shape() || - TQTabBar::TriangularBelow == tb->shape())) + if(tb && (TQTabBar::RoundedBelow == tb->tqshape() || + TQTabBar::TriangularBelow == tb->tqshape())) r.addCoords(0, 0, 0, -tbHeight); else r.addCoords(0, tbHeight, 0, 0); - tqdrawPrimitive(PE_PanelTabWidget, &painter, r, widget->colorGroup(), + tqdrawPrimitive(PE_PanelTabWidget, &painter, r, widget->tqcolorGroup(), Style_Horizontal|Style_Enabled); return true; } @@ -2143,7 +2143,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) r.setY(r.y()-y_offset); r.setHeight(parent->rect().height()); - drawMenuOrToolBarBackground(&p, r, parent->colorGroup()); + drawMenuOrToolBarBackground(&p, r, parent->tqcolorGroup()); return true; } } @@ -2158,11 +2158,11 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) if (::tqqt_cast<TQSpinWidget*>(widget->parentWidget())) { - widget->parentWidget()->repaint(false); + widget->parentWidget()->tqrepaint(false); return false; } - widget->repaint(false); + widget->tqrepaint(false); } return false; } @@ -2174,23 +2174,23 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) if( (useWindowCols || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars || SHADE_CUSTOM==opts.shadeMenubars) && TQEvent::Paint==event->type()) { - const TQColor &col(((TQWidget *)object)->palette().active().color(TQColorGroup::Foreground)); + const TQColor &col(((TQWidget *)object)->tqpalette().active().color(TQColorGroup::Foreground)); // If we're relouring the menubar text, check to see if menubar palette has changed, if so set back to // our values. This fixes opera - which seems to change the widgets palette after it is polished. if((opts.customMenuTextColor && col!=opts.customMenuNormTextColor) || ( (SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars || (SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) && - col!=TQApplication::palette().active().highlightedText())) + col!=TQApplication::tqpalette().active().highlightedText())) { - TQPalette pal(((TQWidget *)object)->palette()); + TQPalette pal(((TQWidget *)object)->tqpalette()); TQColorGroup act(pal.active()); act.setColor(TQColorGroup::Foreground, useWindowCols ? itsActiveMdiTextColor : opts.customMenuTextColor ? opts.customMenuNormTextColor - : TQApplication::palette().active().highlightedText()); + : TQApplication::tqpalette().active().highlightedText()); if(!opts.shadeMenubarOnlyWhenActive || useWindowCols) { @@ -2209,11 +2209,11 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) { case TQEvent::WindowActivate: itsActive=true; - ((TQWidget *)object)->repaint(false); + ((TQWidget *)object)->tqrepaint(false); return false; case TQEvent::WindowDeactivate: itsActive=false; - ((TQWidget *)object)->repaint(false); + ((TQWidget *)object)->tqrepaint(false); return false; default: break; @@ -2362,14 +2362,14 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) case TQEvent::FocusIn: case TQEvent::FocusOut: if(opts.highlightScrollViews && object->isWidgetType() && ::tqqt_cast<TQScrollView*>(object)) - ((TQWidget *)object)->repaint(false); + ((TQWidget *)object)->tqrepaint(false); break; case TQEvent::Hide: case TQEvent::Show: if(::tqqt_cast<TQListBox *>(object) && (((TQListBox *)object)->parentWidget() && ::tqqt_cast<TQComboBox *>(((TQListBox *)object)->parentWidget()))) - ((TQComboBox *)(((TQListBox *)object)->parentWidget()))->repaint(false); + ((TQComboBox *)(((TQListBox *)object)->parentWidget()))->tqrepaint(false); // else if(::tqqt_cast<TQFrame *>(object) && // (TQFrame::Box==((TQFrame *)object)->frameShape() || TQFrame::Panel==((TQFrame *)object)->frameShape() || // TQFrame::WinPanel==((TQFrame *)object)->frameShape())) @@ -2385,12 +2385,12 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) if(::tqqt_cast<TQTabBar*>(object) && TQT_TQWIDGET(object)->isEnabled()) { itsHoverTab=0L; - itsHoverWidget->repaint(false); + itsHoverWidget->tqrepaint(false); } else if(!itsHoverWidget->hasMouseTracking() || (itsFormMode=isFormWidget(itsHoverWidget))) { - itsHoverWidget->repaint(false); + itsHoverWidget->tqrepaint(false); itsFormMode=false; } } @@ -2405,7 +2405,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) if(itsHoverWidget && TQT_BASE_OBJECT(object)==TQT_BASE_OBJECT(itsHoverWidget)) { resetHover(); - ((TQWidget *)object)->repaint(false); + ((TQWidget *)object)->tqrepaint(false); } break; case TQEvent::MouseMove: // Only occurs for widgets with mouse tracking enabled @@ -2415,7 +2415,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) if(me && itsHoverWidget && object->isWidgetType()) { if(!me->pos().isNull() && itsIsSpecialHover && redrawHoverWidget(me->pos())) - itsHoverWidget->repaint(false); + itsHoverWidget->tqrepaint(false); itsOldPos=me->pos(); } break; @@ -3422,7 +3422,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQListView *lv(item->listView()); p->setPen(TQPen(flags&Style_Enabled ? cg.text() - : lv->palette().color(TQPalette::Disabled, + : lv->tqpalette().color(TQPalette::Disabled, TQColorGroup::Text))); if (flags&Style_Selected) { @@ -3941,7 +3941,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const if(itsActive && opts.shadeMenubarOnlyWhenActive && SHADE_NONE!=opts.shadeMenubars) { - TQWidget *top=w->topLevelWidget(); + TQWidget *top=w->tqtopLevelWidget(); if(top && !top->isActiveWindow()) itsActive=false; @@ -4457,7 +4457,7 @@ void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const } } -void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const { @@ -4515,7 +4515,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi } TQRect tr(r); - bool top(TQTabBar::TriangularAbove==tb->shape() || TQTabBar::RoundedAbove==tb->shape()); + bool top(TQTabBar::TriangularAbove==tb->tqshape() || TQTabBar::RoundedAbove==tb->tqshape()); if(active && opts.tabBgnd) { @@ -4711,20 +4711,20 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi const TQTabBar *tb((const TQTabBar *) widget); TQTab *t(data.tab()); TQRect tr(r); - int shift(pixelMetric(PM_TabBarTabShiftVertical, tb)); + int shift(tqpixelMetric(PM_TabBarTabShiftVertical, tb)); if (t->identifier() == tb->currentTab()) { - if(TQTabBar::RoundedAbove==tb->shape() || TQTabBar::TriangularAbove==tb->shape()) + if(TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape()) tr.addCoords(0, -shift, 0, -shift); } else - if(TQTabBar::RoundedBelow==tb->shape() || TQTabBar::TriangularBelow==tb->shape()) + if(TQTabBar::RoundedBelow==tb->tqshape() || TQTabBar::TriangularBelow==tb->tqshape()) tr.addCoords(0, shift, 0, shift); if(APP_MACTOR==itsThemedApp) { - drawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data); + tqdrawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data); if(t->iconSet()) { @@ -4741,8 +4741,8 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi if(!(flags&Style_Selected)) { - xoff = pixelMetric(PM_TabBarTabShiftHorizontal, widget); - yoff = pixelMetric(PM_TabBarTabShiftVertical, widget); + xoff = tqpixelMetric(PM_TabBarTabShiftHorizontal, widget); + yoff = tqpixelMetric(PM_TabBarTabShiftVertical, widget); } p->drawPixmap(t->rect().left()+8+xoff, t->rect().center().y()-pixh/2 + yoff, pixmap); @@ -4755,7 +4755,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi { TQRect fr(r); - if(TQTabBar::RoundedAbove==tb->shape() || TQTabBar::TriangularAbove==tb->shape()) + if(TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape()) fr.addCoords(0, 1, 0, -1); else fr.addCoords(0, 0, 0, -1); @@ -4778,16 +4778,16 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi // Shift button contents if pushed. if (active) { - x += pixelMetric(PM_ButtonShiftHorizontal, widget); - y += pixelMetric(PM_ButtonShiftVertical, widget); + x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); + y += tqpixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if (button->isMenuButton()) { - int dx(pixelMetric(PM_MenuButtonIndicator, widget)), - margin(pixelMetric(PM_ButtonMargin, widget)); + int dx(tqpixelMetric(PM_MenuButtonIndicator, widget)), + margin(tqpixelMetric(PM_ButtonMargin, widget)); if(button->iconSet() && !button->iconSet()->isNull() && (dx+button->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off @@ -4796,7 +4796,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi //the widget else { - ::drawArrow(p, visualRect(TQRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r), + ::drawArrow(p, tqvisualRect(TQRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r), MO_ARROW(cg.buttonText()), PE_ArrowDown, opts); w-=(dx+arrowOffset); } @@ -4839,7 +4839,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi } if (cornArrow) //Draw over the icon - ::drawArrow(p, visualRect(TQRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r), + ::drawArrow(p, tqvisualRect(TQRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r), MO_ARROW(cg.buttonText()), PE_ArrowDown, opts); if(xo && iw) @@ -4862,18 +4862,18 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi (button->parentWidget() && button->inherits("Ideal::Button") && button->parentWidget()->inherits("Ideal::ButtonBar")))); const TQColor &textCol(sidebar && (button->isOn() || flags&Style_On) - ? TQApplication::palette().active().highlightedText() - : button->colorGroup().buttonText()); + ? TQApplication::tqpalette().active().highlightedText() + : button->tqcolorGroup().buttonText()); for(i=0; i<j; i++) - drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(), + drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->tqcolorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, &textCol); // Draw a focus rect if the button has focus if (flags&Style_HasFocus && FOCUS_GLOW!=opts.focus && !(flags&Style_MouseOver && FOCUS_FULL==opts.focus && MO_NONE!=opts.coloredMouseOver)) - tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_PushButtonFocusRect, + tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_PushButtonFocusRect, widget), widget), cg, flags); break; } @@ -4939,10 +4939,10 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi if(reverse) { - cr=visualRect(cr, r); - sr=visualRect(sr, r); - tr=visualRect(tr, r); - ir=visualRect(ir, r); + cr=tqvisualRect(cr, r); + sr=tqvisualRect(sr, r); + tr=tqvisualRect(tr, r); + ir=tqvisualRect(ir, r); } if(mi->iconSet() && opts.menuIcons) @@ -4951,7 +4951,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi TQIconSet::Mode mode=flags & Style_Active ? (mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled) : (mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled); - cr=visualRect(TQRect(x, y, maxpmw, h), r); + cr=tqvisualRect(TQRect(x, y, maxpmw, h), r); // Do we have an icon and are checked at the same time? // Then draw a "pressed" background behind the icon @@ -5078,7 +5078,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi drawMenuOrToolBarBackground(p, r, cg, false, Qt::Horizontal==wind->orientation()); } else - BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data); + BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data); break; case CE_ProgressBarGroove: { @@ -5301,31 +5301,31 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi { #if 0x039999 >= 0x030200 TQRect cr(checkbox->rect()); - TQRegion r(TQRect(cr.x(), cr.y(), visualRect(subRect(SR_CheckBoxFocusRect, widget), + TQRegion r(TQRect(cr.x(), cr.y(), tqvisualRect(subRect(SR_CheckBoxFocusRect, widget), widget).width()+ - pixelMetric(PM_IndicatorWidth)+4, + tqpixelMetric(PM_IndicatorWidth)+4, cr.height())); #else TQRegion r(checkbox->rect()); #endif - r-=visualRect(subRect(SR_CheckBoxIndicator, widget), widget); + r-=tqvisualRect(subRect(SR_CheckBoxIndicator, widget), widget); p->setClipRegion(r); drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, checkbox->rect(), true, false, opts.selectionAppearance, WIDGET_SELECTION); p->setClipping(false); } - int alignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); + int tqalignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); - drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg, + drawItem(p, r, tqalignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, checkbox->pixmap(), checkbox->text()); if(checkbox->hasFocus() && FOCUS_GLOW!=opts.focus) - tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_CheckBoxFocusRect, widget), + tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_CheckBoxFocusRect, widget), widget), cg, flags); } else - BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data); + BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data); break; case CE_RadioButton: itsFormMode=isFormWidget(widget); @@ -5346,37 +5346,37 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi #if 0x039999 >= 0x030200 TQRect rb(radiobutton->rect()); TQRegion r(TQRect(rb.x(), rb.y(), - visualRect(subRect(SR_RadioButtonFocusRect, widget), + tqvisualRect(subRect(SR_RadioButtonFocusRect, widget), widget).width()+ - pixelMetric(PM_ExclusiveIndicatorWidth)+4, + tqpixelMetric(PM_ExclusiveIndicatorWidth)+4, rb.height())); #else TQRegion r(radiobutton->rect()); #endif - r-=visualRect(subRect(SR_RadioButtonIndicator, widget), widget); + r-=tqvisualRect(subRect(SR_RadioButtonIndicator, widget), widget); p->setClipRegion(r); drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, radiobutton->rect(), true, false, opts.selectionAppearance, WIDGET_SELECTION); p->setClipping(false); } - int alignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); + int tqalignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); - drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, + drawItem(p, r, tqalignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, radiobutton->pixmap(), radiobutton->text()); if(radiobutton->hasFocus() && FOCUS_GLOW!=opts.focus) - tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_RadioButtonFocusRect, + tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_RadioButtonFocusRect, widget), widget), cg, flags); break; } // Fall through intentional! default: - BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data); + BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data); } } -void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::tqdrawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const { switch(control) @@ -5398,11 +5398,11 @@ void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const break; } default: - BASE_STYLE::drawControlMask(control, p, widget, r, data); + BASE_STYLE::tqdrawControlMask(control, p, widget, r, data); } } -void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::tqdrawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const { switch (control) @@ -5410,10 +5410,10 @@ void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, case CC_SpinWidget: case CC_ComboBox: case CC_ToolButton: - drawControlMask(CE_PushButton, p, widget, r, data); + tqdrawControlMask(CE_PushButton, p, widget, r, data); break; default: - BASE_STYLE::drawComplexControlMask(control, p, widget, r, data); + BASE_STYLE::tqdrawComplexControlMask(control, p, widget, r, data); } } @@ -5430,7 +5430,7 @@ TQRect TQtCurveStyle::subRect(SubRect subrect, const TQWidget *widget)const rect=wrect; else { - int dbw1(pixelMetric(PM_ButtonDefaultIndicator, widget)), + int dbw1(tqpixelMetric(PM_ButtonDefaultIndicator, widget)), dbw2(dbw1*2), border(3), border2=(border*2); @@ -5474,7 +5474,7 @@ class TQTitleBar : public TQWidget TQWidget *window() const; }; -void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, SCFlags controls, SCFlags active, const TQStyleOption &data) const @@ -5623,13 +5623,13 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con itsFormMode = isFormWidget(widget); const TQComboBox *combobox((const TQComboBox *)widget); - TQRect frame(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, + TQRect frame(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxFrame, data), widget)), - arrow(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, + arrow(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow, data), widget)), - field(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, + field(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField, data), widget)); const TQColor *use(buttonColors(cg)); @@ -5745,7 +5745,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con fr=frame; else if(opts.comboSplitter) { - fr=TQStyle::visualRect(subRect(SR_ComboBoxFocusRect, widget), widget); + fr=TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, widget), widget); if(reverse) fr.addCoords(3, 0, 0, 0); else @@ -5900,7 +5900,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con pe=PE_SpinWidgetPlus; if(!spinwidget->isUpEnabled()) upflags&=~Style_Enabled; - tqdrawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg, + tqdrawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg, upflags |((active==SC_SpinWidgetUp) ? Style_On | Style_Sunken : Style_Raised)); } @@ -5916,7 +5916,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con pe=PE_SpinWidgetMinus; if(!spinwidget->isDownEnabled()) downflags&=~Style_Enabled; - tqdrawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg, + tqdrawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg, downflags |((active==SC_SpinWidgetDown) ? Style_On | Style_Sunken : Style_Raised)); } @@ -6100,7 +6100,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con { bool enable=!atMin; - tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->palette().disabled() : cg, + tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->tqpalette().disabled() : cg, sflags | //(enable ? Style_Enabled : Style_Default) | (enable && hw && HOVER_SB_SUB==itsHover @@ -6112,7 +6112,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con { if(IS_FLAT(opts.sbarBgndAppearance)) p->fillRect(subline2, cg.background()); - tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->palette().disabled() : cg, + tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->tqpalette().disabled() : cg, sflags | //(enable ? Style_Enabled : Style_Default) | (enable && hw && HOVER_SB_SUB2==itsHover @@ -6132,7 +6132,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con else addline.addCoords(0, 0, 0, -1); - tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->palette().disabled() : cg, + tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->tqpalette().disabled() : cg, sflags | //(enable ? Style_Enabled : Style_Default) | (enable && hw && HOVER_SB_ADD==itsHover @@ -6290,7 +6290,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con if((controls & SC_SliderHandle)&& handle.isValid()) drawSliderHandle(paint, handle, cg, flags, widget ? ::tqqt_cast<TQSlider *>(widget) : 0L, tb); if(controls & SC_SliderTickmarks) - TQCommonStyle::drawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks, + TQCommonStyle::tqdrawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks, active, data); if(flags&Style_HasFocus && FOCUS_GLOW!=opts.focus) @@ -6308,10 +6308,10 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con const int buttonMargin(3); const TQTitleBar *tb((const TQTitleBar *)widget); bool isActive((tb->isActive() && widget->isActiveWindow()) || - (!tb->window() && widget->topLevelWidget()->isActiveWindow())); + (!tb->window() && widget->tqtopLevelWidget()->isActiveWindow())); TQColorGroup cgroup(isActive - ? widget->palette().active() - : widget->palette().inactive()); + ? widget->tqpalette().active() + : widget->tqpalette().inactive()); const TQColor *cols(getMdiColors(cg, isActive)); TQColor textCol(isActive ? itsActiveMdiTextColor : itsMdiTextColor), shdCol(shadowColor(textCol)), @@ -6319,27 +6319,27 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con if (controls&SC_TitleBarLabel) { - int alignment=AlignVCenter|SingleLine; + int tqalignment=AlignVCenter|SingleLine; bool full=false; switch(opts.titlebarAlignment) { default: case ALIGN_LEFT: - alignment|=TQt::AlignLeft; + tqalignment|=TQt::AlignLeft; break; case ALIGN_CENTER: - alignment|=TQt::AlignHCenter; + tqalignment|=TQt::AlignHCenter; break; case ALIGN_FULL_CENTER: - alignment|=TQt::AlignHCenter; + tqalignment|=TQt::AlignHCenter; full=true; break; case ALIGN_RIGHT: - alignment|=TQt::AlignRight; + tqalignment|=TQt::AlignRight; } - TQRect ir(visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)), + TQRect ir(tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)), textRect(full ? tb->rect().x() : ir.x(), ir.y(), full ? tb->rect().width() : ir.width(), ir.height()); EAppearance app=isActive ? opts.titlebarAppearance : opts.inactiveTitlebarAppearance; @@ -6354,13 +6354,13 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con int textWidth=fm.boundingRect(titleString).width(); if(ir.left()>((textRect.width()-textWidth)>>1)) { - alignment=TQt::AlignVCenter|TQt::AlignLeft; + tqalignment=TQt::AlignVCenter|TQt::AlignLeft; textRect=ir; full=false; } else if(ir.right()<((textRect.width()+textWidth)>>1)) { - alignment=TQt::AlignVCenter|TQt::AlignRight; + tqalignment=TQt::AlignVCenter|TQt::AlignRight; textRect=ir; full=false; } @@ -6369,9 +6369,9 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con } p->setPen(shadowCol); - p->drawText(textRect.x()+1, textRect.y()+1, textRect.width(), textRect.height(), alignment, titleString); + p->drawText(textRect.x()+1, textRect.y()+1, textRect.width(), textRect.height(), tqalignment, titleString); p->setPen(textCol); - p->drawText(textRect.x(), textRect.y(), textRect.width(), textRect.height(), alignment, titleString); + p->drawText(textRect.x(), textRect.y(), textRect.width(), textRect.height(), tqalignment, titleString); if(full) p->setClipping(false); @@ -6383,9 +6383,9 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con if (controls&SC_TitleBarCloseButton) { - ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget); + ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget); down = active & SC_TitleBarCloseButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarCloseButton); } @@ -6393,49 +6393,49 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con { if (controls &SC_TitleBarMaxButton) { - ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget); + ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget); down = active & SC_TitleBarMaxButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarMaxButton); } if (controls&SC_TitleBarNormalButton || controls&SC_TitleBarMinButton) { - ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget); + ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget); TQStyle::SubControl ctrl = (controls & SC_TitleBarNormalButton ? SC_TitleBarNormalButton : SC_TitleBarMinButton); down = active & ctrl; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, ctrl); } if (controls&SC_TitleBarShadeButton) { - ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget); + ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget); down = active & SC_TitleBarShadeButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarShadeButton); } if (controls&SC_TitleBarUnshadeButton) { - ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget); + ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget); down = active & SC_TitleBarUnshadeButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarUnshadeButton); } } if (controls&SC_TitleBarSysMenu && tb->icon()) { - ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget); + ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget); down = active & SC_TitleBarSysMenu; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); - drawItem(p, ir, AlignCenter, tb->colorGroup(), true, tb->icon(), TQString()); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + drawItem(p, ir, AlignCenter, tb->tqcolorGroup(), true, tb->icon(), TQString()); } break; } default: - BASE_STYLE::drawComplexControl(control, p, widget, r, cg, flags, controls, active, data); + BASE_STYLE::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, data); } } @@ -6451,7 +6451,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ if(!widget) return TQRect(); - int fw(pixelMetric(PM_SpinBoxFrameWidth, 0)); + int fw(tqpixelMetric(PM_SpinBoxFrameWidth, 0)); TQSize bs; bs.setHeight(widget->height()>>1); @@ -6510,7 +6510,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ const TQScrollBar *sb((const TQScrollBar*)widget); bool horizontal(sb->orientation() == Qt::Horizontal); int sliderstart(sb->sliderStart()), - sbextent(pixelMetric(PM_ScrollBarExtent, widget)), + sbextent(tqpixelMetric(PM_ScrollBarExtent, widget)), maxlen((horizontal ? sb->width() : sb->height()) - (noButtons ? 0 : (sbextent * (threeButtonScrollBar ? 3 : 2)))), sliderlen; @@ -6521,7 +6521,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ uint range = sb->maxValue() - sb->minValue(); sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep()); - int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -6723,7 +6723,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ else r.setRect(r.left()+windowMargin+pos, r.top()+windowMargin, controlSize, controlSize); - return visualRect(tb->direction, tb->rect, r); + return tqvisualRect(tb->direction, tb->rect, r); } } #endif @@ -6734,7 +6734,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 TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) const { switch(metric) { @@ -6750,10 +6750,10 @@ int TQtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const const TQTabBar *tb=widget ? ::tqqt_cast<const TQTabBar *>(widget) : 0; return tb - ? TQTabBar::RoundedAbove==tb->shape() || TQTabBar::TriangularAbove==tb->shape() + ? TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape() ? 1 : -1 - : BASE_STYLE::pixelMetric(metric, widget); + : BASE_STYLE::tqpixelMetric(metric, widget); } case PM_TabBarTabShiftHorizontal: return 0; @@ -6820,7 +6820,7 @@ int TQtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const case PM_TabBarTabVSpace: return opts.highlightTab ? 11 : 9; default: - return BASE_STYLE::pixelMetric(metric, widget); + return BASE_STYLE::tqpixelMetric(metric, widget); } } @@ -6846,8 +6846,8 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget * if (button && !button->text().isEmpty()) { - int margin(2*pixelMetric(PM_ButtonMargin, widget)), - mbi(button->isMenuButton() ? pixelMetric(PM_MenuButtonIndicator, widget) : 0), + int margin(2*tqpixelMetric(PM_ButtonMargin, widget)), + mbi(button->isMenuButton() ? tqpixelMetric(PM_MenuButtonIndicator, widget) : 0), w(contentsSize.width() + margin + mbi + 16); // if(button->text()=="...") @@ -6887,8 +6887,8 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget * if (mi->custom()) { - w = mi->custom()->sizeHint().width(); - h = mi->custom()->sizeHint().height(); + w = mi->custom()->tqsizeHint().width(); + h = mi->custom()->tqsizeHint().height(); if (!mi->custom()->fullSpan() && h < constMinH) h = constMinH; @@ -6947,7 +6947,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 TQtCurveStyle::tqstyleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn *returnData) const { switch(stylehint) @@ -6990,7 +6990,7 @@ int TQtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const case SH_TabBar_Alignment: return AlignLeft; default: - return BASE_STYLE::styleHint(stylehint, widget, option, returnData); + return BASE_STYLE::tqstyleHint(stylehint, widget, option, returnData); } } @@ -7017,7 +7017,7 @@ void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQC rb.rect(&left, &top, &width, &height); //rb.coords(&left, &top, &right, &bottom); f.setBold(true); - p->setPen(box->colorGroup().foreground()); + p->setPen(box->tqcolorGroup().foreground()); p->setFont(f); p->drawText(TQRect(left, top, width, th), (TQApplication::reverseLayout() ? AlignRight @@ -8150,8 +8150,8 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos) if(rb) { TQRect rect(0, 0, - visualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+ - pixelMetric(PM_ExclusiveIndicatorWidth)+4, itsHoverWidget->height()); + tqvisualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+ + tqpixelMetric(PM_ExclusiveIndicatorWidth)+4, itsHoverWidget->height()); itsHover=rect.contains(pos) ? HOVER_RADIO : HOVER_NONE; return (HOVER_NONE!=itsHover && !rect.contains(itsOldPos)) || @@ -8164,8 +8164,8 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos) if(cb) { TQRect rect(0, 0, - visualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+ - pixelMetric(PM_IndicatorWidth)+4, itsHoverWidget->height()); + tqvisualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+ + tqpixelMetric(PM_IndicatorWidth)+4, itsHoverWidget->height()); itsHover=rect.contains(pos) ? HOVER_CHECK : HOVER_NONE; return (HOVER_NONE!=itsHover && !rect.contains(itsOldPos)) || (HOVER_NONE==itsHover && rect.contains(itsOldPos)); diff --git a/style/qtcurve.h b/style/qtcurve.h index b67334d..54cb871 100644 --- a/style/qtcurve.h +++ b/style/qtcurve.h @@ -59,7 +59,7 @@ #endif #include <tqcolor.h> #include <tqpoint.h> -#include <palette.h> +#include <tqpalette.h> #include <tqpixmap.h> #include <tqcache.h> #include <tqvaluelist.h> @@ -162,23 +162,23 @@ class TQtCurveStyle : public BASE_STYLE SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; void drawKStylePrimitive(KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const; - void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, + void tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption & = TQStyleOption::Default) const; - void drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, + void tqdrawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const; TQRect subRect(SubRect, const TQWidget *) const; - void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &, + void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default) const; TQRect querySubControlMetrics(TQ_ComplexControl, const TQWidget *, SubControl, const TQStyleOption & = TQStyleOption::Default) const; - int pixelMetric(PixelMetric, const TQWidget *widget= 0) const; + int tqpixelMetric(PixelMetric, const TQWidget *widget= 0) const; int kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const; TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &, const TQStyleOption & = TQStyleOption::Default) const; - int styleHint(StyleHint, const TQWidget *widget= 0, const TQStyleOption & = TQStyleOption::Default, + int tqstyleHint(StyleHint, const TQWidget *widget= 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn *returnData= 0) const; void drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled, const TQPixmap *pixmap, const TQString &text, int len=-1, const TQColor *penColor=0) const; |