summaryrefslogtreecommitdiffstats
path: root/tools/designer/examples/colortool
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/colortool
parent7dd4848d61e4c52091d6c644356c84c67536bde2 (diff)
downloadtqt-35ced32e.tar.gz
tqt-35ced32e.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/colortool')
-rw-r--r--tools/designer/examples/colortool/mainform.ui.h62
1 files changed, 31 insertions, 31 deletions
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 );