diff options
Diffstat (limited to 'src/styles')
| -rw-r--r-- | src/styles/tqcdestyle.cpp | 6 | ||||
| -rw-r--r-- | src/styles/tqcdestyle.h | 2 | ||||
| -rw-r--r-- | src/styles/tqcommonstyle.cpp | 30 | ||||
| -rw-r--r-- | src/styles/tqcompactstyle.cpp | 6 | ||||
| -rw-r--r-- | src/styles/tqinterlacestyle.cpp | 44 | ||||
| -rw-r--r-- | src/styles/tqinterlacestyle.h | 10 | ||||
| -rw-r--r-- | src/styles/tqmotifplusstyle.cpp | 48 | ||||
| -rw-r--r-- | src/styles/tqmotifplusstyle.h | 2 | ||||
| -rw-r--r-- | src/styles/tqmotifstyle.cpp | 48 | ||||
| -rw-r--r-- | src/styles/tqmotifstyle.h | 2 | ||||
| -rw-r--r-- | src/styles/tqplatinumstyle.cpp | 10 | ||||
| -rw-r--r-- | src/styles/tqsgistyle.cpp | 70 | ||||
| -rw-r--r-- | src/styles/tqsgistyle.h | 2 | ||||
| -rw-r--r-- | src/styles/tqstylefactory.cpp | 2 | ||||
| -rw-r--r-- | src/styles/tqstyleplugin.cpp | 2 | ||||
| -rw-r--r-- | src/styles/tqwindowsstyle.cpp | 41 |
16 files changed, 162 insertions, 163 deletions
diff --git a/src/styles/tqcdestyle.cpp b/src/styles/tqcdestyle.cpp index 2c3b103da..61b39ed4f 100644 --- a/src/styles/tqcdestyle.cpp +++ b/src/styles/tqcdestyle.cpp @@ -68,7 +68,7 @@ /*! Constructs a TQCDEStyle. - If \a useHighlightCols is FALSE (the default), then the style will + If \a useHighlightCols is false (the default), then the style will polish the application's color palette to emulate the Motif way of highlighting, which is a simple inversion between the base and the text color. @@ -125,7 +125,7 @@ void TQCDEStyle::drawControl( ControlElement element, case CE_MenuBarItem: { if ( how & Style_Active ) // active item - qDrawShadePanel( p, r, cg, TRUE, 1, + qDrawShadePanel( p, r, cg, true, 1, &cg.brush( TQColorGroup::Button ) ); else // other item p->fillRect( r, cg.brush( TQColorGroup::Button ) ); @@ -341,7 +341,7 @@ void TQCDEStyle::drawPrimitive( PrimitiveElement pe, p->setPen( pen ); p->setBrush( brush ); - p->setWorldMatrix( matrix, TRUE ); // set transformation matrix + p->setWorldMatrix( matrix, true ); // set transformation matrix p->drawPolygon( bFill ); // fill arrow p->setBrush( NoBrush ); // don't fill diff --git a/src/styles/tqcdestyle.h b/src/styles/tqcdestyle.h index 200360bd5..c31559ea7 100644 --- a/src/styles/tqcdestyle.h +++ b/src/styles/tqcdestyle.h @@ -59,7 +59,7 @@ class TQ_EXPORT_STYLE_CDE TQCDEStyle : public TQMotifStyle TQ_OBJECT public: - TQCDEStyle( bool useHighlightCols = FALSE ); + TQCDEStyle( bool useHighlightCols = false ); virtual ~TQCDEStyle(); int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const; diff --git a/src/styles/tqcommonstyle.cpp b/src/styles/tqcommonstyle.cpp index a18604f48..bf1001a7d 100644 --- a/src/styles/tqcommonstyle.cpp +++ b/src/styles/tqcommonstyle.cpp @@ -963,7 +963,7 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe, break; case PE_StatusBarSection: - qDrawShadeRect( p, r, cg, TRUE, 1, 0, 0 ); + qDrawShadeRect( p, r, cg, true, 1, 0, 0 ); break; case PE_ButtonCommand: @@ -1162,14 +1162,14 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe, int lw = opt.isDefault() ? pixelMetric(PM_DockWindowFrameWidth, ceData, elementFlags) : opt.lineWidth(); - qDrawShadePanel(p, r, cg, FALSE, lw); + qDrawShadePanel(p, r, cg, false, lw); break; } case PE_PanelMenuBar: { int lw = opt.isDefault() ? pixelMetric(PM_MenuBarFrameWidth, ceData, elementFlags) : opt.lineWidth(); - qDrawShadePanel(p, r, cg, FALSE, lw, &cg.brush(TQColorGroup::Button)); + qDrawShadePanel(p, r, cg, false, lw, &cg.brush(TQColorGroup::Button)); break; } case PE_SizeGrip: { @@ -1555,7 +1555,7 @@ void TQCommonStyle::drawControl( ControlElement element, } #endif // TQT_NO_TOOLBOX case CE_ProgressBarGroove: - qDrawShadePanel(p, r, cg, TRUE, 1, &cg.brush(TQColorGroup::Background)); + qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Background)); break; #ifndef TQT_NO_PROGRESSBAR @@ -1726,14 +1726,14 @@ void TQCommonStyle::drawControl( ControlElement element, pr.addCoords( 0, 1, 0, -fh-3 ); tr.addCoords( 0, pr.bottom(), 0, -3 ); pr.moveBy(shiftX, shiftY); - drawItem( p, pr, AlignCenter, cg, TRUE, &pm, TQString::null ); + drawItem( p, pr, AlignCenter, cg, true, &pm, TQString::null ); alignment |= AlignCenter; } else { pr.setWidth( pm.width() + 8 ); tr.addCoords( pr.right(), 0, 0, 0 ); pr.moveBy(shiftX, shiftY); - drawItem( p, pr, AlignCenter, cg, TRUE, &pm, TQString::null ); + drawItem( p, pr, AlignCenter, cg, true, &pm, TQString::null ); alignment |= AlignLeft | AlignVCenter; } @@ -1743,7 +1743,7 @@ void TQCommonStyle::drawControl( ControlElement element, ceData.textLabel.length(), &btext); } else { rect.moveBy(shiftX, shiftY); - drawItem( p, rect, AlignCenter, cg, TRUE, &pm, TQString::null ); + drawItem( p, rect, AlignCenter, cg, true, &pm, TQString::null ); } } } @@ -2330,7 +2330,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control, } TQRect ir; - bool down = FALSE; + bool down = false; TQPixmap pm; if ( controls & SC_TitleBarCloseButton ) { @@ -2351,7 +2351,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control, if( down ) p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget), pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) ); - drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null ); + drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null ); p->restore(); } @@ -2368,7 +2368,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control, if( down ) p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget), pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) ); - drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null ); + drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null ); p->restore(); } @@ -2389,7 +2389,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control, if( down ) p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget), pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) ); - drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null ); + drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null ); p->restore(); } @@ -2404,7 +2404,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control, if( down ) p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget), pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) ); - drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null ); + drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null ); p->restore(); } @@ -2419,7 +2419,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control, if( down ) p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget), pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) ); - drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null ); + drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null ); p->restore(); } } @@ -2427,7 +2427,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control, if ( controls & SC_TitleBarSysMenu ) { if ( !ceData.icon.isNull() ) { ir = visualRect( querySubControlMetrics( CC_TitleBar, ceData, elementFlags, SC_TitleBarSysMenu, TQStyleOption::Default, widget ), ceData, elementFlags ); - drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, (ceData.icon.isNull())?NULL:&ceData.icon, TQString::null ); + drawItem( p, ir, AlignCenter, ceData.colorGroup, true, (ceData.icon.isNull())?NULL:&ceData.icon, TQString::null ); } } #endif @@ -2441,7 +2441,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control, PrimitiveElement pe; if ( controls & SC_SpinWidgetFrame ) - qDrawWinPanel( p, r, cg, TRUE ); //cstyle == Sunken ); + qDrawWinPanel( p, r, cg, true ); //cstyle == Sunken ); if ( controls & SC_SpinWidgetUp ) { flags = Style_Default | Style_Enabled; diff --git a/src/styles/tqcompactstyle.cpp b/src/styles/tqcompactstyle.cpp index 440c379e4..83a6c8656 100644 --- a/src/styles/tqcompactstyle.cpp +++ b/src/styles/tqcompactstyle.cpp @@ -331,9 +331,9 @@ void TQCompactStyle::drawPrimitive( PrimitiveElement pe, int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL); if ( act && !dis ) { - qDrawShadePanel( p, x, y, checkcol, h, cg, TRUE, 1, &cg.brush( TQColorGroup::Button ) ); + qDrawShadePanel( p, x, y, checkcol, h, cg, true, 1, &cg.brush( TQColorGroup::Button ) ); } else { - qDrawShadePanel( p, x, y, checkcol, h, cg, TRUE, 1, &cg.brush( TQColorGroup::Midlight ) ); + qDrawShadePanel( p, x, y, checkcol, h, cg, true, 1, &cg.brush( TQColorGroup::Midlight ) ); } } break; @@ -341,7 +341,7 @@ void TQCompactStyle::drawPrimitive( PrimitiveElement pe, { int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL); - qDrawShadePanel( p, x, y, checkcol, h, cg, FALSE, 1, &cg.brush( TQColorGroup::Button ) ); + qDrawShadePanel( p, x, y, checkcol, h, cg, false, 1, &cg.brush( TQColorGroup::Button ) ); } break; case PE_MenuItemIndicatorCheck: diff --git a/src/styles/tqinterlacestyle.cpp b/src/styles/tqinterlacestyle.cpp index a0cd70c58..01e166a7a 100644 --- a/src/styles/tqinterlacestyle.cpp +++ b/src/styles/tqinterlacestyle.cpp @@ -74,7 +74,7 @@ */ TQInterlaceStyle::TQInterlaceStyle() : TQMotifStyle() { - setUseHighlightColors( TRUE ); + setUseHighlightColors( true ); } /*! \reimp @@ -133,7 +133,7 @@ void TQInterlaceStyle::polish( TQApplication *app) dcg.setColor( TQColorGroup::ButtonText, low ); dcg.setColor( TQColorGroup::Text, low ); - app->setPalette( TQPalette( cg, dcg, cg ), TRUE ); + app->setPalette( TQPalette( cg, dcg, cg ), true ); } /*! @@ -141,7 +141,7 @@ void TQInterlaceStyle::polish( TQApplication *app) */ void TQInterlaceStyle::unPolish( TQApplication *app) { - app->setPalette(oldPalette, TRUE); + app->setPalette(oldPalette, true); } /*! @@ -162,7 +162,7 @@ void TQInterlaceStyle::polish( TQWidget* w) if ( w->inherits("TQGroupBox") || w->inherits("TQTabWidget") || w->inherits("TQPushButton") ) { - w->setAutoMask( TRUE ); + w->setAutoMask( true ); return; } if (w->inherits("TQLabel") @@ -220,7 +220,7 @@ void TQInterlaceStyle::unPolish( TQWidget* w) if ( w->inherits("TQGroupBox") || w->inherits("TQTabWidget") || w->inherits("TQPushButton" ) ) { - w->setAutoMask( FALSE ); + w->setAutoMask( false ); return; } if (w->inherits("TQLabel") @@ -313,7 +313,7 @@ void TQInterlaceStyle::drawButtonMask( TQPainter * p, int x, int y, int w, int h TQBrush fill( color1 ); TQColorGroup cg; cg.setBrush( TQColorGroup::Dark, color1 ); - drawButton( p, x, y, w, h, cg, FALSE, &fill ); + drawButton( p, x, y, w, h, cg, false, &fill ); } /*! @@ -341,11 +341,11 @@ void TQInterlaceStyle::drawPushButton( TQPushButton* btn, TQPainter *p) if ( btn->hasFocus() ) g.setBrush( TQColorGroup::Dark, black ); - drawButton( p, x1, y1, x2-x1+1, y2-y1+1, g, FALSE, &fill ); + drawButton( p, x1, y1, x2-x1+1, y2-y1+1, g, false, &fill ); if ( btn->isMenuButton() ) { int dx = (y1-y2-4)/3; - drawArrow( p, DownArrow, FALSE, + drawArrow( p, DownArrow, false, x2 - dx, dx, y1, y2 - y1, g, btn->isEnabled() ); } @@ -382,7 +382,7 @@ void TQInterlaceStyle::drawIndicator( TQPainter * p, int x, int y, int w, int h, else fill = g.brush( enabled ? TQColorGroup::Base : TQColorGroup::Background ); - drawButton( p, x, y, w, h, g, FALSE, &fill ); + drawButton( p, x, y, w, h, g, false, &fill ); if ( s != TQButton::Off ) { TQPointArray a( 7*2 ); @@ -522,9 +522,9 @@ void TQInterlaceStyle::drawComboButton( TQPainter *p, int x, int y, int w, int h int awh, ax, ay, sh, sy, dh, ew; get_combo_parameters( buttonRect(x,y,w,h), ew, awh, ax, ay, sh, dh, sy ); - drawButton( p, x, y, w, h, g, FALSE, &fill ); + drawButton( p, x, y, w, h, g, false, &fill ); - qDrawArrow( p, DownArrow, MotifStyle, FALSE, ax, ay, awh, awh, g, TRUE ); + qDrawArrow( p, DownArrow, MotifStyle, false, ax, ay, awh, awh, g, true ); p->setPen( g.dark() ); p->drawRect( ax+1, sy+1, awh-1, sh-1 ); @@ -626,7 +626,7 @@ void TQInterlaceStyle::drawScrollBarControls( TQPainter* p, const TQScrollBar* s } if ( controls == (AddLine | SubLine | AddPage | SubPage | Slider | First | Last ) ) - drawPanel( p, 0, 0, sb->width(), sb->height(), g, FALSE, 2, &fill ); + drawPanel( p, 0, 0, sb->width(), sb->height(), g, false, 2, &fill ); if (sliderStart > sliderMax) { // sanity check sliderStart = sliderMax; @@ -673,11 +673,11 @@ void TQInterlaceStyle::drawScrollBarControls( TQPainter* p, const TQScrollBar* s if ( controls & AddLine ) drawArrow( p, VERTICAL ? DownArrow : RightArrow, ADD_LINE_ACTIVE, addB.x(), addB.y(), - addB.width(), addB.height(), g, TRUE ); + addB.width(), addB.height(), g, true ); if ( controls & SubLine ) drawArrow( p, VERTICAL ? UpArrow : LeftArrow, SUB_LINE_ACTIVE, subB.x(), subB.y(), - subB.width(), subB.height(), g, TRUE ); + subB.width(), subB.height(), g, true ); if ( controls & SubPage ) p->fillRect( subPageR, fill ); @@ -691,7 +691,7 @@ void TQInterlaceStyle::drawScrollBarControls( TQPainter* p, const TQScrollBar* s if ( sliderR.isValid() ) drawButton( p, sliderR.x(), sliderR.y(), sliderR.width(), sliderR.height(), g, - FALSE, &g.brush( TQColorGroup::Button ) ); + false, &g.brush( TQColorGroup::Button ) ); p->setBrushOrigin(bo); } @@ -703,13 +703,13 @@ void TQInterlaceStyle::drawScrollBarControls( TQPainter* p, const TQScrollBar* s void TQInterlaceStyle::drawSlider ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, Orientation orient, bool, bool) { p->fillRect( x, y, w, h, g.brush( TQColorGroup::Background ) ); - drawButton( p, x, y, w, h, g, FALSE, &g.brush( TQColorGroup::Button ) ); + drawButton( p, x, y, w, h, g, false, &g.brush( TQColorGroup::Button ) ); if ( orient == Horizontal ) { TQCOORD mid = x + w / 2; - qDrawShadeLine( p, mid, y , mid, y + h - 2, g, TRUE, 1); + qDrawShadeLine( p, mid, y , mid, y + h - 2, g, true, 1); } else { TQCOORD mid = y +h / 2; - qDrawShadeLine( p, x, mid, x + w - 2, mid, g, TRUE, 1); + qDrawShadeLine( p, x, mid, x + w - 2, mid, g, true, 1); } } @@ -723,9 +723,9 @@ void TQInterlaceStyle::drawSliderGroove ( TQPainter * p, int x, int y, int w, in p->setPen( NoPen ); if ( o == Horizontal ) - drawButton( p, x, y+h/2-3, w, 6, g, FALSE, &g.brush( TQColorGroup::Mid ) ); + drawButton( p, x, y+h/2-3, w, 6, g, false, &g.brush( TQColorGroup::Mid ) ); else - drawButton( p, x+w/2-3, y, 6, h, g, FALSE, &g.brush( TQColorGroup::Mid ) ); + drawButton( p, x+w/2-3, y, 6, h, g, false, &g.brush( TQColorGroup::Mid ) ); } @@ -753,7 +753,7 @@ void TQInterlaceStyle::drawSplitter( TQPainter *p, int x, int y, int w, int h, qDrawShadeLine( p, xPos, kPos + kSize - 1 , xPos, h, g ); drawPanel( p, xPos-sw/2+2, kPos, - kSize, kSize, g, FALSE, 2, + kSize, kSize, g, false, 2, &g.brush( TQColorGroup::Button )); qDrawShadeLine( p, xPos, 0, xPos, kPos, g ); } else { @@ -763,7 +763,7 @@ void TQInterlaceStyle::drawSplitter( TQPainter *p, int x, int y, int w, int h, qDrawShadeLine( p, 0, yPos, kPos, yPos, g ); drawPanel( p, kPos, yPos-sw/2+2, - kSize, kSize, g, FALSE, 2, + kSize, kSize, g, false, 2, &g.brush( TQColorGroup::Button )); qDrawShadeLine( p, kPos + kSize -1, yPos, w, yPos, g ); diff --git a/src/styles/tqinterlacestyle.h b/src/styles/tqinterlacestyle.h index 8c1982712..115e0d2ec 100644 --- a/src/styles/tqinterlacestyle.h +++ b/src/styles/tqinterlacestyle.h @@ -62,21 +62,21 @@ public: int defaultFrameWidth() const; TQRect pushButtonContentsRect( TQPushButton *btn ); - void drawFocusRect ( TQPainter *, const TQRect &, const TQColorGroup &, const TQColor * bg = 0, bool = FALSE ); + void drawFocusRect ( TQPainter *, const TQRect &, const TQColorGroup &, const TQColor * bg = 0, bool = false ); void drawButton( TQPainter *p, int x, int y, int w, int h, - const TQColorGroup &g, bool sunken = FALSE, + const TQColorGroup &g, bool sunken = false, const TQBrush *fill = 0 ); void drawButtonMask ( TQPainter * p, int x, int y, int w, int h ); void drawBevelButton( TQPainter *p, int x, int y, int w, int h, - const TQColorGroup &g, bool sunken = FALSE, + const TQColorGroup &g, bool sunken = false, const TQBrush *fill = 0 ); void drawPushButton( TQPushButton* btn, TQPainter *p); TQSize indicatorSize () const; - void drawIndicator ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, int state, bool down = FALSE, bool enabled = TRUE ); + void drawIndicator ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, int state, bool down = false, bool enabled = true ); void drawIndicatorMask( TQPainter *p, int x, int y, int w, int h, int ); TQSize exclusiveIndicatorSize () const; - void drawExclusiveIndicator( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool on, bool down = FALSE, bool enabled = TRUE ); + void drawExclusiveIndicator( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool on, bool down = false, bool enabled = true ); void drawExclusiveIndicatorMask( TQPainter * p, int x, int y, int w, int h, bool ); TQRect comboButtonRect ( int x, int y, int w, int h ); void drawComboButton( TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, bool sunken, bool editable, bool enabled, const TQBrush *fb ); diff --git a/src/styles/tqmotifplusstyle.cpp b/src/styles/tqmotifplusstyle.cpp index 6c9075495..8b13cb538 100644 --- a/src/styles/tqmotifplusstyle.cpp +++ b/src/styles/tqmotifplusstyle.cpp @@ -65,7 +65,7 @@ struct TQMotifPlusStylePrivate { TQMotifPlusStylePrivate() - : hovering(FALSE), sliderActive(FALSE), mousePressed(FALSE), + : hovering(false), sliderActive(false), mousePressed(false), scrollbarElement(0), lastElement(0), ref(1) { ; } @@ -144,11 +144,11 @@ static void drawMotifPlusShade(TQPainter *p, /*! Constructs a TQMotifPlusStyle - If \a hoveringHighlight is TRUE (the default), then the style will + If \a hoveringHighlight is true (the default), then the style will not highlight push buttons, checkboxes, radiobuttons, comboboxes, scrollbars or sliders. */ -TQMotifPlusStyle::TQMotifPlusStyle(bool hoveringHighlight) : TQMotifStyle(TRUE) +TQMotifPlusStyle::TQMotifPlusStyle(bool hoveringHighlight) : TQMotifStyle(true) { if ( !singleton ) singleton = new TQMotifPlusStylePrivate; @@ -650,7 +650,7 @@ void TQMotifPlusStyle::drawPrimitive( PrimitiveElement pe, case PE_PanelScrollBar: { - drawMotifPlusShade(p, r, cg, TRUE, FALSE, &cg.brush(TQColorGroup::Mid)); + drawMotifPlusShade(p, r, cg, true, false, &cg.brush(TQColorGroup::Mid)); break; } @@ -667,7 +667,7 @@ void TQMotifPlusStyle::drawPrimitive( PrimitiveElement pe, TQRect vrect = visualRect( TQRect( x+2, y+2, checkcol, h-2 ), r ); - qDrawShadePanel( p, vrect.x(), y+2, checkcol, h-2*2, cg, TRUE, 1, &cg.brush( TQColorGroup::Midlight ) ); + qDrawShadePanel( p, vrect.x(), y+2, checkcol, h-2*2, cg, true, 1, &cg.brush( TQColorGroup::Midlight ) ); break; } @@ -717,7 +717,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element, if ((elementFlags & CEF_IsDefault) || (elementFlags & CEF_AutoDefault)) { if (elementFlags & CEF_IsDefault) - drawMotifPlusShade(p, br, cg, TRUE, FALSE, + drawMotifPlusShade(p, br, cg, true, false, &cg.brush(TQColorGroup::Background)); br.setCoords(br.left() + dbi, @@ -745,7 +745,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element, r -= visualRect(subRect(SR_CheckBoxIndicator, ceData, elementFlags, widget), ceData, elementFlags); p->setClipRegion(r); p->fillRect(ceData.rect, cg.brush(TQColorGroup::Midlight)); - p->setClipping(FALSE); + p->setClipping(false); } int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft; @@ -768,7 +768,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element, r -= visualRect(subRect(SR_RadioButtonIndicator, ceData, elementFlags, widget), ceData, elementFlags); p->setClipRegion(r); p->fillRect(ceData.rect, cg.brush(TQColorGroup::Midlight)); - p->setClipping(FALSE); + p->setClipping(false); } int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft; @@ -791,7 +791,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element, TQMenuItem *mi = opt.menuItem(); if ((flags & Style_Enabled) && (flags & Style_Active)) - drawMotifPlusShade(p, r, cg, FALSE, TRUE); + drawMotifPlusShade(p, r, cg, false, true); else p->fillRect(r, cg.button()); @@ -836,7 +836,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element, } if ( act && !dis ) - drawMotifPlusShade(p, TQRect(x, y, w, h), cg, FALSE, TRUE); + drawMotifPlusShade(p, TQRect(x, y, w, h), cg, false, true); else p->fillRect(x, y, w, h, cg.brush( TQColorGroup::Button )); @@ -1161,7 +1161,7 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control, first = querySubControlMetrics(control, ceData, elementFlags, SC_ScrollBarFirst, opt, widget); last = querySubControlMetrics(control, ceData, elementFlags, SC_ScrollBarLast, opt, widget); - bool skipUpdate = FALSE; + bool skipUpdate = false; if (singleton->hovering) { if (addline.contains(singleton->mousePos)) { skipUpdate = @@ -1286,7 +1286,7 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control, editfield.addCoords(-3, -3, 3, 3); if (elementFlags & CEF_HasFocus) editfield.addCoords(1, 1, -1, -1); - drawMotifPlusShade(p, editfield, cg, TRUE, FALSE, + drawMotifPlusShade(p, editfield, cg, true, false, ((elementFlags & CEF_IsEnabled) ? &cg.brush(TQColorGroup::Base) : &cg.brush(TQColorGroup::Background))); @@ -1308,12 +1308,12 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control, editfield.addCoords(-3, -3, 3, 3); if (elementFlags & CEF_HasFocus) editfield.addCoords(1, 1, -1, -1); - drawMotifPlusShade(p, editfield, cg, FALSE, + drawMotifPlusShade(p, editfield, cg, false, (flags & Style_MouseOver)); } if (controls & SC_ComboBoxArrow && arrow.isValid()) - drawMotifPlusShade(p, arrow, cg, FALSE, (flags & Style_MouseOver)); + drawMotifPlusShade(p, arrow, cg, false, (flags & Style_MouseOver)); } if ((elementFlags & CEF_HasFocus) || @@ -1331,7 +1331,7 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control, SFlags flags = Style_Default; if (controls & SC_SpinWidgetFrame) - drawMotifPlusShade(p, r, cg, TRUE, FALSE, &cg.brush(TQColorGroup::Base)); + drawMotifPlusShade(p, r, cg, true, false, &cg.brush(TQColorGroup::Base)); if (controls & SC_SpinWidgetUp) { flags = Style_Enabled; @@ -1379,7 +1379,7 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control, opt, widget); if ((controls & SC_SliderGroove) && groove.isValid()) { - drawMotifPlusShade(p, groove, cg, TRUE, FALSE, + drawMotifPlusShade(p, groove, cg, true, false, &cg.brush(TQColorGroup::Mid)); if ( flags & Style_HasFocus ) { @@ -1400,12 +1400,12 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control, TQCOORD mid = handle.x() + handle.width() / 2; qDrawShadeLine( p, mid, handle.y() + 1, mid , handle.y() + handle.height() - 3, - cg, TRUE, 1); + cg, true, 1); } else { TQCOORD mid = handle.y() + handle.height() / 2; qDrawShadeLine( p, handle.x() + 1, mid, handle.x() + handle.width() - 3, mid, - cg, TRUE, 1); + cg, true, 1); } } @@ -1529,23 +1529,23 @@ bool TQMotifPlusStyle::objectEventHandler( const TQStyleControlElementData &ceDa switch(event->type()) { case TQEvent::MouseButtonPress: { - singleton->mousePressed = TRUE; + singleton->mousePressed = true; if (!ceData.widgetObjectTypes.contains("TQSlider")) break; - singleton->sliderActive = TRUE; + singleton->sliderActive = true; break; } case TQEvent::MouseButtonRelease: { - singleton->mousePressed = FALSE; + singleton->mousePressed = false; if (!ceData.widgetObjectTypes.contains("TQSlider")) break; - singleton->sliderActive = FALSE; + singleton->sliderActive = false; widgetActionRequest(ceData, elementFlags, source, WAR_Repaint); break; } @@ -1578,9 +1578,9 @@ bool TQMotifPlusStyle::objectEventHandler( const TQStyleControlElementData &ceDa singleton->mousePos = ((TQMouseEvent *) event)->pos(); if (! singleton->mousePressed) { - singleton->hovering = TRUE; + singleton->hovering = true; widgetActionRequest(ceData, elementFlags, source, WAR_Repaint); - singleton->hovering = FALSE; + singleton->hovering = false; } break; diff --git a/src/styles/tqmotifplusstyle.h b/src/styles/tqmotifplusstyle.h index 3cfca0677..df2bce409 100644 --- a/src/styles/tqmotifplusstyle.h +++ b/src/styles/tqmotifplusstyle.h @@ -59,7 +59,7 @@ class TQ_EXPORT_STYLE_MOTIFPLUS TQMotifPlusStyle : public TQMotifStyle TQ_OBJECT public: - TQMotifPlusStyle(bool hoveringHighlight = TRUE); + TQMotifPlusStyle(bool hoveringHighlight = true); virtual ~TQMotifPlusStyle(); void polish(TQPalette &pal); diff --git a/src/styles/tqmotifstyle.cpp b/src/styles/tqmotifstyle.cpp index 5e71d6813..2b80b1e12 100644 --- a/src/styles/tqmotifstyle.cpp +++ b/src/styles/tqmotifstyle.cpp @@ -91,7 +91,7 @@ static const int motifCheckMarkSpace = 12; /*! Constructs a TQMotifStyle. - If \a useHighlightCols is FALSE (the default), the style will + If \a useHighlightCols is false (the default), the style will polish the application's color palette to emulate the Motif way of highlighting, which is a simple inversion between the base and the text color. @@ -108,7 +108,7 @@ TQMotifStyle::~TQMotifStyle() } /*! - If \a arg is FALSE, the style will polish the application's color + If \a arg is false, the style will polish the application's color palette to emulate the Motif way of highlighting, which is a simple inversion between the base and the text color. @@ -124,10 +124,10 @@ void TQMotifStyle::setUseHighlightColors( bool arg ) } /*! - Returns TRUE if the style treats the highlight colors of the + Returns true if the style treats the highlight colors of the palette in a Motif-like manner, which is a simple inversion - between the base and the text color; otherwise returns FALSE. The - default is FALSE. + between the base and the text color; otherwise returns false. The + default is false. */ bool TQMotifStyle::useHighlightColors() const { @@ -678,7 +678,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe, qDrawShadeLine( p, 0, yPos, kPos, yPos, cg ); qDrawShadePanel( p, kPos, yPos - sw / 2 + 1, kSize, kSize, - cg, FALSE, 1, &cg.brush( TQColorGroup::Button ) ); + cg, false, 1, &cg.brush( TQColorGroup::Button ) ); qDrawShadeLine( p, kPos + kSize - 1, yPos, r.width(), yPos, cg ); } else { TQCOORD xPos = r.x() + r.width() / 2; @@ -687,7 +687,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe, qDrawShadeLine( p, xPos, kPos + kSize - 1, xPos, r.height(), cg ); qDrawShadePanel( p, xPos - sw / 2 + 1, kPos, kSize, kSize, cg, - FALSE, 1, &cg.brush( TQColorGroup::Button ) ); + false, 1, &cg.brush( TQColorGroup::Button ) ); qDrawShadeLine( p, xPos, 0, xPos, kPos, cg ); } break; @@ -731,9 +731,9 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe, p->setPen( cg.text() ); p->drawLineSegments( a ); - qDrawShadePanel( p, posX-2, posY-2, markW+4, markH+6, cg, TRUE, dfw); + qDrawShadePanel( p, posX-2, posY-2, markW+4, markH+6, cg, true, dfw); } else - qDrawShadePanel( p, posX, posY, markW, markH, cg, TRUE, dfw, + qDrawShadePanel( p, posX, posY, markW, markH, cg, true, dfw, &cg.brush( TQColorGroup::Mid ) ); break; @@ -765,7 +765,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe, break; case PE_PanelScrollBar: - qDrawShadePanel(p, r, cg, TRUE, + qDrawShadePanel(p, r, cg, true, pixelMetric(PM_DefaultFrameWidth, ceData, elementFlags), &cg.brush(TQColorGroup::Mid)); break; @@ -785,7 +785,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe, TQRect vrect = visualRect( TQRect( x+motifItemFrame, y+motifItemFrame, checkcol, h-2*motifItemFrame ), r ); int xvis = vrect.x(); - qDrawShadePanel( p, xvis, y+motifItemFrame, checkcol, h-2*motifItemFrame, cg, TRUE, 1, &cg.brush( TQColorGroup::Midlight ) ); + qDrawShadePanel( p, xvis, y+motifItemFrame, checkcol, h-2*motifItemFrame, cg, true, 1, &cg.brush( TQColorGroup::Midlight ) ); break; } @@ -867,7 +867,7 @@ void TQMotifStyle::drawControl( ControlElement element, x2 -= 2; y2 -= 2; } else { - qDrawShadePanel( p, r, newCg, TRUE ); + qDrawShadePanel( p, r, newCg, true ); } } if ( !( elementFlags & CEF_IsFlat ) || ( elementFlags & CEF_IsOn ) || ( elementFlags & CEF_IsDown ) ) { @@ -902,13 +902,13 @@ void TQMotifStyle::drawControl( ControlElement element, int dfw = pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags, widget ); bool selected = flags & Style_Selected; int o = dfw > 1 ? 1 : 0; - bool lastTab = FALSE; + bool lastTab = false; TQRect r2( r ); if ( ceData.tabBarData.shape == TQTabBar::RoundedAbove ) { if ( styleHint( SH_TabBar_Alignment, ceData, elementFlags, TQStyleOption::Default, 0, widget ) == AlignRight && ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1 ) - lastTab = TRUE; + lastTab = true; if ( o ) { p->setPen( ceData.colorGroup.light() ); @@ -963,7 +963,7 @@ void TQMotifStyle::drawControl( ControlElement element, } else if ( ceData.tabBarData.shape == TQTabBar::RoundedBelow ) { if ( styleHint( SH_TabBar_Alignment, ceData, elementFlags, TQStyleOption::Default, 0, widget ) == AlignLeft && ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1 ) - lastTab = TRUE; + lastTab = true; if ( selected ) { p->fillRect( TQRect( r2.left()+1, r2.top(), r2.width()-3, 1), ceData.palette.active().brush( TQColorGroup::Background )); @@ -1010,7 +1010,7 @@ void TQMotifStyle::drawControl( ControlElement element, } case CE_ProgressBarGroove: - qDrawShadePanel(p, r, cg, TRUE, 2); + qDrawShadePanel(p, r, cg, true, 2); break; case CE_ProgressBarLabel: @@ -1083,10 +1083,10 @@ void TQMotifStyle::drawControl( ControlElement element, if ( act && !dis ) { // active item frame if (pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags ) > 1) - qDrawShadePanel( p, x, y, w, h, cg, FALSE, pw, + qDrawShadePanel( p, x, y, w, h, cg, false, pw, &cg.brush( TQColorGroup::Button ) ); else - qDrawShadePanel( p, x+1, y+1, w-2, h-2, cg, TRUE, 1, + qDrawShadePanel( p, x+1, y+1, w-2, h-2, cg, true, 1, &cg.brush( TQColorGroup::Button ) ); } else // incognito frame @@ -1192,7 +1192,7 @@ void TQMotifStyle::drawControl( ControlElement element, case CE_MenuBarItem: { if ( flags & Style_Active ) // active item - qDrawShadePanel( p, r, cg, FALSE, motifItemFrame, + qDrawShadePanel( p, r, cg, false, motifItemFrame, &cg.brush(TQColorGroup::Button) ); else // other item p->fillRect( r, cg.brush(TQColorGroup::Button) ); @@ -1271,7 +1271,7 @@ void TQMotifStyle::drawComplexControl( ComplexControl control, case CC_SpinWidget: { SCFlags drawSub = SC_None; if ( sub & SC_SpinWidgetFrame ) - qDrawShadePanel( p, r, cg, TRUE, + qDrawShadePanel( p, r, cg, true, pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags ) ); if ( sub & SC_SpinWidgetUp || sub & SC_SpinWidgetDown ) { @@ -1294,7 +1294,7 @@ void TQMotifStyle::drawComplexControl( ComplexControl control, opt, widget); if ((sub & SC_SliderGroove) && groove.isValid()) { - qDrawShadePanel( p, groove, cg, TRUE, 2, + qDrawShadePanel( p, groove, cg, true, 2, &cg.brush( TQColorGroup::Mid ) ); @@ -1311,12 +1311,12 @@ void TQMotifStyle::drawComplexControl( ComplexControl control, TQCOORD mid = handle.x() + handle.width() / 2; qDrawShadeLine( p, mid, handle.y(), mid, handle.y() + handle.height() - 2, - cg, TRUE, 1); + cg, true, 1); } else { TQCOORD mid = handle.y() + handle.height() / 2; qDrawShadeLine( p, handle.x(), mid, handle.x() + handle.width() - 2, mid, - cg, TRUE, 1); + cg, true, 1); } } @@ -1364,7 +1364,7 @@ void TQMotifStyle::drawComplexControl( ComplexControl control, TQRect er = TQStyle::visualRect( querySubControlMetrics( CC_ComboBox, ceData, elementFlags, SC_ComboBoxEditField, cb ), ceData, elementFlags ); er.addCoords( -1, -1, 1, 1); - qDrawShadePanel( p, er, cg, TRUE, 1, + qDrawShadePanel( p, er, cg, true, 1, &cg.brush( TQColorGroup::Button )); } } diff --git a/src/styles/tqmotifstyle.h b/src/styles/tqmotifstyle.h index e840de446..eaca499a6 100644 --- a/src/styles/tqmotifstyle.h +++ b/src/styles/tqmotifstyle.h @@ -60,7 +60,7 @@ class TQ_EXPORT_STYLE_MOTIF TQMotifStyle : public TQCommonStyle { TQ_OBJECT public: - TQMotifStyle( bool useHighlightCols=FALSE ); + TQMotifStyle( bool useHighlightCols=false ); virtual ~TQMotifStyle(); void setUseHighlightColors( bool ); diff --git a/src/styles/tqplatinumstyle.cpp b/src/styles/tqplatinumstyle.cpp index 4050f075e..71e9ae3ae 100644 --- a/src/styles/tqplatinumstyle.cpp +++ b/src/styles/tqplatinumstyle.cpp @@ -796,9 +796,9 @@ void TQPlatinumStyle::drawControl( ControlElement element, || ( (!ceData.fgPixmap.isNull()) && (ceData.rect.width() * ceData.rect.height() < 1600 || TQABS( ceData.rect.width() - ceData.rect.height()) < 10 )) ) - useBevelButton = TRUE; + useBevelButton = true; else - useBevelButton = FALSE; + useBevelButton = false; int diw = pixelMetric( PM_ButtonDefaultIndicator, ceData, elementFlags, widget ); if ( elementFlags & CEF_IsDefault ) { @@ -1119,7 +1119,7 @@ void TQPlatinumStyle::drawComplexControl( ComplexControl control, // end comboButtonRect... ir.setRect( ir.left() - 1, ir.top() - 1, ir.width() + 2, ir.height() + 2 ); - qDrawShadePanel( p, ir, cg, TRUE, 2, 0 ); + qDrawShadePanel( p, ir, cg, true, 2, 0 ); } } #endif @@ -1260,7 +1260,7 @@ void TQPlatinumStyle::drawComplexControl( ComplexControl control, p->drawLine( x1 + 1, y2 - 1, x2 -my + 2, y2 - 1 ); drawRiffles( p, handle.x(), handle.y() + 2, handle.width() - 3, - handle.height() - 4, cg, TRUE ); + handle.height() - 4, cg, true ); } else { // Horizontal TQBrush oldBrush = p->brush(); p->setBrush( cg.brush( TQColorGroup::Button ) ); @@ -1297,7 +1297,7 @@ void TQPlatinumStyle::drawComplexControl( ComplexControl control, p->drawLine( x1 + mx - 2, y2 - 1, x1 + mx + 2, y2 - 1 ); drawRiffles( p, handle.x() + 2, handle.y(), handle.width() - 4, - handle.height() - 5, cg, FALSE ); + handle.height() - 5, cg, false ); } } diff --git a/src/styles/tqsgistyle.cpp b/src/styles/tqsgistyle.cpp index 3574dc0d0..0a78be86f 100644 --- a/src/styles/tqsgistyle.cpp +++ b/src/styles/tqsgistyle.cpp @@ -109,7 +109,7 @@ public: /*! Constructs a TQSGIStyle. - If \a useHighlightCols is FALSE (default value), the style will + If \a useHighlightCols is false (default value), the style will polish the application's color palette to emulate the Motif way of highlighting, which is a simple inversion between the base and the text color. @@ -156,7 +156,7 @@ TQSGIStyle::applicationPolish( const TQStyleControlElementData &ceData, ControlE pal.setColor( TQPalette::Disabled, TQColorGroup::Highlight, pal.disabled().text() ); pal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, pal.disabled().base() ); } - TQApplication::setPalette( pal, TRUE ); + TQApplication::setPalette( pal, true ); // different basecolor and highlighting in Q(Multi)LineEdit pal.setColor( TQColorGroup::Base, TQColor(211,181,181) ); @@ -167,15 +167,15 @@ TQSGIStyle::applicationPolish( const TQStyleControlElementData &ceData, ControlE pal.setColor( TQPalette::Disabled, TQColorGroup::Highlight, pal.disabled().midlight() ); pal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, pal.disabled().text() ); - TQApplication::setPalette( pal, TRUE, "TQLineEdit" ); - TQApplication::setPalette( pal, TRUE, "TQTextEdit" ); - TQApplication::setPalette( pal, TRUE, "TQDateTimeEditBase" ); + TQApplication::setPalette( pal, true, "TQLineEdit" ); + TQApplication::setPalette( pal, true, "TQTextEdit" ); + TQApplication::setPalette( pal, true, "TQDateTimeEditBase" ); pal = TQApplication::palette(); pal.setColor( TQColorGroup::Button, pal.active().background() ); - TQApplication::setPalette( pal, TRUE, "TQMenuBar" ); - TQApplication::setPalette( pal, TRUE, "TQToolBar" ); - TQApplication::setPalette( pal, TRUE, "TQPopupMenu" ); + TQApplication::setPalette( pal, true, "TQMenuBar" ); + TQApplication::setPalette( pal, true, "TQToolBar" ); + TQApplication::setPalette( pal, true, "TQPopupMenu" ); } /*! \reimp @@ -184,7 +184,7 @@ void TQSGIStyle::applicationUnPolish( const TQStyleControlElementData&, ControlElementFlags, void * ) { TQFont f = TQApplication::font(); - TQApplication::setFont( f, TRUE ); // get rid of the special fonts for special widget classes + TQApplication::setFont( f, true ); // get rid of the special fonts for special widget classes } /*! @@ -241,16 +241,16 @@ TQSGIStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags #endif } else if ( ceData.widgetObjectTypes.contains("TQComboBox") ) { TQFont f = TQApplication::font(); - f.setBold( TRUE ); - f.setItalic( TRUE ); + f.setBold( true ); + f.setItalic( true ); widgetActionRequest(ceData, elementFlags, ptr, WAR_SetFont, TQStyleWidgetActionRequestData(f)); #ifndef TQT_NO_MENUBAR } else if ( ceData.widgetObjectTypes.contains("TQMenuBar") ) { widgetActionRequest(ceData, elementFlags, ptr, WAR_FrameSetStyle, TQStyleWidgetActionRequestData(TQFrame::StyledPanel | TQFrame::Raised)); widgetActionRequest(ceData, elementFlags, ptr, WAR_SetBackgroundMode, TQStyleWidgetActionRequestData(TQWidget::PaletteBackground)); TQFont f = TQApplication::font(); - f.setBold( TRUE ); - f.setItalic( TRUE ); + f.setBold( true ); + f.setItalic( true ); widgetActionRequest(ceData, elementFlags, ptr, WAR_SetFont, TQStyleWidgetActionRequestData(f)); #endif #ifndef TQT_NO_POPUPMENU @@ -258,8 +258,8 @@ TQSGIStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags TQStyleWidgetActionRequestData requestData; widgetActionRequest(ceData, elementFlags, ptr, WAR_FrameSetLineWidth, TQStyleWidgetActionRequestData(pixelMetric( PM_DefaultFrameWidth, TQStyleControlElementData(), CEF_None ) + 1)); TQFont f = TQApplication::font(); - f.setBold( TRUE ); - f.setItalic( TRUE ); + f.setBold( true ); + f.setItalic( true ); widgetActionRequest(ceData, elementFlags, ptr, WAR_SetFont, TQStyleWidgetActionRequestData(f)); #endif } else if ( (ceData.widgetObjectTypes.contains("TQToolBar")) || (ceData.widgetObjectTypes.contains("TQToolBarSeparator")) ) { @@ -494,7 +494,7 @@ static void drawSGIPrefix( TQPainter *p, int x, int y, TQString* miText ) { if ( miText && (!!(*miText)) ) { int amp = 0; - bool nextAmp = FALSE; + bool nextAmp = false; while ( ( amp = miText->find( '&', amp ) ) != -1 ) { if ( (uint)amp == miText->length()-1 ) return; @@ -826,7 +826,7 @@ void TQSGIStyle::drawPrimitive( PrimitiveElement pe, if ( !r.contains( d->mousePos ) ) flags &= ~Style_MouseOver; if ( r.isValid() ) - qDrawShadePanel( p, x, y, w, h, cg, FALSE, 1, hot ? &cg.brush( TQColorGroup::Midlight ) : &cg.brush( TQColorGroup::Button ) ); + qDrawShadePanel( p, x, y, w, h, cg, false, 1, hot ? &cg.brush( TQColorGroup::Midlight ) : &cg.brush( TQColorGroup::Button ) ); break; case PE_ScrollBarSlider: @@ -912,7 +912,7 @@ void TQSGIStyle::drawPrimitive( PrimitiveElement pe, r.rect(&x, &y, &w, &h); int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL); - drawPanel( p, x+sgiItemFrame, y+sgiItemFrame, checkcol, h-2*sgiItemFrame, cg, TRUE, 1, &cg.brush( TQColorGroup::Light ) ); + drawPanel( p, x+sgiItemFrame, y+sgiItemFrame, checkcol, h-2*sgiItemFrame, cg, true, 1, &cg.brush( TQColorGroup::Light ) ); } break; @@ -987,7 +987,7 @@ void TQSGIStyle::drawControl( ControlElement element, x2 -= 2; y2 -= 2; } else { - qDrawShadePanel( p, ceData.rect, cg, TRUE ); + qDrawShadePanel( p, ceData.rect, cg, true ); } } @@ -1032,10 +1032,10 @@ void TQSGIStyle::drawControl( ControlElement element, if ( act && !dis ) { if ( pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags ) > 1 ) - drawPanel( p, x, y, w, h, cg, FALSE, pw, + drawPanel( p, x, y, w, h, cg, false, pw, &cg.brush( TQColorGroup::Light ) ); else - drawPanel( p, x+1, y+1, w-2, h-2, cg, FALSE, 1, + drawPanel( p, x+1, y+1, w-2, h-2, cg, false, 1, &cg.brush( TQColorGroup::Light ) ); } else { p->fillRect( x, y, w, h, cg.brush( TQColorGroup::Button ) ); @@ -1149,7 +1149,7 @@ void TQSGIStyle::drawControl( ControlElement element, if ( active ) { p->setPen( TQPen( cg.shadow(), 1) ); p->drawRect( x, y, w, h ); - qDrawShadePanel( p, TQRect(x+1,y+1,w-2,h-2), cg, FALSE, 2, + qDrawShadePanel( p, TQRect(x+1,y+1,w-2,h-2), cg, false, 2, &cg.brush( TQColorGroup::Light )); } else { p->fillRect( x, y, w, h, cg.brush( TQColorGroup::Button )); @@ -1231,11 +1231,11 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, region = region.subtract( handle ); p->setClipRegion( region ); } else { - p->setClipping( FALSE ); + p->setClipping( false ); } - qDrawShadePanel( p, d->lastSliderRect.rect, cg, TRUE, 1, &cg.brush( TQColorGroup::Dark ) ); + qDrawShadePanel( p, d->lastSliderRect.rect, cg, true, 1, &cg.brush( TQColorGroup::Dark ) ); } - p->setClipping( FALSE ); + p->setClipping( false ); } if (( sub & SC_SliderHandle ) && handle.isValid()) { @@ -1247,12 +1247,12 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, TQCOORD mid = handle.x() + handle.width() / 2; qDrawShadeLine( p, mid, handle.y(), mid, handle.y() + handle.height() - 2, - cg, TRUE, 1); + cg, true, 1); } else { TQCOORD mid = handle.y() + handle.height() / 2; qDrawShadeLine( p, handle.x(), mid, handle.x() + handle.width() - 2, mid, - cg, TRUE, 1); + cg, true, 1); } } @@ -1302,7 +1302,7 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, er.addCoords( -1, -1, 1, 1); qDrawShadePanel( p, TQRect( er.x()-1, er.y()-1, er.width()+2, er.height()+2 ), - cg, TRUE, 1, &cg.brush( TQColorGroup::Button ) ); + cg, true, 1, &cg.brush( TQColorGroup::Button ) ); } } #endif @@ -1353,11 +1353,11 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, region.subtract( handle ); p->setClipRegion( region ); } else { - p->setClipping( FALSE ); + p->setClipping( false ); } - qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, TRUE, 1, &cg.brush( TQColorGroup::Dark ) ); + qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, true, 1, &cg.brush( TQColorGroup::Dark ) ); } - p->setClipping( FALSE ); + p->setClipping( false ); } if ( sub & SC_ScrollBarSubPage ) { TQRect er = TQStyle::visualRect( querySubControlMetrics( CC_ScrollBar, ceData, elementFlags, SC_ScrollBarSubPage, opt, widget ), ceData, elementFlags ); @@ -1381,14 +1381,14 @@ void TQSGIStyle::drawComplexControl( ComplexControl control, region.subtract( handle ); p->setClipRegion( region ); } else { - p->setClipping( FALSE ); + p->setClipping( false ); } - qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, TRUE, 1, &cg.brush( TQColorGroup::Dark ) ); + qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, true, 1, &cg.brush( TQColorGroup::Dark ) ); } - p->setClipping( FALSE ); + p->setClipping( false ); } if ( sub & SC_ScrollBarSlider ) { - p->setClipping( FALSE ); + p->setClipping( false ); if ( subActive == SC_ScrollBarSlider ) flags |= Style_Active; diff --git a/src/styles/tqsgistyle.h b/src/styles/tqsgistyle.h index bd129ac53..0b65f3681 100644 --- a/src/styles/tqsgistyle.h +++ b/src/styles/tqsgistyle.h @@ -61,7 +61,7 @@ class TQ_EXPORT_STYLE_SGI TQSGIStyle: public TQMotifStyle { TQ_OBJECT public: - TQSGIStyle( bool useHighlightCols = FALSE ); + TQSGIStyle( bool useHighlightCols = false ); virtual ~TQSGIStyle(); #if !defined(Q_NO_USING_KEYWORD) diff --git a/src/styles/tqstylefactory.cpp b/src/styles/tqstylefactory.cpp index 05418b275..ed697dd8c 100644 --- a/src/styles/tqstylefactory.cpp +++ b/src/styles/tqstylefactory.cpp @@ -85,7 +85,7 @@ TQPluginManager<TQStyleFactoryInterface> *TQStyleFactoryPrivate::manager = 0; TQStyleFactoryPrivate::TQStyleFactoryPrivate() : TQObject( tqApp ) { - manager = new TQPluginManager<TQStyleFactoryInterface>( IID_QStyleFactory, TQApplication::libraryPaths(), "/styles", FALSE ); + manager = new TQPluginManager<TQStyleFactoryInterface>( IID_QStyleFactory, TQApplication::libraryPaths(), "/styles", false ); } TQStyleFactoryPrivate::~TQStyleFactoryPrivate() diff --git a/src/styles/tqstyleplugin.cpp b/src/styles/tqstyleplugin.cpp index 50e0e684d..9edadfc24 100644 --- a/src/styles/tqstyleplugin.cpp +++ b/src/styles/tqstyleplugin.cpp @@ -147,7 +147,7 @@ TQStyle *TQStylePluginPrivate::create( const TQString &key ) bool TQStylePluginPrivate::init() { - return TRUE; + return true; } void TQStylePluginPrivate::cleanup() diff --git a/src/styles/tqwindowsstyle.cpp b/src/styles/tqwindowsstyle.cpp index 02bd43720..38c126349 100644 --- a/src/styles/tqwindowsstyle.cpp +++ b/src/styles/tqwindowsstyle.cpp @@ -79,7 +79,7 @@ static const int windowsCheckMarkHMargin = 2; // horiz. margins of check mark static const int windowsRightBorder = 12; // right border on windows static const int windowsCheckMarkWidth = 12; // checkmarks width on windows -static bool use2000style = TRUE; +static bool use2000style = true; enum TQSliderDirection { SlUp, SlDown, SlLeft, SlRight }; @@ -110,7 +110,7 @@ TQWindowsStyle::Private::Private(TQWindowsStyle *parent) bool TQWindowsStyle::Private::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags, void* source, TQEvent *e ) { if (!(ceData.widgetObjectTypes.contains("TQWidget"))) { - return TRUE; + return true; } TQWidget *widget = reinterpret_cast<TQWidget*>(source); @@ -135,8 +135,8 @@ bool TQWindowsStyle::Private::objectEventHandler( const TQStyleControlElementDat if (menuBar && te->timerId() == menuBarTimer) { menuBar->killTimer(te->timerId()); menuBarTimer = 0; - menuBar->repaint(FALSE); - return TRUE; + menuBar->repaint(false); + return true; } } break; @@ -144,7 +144,7 @@ bool TQWindowsStyle::Private::objectEventHandler( const TQStyleControlElementDat break; } - return TRUE; + return true; } /*! @@ -177,7 +177,7 @@ bool TQWindowsStyle::objectEventHandler( const TQStyleControlElementData &ceData if (d) { return d->objectEventHandler(ceData, elementFlags, source, e); } - return TRUE; + return true; } /*! \reimp */ @@ -276,13 +276,13 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, case PE_ButtonTool: { TQBrush fill; - bool stippled = FALSE; + bool stippled = false; if (! (flags & (Style_Down | Style_MouseOver)) && (flags & Style_On) && use2000style) { fill = TQBrush(cg.light(), Dense4Pattern); - stippled = TRUE; + stippled = true; } else fill = cg.brush(TQColorGroup::Button); @@ -329,7 +329,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, else fill = cg.brush( TQColorGroup::Background ); - qDrawWinPanel( p, r, cg, TRUE, &fill ); + qDrawWinPanel( p, r, cg, true, &fill ); if (flags & Style_NoChange ) p->setPen( cg.dark() ); @@ -581,7 +581,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, int xvis = vrect.x(); if ( act && !dis ) { - qDrawShadePanel( p, xvis, y, checkcol, h, cg, TRUE, 1, &cg.brush( TQColorGroup::Button ) ); + qDrawShadePanel( p, xvis, y, checkcol, h, cg, true, 1, &cg.brush( TQColorGroup::Button ) ); } else { TQBrush fill( cg.light(), Dense4Pattern ); @@ -590,7 +590,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, // a consistent look TQPoint origin = p->brushOrigin(); p->setBrushOrigin( xvis, y ); - qDrawShadePanel( p, xvis, y, checkcol, h, cg, TRUE, 1, &fill ); + qDrawShadePanel( p, xvis, y, checkcol, h, cg, true, 1, &fill ); // restore the previous brush origin p->setBrushOrigin( origin ); } @@ -606,7 +606,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe, TQRect vrect = visualRect( TQRect( x, y, checkcol, h ), r ); int xvis = vrect.x(); - qDrawShadePanel( p, xvis, y, w, h, cg, FALSE, 1, &cg.brush( TQColorGroup::Button ) ); + qDrawShadePanel( p, xvis, y, w, h, cg, false, 1, &cg.brush( TQColorGroup::Button ) ); } break; @@ -705,8 +705,7 @@ void TQWindowsStyle::drawControl( ControlElement element, const TQTab * t = opt.tab(); bool selected = flags & Style_Selected; - bool lastTab = (ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1) ? - TRUE : FALSE; + bool lastTab = (ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1); TQRect r2( r ); if ( ceData.tabBarData.shape == TQTabBar::RoundedAbove ) { p->setPen( cg.midlight() ); @@ -1634,8 +1633,8 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, if ( !verticalLine ) { // make 128*1 and 1*128 bitmaps that can be used for // drawing the right sort of lines. - verticalLine = new TQBitmap( 1, 129, TRUE ); - horizontalLine = new TQBitmap( 128, 1, TRUE ); + verticalLine = new TQBitmap( 1, 129, true ); + horizontalLine = new TQBitmap( 128, 1, true ); TQPointArray a( 64 ); TQPainter p; p.begin( verticalLine ); @@ -1705,7 +1704,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, if ( sub & SC_ComboBoxArrow ) { SFlags flags = Style_Default; - qDrawWinPanel( p, r, cg, TRUE, ( elementFlags & CEF_IsEnabled ) ? + qDrawWinPanel( p, r, cg, true, ( elementFlags & CEF_IsEnabled ) ? &cg.brush( TQColorGroup::Base ): &cg.brush( TQColorGroup::Background ) ); @@ -1717,7 +1716,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, p->setBrush( cg.brush( TQColorGroup::Button ) ); p->drawRect( ar ); } else - qDrawWinPanel( p, ar, cg, FALSE, + qDrawWinPanel( p, ar, cg, false, &cg.brush( TQColorGroup::Button ) ); ar.addCoords( 2, 2, -2, -2 ); @@ -1780,12 +1779,12 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, p->setPen( cg.shadow() ); if ( ceData.orientation == Horizontal ) { qDrawWinPanel( p, groove.x(), groove.y() + mid - 2, - groove.width(), 4, cg, TRUE ); + groove.width(), 4, cg, true ); p->drawLine( groove.x() + 1, groove.y() + mid - 1, groove.x() + groove.width() - 3, groove.y() + mid - 1 ); } else { qDrawWinPanel( p, groove.x() + mid - 2, groove.y(), - 4, groove.height(), cg, TRUE ); + 4, groove.height(), cg, true ); p->drawLine( groove.x() + mid - 1, groove.y() + 1, groove.x() + mid - 1, groove.y() + groove.height() - 3 ); @@ -1833,7 +1832,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p, } if ( (tickAbove && tickBelow) || (!tickAbove && !tickBelow) ) { - qDrawWinButton( p, TQRect(x,y,wi,he), cg, FALSE, + qDrawWinButton( p, TQRect(x,y,wi,he), cg, false, &cg.brush( TQColorGroup::Button ) ); return; } |
