summaryrefslogtreecommitdiffstats
path: root/src/widgets/tqtoolbar.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-12-26 14:08:52 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-12-27 22:38:28 +0900
commit50326e196a9245af21604da7dc3a36eea52784ed (patch)
tree955f50c739379c59d3846c5c6ec25c8f5856fb91 /src/widgets/tqtoolbar.cpp
parent854c5d5c9cfd48a2d5a17366fb6805219eab4859 (diff)
downloadtqt-50326e196a9245af21604da7dc3a36eea52784ed.tar.gz
tqt-50326e196a9245af21604da7dc3a36eea52784ed.zip
Replace TRUE/FALSE with boolean values true/false - part 10
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/widgets/tqtoolbar.cpp')
-rw-r--r--src/widgets/tqtoolbar.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/widgets/tqtoolbar.cpp b/src/widgets/tqtoolbar.cpp
index 43281cf9a..f571ffad8 100644
--- a/src/widgets/tqtoolbar.cpp
+++ b/src/widgets/tqtoolbar.cpp
@@ -89,7 +89,7 @@ class TQToolBarExtensionWidget;
class TQToolBarPrivate
{
public:
- TQToolBarPrivate() : moving( FALSE ) {
+ TQToolBarPrivate() : moving( false ) {
}
bool moving;
@@ -142,7 +142,7 @@ TQToolBarExtensionWidget::TQToolBarExtensionWidget( TQWidget *w )
: TQWidget( w, "qt_dockwidget_internal" )
{
tb = new TQToolButton( this, "qt_toolbar_ext_button" );
- tb->setAutoRaise( TRUE );
+ tb->setAutoRaise( true );
setOrientation( Horizontal );
}
@@ -293,7 +293,7 @@ void TQToolBarSeparator::paintEvent( TQPaintEvent * )
/*!
\fn TQToolBar::TQToolBar( const TQString &label,
TQMainWindow *, ToolBarDock = Top,
- bool newLine = FALSE, const char * name = 0 );
+ bool newLine = false, const char * name = 0 );
\obsolete
*/
@@ -302,14 +302,14 @@ void TQToolBarSeparator::paintEvent( TQPaintEvent * )
The toolbar is called \a name and is a child of \a parent and is
managed by \a parent. It is initially located in dock area \a dock
- and is labeled \a label. If \a newLine is TRUE the toolbar will be
+ and is labeled \a label. If \a newLine is true the toolbar will be
placed on a new line in the dock area.
*/
TQToolBar::TQToolBar( const TQString &label,
TQMainWindow * parent, TQMainWindow::ToolBarDock dock,
bool newLine, const char * name )
- : TQDockWindow( InDock, parent, name, 0, TRUE )
+ : TQDockWindow( InDock, parent, name, 0, true )
{
mw = parent;
init();
@@ -335,13 +335,13 @@ TQToolBar::TQToolBar( const TQString &label,
TQToolBar::TQToolBar( const TQString &label, TQMainWindow * mainWindow,
TQWidget * parent, bool newLine, const char * name,
WFlags f )
- : TQDockWindow( InDock, parent, name, f, TRUE )
+ : TQDockWindow( InDock, parent, name, f, true )
{
mw = mainWindow;
init();
clearWFlags( WType_Dialog | WStyle_Customize | WStyle_NoBorder );
- reparent( parent, TQPoint( 0, 0 ), FALSE );
+ reparent( parent, TQPoint( 0, 0 ), false );
if ( mainWindow )
mainWindow->addToolBar( this, label, TQMainWindow::DockUnmanaged, newLine );
@@ -357,7 +357,7 @@ TQToolBar::TQToolBar( const TQString &label, TQMainWindow * mainWindow,
*/
TQToolBar::TQToolBar( TQMainWindow * parent, const char * name )
- : TQDockWindow( InDock, parent, name, 0, TRUE )
+ : TQDockWindow( InDock, parent, name, 0, true )
{
mw = parent;
init();
@@ -451,7 +451,7 @@ void TQToolBar::show()
{
TQDockWindow::show();
if ( mw )
- mw->triggerLayout( FALSE );
+ mw->triggerLayout( false );
checkForExtension( size() );
}
@@ -464,7 +464,7 @@ void TQToolBar::hide()
{
TQDockWindow::hide();
if ( mw )
- mw->triggerLayout( FALSE );
+ mw->triggerLayout( false );
}
/*!
@@ -484,7 +484,7 @@ TQMainWindow * TQToolBar::mainWindow() const
The request to stretch might occur because TQMainWindow
right-justifies the dock area the toolbar is in, or because this
toolbar's isVerticalStretchable() or isHorizontalStretchable() is
- set to TRUE.
+ set to true.
If you call this function and the toolbar is not yet stretchable,
setStretchable() is called.
@@ -500,9 +500,9 @@ void TQToolBar::setStretchableWidget( TQWidget * w )
if ( !isHorizontalStretchable() && !isVerticalStretchable() ) {
if ( orientation() == Horizontal )
- setHorizontalStretchable( TRUE );
+ setHorizontalStretchable( true );
else
- setVerticalStretchable( TRUE );
+ setVerticalStretchable( true );
}
}
@@ -614,14 +614,14 @@ void TQToolBar::createPopup()
d->extensionPopup->clear();
// clear doesn't delete submenus, so do this explicitly
- TQObjectList *childlist = d->extensionPopup->queryList( "TQPopupMenu", 0, FALSE, TRUE );
- childlist->setAutoDelete(TRUE);
+ TQObjectList *childlist = d->extensionPopup->queryList( "TQPopupMenu", 0, false, true );
+ childlist->setAutoDelete(true);
delete childlist;
- childlist = queryList( "TQWidget", 0, FALSE, TRUE );
+ childlist = queryList( "TQWidget", 0, false, true );
TQObjectListIt it( *childlist );
- bool hide = FALSE;
- bool doHide = FALSE;
+ bool hide = false;
+ bool doHide = false;
int id;
while ( it.current() ) {
int j = 2;
@@ -635,17 +635,17 @@ void TQToolBar::createPopup()
if ( ::tqt_cast<TQComboBox*>(w) )
j = 1;
#endif
- hide = FALSE;
+ hide = false;
TQPoint p = w->parentWidget()->mapTo( this, w->geometry().bottomRight() );
if ( orientation() == Horizontal ) {
if ( p.x() > ( doHide ? width() - d->extension->width() / j : width() ) )
- hide = TRUE;
+ hide = true;
} else {
if ( p.y() > ( doHide ? height()- d->extension->height() / j : height() ) )
- hide = TRUE;
+ hide = true;
}
if ( hide && w->isVisible() ) {
- doHide = TRUE;
+ doHide = true;
if ( ::tqt_cast<TQToolButton*>(w) ) {
TQToolButton *b = (TQToolButton*)w;
TQString s = b->textLabel();
@@ -658,7 +658,7 @@ void TQToolBar::createPopup()
if ( b->isToggleButton() )
d->extensionPopup->setItemChecked( id, b->isOn() );
if ( !b->isEnabled() )
- d->extensionPopup->setItemEnabled( id, FALSE );
+ d->extensionPopup->setItemEnabled( id, false );
} else if ( ::tqt_cast<TQButton*>(w) ) {
TQButton *b = (TQButton*)w;
TQString s = b->text();
@@ -671,7 +671,7 @@ void TQToolBar::createPopup()
if ( b->isToggleButton() )
d->extensionPopup->setItemChecked( id, b->isOn() );
if ( !b->isEnabled() )
- d->extensionPopup->setItemEnabled( id, FALSE );
+ d->extensionPopup->setItemEnabled( id, false );
#ifndef TQT_NO_COMBOBOX
} else if ( ::tqt_cast<TQComboBox*>(w) ) {
TQComboBox *c = (TQComboBox*)w;
@@ -692,7 +692,7 @@ void TQToolBar::createPopup()
TQString tmp = c->text( i );
cp->insertItem( tmp, i );
if ( c->currentText() == tmp )
- cp->setItemChecked( i, TRUE );
+ cp->setItemChecked( i, true );
if ( !maxItems ) {
if ( cp->count() == 10 ) {
int h = cp->sizeHint().height();