summaryrefslogtreecommitdiffstats
path: root/examples/textedit/textedit.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-07-01 22:09:14 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-07-08 08:53:47 +0900
commitc03a4800879ab62692e017e01c825ba12a421ad0 (patch)
tree57aeff4300eb9fa64d193569f56b2d98305b49a2 /examples/textedit/textedit.cpp
parent030b165ac197ce4c2eb62c7700dc4c10604637aa (diff)
downloadtqt-c03a4800879ab62692e017e01c825ba12a421ad0.tar.gz
tqt-c03a4800879ab62692e017e01c825ba12a421ad0.zip
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'examples/textedit/textedit.cpp')
-rw-r--r--examples/textedit/textedit.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/examples/textedit/textedit.cpp b/examples/textedit/textedit.cpp
index afcb0a4e8..c01e2cd59 100644
--- a/examples/textedit/textedit.cpp
+++ b/examples/textedit/textedit.cpp
@@ -123,14 +123,14 @@ void TextEdit::setupTextActions()
TQPopupMenu *menu = new TQPopupMenu( this );
menuBar()->insertItem( tr( "F&ormat" ), menu );
- comboFont = new TQComboBox( TRUE, tb );
+ comboFont = new TQComboBox( true, tb );
TQFontDatabase db;
comboFont->insertStringList( db.families() );
connect( comboFont, TQ_SIGNAL( activated( const TQString & ) ),
this, TQ_SLOT( textFamily( const TQString & ) ) );
comboFont->lineEdit()->setText( TQApplication::font().family() );
- comboSize = new TQComboBox( TRUE, tb );
+ comboSize = new TQComboBox( true, tb );
TQValueList<int> sizes = db.standardSizes();
TQValueList<int>::Iterator it = sizes.begin();
for ( ; it != sizes.end(); ++it )
@@ -143,30 +143,30 @@ void TextEdit::setupTextActions()
connect( actionTextBold, TQ_SIGNAL( activated() ), this, TQ_SLOT( textBold() ) );
actionTextBold->addTo( tb );
actionTextBold->addTo( menu );
- actionTextBold->setToggleAction( TRUE );
+ actionTextBold->setToggleAction( true );
actionTextItalic = new TQAction( TQPixmap::fromMimeSource( "textitalic.xpm" ), tr( "&Italic" ), CTRL + Key_I, this, "textItalic" );
connect( actionTextItalic, TQ_SIGNAL( activated() ), this, TQ_SLOT( textItalic() ) );
actionTextItalic->addTo( tb );
actionTextItalic->addTo( menu );
- actionTextItalic->setToggleAction( TRUE );
+ actionTextItalic->setToggleAction( true );
actionTextUnderline = new TQAction( TQPixmap::fromMimeSource( "textunder.xpm" ), tr( "&Underline" ), CTRL + Key_U, this, "textUnderline" );
connect( actionTextUnderline, TQ_SIGNAL( activated() ), this, TQ_SLOT( textUnderline() ) );
actionTextUnderline->addTo( tb );
actionTextUnderline->addTo( menu );
- actionTextUnderline->setToggleAction( TRUE );
+ actionTextUnderline->setToggleAction( true );
menu->insertSeparator();
TQActionGroup *grp = new TQActionGroup( this );
connect( grp, TQ_SIGNAL( selected( TQAction* ) ), this, TQ_SLOT( textAlign( TQAction* ) ) );
actionAlignLeft = new TQAction( TQPixmap::fromMimeSource( "textleft.xpm" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" );
- actionAlignLeft->setToggleAction( TRUE );
+ actionAlignLeft->setToggleAction( true );
actionAlignCenter = new TQAction( TQPixmap::fromMimeSource( "textcenter.xpm" ), tr( "C&enter" ), CTRL + Key_E, grp, "textCenter" );
- actionAlignCenter->setToggleAction( TRUE );
+ actionAlignCenter->setToggleAction( true );
actionAlignRight = new TQAction( TQPixmap::fromMimeSource( "textright.xpm" ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" );
- actionAlignRight->setToggleAction( TRUE );
+ actionAlignRight->setToggleAction( true );
actionAlignJustify = new TQAction( TQPixmap::fromMimeSource( "textjustify.xpm" ), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" );
- actionAlignJustify->setToggleAction( TRUE );
+ actionAlignJustify->setToggleAction( true );
grp->addTo( tb );
grp->addTo( menu );
@@ -271,7 +271,7 @@ void TextEdit::filePrint()
return;
#ifndef TQT_NO_PRINTER
TQPrinter printer( TQPrinter::HighResolution );
- printer.setFullPage(TRUE);
+ printer.setFullPage(true);
if ( printer.setup( this ) ) {
TQPainter p( &printer );
// Check that there is a valid device to print to.
@@ -301,7 +301,7 @@ void TextEdit::filePrint()
break;
printer.newPage();
page++;
- } while (TRUE);
+ } while (true);
}
#endif
}
@@ -436,13 +436,13 @@ void TextEdit::colorChanged( const TQColor &c )
void TextEdit::alignmentChanged( int a )
{
if ( ( a == AlignAuto ) || ( a & AlignLeft ))
- actionAlignLeft->setOn( TRUE );
+ actionAlignLeft->setOn( true );
else if ( ( a & AlignHCenter ) )
- actionAlignCenter->setOn( TRUE );
+ actionAlignCenter->setOn( true );
else if ( ( a & AlignRight ) )
- actionAlignRight->setOn( TRUE );
+ actionAlignRight->setOn( true );
else if ( ( a & AlignJustify ) )
- actionAlignJustify->setOn( TRUE );
+ actionAlignJustify->setOn( true );
}
void TextEdit::editorChanged( TQWidget * )