summaryrefslogtreecommitdiffstats
path: root/tools/designer/examples
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-05-30 14:27:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-06-25 16:43:08 +0900
commit35ced32e331ee29fda1642616c803637952f5b22 (patch)
treeda44726777f814e19c7ef1e43854f6a1693dd6fb /tools/designer/examples
parent7dd4848d61e4c52091d6c644356c84c67536bde2 (diff)
downloadtqt-35ced32e331ee29fda1642616c803637952f5b22.tar.gz
tqt-35ced32e331ee29fda1642616c803637952f5b22.zip
Replace TRUE/FALSE with boolean values true/false - part 1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit a7f1e6e2552d9cdbb3d76bff089db522248b9a24)
Diffstat (limited to 'tools/designer/examples')
-rw-r--r--tools/designer/examples/addressbook/addressbook.ui.h6
-rw-r--r--tools/designer/examples/book/book5/book.ui.h2
-rw-r--r--tools/designer/examples/book/book6/book.ui.h2
-rw-r--r--tools/designer/examples/book/book7/book.ui.h2
-rw-r--r--tools/designer/examples/book/book8/book.ui.h2
-rw-r--r--tools/designer/examples/book/book8/editbook.ui.h4
-rw-r--r--tools/designer/examples/book/connection.cpp4
-rw-r--r--tools/designer/examples/colortool/mainform.ui.h62
-rw-r--r--tools/designer/examples/credit/creditform.h2
-rw-r--r--tools/designer/examples/credit/creditformbase.cpp8
-rw-r--r--tools/designer/examples/credit/creditformbase.h2
-rw-r--r--tools/designer/examples/filechooser/plugin/plugin.cpp2
-rw-r--r--tools/designer/examples/multiclip/multiclip.ui.h8
-rw-r--r--tools/designer/examples/opengl/main.cpp2
-rw-r--r--tools/designer/examples/richedit/richedit.ui.h2
-rw-r--r--tools/designer/examples/sizeaware/main.cpp2
-rw-r--r--tools/designer/examples/sizeaware/sizeaware.cpp2
-rw-r--r--tools/designer/examples/sizeaware/sizeaware.h2
18 files changed, 58 insertions, 58 deletions
diff --git a/tools/designer/examples/addressbook/addressbook.ui.h b/tools/designer/examples/addressbook/addressbook.ui.h
index 93f3d50e5..6b282a2cc 100644
--- a/tools/designer/examples/addressbook/addressbook.ui.h
+++ b/tools/designer/examples/addressbook/addressbook.ui.h
@@ -15,7 +15,7 @@
void AddressBook::fileNew()
{
- AddressDetails dia( this, 0, TRUE );
+ AddressDetails dia( this, 0, true );
connect( &dia, TQ_SIGNAL( newAddress( const TQString &,
const TQString &,
const TQString &,
@@ -117,7 +117,7 @@ void AddressBook::fileExit()
void AddressBook::editFind()
{
- SearchDialog dia( this, 0, TRUE );
+ SearchDialog dia( this, 0, true );
connect( &dia, TQ_SIGNAL( searchAddress( const TQString & ) ),
this, TQ_SLOT( searchAddress( const TQString & ) ) );
dia.exec();
@@ -130,7 +130,7 @@ void AddressBook::searchAddress( const TQString &expr )
while ( it.current() ) {
for ( int i = 0; i < 7; ++i ) {
if ( it.current()->text( i ).find( expr ) != -1 )
- addressView->setSelected( it.current(), TRUE );
+ addressView->setSelected( it.current(), true );
}
++it;
}
diff --git a/tools/designer/examples/book/book5/book.ui.h b/tools/designer/examples/book/book5/book.ui.h
index c41fa174f..88bffedd7 100644
--- a/tools/designer/examples/book/book5/book.ui.h
+++ b/tools/designer/examples/book/book5/book.ui.h
@@ -1,6 +1,6 @@
void BookForm::editClicked()
{
- EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", TRUE );
+ EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", true );
dialog->exec();
delete dialog;
}
diff --git a/tools/designer/examples/book/book6/book.ui.h b/tools/designer/examples/book/book6/book.ui.h
index fe0b39d9d..cc5126ffd 100644
--- a/tools/designer/examples/book/book6/book.ui.h
+++ b/tools/designer/examples/book/book6/book.ui.h
@@ -1,6 +1,6 @@
void BookForm::editClicked()
{
- EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", TRUE );
+ EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", true );
TQSqlCursor cur( "book" );
dialog->BookDataBrowser->setSqlCursor( &cur );
dialog->BookDataBrowser->setFilter( BookDataTable->filter() );
diff --git a/tools/designer/examples/book/book7/book.ui.h b/tools/designer/examples/book/book7/book.ui.h
index 1cb2f0b9c..1c704ddc4 100644
--- a/tools/designer/examples/book/book7/book.ui.h
+++ b/tools/designer/examples/book/book7/book.ui.h
@@ -1,6 +1,6 @@
void BookForm::editClicked()
{
- EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", TRUE );
+ EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", true );
TQSqlCursor cur( "book" );
dialog->BookDataBrowser->setSqlCursor( &cur );
dialog->BookDataBrowser->setFilter( BookDataTable->filter() );
diff --git a/tools/designer/examples/book/book8/book.ui.h b/tools/designer/examples/book/book8/book.ui.h
index 24bb69c4f..fe512c626 100644
--- a/tools/designer/examples/book/book8/book.ui.h
+++ b/tools/designer/examples/book/book8/book.ui.h
@@ -1,6 +1,6 @@
void BookForm::editClicked()
{
- EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", TRUE );
+ EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", true );
TQSqlCursor cur( "book" );
dialog->BookDataBrowser->setSqlCursor( &cur );
dialog->BookDataBrowser->setFilter( BookDataTable->filter() );
diff --git a/tools/designer/examples/book/book8/editbook.ui.h b/tools/designer/examples/book/book8/editbook.ui.h
index 45876fe71..cb06b57e2 100644
--- a/tools/designer/examples/book/book8/editbook.ui.h
+++ b/tools/designer/examples/book/book8/editbook.ui.h
@@ -4,14 +4,14 @@ void EditBookForm::init()
while ( query.next() ) {
ComboBoxAuthor->insertItem( query.value( 0 ).toString() );
int id = query.value( 1 ).toInt();
- mapAuthor( query.value( 0 ).toString(), id, TRUE );
+ mapAuthor( query.value( 0 ).toString(), id, true );
}
}
void EditBookForm::beforeUpdateBook( TQSqlRecord * buffer )
{
int id;
- mapAuthor( ComboBoxAuthor->currentText(), id, FALSE );
+ mapAuthor( ComboBoxAuthor->currentText(), id, false );
buffer->setValue( "authorid", id );
}
diff --git a/tools/designer/examples/book/connection.cpp b/tools/designer/examples/book/connection.cpp
index d9b0df31f..24d38746c 100644
--- a/tools/designer/examples/book/connection.cpp
+++ b/tools/designer/examples/book/connection.cpp
@@ -21,7 +21,7 @@ bool createConnections()
tqWarning( "Failed to open books database: " +
defaultDB->lastError().driverText() );
tqWarning( defaultDB->lastError().databaseText() );
- return FALSE;
+ return false;
}
TQSqlQuery q(TQString::null, defaultDB);
@@ -46,7 +46,7 @@ bool createConnections()
q.exec("INSERT INTO sequence VALUES ( 'author', 2 )");
q.exec("INSERT INTO sequence VALUES ( 'book', 5 )");
- return TRUE;
+ return true;
}
diff --git a/tools/designer/examples/colortool/mainform.ui.h b/tools/designer/examples/colortool/mainform.ui.h
index 7a0f8a8db..f75ba266d 100644
--- a/tools/designer/examples/colortool/mainform.ui.h
+++ b/tools/designer/examples/colortool/mainform.ui.h
@@ -20,15 +20,15 @@ void MainForm::init()
{
clipboard = TQApplication::clipboard();
if ( clipboard->supportsSelection() )
- clipboard->setSelectionMode( TRUE );
+ clipboard->setSelectionMode( true );
findForm = 0;
loadSettings();
m_filename = "";
- m_changed = FALSE;
- m_table_dirty = TRUE;
- m_icons_dirty = TRUE;
- clearData( TRUE );
+ m_changed = false;
+ m_table_dirty = true;
+ m_icons_dirty = true;
+ clearData( true );
}
void MainForm::clearData( bool fillWithDefaults )
@@ -98,7 +98,7 @@ void MainForm::populate()
}
else
colorTable->hideColumn( COL_WEB );
- m_table_dirty = FALSE;
+ m_table_dirty = false;
}
if ( m_icons_dirty ) {
@@ -108,7 +108,7 @@ void MainForm::populate()
for ( it = m_colors.constBegin(); it != m_colors.constEnd(); ++it )
(void) new TQIconViewItem( colorIconView, it.key(),
colorSwatch( it.data() ) );
- m_icons_dirty = FALSE;
+ m_icons_dirty = false;
}
}
@@ -129,10 +129,10 @@ void MainForm::fileNew()
{
if ( okToClear() ) {
m_filename = "";
- m_changed = FALSE;
- m_table_dirty = TRUE;
- m_icons_dirty = TRUE;
- clearData( FALSE );
+ m_changed = false;
+ m_table_dirty = true;
+ m_icons_dirty = true;
+ clearData( false );
}
}
@@ -176,7 +176,7 @@ void MainForm::fileSave()
statusBar()->message( TQString( "Saved %1 colors to '%2'" ).
arg( m_colors.count() ).
arg( m_filename ), 3000 );
- m_changed = FALSE;
+ m_changed = false;
}
else
statusBar()->message( TQString( "Failed to save '%1'" ).
@@ -208,7 +208,7 @@ void MainForm::fileSaveAs()
void MainForm::load( const TQString& filename )
{
- clearData( FALSE );
+ clearData( false );
m_filename = filename;
TQRegExp regex( "^\\s*(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\S+.*)$" );
TQFile file( filename );
@@ -236,7 +236,7 @@ void MainForm::load( const TQString& filename )
m_icons_dirty = ! ( m_table_dirty = ( visible == tablePage ) );
populate();
m_icons_dirty = ! ( m_table_dirty = ( visible != tablePage ) );
- m_changed = FALSE;
+ m_changed = false;
}
else
statusBar()->message( TQString( "Failed to load '%1'" ).
@@ -261,10 +261,10 @@ bool MainForm::okToClear()
if ( ans == 0 )
fileSave();
else if ( ans == 1 )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void MainForm::closeEvent( TQCloseEvent * )
@@ -294,7 +294,7 @@ void MainForm::editCut()
colorTable->setCurrentCell( row, 0 );
else if ( colorTable->numRows() )
colorTable->setCurrentCell( colorTable->numRows() - 1, 0 );
- m_icons_dirty = TRUE;
+ m_icons_dirty = true;
}
else if ( visible == iconsPage && colorIconView->currentItem() ) {
TQIconViewItem *item = colorIconView->currentItem();
@@ -310,12 +310,12 @@ void MainForm::editCut()
colorIconView->setCurrentItem( current );
colorIconView->arrangeItemsInGrid();
}
- m_table_dirty = TRUE;
+ m_table_dirty = true;
}
if ( ! name.isNull() ) {
m_colors.remove( name );
- m_changed = TRUE;
+ m_changed = true;
statusBar()->message( TQString( "Deleted '%1'" ).arg( name ), 5000 );
}
else
@@ -368,7 +368,7 @@ void MainForm::lookfor( const TQString& text )
return;
TQString ltext = text.lower();
TQWidget *visible = colorWidgetStack->visibleWidget();
- bool found = FALSE;
+ bool found = false;
if ( visible == tablePage && colorTable->numRows() ) {
int row = colorTable->currentRow();
@@ -377,7 +377,7 @@ void MainForm::lookfor( const TQString& text )
colorTable->setCurrentCell( i, 0 );
colorTable->clearSelection();
colorTable->selectRow( i );
- found = TRUE;
+ found = true;
break;
}
if ( ! found )
@@ -390,7 +390,7 @@ void MainForm::lookfor( const TQString& text )
if ( item->text().lower().contains( ltext ) ) {
colorIconView->setCurrentItem( item );
colorIconView->ensureItemVisible( item );
- found = TRUE;
+ found = true;
break;
}
if ( ! found && start )
@@ -487,7 +487,7 @@ void MainForm::editAdd()
if ( color.isValid() ) {
TQPixmap pixmap( 80, 10 );
pixmap.fill( color );
- ColorNameForm *colorForm = new ColorNameForm( this, "color", TRUE );
+ ColorNameForm *colorForm = new ColorNameForm( this, "color", true );
colorForm->setColors( m_colors );
colorForm->colorLabel->setPixmap( pixmap );
if ( colorForm->exec() ) {
@@ -509,23 +509,23 @@ void MainForm::editAdd()
(void) new TQIconViewItem( colorIconView, name,
colorSwatch( color ) );
- m_changed = TRUE;
+ m_changed = true;
}
}
}
void MainForm::editOptions()
{
- OptionsForm *options = new OptionsForm( this, "options", TRUE );
+ OptionsForm *options = new OptionsForm( this, "options", true );
switch ( m_clip_as ) {
case CLIP_AS_HEX:
- options->hexRadioButton->setChecked( TRUE );
+ options->hexRadioButton->setChecked( true );
break;
case CLIP_AS_NAME:
- options->nameRadioButton->setChecked( TRUE );
+ options->nameRadioButton->setChecked( true );
break;
case CLIP_AS_RGB:
- options->rgbRadioButton->setChecked( TRUE );
+ options->rgbRadioButton->setChecked( true );
break;
}
options->webCheckBox->setChecked( m_show_web );
@@ -554,10 +554,10 @@ void MainForm::loadSettings()
int windowX = settings.readNumEntry( APP_KEY + "WindowX", 0 );
int windowY = settings.readNumEntry( APP_KEY + "WindowY", 0 );
m_clip_as = settings.readNumEntry( APP_KEY + "ClipAs", CLIP_AS_HEX );
- m_show_web = settings.readBoolEntry( APP_KEY + "ShowWeb", TRUE );
- if ( ! settings.readBoolEntry( APP_KEY + "View", TRUE ) ) {
+ m_show_web = settings.readBoolEntry( APP_KEY + "ShowWeb", true );
+ if ( ! settings.readBoolEntry( APP_KEY + "View", true ) ) {
colorWidgetStack->raiseWidget( iconsPage );
- viewIconsAction->setOn( TRUE );
+ viewIconsAction->setOn( true );
}
resize( windowWidth, windowHeight );
diff --git a/tools/designer/examples/credit/creditform.h b/tools/designer/examples/credit/creditform.h
index f8beb3581..938bcb10f 100644
--- a/tools/designer/examples/credit/creditform.h
+++ b/tools/designer/examples/credit/creditform.h
@@ -5,7 +5,7 @@ class CreditForm : public CreditFormBase
TQ_OBJECT
public:
CreditForm( TQWidget* parent = 0, const char* name = 0,
- bool modal = FALSE, WFlags fl = 0 );
+ bool modal = false, WFlags fl = 0 );
~CreditForm();
public slots:
void setAmount();
diff --git a/tools/designer/examples/credit/creditformbase.cpp b/tools/designer/examples/credit/creditformbase.cpp
index 372a756d3..79ed73d22 100644
--- a/tools/designer/examples/credit/creditformbase.cpp
+++ b/tools/designer/examples/credit/creditformbase.cpp
@@ -36,7 +36,7 @@ static TQPixmap uic_load_pixmap_CreditFormBase( const TQString &name )
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
+ * true to construct a modal dialog.
*/
CreditFormBase::CreditFormBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
: TQDialog( parent, name, modal, fl )
@@ -61,7 +61,7 @@ CreditFormBase::CreditFormBase( TQWidget* parent, const char* name, bool modal,
stdRadioButton = new TQRadioButton( creditButtonGroup, "stdRadioButton" );
stdRadioButton->setText( trUtf8( "&Standard", "" ) );
- stdRadioButton->setChecked( TRUE );
+ stdRadioButton->setChecked( true );
creditButtonGroupLayout->addWidget( stdRadioButton );
noneRadioButton = new TQRadioButton( creditButtonGroup, "noneRadioButton" );
@@ -74,7 +74,7 @@ CreditFormBase::CreditFormBase( TQWidget* parent, const char* name, bool modal,
CreditFormBaseLayout->addWidget( creditButtonGroup );
amountSpinBox = new TQSpinBox( this, "amountSpinBox" );
- amountSpinBox->setEnabled( FALSE );
+ amountSpinBox->setEnabled( false );
amountSpinBox->setPrefix( trUtf8( "$ ", "" ) );
amountSpinBox->setButtonSymbols( TQSpinBox::UpDownArrows );
amountSpinBox->setMaxValue( 100000 );
@@ -89,7 +89,7 @@ CreditFormBase::CreditFormBase( TQWidget* parent, const char* name, bool modal,
okPushButton = new TQPushButton( this, "okPushButton" );
okPushButton->setText( trUtf8( "OK", "" ) );
- okPushButton->setDefault( TRUE );
+ okPushButton->setDefault( true );
Layout4->addWidget( okPushButton );
TQSpacerItem* spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout4->addItem( spacer_2 );
diff --git a/tools/designer/examples/credit/creditformbase.h b/tools/designer/examples/credit/creditformbase.h
index 8d8b97c69..cae897357 100644
--- a/tools/designer/examples/credit/creditformbase.h
+++ b/tools/designer/examples/credit/creditformbase.h
@@ -24,7 +24,7 @@ class CreditFormBase : public TQDialog
TQ_OBJECT
public:
- CreditFormBase( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ CreditFormBase( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~CreditFormBase();
TQButtonGroup* creditButtonGroup;
diff --git a/tools/designer/examples/filechooser/plugin/plugin.cpp b/tools/designer/examples/filechooser/plugin/plugin.cpp
index be8105ff5..80bce8dc1 100644
--- a/tools/designer/examples/filechooser/plugin/plugin.cpp
+++ b/tools/designer/examples/filechooser/plugin/plugin.cpp
@@ -88,7 +88,7 @@ TQString CustomWidgetPlugin::whatsThis( const TQString& feature ) const
bool CustomWidgetPlugin::isContainer( const TQString& ) const
{
- return FALSE;
+ return false;
}
diff --git a/tools/designer/examples/multiclip/multiclip.ui.h b/tools/designer/examples/multiclip/multiclip.ui.h
index 203fc6906..ba329f01e 100644
--- a/tools/designer/examples/multiclip/multiclip.ui.h
+++ b/tools/designer/examples/multiclip/multiclip.ui.h
@@ -45,9 +45,9 @@ void MulticlipForm::init()
void MulticlipForm::selectionChanged()
{
- cb->setSelectionMode( TRUE );
+ cb->setSelectionMode( true );
dataChanged();
- cb->setSelectionMode( FALSE );
+ cb->setSelectionMode( false );
}
void MulticlipForm::copyPrevious()
@@ -55,9 +55,9 @@ void MulticlipForm::copyPrevious()
if ( clippingsListBox->currentItem() != -1 ) {
cb->setText( clippingsListBox->currentText() );
if ( cb->supportsSelection() ) {
- cb->setSelectionMode( TRUE );
+ cb->setSelectionMode( true );
cb->setText( clippingsListBox->currentText() );
- cb->setSelectionMode( FALSE );
+ cb->setSelectionMode( false );
}
}
}
diff --git a/tools/designer/examples/opengl/main.cpp b/tools/designer/examples/opengl/main.cpp
index 08168e48c..fd810acd3 100644
--- a/tools/designer/examples/opengl/main.cpp
+++ b/tools/designer/examples/opengl/main.cpp
@@ -279,7 +279,7 @@ TQString OpenGLWidgetInterface::whatsThis( const TQString &description ) const
bool OpenGLWidgetInterface::isContainer( const TQString& ) const
{
- return FALSE;
+ return false;
}
TQRESULT OpenGLWidgetInterface::queryInterface( const TQUuid& uuid, TQUnknownInterface **iface )
diff --git a/tools/designer/examples/richedit/richedit.ui.h b/tools/designer/examples/richedit/richedit.ui.h
index 02f7b1ef4..a68503244 100644
--- a/tools/designer/examples/richedit/richedit.ui.h
+++ b/tools/designer/examples/richedit/richedit.ui.h
@@ -52,7 +52,7 @@ void EditorForm::fileSave()
if ( f.open( IO_WriteOnly ) ) {
TQTextStream ts( &f );
ts << textEdit->text();
- textEdit->setModified( FALSE );
+ textEdit->setModified( false );
}
}
}
diff --git a/tools/designer/examples/sizeaware/main.cpp b/tools/designer/examples/sizeaware/main.cpp
index 2b0dcf446..0481093ea 100644
--- a/tools/designer/examples/sizeaware/main.cpp
+++ b/tools/designer/examples/sizeaware/main.cpp
@@ -4,7 +4,7 @@
int main( int argc, char ** argv )
{
TQApplication app( argc, argv );
- SizeAware *sizeaware = new SizeAware( 0, 0, TRUE );
+ SizeAware *sizeaware = new SizeAware( 0, 0, true );
sizeaware->exec();
sizeaware->destroy();
return 0;
diff --git a/tools/designer/examples/sizeaware/sizeaware.cpp b/tools/designer/examples/sizeaware/sizeaware.cpp
index 621d36ead..3af595ce9 100644
--- a/tools/designer/examples/sizeaware/sizeaware.cpp
+++ b/tools/designer/examples/sizeaware/sizeaware.cpp
@@ -31,7 +31,7 @@ void SizeAware::destroy()
settings.insertSearchPath( TQSettings::Unix, "/Opt/" + company() + "/share" );
settings.writeEntry( "/" + settingsFile() + "/width", width() );
settings.writeEntry( "/" + settingsFile() + "/height", height() );
- close( TRUE );
+ close( true );
}
diff --git a/tools/designer/examples/sizeaware/sizeaware.h b/tools/designer/examples/sizeaware/sizeaware.h
index b939cfe4e..505b8351e 100644
--- a/tools/designer/examples/sizeaware/sizeaware.h
+++ b/tools/designer/examples/sizeaware/sizeaware.h
@@ -8,7 +8,7 @@ class SizeAware : public TQDialog
TQ_PROPERTY( TQString company READ company WRITE setCompany )
TQ_PROPERTY( TQString settingsFile READ settingsFile WRITE setSettingsFile )
public:
- SizeAware( TQDialog *parent = 0, const char *name = 0, bool modal = FALSE );
+ SizeAware( TQDialog *parent = 0, const char *name = 0, bool modal = false );
~SizeAware();
void setCompany( TQString company ) { m_company = company; }
TQString company() const { return m_company; }