diff options
Diffstat (limited to 'src/dialogs/qfontdialog.cpp')
| -rw-r--r-- | src/dialogs/qfontdialog.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/dialogs/qfontdialog.cpp b/src/dialogs/qfontdialog.cpp index d81c01476..e4854087f 100644 --- a/src/dialogs/qfontdialog.cpp +++ b/src/dialogs/qfontdialog.cpp @@ -160,11 +160,11 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name, bool modal, WFlags f ) : TQDialog( parent, name, modal, f ) { - setSizeGripEnabled( TRUE ); + setSizeGripEnabled( true ); d = new TQFontDialogPrivate; // grid d->familyEdit = new TQLineEdit( this, "font family I" ); - d->familyEdit->setReadOnly( TRUE ); + d->familyEdit->setReadOnly( true ); d->familyList = new TQListBox( this, "font family II" ); d->familyEdit->setFocusProxy( d->familyList ); @@ -173,7 +173,7 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name, d->familyAccel->setIndent( 2 ); d->styleEdit = new TQLineEdit( this, "font style I" ); - d->styleEdit->setReadOnly( TRUE ); + d->styleEdit->setReadOnly( true ); d->styleList = new TQListBox( this, "font style II" ); d->styleEdit->setFocusProxy( d->styleList ); @@ -206,14 +206,14 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name, // characters used depend on the charset encoding. d->sampleEdit->setText( "AaBbYyZz" ); - d->scriptCombo = new TQComboBox( FALSE, this, "font encoding" ); + d->scriptCombo = new TQComboBox( false, this, "font encoding" ); d->scriptAccel = new TQLabel( d->scriptCombo, tr("Scr&ipt"), this,"encoding label"); d->scriptAccel->setIndent( 2 ); d->size = 0; - d->smoothScalable = FALSE; + d->smoothScalable = false; connect( d->scriptCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(scriptHighlighted(int)) ); @@ -289,7 +289,7 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name, buttonBox->addWidget( d->ok ); if ( modal ) connect( d->ok, TQ_SIGNAL(clicked()), TQ_SLOT(accept()) ); - d->ok->setDefault( TRUE ); + d->ok->setDefault( true ); buttonBox->addSpacing( 12 ); @@ -327,8 +327,8 @@ TQFontDialog::~TQFontDialog() The dialog is called \a name, with the parent \a parent. \a initial is the initially selected font. - If the \a ok parameter is not-null, \e *\a ok is set to TRUE if the - user clicked OK, and set to FALSE if the user clicked Cancel. + If the \a ok parameter is not-null, \e *\a ok is set to true if the + user clicked OK, and set to false if the user clicked Cancel. This static function is less flexible than the full TQFontDialog object, but is convenient and easy to use. @@ -367,8 +367,8 @@ TQFont TQFontDialog::getFont( bool *ok, const TQFont &initial, clicks Cancel, the TQt default font is returned. The dialog is called \a name, with parent \a parent. - If the \a ok parameter is not-null, \e *\a ok is set to TRUE if the - user clicked OK, and FALSE if the user clicked Cancel. + If the \a ok parameter is not-null, \e *\a ok is set to true if the + user clicked OK, and false if the user clicked Cancel. This static function is less functional than the full TQFontDialog object, but is convenient and easy to use. @@ -404,7 +404,7 @@ TQFont TQFontDialog::getFont( bool *ok, const TQFont *def, if ( def ) result = *def; - TQFontDialog *dlg = new TQFontDialog( parent, name, TRUE ); + TQFontDialog *dlg = new TQFontDialog( parent, name, true ); dlg->setFont( ( def ? *def : TQFont() ) ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -444,12 +444,12 @@ bool TQFontDialog::eventFilter( TQObject * o , TQEvent * e ) if ( ci != d->sizeList->currentItem() && style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this)) d->sizeEdit->selectAll(); - return TRUE; + return true; } else if ( ( o == d->familyList || o == d->styleList ) && ( k->key() == Key_Return || k->key() == Key_Enter) ) { k->accept(); accept(); - return TRUE; + return true; } } else if ( e->type() == TQEvent::FocusIn && style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this) ) { @@ -522,7 +522,7 @@ void TQListBoxFontText::paint( TQPainter *painter ) void TQFontDialog::updateFamilies() { - d->familyList->blockSignals( TRUE ); + d->familyList->blockSignals( true ); enum match_t { MATCH_NONE=0, MATCH_LAST_RESORT=1, MATCH_APP=2, MATCH_FALLBACK, MATCH_FAMILY=3 }; @@ -598,7 +598,7 @@ void TQFontDialog::updateFamilies() d->familyList->hasFocus() ) d->familyEdit->selectAll(); - d->familyList->blockSignals( FALSE ); + d->familyList->blockSignals( false ); updateStyles(); } @@ -610,7 +610,7 @@ void TQFontDialog::updateFamilies() void TQFontDialog::updateStyles() { - d->styleList->blockSignals( TRUE ); + d->styleList->blockSignals( true ); d->styleList->clear(); @@ -618,30 +618,30 @@ void TQFontDialog::updateStyles() if ( styles.isEmpty() ) { d->styleEdit->clear(); - d->smoothScalable = FALSE; + d->smoothScalable = false; } else { d->styleList->insertStringList( styles ); if ( !d->style.isEmpty() ) { - bool found = FALSE; - bool first = TRUE; + bool found = false; + bool first = true; TQString cstyle = d->style; redo: for ( int i = 0 ; i < (int)d->styleList->count() ; i++ ) { if ( cstyle == d->styleList->text(i) ) { d->styleList->setCurrentItem( i ); - found = TRUE; + found = true; break; } } if (!found && first) { if (cstyle.contains("Italic")) { cstyle.replace("Italic", "Oblique"); - first = FALSE; + first = false; goto redo; } else if (cstyle.contains("Oblique")) { cstyle.replace("Oblique", "Italic"); - first = FALSE; + first = false; goto redo; } } @@ -657,7 +657,7 @@ void TQFontDialog::updateStyles() d->smoothScalable = d->fdb.isSmoothlyScalable( d->familyList->currentText(), d->styleList->currentText() ); } - d->styleList->blockSignals( FALSE ); + d->styleList->blockSignals( false ); updateSizes(); } @@ -670,7 +670,7 @@ void TQFontDialog::updateStyles() void TQFontDialog::updateSizes() { - d->sizeList->blockSignals( TRUE ); + d->sizeList->blockSignals( true ); d->sizeList->clear(); @@ -678,12 +678,12 @@ void TQFontDialog::updateSizes() TQValueList<int> sizes = d->fdb.pointSizes( d->familyList->currentText(), d->styleList->currentText() ); int i = 0; - bool found = FALSE; + bool found = false; for( TQValueList<int>::iterator it = sizes.begin() ; it != sizes.end(); ++it ) { d->sizeList->insertItem( TQString::number( *it ) ); if ( !found && *it >= d->size ) { d->sizeList->setCurrentItem( i ); - found = TRUE; + found = true; } ++i; } @@ -692,17 +692,17 @@ void TQFontDialog::updateSizes() d->sizeList->setCurrentItem( d->sizeList->count() - 1 ); } - d->sizeEdit->blockSignals( TRUE ); + d->sizeEdit->blockSignals( true ); d->sizeEdit->setText( ( d->smoothScalable ? TQString::number( d->size ) : d->sizeList->currentText() ) ); if ( style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this) && d->sizeList->hasFocus() ) d->sizeEdit->selectAll(); - d->sizeEdit->blockSignals( FALSE ); + d->sizeEdit->blockSignals( false ); } else { d->sizeEdit->clear(); } - d->sizeList->blockSignals( FALSE ); + d->sizeList->blockSignals( false ); updateSample(); } @@ -792,9 +792,9 @@ void TQFontDialog::sizeChanged( const TQString &s ) if ( d->sizeList->text(i).toInt() >= d->size ) break; } - d->sizeList->blockSignals( TRUE ); + d->sizeList->blockSignals( true ); d->sizeList->setCurrentItem( i ); - d->sizeList->blockSignals( FALSE ); + d->sizeList->blockSignals( false ); } updateSample(); } |
