diff options
Diffstat (limited to 'examples/themes')
| -rw-r--r-- | examples/themes/metal.cpp | 28 | ||||
| -rw-r--r-- | examples/themes/metal.h | 4 | ||||
| -rw-r--r-- | examples/themes/themes.cpp | 22 | ||||
| -rw-r--r-- | examples/themes/wood.cpp | 8 |
4 files changed, 31 insertions, 31 deletions
diff --git a/examples/themes/metal.cpp b/examples/themes/metal.cpp index 19ec19ff3..05d080d61 100644 --- a/examples/themes/metal.cpp +++ b/examples/themes/metal.cpp @@ -49,10 +49,10 @@ void MetalStyle::applicationPolish( const TQStyleControlElementData &ceData, Con // pixmaps here and apply to it all widgets TQFont f("times", ceData.font.pointSize() ); - f.setBold( TRUE ); - f.setItalic( TRUE ); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, TRUE, "TQMenuBar")); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, TRUE, "TQPopupMenu")); + f.setBold( true ); + f.setItalic( true ); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, true, "TQMenuBar")); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, true, "TQPopupMenu")); // TQPixmap button( stonedark_xpm ); @@ -93,7 +93,7 @@ void MetalStyle::applicationPolish( const TQStyleControlElementData &ceData, Con ); TQPalette newPalette( active, disabled, active ); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(newPalette, TRUE)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(newPalette, true)); } /*! @@ -101,8 +101,8 @@ void MetalStyle::applicationPolish( const TQStyleControlElementData &ceData, Con */ void MetalStyle::applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, TRUE)); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(ceData.font, TRUE)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, true)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(ceData.font, true)); } /*! @@ -160,7 +160,7 @@ void MetalStyle::drawPrimitive( PrimitiveElement pe, case PE_ButtonCommand: drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), (flags & (Style_Sunken|Style_On|Style_Down)), - TRUE, !(flags & Style_Raised) ); + true, !(flags & Style_Raised) ); break; case PE_PanelMenuBar: drawMetalFrame( p, r.x(), r.y(), r.width(), r.height() ); @@ -180,7 +180,7 @@ void MetalStyle::drawPrimitive( PrimitiveElement pe, case PE_ScrollBarSlider: - drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), FALSE, + drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), false, flags & Style_Horizontal ); break; default: @@ -312,17 +312,17 @@ void MetalStyle::drawComplexControl( ComplexControl cc, SC_SliderGroove, subActive, opt, widget ); if ( (sub & SC_SliderHandle) && handle.isValid() ) drawMetalButton( p, handle.x(), handle.y(), handle.width(), - handle.height(), FALSE, + handle.height(), false, ceData.orientation == TQSlider::Horizontal); break; } case CC_ComboBox: { - qDrawWinPanel( p, r.x(), r.y(), r.width(), r.height(), cg, TRUE, + qDrawWinPanel( p, r.x(), r.y(), r.width(), r.height(), cg, true, (elementFlags & CEF_IsEnabled) ? &cg.brush( TQColorGroup::Base ) : &cg.brush( TQColorGroup::Background ) ); drawMetalButton( p, r.x() + r.width() - 2 - 16, r.y() + 2, 16, r.height() - 4, - how & Style_Sunken, TRUE ); + how & Style_Sunken, true ); drawPrimitive( PE_ArrowDown, p, ceData, elementFlags, TQRect( r.x() + r.width() - 2 - 16 + 2, r.y() + 2 + 2, 16 - 4, r.height() - 4 -4 ), @@ -340,8 +340,8 @@ void MetalStyle::drawComplexControl( ComplexControl cc, /*! - Draw a metallic button, sunken if \a sunken is TRUE, horizontal if - /a horz is TRUE. + Draw a metallic button, sunken if \a sunken is true, horizontal if + /a horz is true. */ void MetalStyle::drawMetalButton( TQPainter *p, int x, int y, int w, int h, diff --git a/examples/themes/metal.h b/examples/themes/metal.h index 0941840d6..80b05af69 100644 --- a/examples/themes/metal.h +++ b/examples/themes/metal.h @@ -67,9 +67,9 @@ public: private: void drawMetalFrame( TQPainter *p, int x, int y, int w, int h ) const; void drawMetalGradient( TQPainter *p, int x, int y, int w, int h, - bool sunken, bool horz, bool flat=FALSE ) const; + bool sunken, bool horz, bool flat=false ) const; void drawMetalButton( TQPainter *p, int x, int y, int w, int h, - bool sunken, bool horz, bool flat=FALSE ) const; + bool sunken, bool horz, bool flat=false ) const; TQPalette oldPalette; }; diff --git a/examples/themes/themes.cpp b/examples/themes/themes.cpp index be0751f5b..16b9b1ff4 100644 --- a/examples/themes/themes.cpp +++ b/examples/themes/themes.cpp @@ -50,12 +50,12 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f ) setCentralWidget( tabwidget ); TQPopupMenu *style = new TQPopupMenu( this ); - style->setCheckable( TRUE ); + style->setCheckable( true ); menuBar()->insertItem( "&Style" , style ); - style->setCheckable( TRUE ); + style->setCheckable( true ); TQActionGroup *ag = new TQActionGroup( this, 0 ); - ag->setExclusive( TRUE ); + ag->setExclusive( true ); TQSignalMapper *styleMapper = new TQSignalMapper( this ); connect( styleMapper, TQ_SIGNAL( mapped( const TQString& ) ), this, TQ_SLOT( makeStyle( const TQString& ) ) ); TQStringList list = TQStyleFactory::keys(); @@ -64,7 +64,7 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f ) list.insert(list.begin(), "Norwegian Wood"); list.insert(list.begin(), "Metal"); #endif - TQDict<int> stylesDict( 17, FALSE ); + TQDict<int> stylesDict( 17, false ); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { TQString styleStr = *it; TQString styleAccel = styleStr; @@ -113,10 +113,10 @@ void Themes::makeStyle(const TQString &style) tqApp->setStyle(style); if(style == "Platinum") { TQPalette p( TQColor( 239, 239, 239 ) ); - tqApp->setPalette( p, TRUE ); - tqApp->setFont( appFont, TRUE ); + tqApp->setPalette( p, true ); + tqApp->setFont( appFont, true ); } else if(style == "Windows") { - tqApp->setFont( appFont, TRUE ); + tqApp->setFont( appFont, true ); } else if(style == "CDE") { TQPalette p( TQColor( 75, 123, 130 ) ); p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); @@ -137,12 +137,12 @@ void Themes::makeStyle(const TQString &style) p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); - tqApp->setPalette( p, TRUE ); - tqApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE ); + tqApp->setPalette( p, true ); + tqApp->setFont( TQFont( "times", appFont.pointSize() ), true ); } else if(style == "Motif" || style == "MotifPlus") { TQPalette p( TQColor( 192, 192, 192 ) ); - tqApp->setPalette( p, TRUE ); - tqApp->setFont( appFont, TRUE ); + tqApp->setPalette( p, true ); + tqApp->setFont( appFont, true ); } } } diff --git a/examples/themes/wood.cpp b/examples/themes/wood.cpp index 50e191975..98b56fbbb 100644 --- a/examples/themes/wood.cpp +++ b/examples/themes/wood.cpp @@ -868,12 +868,12 @@ void NorwegianWoodStyle::applicationPolish( const TQStyleControlElementData &ceD TQBrush(op.disabled().background(), background) ); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(TQPalette(active, disabled, active), TRUE)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(TQPalette(active, disabled, active), true)); } void NorwegianWoodStyle::applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, TRUE)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, true)); } /*! @@ -960,7 +960,7 @@ void NorwegianWoodStyle::drawPrimitive( PrimitiveElement pe, p->fillRect( r, (flags & Style_Sunken ? TQBrush( cg.light(), *sunkenLight) : cg.brush( TQColorGroup::Dark ) ) ); } p->setClipRegion( internR ); - p->setClipping( FALSE ); + p->setClipping( false ); p->setPen( cg.foreground() ); drawroundrect( p, x, y, w, h, d ); p->setPen( oldPen ); @@ -1155,7 +1155,7 @@ void NorwegianWoodStyle::drawComplexControl( ComplexControl cc, if ( elementFlags & CEF_IsEditable ) { TQRect r( querySubControlMetrics(CC_ComboBox, ceData, elementFlags, SC_ComboBoxEditField, opt, widget) ); - qDrawShadePanel( p, r, cg, TRUE, 1, + qDrawShadePanel( p, r, cg, true, 1, &cg.brush(TQColorGroup::Button) ); } |
