summaryrefslogtreecommitdiffstats
path: root/src/widgets/tqtoolbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/tqtoolbutton.cpp')
-rw-r--r--src/widgets/tqtoolbutton.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/widgets/tqtoolbutton.cpp b/src/widgets/tqtoolbutton.cpp
index fab5ffb93..176059290 100644
--- a/src/widgets/tqtoolbutton.cpp
+++ b/src/widgets/tqtoolbutton.cpp
@@ -106,7 +106,7 @@ public:
TQMainWindow's settings (see TQMainWindow::setUsesTextLabel() and
TQMainWindow::setUsesBigPixmaps()). The pixmap set on a TQToolButton
will be set to 22x22 if it is bigger than this size. If
- usesBigPixmap() is TRUE, then the pixmap will be set to 32x32.
+ usesBigPixmap() is true, then the pixmap will be set to 32x32.
A tool button can offer additional choices in a popup menu. The
feature is sometimes used with the "Back" button in a web browser.
@@ -145,7 +145,7 @@ TQToolButton::TQToolButton( TQWidget * parent, const char *name )
#ifndef TQT_NO_TOOLBAR
TQToolBar* tb = ::tqt_cast<TQToolBar*>(parent);
if ( tb ) {
- setAutoRaise( TRUE );
+ setAutoRaise( true );
if ( tb->mainWindow() ) {
connect( tb->mainWindow(), TQ_SIGNAL(pixmapSizeChanged(bool)),
this, TQ_SLOT(setUsesBigPixmap(bool)) );
@@ -154,12 +154,12 @@ TQToolButton::TQToolButton( TQWidget * parent, const char *name )
this, TQ_SLOT(setUsesTextLabel(bool)) );
setUsesTextLabel( tb->mainWindow()->usesTextLabel() );
} else {
- setUsesBigPixmap( FALSE );
+ setUsesBigPixmap( false );
}
} else
#endif
{
- setUsesBigPixmap( FALSE );
+ setUsesBigPixmap( false );
}
}
@@ -178,10 +178,10 @@ TQToolButton::TQToolButton( ArrowType type, TQWidget *parent, const char *name )
: TQButton( parent, name )
{
init();
- setUsesBigPixmap( FALSE );
- setAutoRepeat( TRUE );
+ setUsesBigPixmap( false );
+ setAutoRepeat( true );
d->arrow = type;
- hasArrow = TRUE;
+ hasArrow = true;
}
@@ -196,16 +196,16 @@ void TQToolButton::init()
d->popup = 0;
d->popupTimer = 0;
#endif
- d->autoraise = FALSE;
+ d->autoraise = false;
d->arrow = LeftArrow;
- d->instantPopup = FALSE;
- d->discardNextMouseEvent = FALSE;
+ d->instantPopup = false;
+ d->discardNextMouseEvent = false;
bpID = bp.serialNumber();
spID = sp.serialNumber();
- utl = FALSE;
- ubp = TRUE;
- hasArrow = FALSE;
+ utl = false;
+ ubp = true;
+ hasArrow = false;
s = 0;
@@ -233,7 +233,7 @@ TQToolButton::TQToolButton( const TQIconSet& iconSet, const TQString &textLabel,
: TQButton( parent, name )
{
init();
- setAutoRaise( TRUE );
+ setAutoRaise( true );
setIconSet( iconSet );
setTextLabel( textLabel );
if ( receiver && slot )
@@ -246,7 +246,7 @@ TQToolButton::TQToolButton( const TQIconSet& iconSet, const TQString &textLabel,
this, TQ_SLOT(setUsesTextLabel(bool)) );
setUsesTextLabel( parent->mainWindow()->usesTextLabel() );
} else {
- setUsesBigPixmap( FALSE );
+ setUsesBigPixmap( false );
}
#ifndef TQT_NO_TOOLTIP
if ( !textLabel.isEmpty() ) {
@@ -375,7 +375,7 @@ TQSize TQToolButton::minimumSizeHint() const
signal in the TQMainWindow in which it resides. We strongly
recommend that you use TQMainWindow::setUsesBigPixmaps() instead.
- This property's default is TRUE.
+ This property's default is true.
\warning If you set some buttons (in a TQMainWindow) to have big
pixmaps and others to have small pixmaps, TQMainWindow may not get
@@ -399,7 +399,7 @@ void TQToolButton::setUsesBigPixmap( bool enable )
\property TQToolButton::usesTextLabel
\brief whether the toolbutton displays a text label below the button pixmap.
- The default is FALSE.
+ The default is false.
TQToolButton automatically connects this slot to the relevant
signal in the TQMainWindow in which is resides.
@@ -423,7 +423,7 @@ void TQToolButton::setUsesTextLabel( bool enable )
\brief whether this tool button is on.
This property has no effect on \link isToggleButton() non-toggling
- buttons. \endlink The default is FALSE (i.e. off).
+ buttons. \endlink The default is false (i.e. off).
\sa isToggleButton() toggle()
*/
@@ -545,7 +545,7 @@ void TQToolButton::drawButtonLabel(TQPainter *p)
void TQToolButton::enterEvent( TQEvent * e )
{
if ( autoRaise() && isEnabled() )
- repaint(FALSE);
+ repaint(false);
TQButton::enterEvent( e );
}
@@ -557,7 +557,7 @@ void TQToolButton::enterEvent( TQEvent * e )
void TQToolButton::leaveEvent( TQEvent * e )
{
if ( autoRaise() && isEnabled() )
- repaint(FALSE);
+ repaint(false);
TQButton::leaveEvent( e );
}
@@ -571,7 +571,7 @@ void TQToolButton::moveEvent( TQMoveEvent * )
// has a fancy pixmap background.
if ( parentWidget() && parentWidget()->backgroundPixmap() &&
autoRaise() && !uses3D() )
- repaint( FALSE );
+ repaint( false );
}
/*!
@@ -586,8 +586,8 @@ void TQToolButton::mousePressEvent( TQMouseEvent *e )
#ifndef TQT_NO_POPUPMENU
if ( d->discardNextMouseEvent ) {
- d->discardNextMouseEvent = FALSE;
- d->instantPopup = FALSE;
+ d->discardNextMouseEvent = false;
+ d->instantPopup = false;
d->popup->removeEventFilter( this );
return;
}
@@ -597,7 +597,7 @@ void TQToolButton::mousePressEvent( TQMouseEvent *e )
}
#endif
- d->instantPopup = FALSE;
+ d->instantPopup = false;
TQButton::mousePressEvent( e );
}
@@ -615,8 +615,8 @@ bool TQToolButton::eventFilter( TQObject *o, TQEvent *e )
{
TQMouseEvent *me = (TQMouseEvent*)e;
TQPoint p = me->globalPos();
- if ( TQApplication::widgetAt( p, TRUE ) == this )
- d->discardNextMouseEvent = TRUE;
+ if ( TQApplication::widgetAt( p, true ) == this )
+ d->discardNextMouseEvent = true;
}
break;
default:
@@ -627,8 +627,8 @@ bool TQToolButton::eventFilter( TQObject *o, TQEvent *e )
}
/*!
- Returns TRUE if this button should be drawn using raised edges;
- otherwise returns FALSE.
+ Returns true if this button should be drawn using raised edges;
+ otherwise returns false.
\sa drawButton()
*/
@@ -654,14 +654,14 @@ bool TQToolButton::uses3D() const
void TQToolButton::setTextLabel( const TQString &newLabel )
{
- setTextLabel( newLabel, TRUE );
+ setTextLabel( newLabel, true );
}
/*!
\overload
Sets the label of this button to \a newLabel and automatically
- sets it as a tool tip if \a tipToo is TRUE.
+ sets it as a tool tip if \a tipToo is true.
*/
void TQToolButton::setTextLabel( const TQString &newLabel , bool tipToo )
@@ -779,22 +779,22 @@ void TQToolButton::openPopup()
if ( !d->popup )
return;
- d->instantPopup = TRUE;
- repaint( FALSE );
+ d->instantPopup = true;
+ repaint( false );
if ( d->popupTimer )
d->popupTimer->stop();
TQGuardedPtr<TQToolButton> that = this;
popupTimerDone();
if ( !that )
return;
- d->instantPopup = FALSE;
- repaint( FALSE );
+ d->instantPopup = false;
+ repaint( false );
}
void TQToolButton::popupPressed()
{
if ( d->popupTimer && d->delay > 0 )
- d->popupTimer->start( d->delay, TRUE );
+ d->popupTimer->start( d->delay, true );
}
void TQToolButton::popupTimerDone()
@@ -804,12 +804,12 @@ void TQToolButton::popupTimerDone()
d->popup->installEventFilter( this );
d->repeat = autoRepeat();
- setAutoRepeat( FALSE );
- bool horizontal = TRUE;
+ setAutoRepeat( false );
+ bool horizontal = true;
#ifndef TQT_NO_TOOLBAR
TQToolBar *tb = ::tqt_cast<TQToolBar*>(parentWidget());
if ( tb && tb->orientation() == Vertical )
- horizontal = FALSE;
+ horizontal = false;
#endif
TQPoint p;
TQRect screen = tqApp->desktop()->availableGeometry( this );
@@ -849,9 +849,9 @@ void TQToolButton::popupTimerDone()
if ( !that )
return;
- setDown( FALSE );
+ setDown( false );
if ( d->repeat )
- setAutoRepeat( TRUE );
+ setAutoRepeat( true );
}
/*!
@@ -882,7 +882,7 @@ int TQToolButton::popupDelay() const
\property TQToolButton::autoRaise
\brief whether auto-raising is enabled or not.
- The default is disabled (i.e. FALSE).
+ The default is disabled (i.e. false).
*/
void TQToolButton::setAutoRaise( bool enable )
{