diff options
Diffstat (limited to 'src/widgets/tqbutton.cpp')
| -rw-r--r-- | src/widgets/tqbutton.cpp | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/src/widgets/tqbutton.cpp b/src/widgets/tqbutton.cpp index bcf9c2ada..6ffea91e3 100644 --- a/src/widgets/tqbutton.cpp +++ b/src/widgets/tqbutton.cpp @@ -165,7 +165,7 @@ TQTimer *TQButton::timer() \e pressed and then released into the \e on state. When the user clicks it again (to toggle it off), the button moves first to the \e pressed state, then to the \e off state (isOn() and isDown() - are both FALSE). + are both false). Default buttons (as used in many dialogs) are provided by TQPushButton::setDefault() and TQPushButton::setAutoDefault(). @@ -271,18 +271,18 @@ TQTimer *TQButton::timer() \property TQButton::down \brief whether the button is pressed - If this property is TRUE, the button is pressed down. The signals + If this property is true, the button is pressed down. The signals pressed() and clicked() are not emitted if you set this property - to TRUE. The default is FALSE. + to true. The default is false. */ /*! \property TQButton::exclusiveToggle \brief whether the button is an exclusive toggle - If this property is TRUE and the button is in a TQButtonGroup, the + If this property is true and the button is in a TQButtonGroup, the button can only be toggled off by another one being toggled on. - The default is FALSE. + The default is false. */ /*! @@ -295,7 +295,7 @@ TQTimer *TQButton::timer() /*! \fn void TQButton::setOn( bool on ) - Sets the state of this button to On if \a on is TRUE; otherwise to + Sets the state of this button to On if \a on is true; otherwise to Off. \sa toggleState @@ -332,14 +332,14 @@ TQTimer *TQButton::timer() \property TQButton::toggleButton \brief whether the button is a toggle button - The default value is FALSE. + The default value is false. */ /*! \fn TQButton::setToggleButton( bool b ) - If \a b is TRUE, this button becomes a toggle button; if \a b is - FALSE, this button becomes a command button. + If \a b is true, this button becomes a toggle button; if \a b is + false, this button becomes a command button. \sa toggleButton */ @@ -374,12 +374,12 @@ TQButton::TQButton( TQWidget *parent, const char *name, WFlags f ) { bpixmap = 0; toggleTyp = SingleShot; // button is simple - buttonDown = FALSE; // button is up + buttonDown = false; // button is up stat = Off; // button is off - mlbDown = FALSE; // mouse left button up - autoresize = FALSE; // not auto resizing - animation = FALSE; // no pending animateClick - repeat = FALSE; // not in autorepeat mode + mlbDown = false; // mouse left button up + autoresize = false; // not auto resizing + animation = false; // no pending animateClick + repeat = false; // not in autorepeat mode d = 0; #ifndef TQT_NO_BUTTONGROUP if ( ::tqt_cast<TQButtonGroup*>(parent) ) { @@ -441,7 +441,7 @@ TQButton::~TQButton() \fn void TQButton::toggled( bool on ) This signal is emitted whenever a toggle button changes status. \a - on is TRUE if the button is on, or FALSE if the button is off. + on is true if the button is on, or false if the button is off. This may be the result of a user action, toggle() slot activation, or because setOn() was called. @@ -499,7 +499,7 @@ void TQButton::setPixmap( const TQPixmap &pixmap ) pixmap.height() != bpixmap->height(); *bpixmap = pixmap; } else { - newSize = TRUE; + newSize = true; bpixmap = new TQPixmap( pixmap ); TQ_CHECK_PTR( bpixmap ); } @@ -549,7 +549,7 @@ void TQButton::setAutoRepeat( bool enable ) { repeat = (uint)enable; if ( repeat && mlbDown ) - timer()->start( AUTO_REPEAT_DELAY, TRUE ); + timer()->start( AUTO_REPEAT_DELAY, true ); } /*! @@ -569,9 +569,9 @@ void TQButton::animateClick() { if ( !isEnabled() || animation ) return; - animation = TRUE; - buttonDown = TRUE; - repaint( FALSE ); + animation = true; + buttonDown = true; + repaint( false ); emit pressed(); TQTimer::singleShot( 100, this, TQ_SLOT(animateTimeout()) ); } @@ -580,8 +580,8 @@ void TQButton::emulateClick() { if ( !isEnabled() || animation ) return; - animation = TRUE; - buttonDown = TRUE; + animation = true; + buttonDown = true; emit pressed(); animateTimeout(); } @@ -590,10 +590,10 @@ void TQButton::setDown( bool enable ) { if ( d ) timer()->stop(); - mlbDown = FALSE; // the safe setting + mlbDown = false; // the safe setting if ( (bool)buttonDown != enable ) { buttonDown = enable; - repaint( FALSE ); + repaint( false ); #if defined(QT_ACCESSIBILITY_SUPPORT) TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged ); #endif @@ -620,7 +620,7 @@ void TQButton::setState( ToggleState s ) stat = s; if ( autoMask() ) updateMask(); - repaint( FALSE ); + repaint( false ); #if defined(QT_ACCESSIBILITY_SUPPORT) TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged ); #endif @@ -633,8 +633,8 @@ void TQButton::setState( ToggleState s ) /*! - Returns TRUE if \a pos is inside the clickable button rectangle; - otherwise returns FALSE. + Returns true if \a pos is inside the clickable button rectangle; + otherwise returns false. By default, the clickable area is the entire widget. Subclasses may reimplement it, though. @@ -690,7 +690,7 @@ void TQButton::keyPressEvent( TQKeyEvent *e ) break; case Key_Space: if ( !e->isAutoRepeat() ) { - setDown( TRUE ); + setDown( true ); #ifndef TQT_NO_PUSHBUTTON if ( ::tqt_cast<TQPushButton*>(this) ) emit pressed(); @@ -708,7 +708,7 @@ void TQButton::keyPressEvent( TQKeyEvent *e ) #endif { TQFocusEvent::setReason(TQFocusEvent::Backtab); - focusNextPrevChild( FALSE ); + focusNextPrevChild( false ); TQFocusEvent::resetReason(); } break; @@ -721,13 +721,13 @@ void TQButton::keyPressEvent( TQKeyEvent *e ) #endif { TQFocusEvent::setReason(TQFocusEvent::Tab); - focusNextPrevChild( TRUE ); + focusNextPrevChild( true ); TQFocusEvent::resetReason(); } break; case Key_Escape: if ( buttonDown ) { - buttonDown = FALSE; + buttonDown = false; update(); break; } @@ -743,7 +743,7 @@ void TQButton::keyReleaseEvent( TQKeyEvent * e) switch ( e->key() ) { case Key_Space: if ( buttonDown && !e->isAutoRepeat() ) { - buttonDown = FALSE; + buttonDown = false; nextState(); emit released(); emit clicked(); @@ -763,19 +763,19 @@ void TQButton::mousePressEvent( TQMouseEvent *e ) } bool hit = hitButton( e->pos() ); if ( hit ) { // mouse press on button - mlbDown = TRUE; // left mouse button down - buttonDown = TRUE; + mlbDown = true; // left mouse button down + buttonDown = true; if ( autoMask() ) updateMask(); - repaint( FALSE ); + repaint( false ); #if defined(QT_ACCESSIBILITY_SUPPORT) TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged ); #endif TQGuardedPtr<TQTimer> t = timer(); emit pressed(); if ( t && repeat ) - t->start( AUTO_REPEAT_DELAY, TRUE ); + t->start( AUTO_REPEAT_DELAY, true ); } } @@ -786,12 +786,12 @@ void TQButton::mouseReleaseEvent( TQMouseEvent *e) // clean up apperance if left button has been pressed if (mlbDown || buttonDown) { - mlbDown = FALSE; - buttonDown = FALSE; + mlbDown = false; + buttonDown = false; if ( autoMask() ) updateMask(); - repaint( FALSE ); + repaint( false ); } e->ignore(); @@ -803,8 +803,8 @@ void TQButton::mouseReleaseEvent( TQMouseEvent *e) timer()->stop(); const bool oldButtonDown = buttonDown; - mlbDown = FALSE; // left mouse button up - buttonDown = FALSE; + mlbDown = false; // left mouse button up + buttonDown = false; if ( hitButton( e->pos() ) ) { // mouse release on button nextState(); #if defined(QT_ACCESSIBILITY_SUPPORT) @@ -813,7 +813,7 @@ void TQButton::mouseReleaseEvent( TQMouseEvent *e) emit released(); emit clicked(); } else { - repaint( FALSE ); + repaint( false ); #if defined(QT_ACCESSIBILITY_SUPPORT) TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged ); #endif @@ -831,8 +831,8 @@ void TQButton::mouseMoveEvent( TQMouseEvent *e ) } if ( hitButton(e->pos()) ) { // mouse move in button if ( !buttonDown ) { - buttonDown = TRUE; - repaint( FALSE ); + buttonDown = true; + repaint( false ); #if defined(QT_ACCESSIBILITY_SUPPORT) TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged ); #endif @@ -840,8 +840,8 @@ void TQButton::mouseMoveEvent( TQMouseEvent *e ) } } else { // mouse move outside button if ( buttonDown ) { - buttonDown = FALSE; - repaint( FALSE ); + buttonDown = false; + repaint( false ); #if defined(QT_ACCESSIBILITY_SUPPORT) TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged ); #endif @@ -874,7 +874,7 @@ void TQButton::focusInEvent( TQFocusEvent * e) /*! \reimp */ void TQButton::focusOutEvent( TQFocusEvent * e ) { - buttonDown = FALSE; + buttonDown = false; TQWidget::focusOutEvent( e ); } @@ -891,7 +891,7 @@ void TQButton::autoRepeatTimeout() emit pressed(); } if ( t ) - t->start( AUTO_REPEAT_PERIOD, TRUE ); + t->start( AUTO_REPEAT_PERIOD, true ); } } @@ -902,8 +902,8 @@ void TQButton::animateTimeout() { if ( !animation ) return; - animation = FALSE; - buttonDown = FALSE; + animation = false; + buttonDown = false; nextState(); emit released(); emit clicked(); @@ -922,7 +922,7 @@ void TQButton::nextState() } if ( autoMask() ) updateMask(); - repaint( FALSE ); + repaint( false ); if ( t ) { #if defined(QT_ACCESSIBILITY_SUPPORT) TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged ); @@ -937,7 +937,7 @@ void TQButton::nextState() void TQButton::enabledChange( bool e ) { if ( !isEnabled() ) - setDown( FALSE ); + setDown( false ); TQWidget::enabledChange( e ); } @@ -976,7 +976,7 @@ bool TQButton::isExclusiveToggle() const ( group()->isRadioButtonExclusive() && ::tqt_cast<TQRadioButton*>(this) ) ); #else - return FALSE; + return false; #endif } |
