diff options
author | Timothy Pearson <[email protected]> | 2011-12-15 15:34:00 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-15 15:34:00 -0600 |
commit | b98d1ff3de3e501c2a08b61433937cc7bfcc97dc (patch) | |
tree | ac02eae99f531d7f097dbde97b453ada0d3c7cda | |
parent | dd3d53e70948ffd0e3e2745edfd345bbeb838a32 (diff) | |
download | tde-style-qtcurve-b98d1ff3de3e501c2a08b61433937cc7bfcc97dc.tar.gz tde-style-qtcurve-b98d1ff3de3e501c2a08b61433937cc7bfcc97dc.zip |
Rename a number of old tq methods that are no longer tq specific
-rw-r--r-- | common/config_file.c | 2 | ||||
-rw-r--r-- | common/config_file.c-orig | 2 | ||||
-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 |
7 files changed, 220 insertions, 220 deletions
diff --git a/common/config_file.c b/common/config_file.c index 126838f..a923273 100644 --- a/common/config_file.c +++ b/common/config_file.c @@ -53,7 +53,7 @@ #include <tqmap.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #endif #endif // __cplusplus diff --git a/common/config_file.c-orig b/common/config_file.c-orig index 772e4e7..9727460 100644 --- a/common/config_file.c-orig +++ b/common/config_file.c-orig @@ -391,7 +391,7 @@ static void checkColor(EShade *s, color *c) #include <tqmap.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #endif class TQtCConfig diff --git a/style/qtc_fixx11h.h b/style/qtc_fixx11h.h index efa125a..572870a 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 tqStatus -#ifndef FIXX11H_tqStatus -#define FIXX11H_tqStatus -typedef tqStatus XtqStatus; -#undef tqStatus -typedef XtqStatus tqStatus; +#ifdef Status +#ifndef FIXX11H_Status +#define FIXX11H_Status +typedef Status XStatus; +#undef Status +typedef XStatus Status; #endif -#undef tqStatus +#undef Status #endif // Affects: Should be without side effects. -#ifdef tqCursorShape -#ifndef FIXX11H_tqCursorShape -#define FIXX11H_tqCursorShape -const int XtqCursorShape = tqCursorShape; -#undef tqCursorShape -const int tqCursorShape = tqCursorShape; +#ifdef CursorShape +#ifndef FIXX11H_CursorShape +#define FIXX11H_CursorShape +const int XCursorShape = CursorShape; +#undef CursorShape +const int CursorShape = CursorShape; #endif -#undef tqCursorShape +#undef CursorShape #endif // template ---> diff --git a/style/qtc_kstyle.cpp b/style/qtc_kstyle.cpp index 910ec7c..22f2584 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 tqshape = frame->frameShape(); - if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) + TQFrame::Shape shape = frame->frameShape(); + if (shape == TQFrame::ToolBarPanel || shape == 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 tqshape = frame->frameShape(); - if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) + TQFrame::Shape shape = frame->frameShape(); + if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) widget->removeEventFilter(this); } } @@ -423,7 +423,7 @@ void TQtCKStyle::drawPrimitive( PrimitiveElement pe, -void TQtCKStyle::tqdrawControl( ControlElement element, +void TQtCKStyle::drawControl( ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -437,7 +437,7 @@ void TQtCKStyle::tqdrawControl( ControlElement element, // ------------------------------------------------------------------------ case CE_TabBarTab: { const TQTabBar* tb = (const TQTabBar*) widget; - TQTabBar::Shape tbs = tb->tqshape(); + TQTabBar::Shape tbs = tb->shape(); bool selected = flags & Style_Selected; int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right(); @@ -721,7 +721,7 @@ void TQtCKStyle::tqdrawControl( ControlElement element, } default: - TQCommonStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + TQCommonStyle::drawControl(element, p, widget, r, cg, flags, opt); } } @@ -748,7 +748,7 @@ TQRect TQtCKStyle::subRect(SubRect r, const TQWidget* widget) const } -int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const +int TQtCKStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const { switch(m) { @@ -769,7 +769,7 @@ int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const && widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) return widget->fontMetrics().lineSpacing(); else - return TQCommonStyle::tqpixelMetric(m, widget); + return TQCommonStyle::pixelMetric(m, widget); } // TABS @@ -779,8 +779,8 @@ int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabVSpace: { const TQTabBar * tb = (const TQTabBar *) widget; - if ( tb->tqshape() == TQTabBar::RoundedAbove || - tb->tqshape() == TQTabBar::RoundedBelow ) + if ( tb->shape() == TQTabBar::RoundedAbove || + tb->shape() == TQTabBar::RoundedBelow ) return 10; else return 4; @@ -788,7 +788,7 @@ int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabOverlap: { const TQTabBar* tb = (const TQTabBar*)widget; - TQTabBar::Shape tbs = tb->tqshape(); + TQTabBar::Shape tbs = tb->shape(); if ( (tbs == TQTabBar::RoundedAbove) || (tbs == TQTabBar::RoundedBelow) ) @@ -853,10 +853,10 @@ int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const return 0; case PM_PopupMenuScrollerHeight: - return tqpixelMetric( PM_ScrollBarExtent, 0); + return pixelMetric( PM_ScrollBarExtent, 0); default: - return TQCommonStyle::tqpixelMetric( m, widget ); + return TQCommonStyle::pixelMetric( m, widget ); } } @@ -873,7 +873,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void TQtCKStyle::tqdrawComplexControl( ComplexControl control, +void TQtCKStyle::drawComplexControl( ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -996,7 +996,7 @@ void TQtCKStyle::tqdrawComplexControl( ComplexControl control, // Draw the tickmarks if (controls & SC_SliderTickmarks) - TQCommonStyle::tqdrawComplexControl(control, &p2, widget, + TQCommonStyle::drawComplexControl(control, &p2, widget, r, cg, flags, SC_SliderTickmarks, active, opt); // Draw the slider handle @@ -1022,7 +1022,7 @@ void TQtCKStyle::tqdrawComplexControl( ComplexControl control, // Paint the icon and text. if ( controls & SC_ListView ) - TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::drawComplexControl( 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::tqdrawComplexControl( ComplexControl control, } default: - TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, + TQCommonStyle::drawComplexControl( 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 = tqpixelMetric(PM_ScrollBarExtent, widget); + int sbextent = pixelMetric(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 = tqpixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = pixelMetric( 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::tqstyleHint( StyleHint sh, const TQWidget* w, +int TQtCKStyle::styleHint( StyleHint sh, const TQWidget* w, const TQStyleOption &opt, TQStyleHintReturn* shr) const { switch (sh) @@ -1617,7 +1617,7 @@ int TQtCKStyle::tqstyleHint( StyleHint sh, const TQWidget* w, return d->menuAltKeyNavigation ? 1 : 0; case SH_PopupMenu_SubMenuPopupDelay: - if ( tqstyleHint( SH_PopupMenu_SloppySubMenus, w ) ) + if ( styleHint( SH_PopupMenu_SloppySubMenus, w ) ) return TQMIN( 100, d->popupMenuDelay ); else return d->popupMenuDelay; @@ -1653,7 +1653,7 @@ int TQtCKStyle::tqstyleHint( StyleHint sh, const TQWidget* w, } default: - return TQCommonStyle::tqstyleHint(sh, w, opt, shr); + return TQCommonStyle::styleHint(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 tqrepaint + // This is nasty, but I see no other way to properly repaint // filled frames in all TQMenuBars and TQToolBars. // -- Karol. TQFrame *frame = 0; diff --git a/style/qtc_kstyle.h b/style/qtc_kstyle.h index 8b3bc8c..51243f7 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::tqdrawComplexControl + * @see TQStyle::drawComplexControl */ 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 tqdrawControl( ControlElement element, + void drawControl( 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 tqdrawComplexControl( ComplexControl control, + void drawComplexControl( 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 tqpixelMetric( PixelMetric m, + int pixelMetric( 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 tqstyleHint( StyleHint sh, + int styleHint( 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 84853da..8c302db 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 tqpixelMetric +the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the pixelMetric 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 <tqpalette.h> +#include <palette.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 <tqtextedit.h> +#include <textedit.h> #include <tqlabel.h> #include <tqlistbox.h> #include <tqhbox.h> @@ -511,7 +511,7 @@ static bool readKdeGlobals() return false; - TQColor highlight(TQApplication::tqpalette().active().highlight()); + TQColor highlight(TQApplication::palette().active().highlight()); bool inactiveEnabled(false), changeSelectionColor(false), useTQt3(useTQt3Settings()); @@ -867,9 +867,9 @@ TQtCurveStyle::TQtCurveStyle() itsPixmapCache.setAutoDelete(true); - shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols); - shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols); - shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols); + shadeColors(TQApplication::palette().active().highlight(), itsHighlightCols); + shadeColors(TQApplication::palette().active().background(), itsBackgroundCols); + shadeColors(TQApplication::palette().active().button(), itsButtonCols); setDecorationColors(true); @@ -1073,7 +1073,7 @@ TQtCurveStyle::TQtCurveStyle() } } - setMenuColors(TQApplication::tqpalette().active()); + setMenuColors(TQApplication::palette().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::tqpalette().active().buttonText() - : TQApplication::tqpalette().active().text(); + itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText() + : TQApplication::palette().active().text(); break; case SHADE_BLEND_SELECTED: case SHADE_SELECTED: - itsCheckRadioCol=TQApplication::tqpalette().active().highlight(); + itsCheckRadioCol=TQApplication::palette().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::tqpalette()); + itsMactorPal=new TQPalette(TQApplication::palette()); itsThemedApp=APP_MACTOR; } else @@ -1218,7 +1218,7 @@ void TQtCurveStyle::polish(TQApplication *app) // works around this... if(opts.useHighlightForMenu) { - TQMetaObject *meta=(TQMetaObject *)tqmetaObject(); + TQMetaObject *meta=(TQMetaObject *)metaObject(); #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::tqpalette().active().background(), - TQApplication::tqpalette().active().highlight(), 0.4)); + tint(TQApplication::palette().active().background(), + TQApplication::palette().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::tqpalette().active().highlight()), + itsHighlightCols[ORIGINAL_SHADE]!=TQApplication::palette().active().highlight()), newGray(newContrast || - itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().background()), + itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::palette().active().background()), newButton(newContrast || - itsButtonCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().button()), + itsButtonCols[ORIGINAL_SHADE]!=TQApplication::palette().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::tqpalette().active().background(), itsBackgroundCols); + shadeColors(TQApplication::palette().active().background(), itsBackgroundCols); if(newButton) - shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols); + shadeColors(TQApplication::palette().active().button(), itsButtonCols); if(newMenu) - shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols); + shadeColors(TQApplication::palette().active().highlight(), itsHighlightCols); setDecorationColors(); - setMenuColors(TQApplication::tqpalette().active()); + setMenuColors(TQApplication::palette().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::tqpalette().active().buttonText() - : TQApplication::tqpalette().active().text(); + itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText() + : TQApplication::palette().active().text(); break; case SHADE_SELECTED: case SHADE_BLEND_SELECTED: - itsCheckRadioCol=TQApplication::tqpalette().active().highlight(); + itsCheckRadioCol=TQApplication::palette().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->tqpalette()); + TQPalette pal(widget->palette()); #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::tqpalette().active().base()); + : TQApplication::palette().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 *tqchildren(widget->tqchildren()); + const TQObjectList *children(widget->children()); - if(tqchildren) + if(children) { - TQObjectList::Iterator it(tqchildren->begin()), - end(tqchildren->end()); + TQObjectList::Iterator it(children->begin()), + end(children->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->tqpalette()); + TQPalette pal(widget->palette()); 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->tqpalette()); + TQPalette pal(widget->palette()); TQColorGroup act(pal.active()); act.setColor(TQColorGroup::Foreground, opts.customMenuTextColor ? opts.customMenuNormTextColor - : TQApplication::tqpalette().active().highlightedText()); + : TQApplication::palette().active().highlightedText()); if(!opts.shadeMenubarOnlyWhenActive) { @@ -1724,10 +1724,10 @@ void TQtCurveStyle::polish(TQWidget *widget) } else if(::tqqt_cast<TQProgressBar *>(widget)) { - if(widget->tqpalette().inactive().highlightedText()!=widget->tqpalette().active().highlightedText()) + if(widget->palette().inactive().highlightedText()!=widget->palette().active().highlightedText()) { - TQPalette pal(widget->tqpalette()); - pal.setInactive(widget->tqpalette().active()); + TQPalette pal(widget->palette()); + pal.setInactive(widget->palette().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::tqpalette()); + TQPalette pal(TQApplication::palette()); 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->tqpalette()); + TQPalette pal(widget->palette()); 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::tqpalette()); + widget->setPalette(TQApplication::palette()); } 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->tqcolorGroup().background()); + TQPainter(widget).fillRect(widget->rect(), parent->colorGroup().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->tqcolorGroup(), false, horiz); + drawMenuOrToolBarBackground(&p, bgndRect, parent->colorGroup(), 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->tqgeometry()); + TQRect r(cb->geometry()); 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->tqpalette().active().background()); + TQColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->palette().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->tqcolorGroup(), Style_Horizontal); + frame->colorGroup(), Style_Horizontal); else if (TQFrame::HLine==frame->frameShape()) tqdrawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(), - frame->tqcolorGroup()); + frame->colorGroup()); 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->tqshape() || - TQTabBar::TriangularBelow == tb->tqshape())) + if(tb && (TQTabBar::RoundedBelow == tb->shape() || + TQTabBar::TriangularBelow == tb->shape())) r.addCoords(0, 0, 0, -tbHeight); else r.addCoords(0, tbHeight, 0, 0); - tqdrawPrimitive(PE_PanelTabWidget, &painter, r, widget->tqcolorGroup(), + tqdrawPrimitive(PE_PanelTabWidget, &painter, r, widget->colorGroup(), 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->tqcolorGroup()); + drawMenuOrToolBarBackground(&p, r, parent->colorGroup()); return true; } } @@ -2158,11 +2158,11 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) if (::tqqt_cast<TQSpinWidget*>(widget->parentWidget())) { - widget->parentWidget()->tqrepaint(false); + widget->parentWidget()->repaint(false); return false; } - widget->tqrepaint(false); + widget->repaint(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)->tqpalette().active().color(TQColorGroup::Foreground)); + const TQColor &col(((TQWidget *)object)->palette().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::tqpalette().active().highlightedText())) + col!=TQApplication::palette().active().highlightedText())) { - TQPalette pal(((TQWidget *)object)->tqpalette()); + TQPalette pal(((TQWidget *)object)->palette()); TQColorGroup act(pal.active()); act.setColor(TQColorGroup::Foreground, useWindowCols ? itsActiveMdiTextColor : opts.customMenuTextColor ? opts.customMenuNormTextColor - : TQApplication::tqpalette().active().highlightedText()); + : TQApplication::palette().active().highlightedText()); if(!opts.shadeMenubarOnlyWhenActive || useWindowCols) { @@ -2209,11 +2209,11 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) { case TQEvent::WindowActivate: itsActive=true; - ((TQWidget *)object)->tqrepaint(false); + ((TQWidget *)object)->repaint(false); return false; case TQEvent::WindowDeactivate: itsActive=false; - ((TQWidget *)object)->tqrepaint(false); + ((TQWidget *)object)->repaint(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)->tqrepaint(false); + ((TQWidget *)object)->repaint(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()))->tqrepaint(false); + ((TQComboBox *)(((TQListBox *)object)->parentWidget()))->repaint(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->tqrepaint(false); + itsHoverWidget->repaint(false); } else if(!itsHoverWidget->hasMouseTracking() || (itsFormMode=isFormWidget(itsHoverWidget))) { - itsHoverWidget->tqrepaint(false); + itsHoverWidget->repaint(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)->tqrepaint(false); + ((TQWidget *)object)->repaint(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->tqrepaint(false); + itsHoverWidget->repaint(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->tqpalette().color(TQPalette::Disabled, + : lv->palette().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->tqtopLevelWidget(); + TQWidget *top=w->topLevelWidget(); if(top && !top->isActiveWindow()) itsActive=false; @@ -4457,7 +4457,7 @@ void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const } } -void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::drawControl(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::tqdrawControl(ControlElement control, TQPainter *p, const TQ } TQRect tr(r); - bool top(TQTabBar::TriangularAbove==tb->tqshape() || TQTabBar::RoundedAbove==tb->tqshape()); + bool top(TQTabBar::TriangularAbove==tb->shape() || TQTabBar::RoundedAbove==tb->shape()); if(active && opts.tabBgnd) { @@ -4711,20 +4711,20 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ const TQTabBar *tb((const TQTabBar *) widget); TQTab *t(data.tab()); TQRect tr(r); - int shift(tqpixelMetric(PM_TabBarTabShiftVertical, tb)); + int shift(pixelMetric(PM_TabBarTabShiftVertical, tb)); if (t->identifier() == tb->currentTab()) { - if(TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape()) + if(TQTabBar::RoundedAbove==tb->shape() || TQTabBar::TriangularAbove==tb->shape()) tr.addCoords(0, -shift, 0, -shift); } else - if(TQTabBar::RoundedBelow==tb->tqshape() || TQTabBar::TriangularBelow==tb->tqshape()) + if(TQTabBar::RoundedBelow==tb->shape() || TQTabBar::TriangularBelow==tb->shape()) tr.addCoords(0, shift, 0, shift); if(APP_MACTOR==itsThemedApp) { - tqdrawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data); + drawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data); if(t->iconSet()) { @@ -4741,8 +4741,8 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ if(!(flags&Style_Selected)) { - xoff = tqpixelMetric(PM_TabBarTabShiftHorizontal, widget); - yoff = tqpixelMetric(PM_TabBarTabShiftVertical, widget); + xoff = pixelMetric(PM_TabBarTabShiftHorizontal, widget); + yoff = pixelMetric(PM_TabBarTabShiftVertical, widget); } p->drawPixmap(t->rect().left()+8+xoff, t->rect().center().y()-pixh/2 + yoff, pixmap); @@ -4755,7 +4755,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ { TQRect fr(r); - if(TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape()) + if(TQTabBar::RoundedAbove==tb->shape() || TQTabBar::TriangularAbove==tb->shape()) fr.addCoords(0, 1, 0, -1); else fr.addCoords(0, 0, 0, -1); @@ -4778,16 +4778,16 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ // Shift button contents if pushed. if (active) { - x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); - y += tqpixelMetric(PM_ButtonShiftVertical, widget); + x += pixelMetric(PM_ButtonShiftHorizontal, widget); + y += pixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if (button->isMenuButton()) { - int dx(tqpixelMetric(PM_MenuButtonIndicator, widget)), - margin(tqpixelMetric(PM_ButtonMargin, widget)); + int dx(pixelMetric(PM_MenuButtonIndicator, widget)), + margin(pixelMetric(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::tqdrawControl(ControlElement control, TQPainter *p, const TQ //the widget else { - ::drawArrow(p, tqvisualRect(TQRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r), + ::drawArrow(p, visualRect(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::tqdrawControl(ControlElement control, TQPainter *p, const TQ } if (cornArrow) //Draw over the icon - ::drawArrow(p, tqvisualRect(TQRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r), + ::drawArrow(p, visualRect(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::tqdrawControl(ControlElement control, TQPainter *p, const TQ (button->parentWidget() && button->inherits("Ideal::Button") && button->parentWidget()->inherits("Ideal::ButtonBar")))); const TQColor &textCol(sidebar && (button->isOn() || flags&Style_On) - ? TQApplication::tqpalette().active().highlightedText() - : button->tqcolorGroup().buttonText()); + ? TQApplication::palette().active().highlightedText() + : button->colorGroup().buttonText()); for(i=0; i<j; i++) - drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->tqcolorGroup(), + drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(), 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, tqvisualRect(subRect(SR_PushButtonFocusRect, + tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_PushButtonFocusRect, widget), widget), cg, flags); break; } @@ -4939,10 +4939,10 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ if(reverse) { - cr=tqvisualRect(cr, r); - sr=tqvisualRect(sr, r); - tr=tqvisualRect(tr, r); - ir=tqvisualRect(ir, r); + cr=visualRect(cr, r); + sr=visualRect(sr, r); + tr=visualRect(tr, r); + ir=visualRect(ir, r); } if(mi->iconSet() && opts.menuIcons) @@ -4951,7 +4951,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ TQIconSet::Mode mode=flags & Style_Active ? (mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled) : (mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled); - cr=tqvisualRect(TQRect(x, y, maxpmw, h), r); + cr=visualRect(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::tqdrawControl(ControlElement control, TQPainter *p, const TQ drawMenuOrToolBarBackground(p, r, cg, false, Qt::Horizontal==wind->orientation()); } else - BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data); + BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data); break; case CE_ProgressBarGroove: { @@ -5301,31 +5301,31 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ { #if 0x039999 >= 0x030200 TQRect cr(checkbox->rect()); - TQRegion r(TQRect(cr.x(), cr.y(), tqvisualRect(subRect(SR_CheckBoxFocusRect, widget), + TQRegion r(TQRect(cr.x(), cr.y(), visualRect(subRect(SR_CheckBoxFocusRect, widget), widget).width()+ - tqpixelMetric(PM_IndicatorWidth)+4, + pixelMetric(PM_IndicatorWidth)+4, cr.height())); #else TQRegion r(checkbox->rect()); #endif - r-=tqvisualRect(subRect(SR_CheckBoxIndicator, widget), widget); + r-=visualRect(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 tqalignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); + int alignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); - drawItem(p, r, tqalignment | AlignVCenter | ShowPrefix, cg, + drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, checkbox->pixmap(), checkbox->text()); if(checkbox->hasFocus() && FOCUS_GLOW!=opts.focus) - tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_CheckBoxFocusRect, widget), + tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_CheckBoxFocusRect, widget), widget), cg, flags); } else - BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data); + BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data); break; case CE_RadioButton: itsFormMode=isFormWidget(widget); @@ -5346,37 +5346,37 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ #if 0x039999 >= 0x030200 TQRect rb(radiobutton->rect()); TQRegion r(TQRect(rb.x(), rb.y(), - tqvisualRect(subRect(SR_RadioButtonFocusRect, widget), + visualRect(subRect(SR_RadioButtonFocusRect, widget), widget).width()+ - tqpixelMetric(PM_ExclusiveIndicatorWidth)+4, + pixelMetric(PM_ExclusiveIndicatorWidth)+4, rb.height())); #else TQRegion r(radiobutton->rect()); #endif - r-=tqvisualRect(subRect(SR_RadioButtonIndicator, widget), widget); + r-=visualRect(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 tqalignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); + int alignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); - drawItem(p, r, tqalignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, + drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, radiobutton->pixmap(), radiobutton->text()); if(radiobutton->hasFocus() && FOCUS_GLOW!=opts.focus) - tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_RadioButtonFocusRect, + tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_RadioButtonFocusRect, widget), widget), cg, flags); break; } // Fall through intentional! default: - BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data); + BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data); } } -void TQtCurveStyle::tqdrawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const { switch(control) @@ -5398,11 +5398,11 @@ void TQtCurveStyle::tqdrawControlMask(ControlElement control, TQPainter *p, cons break; } default: - BASE_STYLE::tqdrawControlMask(control, p, widget, r, data); + BASE_STYLE::drawControlMask(control, p, widget, r, data); } } -void TQtCurveStyle::tqdrawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const { switch (control) @@ -5410,10 +5410,10 @@ void TQtCurveStyle::tqdrawComplexControlMask(ComplexControl control, TQPainter * case CC_SpinWidget: case CC_ComboBox: case CC_ToolButton: - tqdrawControlMask(CE_PushButton, p, widget, r, data); + drawControlMask(CE_PushButton, p, widget, r, data); break; default: - BASE_STYLE::tqdrawComplexControlMask(control, p, widget, r, data); + BASE_STYLE::drawComplexControlMask(control, p, widget, r, data); } } @@ -5430,7 +5430,7 @@ TQRect TQtCurveStyle::subRect(SubRect subrect, const TQWidget *widget)const rect=wrect; else { - int dbw1(tqpixelMetric(PM_ButtonDefaultIndicator, widget)), + int dbw1(pixelMetric(PM_ButtonDefaultIndicator, widget)), dbw2(dbw1*2), border(3), border2=(border*2); @@ -5474,7 +5474,7 @@ class TQTitleBar : public TQWidget TQWidget *window() const; }; -void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::drawComplexControl(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::tqdrawComplexControl(ComplexControl control, TQPainter *p, c itsFormMode = isFormWidget(widget); const TQComboBox *combobox((const TQComboBox *)widget); - TQRect frame(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + TQRect frame(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxFrame, data), widget)), - arrow(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + arrow(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow, data), widget)), - field(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + field(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField, data), widget)); const TQColor *use(buttonColors(cg)); @@ -5745,7 +5745,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c fr=frame; else if(opts.comboSplitter) { - fr=TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, widget), widget); + fr=TQStyle::visualRect(subRect(SR_ComboBoxFocusRect, widget), widget); if(reverse) fr.addCoords(3, 0, 0, 0); else @@ -5900,7 +5900,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c pe=PE_SpinWidgetPlus; if(!spinwidget->isUpEnabled()) upflags&=~Style_Enabled; - tqdrawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg, + tqdrawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg, upflags |((active==SC_SpinWidgetUp) ? Style_On | Style_Sunken : Style_Raised)); } @@ -5916,7 +5916,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c pe=PE_SpinWidgetMinus; if(!spinwidget->isDownEnabled()) downflags&=~Style_Enabled; - tqdrawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg, + tqdrawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg, downflags |((active==SC_SpinWidgetDown) ? Style_On | Style_Sunken : Style_Raised)); } @@ -6100,7 +6100,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c { bool enable=!atMin; - tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->tqpalette().disabled() : cg, + tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->palette().disabled() : cg, sflags | //(enable ? Style_Enabled : Style_Default) | (enable && hw && HOVER_SB_SUB==itsHover @@ -6112,7 +6112,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c { if(IS_FLAT(opts.sbarBgndAppearance)) p->fillRect(subline2, cg.background()); - tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->tqpalette().disabled() : cg, + tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->palette().disabled() : cg, sflags | //(enable ? Style_Enabled : Style_Default) | (enable && hw && HOVER_SB_SUB2==itsHover @@ -6132,7 +6132,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c else addline.addCoords(0, 0, 0, -1); - tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->tqpalette().disabled() : cg, + tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->palette().disabled() : cg, sflags | //(enable ? Style_Enabled : Style_Default) | (enable && hw && HOVER_SB_ADD==itsHover @@ -6290,7 +6290,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c if((controls & SC_SliderHandle)&& handle.isValid()) drawSliderHandle(paint, handle, cg, flags, widget ? ::tqqt_cast<TQSlider *>(widget) : 0L, tb); if(controls & SC_SliderTickmarks) - TQCommonStyle::tqdrawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks, + TQCommonStyle::drawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks, active, data); if(flags&Style_HasFocus && FOCUS_GLOW!=opts.focus) @@ -6308,10 +6308,10 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c const int buttonMargin(3); const TQTitleBar *tb((const TQTitleBar *)widget); bool isActive((tb->isActive() && widget->isActiveWindow()) || - (!tb->window() && widget->tqtopLevelWidget()->isActiveWindow())); + (!tb->window() && widget->topLevelWidget()->isActiveWindow())); TQColorGroup cgroup(isActive - ? widget->tqpalette().active() - : widget->tqpalette().inactive()); + ? widget->palette().active() + : widget->palette().inactive()); const TQColor *cols(getMdiColors(cg, isActive)); TQColor textCol(isActive ? itsActiveMdiTextColor : itsMdiTextColor), shdCol(shadowColor(textCol)), @@ -6319,27 +6319,27 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c if (controls&SC_TitleBarLabel) { - int tqalignment=AlignVCenter|SingleLine; + int alignment=AlignVCenter|SingleLine; bool full=false; switch(opts.titlebarAlignment) { default: case ALIGN_LEFT: - tqalignment|=TQt::AlignLeft; + alignment|=TQt::AlignLeft; break; case ALIGN_CENTER: - tqalignment|=TQt::AlignHCenter; + alignment|=TQt::AlignHCenter; break; case ALIGN_FULL_CENTER: - tqalignment|=TQt::AlignHCenter; + alignment|=TQt::AlignHCenter; full=true; break; case ALIGN_RIGHT: - tqalignment|=TQt::AlignRight; + alignment|=TQt::AlignRight; } - TQRect ir(tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)), + TQRect ir(visualRect(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::tqdrawComplexControl(ComplexControl control, TQPainter *p, c int textWidth=fm.boundingRect(titleString).width(); if(ir.left()>((textRect.width()-textWidth)>>1)) { - tqalignment=TQt::AlignVCenter|TQt::AlignLeft; + alignment=TQt::AlignVCenter|TQt::AlignLeft; textRect=ir; full=false; } else if(ir.right()<((textRect.width()+textWidth)>>1)) { - tqalignment=TQt::AlignVCenter|TQt::AlignRight; + alignment=TQt::AlignVCenter|TQt::AlignRight; textRect=ir; full=false; } @@ -6369,9 +6369,9 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c } p->setPen(shadowCol); - p->drawText(textRect.x()+1, textRect.y()+1, textRect.width(), textRect.height(), tqalignment, titleString); + p->drawText(textRect.x()+1, textRect.y()+1, textRect.width(), textRect.height(), alignment, titleString); p->setPen(textCol); - p->drawText(textRect.x(), textRect.y(), textRect.width(), textRect.height(), tqalignment, titleString); + p->drawText(textRect.x(), textRect.y(), textRect.width(), textRect.height(), alignment, titleString); if(full) p->setClipping(false); @@ -6383,9 +6383,9 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c if (controls&SC_TitleBarCloseButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget); down = active & SC_TitleBarCloseButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarCloseButton); } @@ -6393,49 +6393,49 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c { if (controls &SC_TitleBarMaxButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget); down = active & SC_TitleBarMaxButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarMaxButton); } if (controls&SC_TitleBarNormalButton || controls&SC_TitleBarMinButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget); + ir = visualRect(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->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, ctrl); } if (controls&SC_TitleBarShadeButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget); down = active & SC_TitleBarShadeButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarShadeButton); } if (controls&SC_TitleBarUnshadeButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget); down = active & SC_TitleBarUnshadeButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarUnshadeButton); } } if (controls&SC_TitleBarSysMenu && tb->icon()) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget); down = active & SC_TitleBarSysMenu; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); - drawItem(p, ir, AlignCenter, tb->tqcolorGroup(), true, tb->icon(), TQString()); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); + drawItem(p, ir, AlignCenter, tb->colorGroup(), true, tb->icon(), TQString()); } break; } default: - BASE_STYLE::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, data); + BASE_STYLE::drawComplexControl(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(tqpixelMetric(PM_SpinBoxFrameWidth, 0)); + int fw(pixelMetric(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(tqpixelMetric(PM_ScrollBarExtent, widget)), + sbextent(pixelMetric(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 = tqpixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = pixelMetric( 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 tqvisualRect(tb->direction, tb->rect, r); + return visualRect(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::tqpixelMetric(PixelMetric metric, const TQWidget *widget) const +int TQtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const { switch(metric) { @@ -6750,10 +6750,10 @@ int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) con const TQTabBar *tb=widget ? ::tqqt_cast<const TQTabBar *>(widget) : 0; return tb - ? TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape() + ? TQTabBar::RoundedAbove==tb->shape() || TQTabBar::TriangularAbove==tb->shape() ? 1 : -1 - : BASE_STYLE::tqpixelMetric(metric, widget); + : BASE_STYLE::pixelMetric(metric, widget); } case PM_TabBarTabShiftHorizontal: return 0; @@ -6820,7 +6820,7 @@ int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) con case PM_TabBarTabVSpace: return opts.highlightTab ? 11 : 9; default: - return BASE_STYLE::tqpixelMetric(metric, widget); + return BASE_STYLE::pixelMetric(metric, widget); } } @@ -6846,8 +6846,8 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget * if (button && !button->text().isEmpty()) { - int margin(2*tqpixelMetric(PM_ButtonMargin, widget)), - mbi(button->isMenuButton() ? tqpixelMetric(PM_MenuButtonIndicator, widget) : 0), + int margin(2*pixelMetric(PM_ButtonMargin, widget)), + mbi(button->isMenuButton() ? pixelMetric(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()->tqsizeHint().width(); - h = mi->custom()->tqsizeHint().height(); + w = mi->custom()->sizeHint().width(); + h = mi->custom()->sizeHint().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::tqstyleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, +int TQtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn *returnData) const { switch(stylehint) @@ -6990,7 +6990,7 @@ int TQtCurveStyle::tqstyleHint(StyleHint stylehint, const TQWidget *widget, cons case SH_TabBar_Alignment: return AlignLeft; default: - return BASE_STYLE::tqstyleHint(stylehint, widget, option, returnData); + return BASE_STYLE::styleHint(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->tqcolorGroup().foreground()); + p->setPen(box->colorGroup().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, - tqvisualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+ - tqpixelMetric(PM_ExclusiveIndicatorWidth)+4, itsHoverWidget->height()); + visualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+ + pixelMetric(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, - tqvisualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+ - tqpixelMetric(PM_IndicatorWidth)+4, itsHoverWidget->height()); + visualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+ + pixelMetric(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 54cb871..b67334d 100644 --- a/style/qtcurve.h +++ b/style/qtcurve.h @@ -59,7 +59,7 @@ #endif #include <tqcolor.h> #include <tqpoint.h> -#include <tqpalette.h> +#include <palette.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 tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, + void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption & = TQStyleOption::Default) const; - void tqdrawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, + void drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const; TQRect subRect(SubRect, const TQWidget *) const; - void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &, + void drawComplexControl(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 tqpixelMetric(PixelMetric, const TQWidget *widget= 0) const; + int pixelMetric(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 tqstyleHint(StyleHint, const TQWidget *widget= 0, const TQStyleOption & = TQStyleOption::Default, + int styleHint(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; |