diff options
Diffstat (limited to 'tools/designer/plugins/wizards/sqlformwizardimpl.cpp')
-rw-r--r-- | tools/designer/plugins/wizards/sqlformwizardimpl.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp index fe7e5c4a8..2291af5d9 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; |