diff options
Diffstat (limited to 'src/widgets/tqtooltip.cpp')
| -rw-r--r-- | src/widgets/tqtooltip.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/src/widgets/tqtooltip.cpp b/src/widgets/tqtooltip.cpp index 32211ec9f..8599a611d 100644 --- a/src/widgets/tqtooltip.cpp +++ b/src/widgets/tqtooltip.cpp @@ -45,7 +45,7 @@ #include "tqtimer.h" #include "tqeffects_p.h" -static bool globally_enabled = TRUE; +static bool globally_enabled = true; // Magic value meaning an entire widget - if someone tries to insert a // tool tip on this part of a widget it will be interpreted as the @@ -67,7 +67,7 @@ public: WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ) { setMargin(1); - setAutoMask( FALSE ); + setAutoMask( false ); setFrameStyle( TQFrame::Plain | TQFrame::Box ); setLineWidth( 1 ); setAlignment( AlignAuto | AlignTop ); @@ -106,7 +106,7 @@ public: TQToolTipGroup *, const TQString& , TQToolTip *, bool ); void add( TQWidget *, const TQRect &, const TQString& , TQToolTipGroup *, const TQString& , TQToolTip *, bool ); - void remove( TQWidget *, const TQRect &, bool delayhide = FALSE ); + void remove( TQWidget *, const TQRect &, bool delayhide = false ); void remove( TQWidget * ); void removeFromGroup( TQToolTipGroup * ); @@ -163,8 +163,8 @@ TQTipManager::TQTipManager() currentTip = 0; previousTip = 0; label = 0; - preventAnimation = FALSE; - isApplicationFilter = FALSE; + preventAnimation = false; + isApplicationFilter = false; connect( &wakeUp, TQ_SIGNAL(timeout()), TQ_SLOT(showTip()) ); connect( &fallAsleep, TQ_SIGNAL(timeout()), TQ_SLOT(hideTip()) ); removeTimer = new TQTimer( this ); @@ -174,7 +174,7 @@ TQTipManager::TQTipManager() TQTipManager::~TQTipManager() { if ( isApplicationFilter && !tqApp->closingDown() ) { - tqApp->setGlobalMouseTracking( FALSE ); + tqApp->setGlobalMouseTracking( false ); tqApp->removeEventFilter( tipManager ); } @@ -206,7 +206,7 @@ void TQTipManager::add( const TQRect &gm, TQWidget *w, TQToolTipGroup *g, const TQString& gs, TQToolTip *tt, bool a ) { - remove( w, r, TRUE ); + remove( w, r, true ); TQTipManager::Tip *h = (*tips)[ w ]; TQTipManager::Tip *t = new TQTipManager::Tip; t->next = h; @@ -235,9 +235,9 @@ void TQTipManager::add( const TQRect &gm, TQWidget *w, } if ( !isApplicationFilter && tqApp ) { - isApplicationFilter = TRUE; + isApplicationFilter = true; tqApp->installEventFilter( tipManager ); - tqApp->setGlobalMouseTracking( TRUE ); + tqApp->setGlobalMouseTracking( true ); } if ( t->group ) { @@ -266,7 +266,7 @@ void TQTipManager::remove( TQWidget *w, const TQRect & r, bool delayhide ) if (!delayhide) hideTip(); else - currentTip->autoDelete = TRUE; + currentTip->autoDelete = true; } if ( t == previousTip ) @@ -382,14 +382,14 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e ) || e->type() == TQEvent::Timer || e->type() == TQEvent::SockAct || !tips ) - return FALSE; + return false; TQWidget *w = (TQWidget *)obj; if ( e->type() == TQEvent::FocusOut || e->type() == TQEvent::FocusIn ) { // user moved focus somewhere - hide the tip and sleep if ( ((TQFocusEvent*)e)->reason() != TQFocusEvent::Popup ) hideTipAndSleep(); - return FALSE; + return false; } TQTipManager::Tip *t = 0; @@ -399,13 +399,13 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e ) w = w->isTopLevel() ? 0 : w->parentWidget(); } if ( !w ) - return FALSE; + return false; if ( !t && e->type() != TQEvent::MouseMove) { if ( ( e->type() >= TQEvent::MouseButtonPress && e->type() <= TQEvent::FocusOut) || e->type() == TQEvent::Leave ) hideTip(); - return FALSE; + return false; } // with that out of the way, let's get down to action @@ -427,7 +427,7 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e ) if ( currentTip && !currentTip->rect.contains( mousePos ) ) { hideTip(); if ( m->state() == 0 ) - return FALSE; + return false; } wakeUp.stop(); @@ -435,13 +435,13 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e ) mousePos.x() >= 0 && mousePos.x() < w->width() && mousePos.y() >= 0 && mousePos.y() < w->height() ) { if ( label && label->isVisible() ) { - return FALSE; + return false; } else { if ( fallAsleep.isActive() ) { - wakeUp.start( 1, TRUE ); + wakeUp.start( 1, true ); } else { previousTip = 0; - wakeUp.start( wakeUpDelay, TRUE ); + wakeUp.start( wakeUpDelay, true ); } if ( t->group && t->group->ena && !t->group->del && !t->groupText.isEmpty() ) { @@ -452,7 +452,7 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e ) } widget = w; pos = mousePos; - return FALSE; + return false; } else { hideTip(); } @@ -467,7 +467,7 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e ) default: break; } - return FALSE; + return false; } @@ -571,7 +571,7 @@ void TQTipManager::showTip() label->move( p ); #ifndef TQT_NO_EFFECTS - if ( TQApplication::isEffectEnabled( UI_AnimateTooltip ) == FALSE || + if ( TQApplication::isEffectEnabled( UI_AnimateTooltip ) == false || previousTip || preventAnimation ) label->show(); else if ( TQApplication::isEffectEnabled( UI_FadeTooltip ) ) @@ -583,7 +583,7 @@ void TQTipManager::showTip() #endif label->raise(); - fallAsleep.start( 10000, TRUE ); + fallAsleep.start( 10000, true ); } if ( t->group && t->group->del && !t->groupText.isEmpty() ) { @@ -599,21 +599,21 @@ void TQTipManager::showTip() void TQTipManager::hideTip() { TQTimer::singleShot( 250, this, TQ_SLOT(allowAnimation()) ); - preventAnimation = TRUE; + preventAnimation = true; if ( label && label->isVisible() ) { label->hide(); - fallAsleep.start( 2000, TRUE ); + fallAsleep.start( 2000, true ); wakeUp.stop(); if ( currentTip && currentTip->group ) - removeTimer->start( 100, TRUE ); + removeTimer->start( 100, true ); } else if ( wakeUp.isActive() ) { wakeUp.stop(); if ( currentTip && currentTip->group && !currentTip->group->del && !currentTip->groupText.isEmpty() ) - removeTimer->start( 100, TRUE ); + removeTimer->start( 100, true ); } else if ( currentTip && currentTip->group ) { - removeTimer->start( 100, TRUE ); + removeTimer->start( 100, true ); } previousTip = currentTip; @@ -632,7 +632,7 @@ void TQTipManager::hideTipAndSleep() void TQTipManager::allowAnimation() { - preventAnimation = FALSE; + preventAnimation = false; } TQString TQTipManager::find( TQWidget *w, const TQPoint& pos ) @@ -762,7 +762,7 @@ TQFont TQToolTip::font() void TQToolTip::setFont( const TQFont &font ) { - TQApplication::setFont( font, TRUE, "TQTipLabel" ); + TQApplication::setFont( font, true, "TQTipLabel" ); } @@ -787,7 +787,7 @@ TQPalette TQToolTip::palette() void TQToolTip::setPalette( const TQPalette &palette ) { - TQApplication::setPalette( palette, TRUE, "TQTipLabel" ); + TQApplication::setPalette( palette, true, "TQTipLabel" ); } /*! @@ -821,7 +821,7 @@ TQToolTip::TQToolTip( TQWidget * widget, TQToolTipGroup * group ) g = group; initTipManager(); tipManager->add( p, entireWidget(), - TQString::null, g, TQString::null, this, FALSE ); + TQString::null, g, TQString::null, this, false ); } TQToolTip::~TQToolTip() @@ -842,7 +842,7 @@ void TQToolTip::add( TQWidget *widget, const TQString &text ) { initTipManager(); tipManager->add( widget, entireWidget(), - text, 0, TQString::null, 0, FALSE ); + text, 0, TQString::null, 0, false ); } @@ -862,7 +862,7 @@ void TQToolTip::add( TQWidget *widget, const TQString &text, TQToolTipGroup *group, const TQString& longText ) { initTipManager(); - tipManager->add( widget, entireWidget(), text, group, longText, 0, FALSE ); + tipManager->add( widget, entireWidget(), text, group, longText, 0, false ); } @@ -889,7 +889,7 @@ void TQToolTip::remove( TQWidget * widget ) void TQToolTip::add( TQWidget * widget, const TQRect & rect, const TQString &text ) { initTipManager(); - tipManager->add( widget, rect, text, 0, TQString::null, 0, FALSE ); + tipManager->add( widget, rect, text, 0, TQString::null, 0, false ); } @@ -912,7 +912,7 @@ void TQToolTip::add( TQWidget *widget, const TQRect &rect, TQToolTipGroup *group, const TQString& groupText ) { initTipManager(); - tipManager->add( widget, rect, text, group, groupText, 0, FALSE ); + tipManager->add( widget, rect, text, group, groupText, 0, false ); } @@ -1003,7 +1003,7 @@ void TQToolTip::hide() void TQToolTip::tip( const TQRect & rect, const TQString &text ) { initTipManager(); - tipManager->add( parentWidget(), rect, text, 0, TQString::null, 0, TRUE ); + tipManager->add( parentWidget(), rect, text, 0, TQString::null, 0, true ); } /*! @@ -1022,7 +1022,7 @@ void TQToolTip::tip( const TQRect & rect, const TQString &text, const TQString& groupText ) { initTipManager(); - tipManager->add( parentWidget(), rect, text, group(), groupText, 0, TRUE ); + tipManager->add( parentWidget(), rect, text, group(), groupText, 0, true ); } /*! @@ -1042,7 +1042,7 @@ void TQToolTip::tip( const TQRect & rect, const TQString &text, void TQToolTip::tip( const TQRect &rect, const TQString &text, const TQRect &geometry ) { initTipManager(); - tipManager->add( geometry, parentWidget(), rect, text, 0, TQString::null, 0, TRUE ); + tipManager->add( geometry, parentWidget(), rect, text, 0, TQString::null, 0, true ); } /*! @@ -1063,7 +1063,7 @@ void TQToolTip::tip( const TQRect &rect, const TQString &text, const TQRect &geo void TQToolTip::tip( const TQRect &rect, const TQString &text, const TQString& groupText, const TQRect &geometry ) { initTipManager(); - tipManager->add( geometry, parentWidget(), rect, text, group(), groupText, 0, TRUE ); + tipManager->add( geometry, parentWidget(), rect, text, group(), groupText, 0, true ); } @@ -1167,8 +1167,8 @@ void TQToolTip::clear() TQToolTipGroup::TQToolTipGroup( TQObject *parent, const char *name ) : TQObject( parent, name ) { - del = TRUE; - ena = TRUE; + del = true; + ena = true; } @@ -1187,7 +1187,7 @@ TQToolTipGroup::~TQToolTipGroup() \property TQToolTipGroup::delay \brief whether the display of the group text is delayed. - If set to TRUE (the default), the group text is displayed at the + If set to true (the default), the group text is displayed at the same time as the tool tip. Otherwise, the group text is displayed immediately when the cursor enters the widget. */ @@ -1221,7 +1221,7 @@ void TQToolTipGroup::setDelay( bool enable ) \property TQToolTipGroup::enabled \brief whether tool tips in the group are enabled. - This property's default is TRUE. + This property's default is true. */ void TQToolTipGroup::setEnabled( bool enable ) @@ -1235,8 +1235,8 @@ bool TQToolTipGroup::enabled() const } /*! - If \a enable is TRUE sets all tool tips to be enabled (shown when - needed); if \a enable is FALSE sets all tool tips to be disabled + If \a enable is true sets all tool tips to be enabled (shown when + needed); if \a enable is false sets all tool tips to be disabled (never shown). By default, tool tips are enabled. Note that this function affects |
