diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-30 14:27:29 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-06-25 16:43:08 +0900 |
| commit | 35ced32e331ee29fda1642616c803637952f5b22 (patch) | |
| tree | da44726777f814e19c7ef1e43854f6a1693dd6fb /tools/designer/plugins/wizards | |
| parent | 7dd4848d61e4c52091d6c644356c84c67536bde2 (diff) | |
| download | tqt-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/plugins/wizards')
| -rw-r--r-- | tools/designer/plugins/wizards/main.cpp | 12 | ||||
| -rw-r--r-- | tools/designer/plugins/wizards/mainwindowwizard.ui.h | 12 | ||||
| -rw-r--r-- | tools/designer/plugins/wizards/sqlformwizardimpl.cpp | 88 | ||||
| -rw-r--r-- | tools/designer/plugins/wizards/sqlformwizardimpl.h | 2 |
4 files changed, 57 insertions, 57 deletions
diff --git a/tools/designer/plugins/wizards/main.cpp b/tools/designer/plugins/wizards/main.cpp index 7a84ef115..b2d33dee5 100644 --- a/tools/designer/plugins/wizards/main.cpp +++ b/tools/designer/plugins/wizards/main.cpp @@ -63,7 +63,7 @@ private: }; StandardTemplateWizardInterface::StandardTemplateWizardInterface() - : inUse( FALSE ) + : inUse( false ) { } @@ -73,7 +73,7 @@ StandardTemplateWizardInterface::~StandardTemplateWizardInterface() bool StandardTemplateWizardInterface::init() { - return TRUE; + return true; } void StandardTemplateWizardInterface::cleanup() @@ -99,23 +99,23 @@ TQStringList StandardTemplateWizardInterface::featureList() const void StandardTemplateWizardInterface::setup( const TQString &templ, TQWidget *widget, DesignerFormWindow *fw, TQUnknownInterface *aIface ) { - inUse = TRUE; + inUse = true; #ifndef TQT_NO_SQL if ( templ == "TQDesignerDataView" || templ == "TQDesignerDataBrowser" || templ == "TQDataView" || templ == "TQDataBrowser" || templ == "TQDataTable" ) { - SqlFormWizard wizard( aIface, widget, tqApp->mainWidget(), fw, 0, TRUE ); + SqlFormWizard wizard( aIface, widget, tqApp->mainWidget(), fw, 0, true ); wizard.exec(); } #endif if ( templ == "TQMainWindow" ) { - MainWindowWizardBase wizard( tqApp->mainWidget(), 0, TRUE ); + MainWindowWizardBase wizard( tqApp->mainWidget(), 0, true ); wizard.setAppInterface( aIface, fw, widget ); wizard.exec(); } - inUse = FALSE; + inUse = false; } TQRESULT StandardTemplateWizardInterface::queryInterface( const TQUuid& uuid, TQUnknownInterface** iface ) diff --git a/tools/designer/plugins/wizards/mainwindowwizard.ui.h b/tools/designer/plugins/wizards/mainwindowwizard.ui.h index cc5b1c157..99adbe0c7 100644 --- a/tools/designer/plugins/wizards/mainwindowwizard.ui.h +++ b/tools/designer/plugins/wizards/mainwindowwizard.ui.h @@ -37,10 +37,10 @@ void MainWindowWizardBase::init() dIface = 0; dfw = 0; widget = 0; - setHelpEnabled( menuToolbarPage, FALSE ); - setHelpEnabled( toolbarsPage, FALSE ); - setHelpEnabled( finishPage, FALSE ); - setFinishEnabled( finishPage, TRUE ); + setHelpEnabled( menuToolbarPage, false ); + setHelpEnabled( toolbarsPage, false ); + setHelpEnabled( finishPage, false ); + setFinishEnabled( finishPage, true ); } void MainWindowWizardBase::destroy() @@ -114,7 +114,7 @@ void MainWindowWizardBase::accept() return; } - setFinishEnabled( finishPage, FALSE ); + setFinishEnabled( finishPage, false ); TQPixmap pix; @@ -297,7 +297,7 @@ void MainWindowWizardBase::getPixmap( const TQString & n, TQPixmap & pix ) DesignerProject *pro = dIface->currentProject(); if ( !pro || pro->projectName() == "<No Project>" ) return; - pro->pixmapCollection()->addPixmap( pix, n, FALSE ); + pro->pixmapCollection()->addPixmap( pix, n, false ); } void MainWindowWizardBase::pageSelected( const TQString & ) diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp index adb283a79..9ac91ee04 100644 --- a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp +++ b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp @@ -66,25 +66,25 @@ SqlFormWizard::SqlFormWizard( TQUnknownInterface *aIface, TQWidget *w, { appIface->addRef(); formWindow = fw; - setFinishEnabled( finishPage, TRUE ); + setFinishEnabled( finishPage, true ); /* set mode of operation */ if ( ::tqt_cast<TQDataTable*>(widget) ) { setCaption( "Data Table Wizard" ); mode = Table; - setAppropriate( navigPage, FALSE ); - setAppropriate( layoutPage, FALSE ); - checkBoxAutoEdit->setChecked( FALSE ); + setAppropriate( navigPage, false ); + setAppropriate( layoutPage, false ); + checkBoxAutoEdit->setChecked( false ); } else if ( ::tqt_cast<TQDataBrowser*>(widget) ) { setCaption( "Data Browser Wizard" ); - setAppropriate( tablePropertiesPage, FALSE ); + setAppropriate( tablePropertiesPage, false ); mode = Browser; - checkBoxAutoEdit->setChecked( TRUE ); + checkBoxAutoEdit->setChecked( true ); } else if ( ::tqt_cast<TQDataView*>(widget) ) { setCaption( "Data View Wizard" ); - setAppropriate( tablePropertiesPage, FALSE ); - setAppropriate( navigPage, FALSE ); - setAppropriate( sqlPage, FALSE); + setAppropriate( tablePropertiesPage, false ); + setAppropriate( navigPage, false ); + setAppropriate( sqlPage, false); checkCreateFieldLayout->hide(); checkCreateButtonLayout->hide(); checkBoxAutoEdit->hide(); @@ -104,7 +104,7 @@ SqlFormWizard::~SqlFormWizard() void SqlFormWizard::nextPageClicked() { if ( currentPage() == populatePage ) { - autoPopulate( TRUE ); + autoPopulate( true ); } } @@ -129,9 +129,9 @@ void SqlFormWizard::connectionSelected( const TQString &c ) void SqlFormWizard::tableSelected( const TQString & ) { if ( listBoxTable->currentItem() >= 0 ) { - setNextEnabled( databasePage, TRUE ); + setNextEnabled( databasePage, true ); } else { - setNextEnabled( databasePage, FALSE ); + setNextEnabled( databasePage, false ); } } @@ -153,9 +153,9 @@ void SqlFormWizard::autoPopulate( bool populate ) TQStringList lst = *d->fields().find( listBoxTable->currentText() ); // remove primary index fields, if any listBoxSortField->insertStringList( lst ); - d->open( FALSE ); + d->open( false ); #ifndef TQT_NO_SQL - TQSqlCursor tab( listBoxTable->currentText(), TRUE, d->connection() ); + TQSqlCursor tab( listBoxTable->currentText(), true, d->connection() ); TQSqlIndex pIdx = tab.primaryIndex(); for ( uint i = 0; i < pIdx.count(); i++ ) { listBoxField->insertItem( pIdx.field( i )->name() ); @@ -304,7 +304,7 @@ void SqlFormWizard::setupPage1() if ( lst.count() ) listBoxConnection->setCurrentItem( 0 ); - setNextEnabled( databasePage, FALSE ); + setNextEnabled( databasePage, false ); } static TQPushButton *create_widget( TQWidget *parent, const char *name, @@ -313,8 +313,8 @@ static TQPushButton *create_widget( TQWidget *parent, const char *name, TQPushButton *pb = (TQPushButton*)fw->create( "TQPushButton", parent, name ); pb->setText( txt ); pb->setGeometry( r ); - fw->setPropertyChanged( pb, "text", TRUE ); - fw->setPropertyChanged( pb, "geometry", TRUE ); + fw->setPropertyChanged( pb, "text", true ); + fw->setPropertyChanged( pb, "geometry", true ); return pb; } @@ -337,12 +337,12 @@ void SqlFormWizard::accept() if ( !conn.isEmpty() && !table.isEmpty() ) { formWindow->setProperty( widget, "database", lst ); - formWindow->setPropertyChanged( widget, "database", TRUE ); + formWindow->setPropertyChanged( widget, "database", true ); } if ( !editFilter->text().isEmpty() ) { widget->setProperty( "filter", editFilter->text() ); - formWindow->setPropertyChanged( widget, "filter", TRUE ); + formWindow->setPropertyChanged( widget, "filter", true ); } if ( listBoxSortedField->count() ) { @@ -350,7 +350,7 @@ void SqlFormWizard::accept() for ( uint i = 0; i < listBoxSortedField->count(); ++i ) lst << listBoxSortedField->text( i ); widget->setProperty( "sort", lst ); - formWindow->setPropertyChanged( widget, "sort", TRUE ); + formWindow->setPropertyChanged( widget, "sort", true ); } TQPtrList<DesignerDatabase> databases = proIface->databaseConnections(); @@ -358,7 +358,7 @@ void SqlFormWizard::accept() for ( DesignerDatabase *d = databases.first(); d; d = databases.next() ) { if ( d->name() == listBoxConnection->currentText() || ( ( d->name() == "(default)" || d->name().isEmpty() ) && listBoxConnection->currentText() == "(default)" ) ) { database = d; - d->open( FALSE ); + d->open( false ); break; } } @@ -366,7 +366,7 @@ void SqlFormWizard::accept() if (!database) { return; } - TQSqlCursor tab( listBoxTable->currentText(), TRUE, database->connection() ); + TQSqlCursor tab( listBoxTable->currentText(), true, database->connection() ); int columns = 2; TQSqlEditorFactory * f = TQSqlEditorFactory::defaultFactory(); @@ -392,8 +392,8 @@ void SqlFormWizard::accept() case Browser: { if ( mode == Browser && !checkBoxAutoEdit->isChecked() ) { - ((TQDataBrowser*)widget)->setAutoEdit( FALSE ); - formWindow->setPropertyChanged( widget, "autoEdit", TRUE ); + ((TQDataBrowser*)widget)->setAutoEdit( false ); + formWindow->setPropertyChanged( widget, "autoEdit", true ); } formWindow->clearSelection(); @@ -423,8 +423,8 @@ void SqlFormWizard::accept() label->setGeometry( SPACING + currentCol*COL_SPACING, row+SPACING, SPACING*3, SPACING ); - formWindow->setPropertyChanged( label, "geometry", TRUE ); - formWindow->setPropertyChanged( label, "text", TRUE ); + formWindow->setPropertyChanged( label, "geometry", true ); + formWindow->setPropertyChanged( label, "text", true ); /* editor */ editorDummy = f->createEditor( widget, field ); @@ -440,7 +440,7 @@ void SqlFormWizard::accept() editor->setGeometry(SPACING * 5 + currentCol*COL_SPACING, row+SPACING, SPACING*3, SPACING ); } - formWindow->setPropertyChanged( editor, "geometry", TRUE ); + formWindow->setPropertyChanged( editor, "geometry", true ); if ( TQString(editor->className()) == "TQLineEdit" && (field->type() == TQVariant::Double || field->type() == TQVariant::Int || @@ -448,16 +448,16 @@ void SqlFormWizard::accept() /* default right-align numerics */ //## ((TQLineEdit*)editor)->setAlignment( TQt::AlignRight ); - formWindow->setPropertyChanged( editor, "alignment", TRUE ); + formWindow->setPropertyChanged( editor, "alignment", true ); } if ( ::tqt_cast<TQSpinBox*>(editor) ) { ( (TQSpinBox*)editor )->setMaxValue( INT_MAX ); - formWindow->setPropertyChanged( editor, "maxValue", TRUE ); + formWindow->setPropertyChanged( editor, "maxValue", true ); } TQStringList lst; lst << conn << table << field->name(); formWindow->setProperty( editor, "database", lst ); - formWindow->setPropertyChanged( editor, "database", TRUE ); + formWindow->setPropertyChanged( editor, "database", true ); /* geometry */ if ( createFieldLayout ) { @@ -567,34 +567,34 @@ void SqlFormWizard::accept() { TQDataTable* sqlTable = ((TQDataTable*)widget); if ( checkBoxAutoEdit->isChecked() ) { - sqlTable->setAutoEdit( TRUE ); - formWindow->setPropertyChanged( sqlTable, "autoEdit", TRUE ); + sqlTable->setAutoEdit( true ); + formWindow->setPropertyChanged( sqlTable, "autoEdit", true ); } if ( checkBoxReadOnly->isChecked() ) { - sqlTable->setReadOnly( TRUE ); - formWindow->setPropertyChanged( sqlTable, "readOnly", TRUE ); + sqlTable->setReadOnly( true ); + formWindow->setPropertyChanged( sqlTable, "readOnly", true ); } else { if ( checkBoxConfirmInserts->isChecked() ) { - sqlTable->setConfirmInsert( TRUE ); - formWindow->setPropertyChanged( sqlTable, "confirmInsert", TRUE ); + sqlTable->setConfirmInsert( true ); + formWindow->setPropertyChanged( sqlTable, "confirmInsert", true ); } if ( checkBoxConfirmUpdates->isChecked() ) { - sqlTable->setConfirmUpdate( TRUE ); - formWindow->setPropertyChanged( sqlTable, "confirmUpdate", TRUE ); + sqlTable->setConfirmUpdate( true ); + formWindow->setPropertyChanged( sqlTable, "confirmUpdate", true ); } if ( checkBoxConfirmDeletes->isChecked() ) { - sqlTable->setConfirmDelete( TRUE ); - formWindow->setPropertyChanged( sqlTable, "confirmDelete", TRUE ); + sqlTable->setConfirmDelete( true ); + formWindow->setPropertyChanged( sqlTable, "confirmDelete", true ); } if ( checkBoxConfirmCancels->isChecked() ) { - sqlTable->setConfirmCancels( TRUE ); - formWindow->setPropertyChanged( sqlTable, "confirmCancels", TRUE ); + sqlTable->setConfirmCancels( true ); + formWindow->setPropertyChanged( sqlTable, "confirmCancels", true ); } } if ( checkBoxSorting->isChecked() ) { - sqlTable->setSorting( TRUE ); - formWindow->setPropertyChanged( sqlTable, "sorting", TRUE ); + sqlTable->setSorting( true ); + formWindow->setPropertyChanged( sqlTable, "sorting", true ); } TQMap<TQString, TQString> columnFields; diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.h b/tools/designer/plugins/wizards/sqlformwizardimpl.h index 1bce4780e..bfc1bd96b 100644 --- a/tools/designer/plugins/wizards/sqlformwizardimpl.h +++ b/tools/designer/plugins/wizards/sqlformwizardimpl.h @@ -45,7 +45,7 @@ class SqlFormWizard : public SqlFormWizardBase public: SqlFormWizard( TQUnknownInterface *aIface, TQWidget *w, TQWidget* parent = 0, DesignerFormWindow *fw = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + const char* name = 0, bool modal = false, WFlags fl = 0 ); ~SqlFormWizard(); void accept() const; |
