diff options
Diffstat (limited to 'src/dialogs/qinputdialog.cpp')
| -rw-r--r-- | src/dialogs/qinputdialog.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/dialogs/qinputdialog.cpp b/src/dialogs/qinputdialog.cpp index ee6c15e75..50ed79090 100644 --- a/src/dialogs/qinputdialog.cpp +++ b/src/dialogs/qinputdialog.cpp @@ -118,7 +118,7 @@ public: Constructs the dialog. The \a label is the text which is shown to the user (it should tell the user what they are expected to enter). The \a parent is the dialog's parent widget. The widget is called \a name. If \a - modal is TRUE (the default) the dialog will be modal. The \a type + modal is true (the default) the dialog will be modal. The \a type parameter is used to specify which type of dialog to construct. \sa getText(), getInteger(), getDouble(), getItem() @@ -142,14 +142,14 @@ TQInputDialog::TQInputDialog( const TQString &label, TQWidget* parent, vbox->addWidget( d->stack ); d->lineEdit = new TQLineEdit( d->stack, "qt_inputdlg_le" ); d->spinBox = new TQSpinBox( d->stack, "qt_inputdlg_sb" ); - d->comboBox = new TQComboBox( FALSE, d->stack, "qt_inputdlg_cb" ); - d->editComboBox = new TQComboBox( TRUE, d->stack, "qt_inputdlg_editcb" ); + d->comboBox = new TQComboBox( false, d->stack, "qt_inputdlg_cb" ); + d->editComboBox = new TQComboBox( true, d->stack, "qt_inputdlg_editcb" ); TQHBoxLayout *hbox = new TQHBoxLayout( 6 ); vbox->addLayout( hbox, AlignRight ); d->ok = new TQPushButton( tr( "OK" ), this, "qt_ok_btn" ); - d->ok->setDefault( TRUE ); + d->ok->setDefault( true ); TQPushButton *cancel = new TQPushButton( tr( "Cancel" ), this, "qt_cancel_btn" ); TQSize bs = d->ok->sizeHint().expandedTo( cancel->sizeHint() ); @@ -273,8 +273,8 @@ TQInputDialog::~TQInputDialog() dialog. \a label is the text which is shown to the user (it should say what should be entered). \a text is the default text which is placed in the line edit. The \a mode is the echo mode the line edit - will use. If \a ok is not-null \e *\a ok will be set to TRUE if the - user pressed OK and to FALSE if the user pressed Cancel. The + will use. If \a ok is not-null \e *\a ok will be set to true if the + user pressed OK and to false if the user pressed Cancel. The dialog's parent is \a parent; the dialog is called \a name. The dialog will be modal. @@ -302,7 +302,7 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label, { TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_gettext", - TRUE, LineEdit ); + true, LineEdit ); #ifndef TQT_NO_WIDGET_TOPEXTRA dlg->setCaption( caption ); @@ -310,7 +310,7 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label, dlg->lineEdit()->setText( text ); dlg->lineEdit()->setEchoMode( mode ); - bool ok_ = FALSE; + bool ok_ = false; TQString result; ok_ = dlg->exec() == TQDialog::Accepted; if ( ok ) @@ -332,8 +332,8 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label, and \a step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value. - If \a ok is not-null *\a ok will be set to TRUE if the user - pressed OK and to FALSE if the user pressed Cancel. The dialog's + If \a ok is not-null *\a ok will be set to true if the user + pressed OK and to false if the user pressed Cancel. The dialog's parent is \a parent; the dialog is called \a name. The dialog will be modal. @@ -360,7 +360,7 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label, { TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getint", - TRUE, SpinBox ); + true, SpinBox ); #ifndef TQT_NO_WIDGET_TOPEXTRA dlg->setCaption( caption ); #endif @@ -368,7 +368,7 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label, dlg->spinBox()->setSteps( step, 0 ); dlg->spinBox()->setValue( value ); - bool ok_ = FALSE; + bool ok_ = false; int result; ok_ = dlg->exec() == TQDialog::Accepted; if ( ok ) @@ -389,8 +389,8 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label, user may choose, and \a decimals is the maximum number of decimal places the number may have. - If \a ok is not-null \e *\a ok will be set to TRUE if the user - pressed OK and to FALSE if the user pressed Cancel. The dialog's + If \a ok is not-null \e *\a ok will be set to true if the user + pressed OK and to false if the user pressed Cancel. The dialog's parent is \a parent; the dialog is called \a name. The dialog will be modal. @@ -418,7 +418,7 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label, const char *name ) { TQInputDialog dlg( label, parent, - name ? name : "qt_inputdlg_getdbl", TRUE, LineEdit ); + name ? name : "qt_inputdlg_getdbl", true, LineEdit ); #ifndef TQT_NO_WIDGET_TOPEXTRA dlg.setCaption( caption ); #endif @@ -438,17 +438,17 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label, bar of the dialog. \a label is the text which is shown to the user (it should say what should be entered). \a list is the string list which is inserted into the combobox, and \a current is the number - of the item which should be the current item. If \a editable is TRUE - the user can enter their own text; if \a editable is FALSE the user + of the item which should be the current item. If \a editable is true + the user can enter their own text; if \a editable is false the user may only select one of the existing items. - If \a ok is not-null \e *\a ok will be set to TRUE if the user - pressed OK and to FALSE if the user pressed Cancel. The dialog's + If \a ok is not-null \e *\a ok will be set to true if the user + pressed OK and to false if the user pressed Cancel. The dialog's parent is \a parent; the dialog is called \a name. The dialog will be modal. This function returns the text of the current item, or if \a - editable is TRUE, the current text of the combobox. + editable is true, the current text of the combobox. Use this static function like this: @@ -457,7 +457,7 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label, lst << "First" << "Second" << "Third" << "Fourth" << "Fifth"; bool ok; TQString res = TQInputDialog::getItem( - "MyApp 3000", "Select an item:", lst, 1, TRUE, &ok, + "MyApp 3000", "Select an item:", lst, 1, true, &ok, this ); if ( ok ) { // user selected an item and pressed OK @@ -471,7 +471,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label, int current, bool editable, bool *ok, TQWidget *parent, const char *name ) { - TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getitem", TRUE, editable ? EditableComboBox : ComboBox ); + TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getitem", true, editable ? EditableComboBox : ComboBox ); #ifndef TQT_NO_WIDGET_TOPEXTRA dlg->setCaption( caption ); #endif @@ -483,7 +483,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label, dlg->comboBox()->setCurrentItem( current ); } - bool ok_ = FALSE; + bool ok_ = false; TQString result; ok_ = dlg->exec() == TQDialog::Accepted; if ( ok ) @@ -506,7 +506,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label, void TQInputDialog::textChanged( const TQString &s ) { - bool on = TRUE; + bool on = true; if ( d->lineEdit->validator() ) { TQString str = d->lineEdit->text(); |
