From 50326e196a9245af21604da7dc3a36eea52784ed Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 26 Dec 2025 14:08:52 +0900 Subject: Replace TRUE/FALSE with boolean values true/false - part 10 Signed-off-by: Michele Calgaro --- src/widgets/tqtitlebar.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/widgets/tqtitlebar.cpp') diff --git a/src/widgets/tqtitlebar.cpp b/src/widgets/tqtitlebar.cpp index 536bf4942..09968c170 100644 --- a/src/widgets/tqtitlebar.cpp +++ b/src/widgets/tqtitlebar.cpp @@ -178,7 +178,7 @@ TQTitleBar::TQTitleBar(TQWidget* w, TQWidget* parent, const char* name) readColors(); setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); - setMouseTracking(TRUE); + setMouseTracking(true); } TQTitleBar::~TQTitleBar() @@ -199,7 +199,7 @@ void TQTitleBar::readColors() { TQPalette pal = palette(); - bool colorsInitialized = FALSE; + bool colorsInitialized = false; #ifdef TQ_WS_WIN // ask system properties on windows #ifndef SPI_GETGRADIENTCAPTIONS @@ -217,7 +217,7 @@ void TQTitleBar::readColors() pal.setColor( TQPalette::Active, TQColorGroup::HighlightedText, qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT)) ); pal.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT)) ); if ( qt_winver != TQt::WV_95 && qt_winver != WV_NT ) { - colorsInitialized = TRUE; + colorsInitialized = true; BOOL gradient; QT_WA( { SystemParametersInfo( SPI_GETGRADIENTCAPTIONS, 0, &gradient, 0 ); @@ -251,7 +251,7 @@ void TQTitleBar::mousePressEvent( TQMouseEvent * e) if ( !d->act ) emit doActivate(); if ( e->button() == LeftButton ) { - d->pressed = TRUE; + d->pressed = true; TQStyle::SCFlags ctrl = style().querySubControl(TQStyle::CC_TitleBar, this, e->pos()); switch (ctrl) { case TQStyle::SC_TitleBarSysMenu: @@ -307,9 +307,9 @@ void TQTitleBar::mousePressEvent( TQMouseEvent * e) default: break; } - repaint( FALSE ); + repaint( false ); } else { - d->pressed = FALSE; + d->pressed = false; } } @@ -357,7 +357,7 @@ void TQTitleBar::mouseReleaseEvent( TQMouseEvent * e) case TQStyle::SC_TitleBarCloseButton: if( testWFlags( WStyle_SysMenu ) ) { d->buttonDown = TQStyle::SC_None; - repaint(FALSE); + repaint(false); emit doClose(); return; } @@ -368,8 +368,8 @@ void TQTitleBar::mouseReleaseEvent( TQMouseEvent * e) } } d->buttonDown = TQStyle::SC_None; - repaint(FALSE); - d->pressed = FALSE; + repaint(false); + d->pressed = false; } } @@ -378,7 +378,7 @@ void TQTitleBar::mouseMoveEvent( TQMouseEvent * e) switch (d->buttonDown) { case TQStyle::SC_None: if(autoRaise()) - repaint( FALSE ); + repaint( false ); break; case TQStyle::SC_TitleBarSysMenu: break; @@ -393,7 +393,7 @@ void TQTitleBar::mouseMoveEvent( TQMouseEvent * e) d->buttonDown = style().querySubControl(TQStyle::CC_TitleBar, this, e->pos()); if( d->buttonDown != last_ctrl) d->buttonDown = TQStyle::SC_None; - repaint(FALSE); + repaint(false); d->buttonDown = last_ctrl; } break; @@ -428,7 +428,7 @@ void TQTitleBar::mouseMoveEvent( TQMouseEvent * e) TQStyle::SCFlags last_ctrl = d->buttonDown; d->buttonDown = TQStyle::SC_None; if( d->buttonDown != last_ctrl) - repaint(FALSE); + repaint(false); } break; } @@ -583,13 +583,13 @@ void TQTitleBar::setIcon( const TQPixmap& icon ) void TQTitleBar::leaveEvent( TQEvent * ) { if(autoRaise() && !d->pressed) - repaint( FALSE ); + repaint( false ); } void TQTitleBar::enterEvent( TQEvent * ) { if(autoRaise() && !d->pressed) - repaint( FALSE ); + repaint( false ); TQEvent e( TQEvent::Leave ); TQApplication::sendEvent( parentWidget(), &e ); } @@ -628,12 +628,12 @@ bool TQTitleBar::event( TQEvent* e ) { if ( e->type() == TQEvent::ApplicationPaletteChange ) { readColors(); - return TRUE; + return true; } else if ( e->type() == TQEvent::WindowActivate ) { setActive( d->act ); } else if ( e->type() == TQEvent::WindowDeactivate ) { bool wasActive = d->act; - setActive( FALSE ); + setActive( false ); d->act = wasActive; } -- cgit v1.2.3