diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-01 22:09:14 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-08 09:01:42 +0900 |
| commit | 81ade129093a279e6537db25710583fd2bba9427 (patch) | |
| tree | a210834cbccc8aee2e9de7a8b7f41e1d31e2ced0 /examples/demo/textdrawing | |
| parent | 35ced32e331ee29fda1642616c803637952f5b22 (diff) | |
| download | tqt-81ade129.tar.gz tqt-81ade129.zip | |
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit c03a4800879ab62692e017e01c825ba12a421ad0)
Diffstat (limited to 'examples/demo/textdrawing')
| -rw-r--r-- | examples/demo/textdrawing/example.html | 8 | ||||
| -rw-r--r-- | examples/demo/textdrawing/helpwindow.cpp | 28 | ||||
| -rw-r--r-- | examples/demo/textdrawing/textedit.cpp | 34 |
3 files changed, 35 insertions, 35 deletions
diff --git a/examples/demo/textdrawing/example.html b/examples/demo/textdrawing/example.html index eca9d9210..c20fe8116 100644 --- a/examples/demo/textdrawing/example.html +++ b/examples/demo/textdrawing/example.html @@ -138,7 +138,7 @@ constructor. <p>See also <a href="#1f406e">setAlignment</a>(). <h3 class="fn">bool <a name="75b2a1"></a>TQLabel::autoResize () const</h3> <p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of TQt. We strongly advise against using it in new code.<p> -<p>Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing +<p>Returns true if auto-resizing is enabled, or false if auto-resizing is disabled. <p>Auto-resizing is disabled by default. <p>See also <a href="#c0e104">setAutoResize</a>(). @@ -187,7 +187,7 @@ returns 0. <p>The <em>alignment</em> must be a bitwise OR of <a href="ntqt.html#AlignmentFlags">TQt::AlignmentFlags</a> values. The <code>WordBreak, ExpandTabs, SingleLine</code> and <code>ShowPrefix</code> flags apply only if the label contains a plain text, and are otherwise ignored. The <code>DontClip</code> flag is always ignored. -<p>If the label has a buddy, the <code>ShowPrefix</code> flag is forced to TRUE. +<p>If the label has a buddy, the <code>ShowPrefix</code> flag is forced to true. <p>The default alignment is <code>AlignLeft | AlignVCenter | ExpandTabs</code> if the label doesn't have a buddy and <code>AlignLeft | AlignVCenter | ExpandTabs | ShowPrefix </code> if @@ -204,7 +204,7 @@ the label has a buddy. <p>Reimplemented from <a href="ntqwidget.html#c7a335">TQWidget.</a> <h3 class="fn">void <a name="c0e104"></a>TQLabel::setAutoResize ( bool enable ) <code>[virtual]</code></h3> <p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of TQt. We strongly advise against using it in new code.<p> -Enables auto-resizing if <em>enable</em> is TRUE, or disables it if <em>enable</em> is FALSE. +Enables auto-resizing if <em>enable</em> is true, or disables it if <em>enable</em> is false. <p>When auto-resizing is enabled, the label will resize itself to fit the contents whenever the contents change. The top left corner is not moved. This is useful for TQLabel widgets that are not managed by @@ -279,7 +279,7 @@ the label. Any previous content is cleared. <p>The label resizes itself if auto-resizing is enabled. <p>See also <a href="#101ecb">pixmap</a>() and <a href="#191701">setBuddy</a>(). <h3 class="fn">void <a name="e9e3cf"></a>TQLabel::setScaledContents ( bool enable )</h3> -<p>When called with <em>enable</em> == TRUE, and the label shows a pixmap, +<p>When called with <em>enable</em> == true, and the label shows a pixmap, it will scale the pixmap to fill available space. <p>See also <a href="#7e1f73">hasScaledContents</a>(). <h3 class="fn">void <a name="dffb43"></a>TQLabel::setText ( const <a href="ntqstring.html">TQString</a> & text ) <code>[virtual slot]</code></h3> diff --git a/examples/demo/textdrawing/helpwindow.cpp b/examples/demo/textdrawing/helpwindow.cpp index 01bb90add..98ead9a8a 100644 --- a/examples/demo/textdrawing/helpwindow.cpp +++ b/examples/demo/textdrawing/helpwindow.cpp @@ -100,8 +100,8 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, menuBar()->insertItem( tr( "History" ), hist ); menuBar()->insertItem( tr( "Bookmarks" ), bookm ); - menuBar()->setItemEnabled( forwardId, FALSE); - menuBar()->setItemEnabled( backwardId, FALSE); + menuBar()->setItemEnabled( forwardId, false); + menuBar()->setItemEnabled( backwardId, false); connect( browser, TQ_SIGNAL( backwardAvailable( bool ) ), this, TQ_SLOT( setBackwardAvailable( bool ) ) ); connect( browser, TQ_SIGNAL( forwardAvailable( bool ) ), @@ -114,21 +114,21 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, button = new TQToolButton( icon_back, tr("Backward"), "", browser, TQ_SLOT(backward()), toolbar ); connect( browser, TQ_SIGNAL( backwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); - button->setEnabled( FALSE ); + button->setEnabled( false ); button = new TQToolButton( icon_forward, tr("Forward"), "", browser, TQ_SLOT(forward()), toolbar ); connect( browser, TQ_SIGNAL( forwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); - button->setEnabled( FALSE ); + button->setEnabled( false ); button = new TQToolButton( icon_home, tr("Home"), "", browser, TQ_SLOT(home()), toolbar ); toolbar->addSeparator(); - pathCombo = new TQComboBox( TRUE, toolbar ); + pathCombo = new TQComboBox( true, toolbar ); connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT( pathSelected( const TQString & ) ) ); toolbar->setStretchableWidget( pathCombo ); - setRightJustification( TRUE ); - setDockEnabled( DockLeft, FALSE ); - setDockEnabled( DockRight, FALSE ); + setRightJustification( true ); + setDockEnabled( DockLeft, false ); + setDockEnabled( DockRight, false ); pathCombo->insertItem( home_ ); @@ -156,11 +156,11 @@ void HelpWindow::textChanged() selectedURL = caption(); if ( !selectedURL.isEmpty() && pathCombo ) { - bool exists = FALSE; + bool exists = false; int i; for ( i = 0; i < pathCombo->count(); ++i ) { if ( pathCombo->text( i ) == selectedURL ) { - exists = TRUE; + exists = true; break; } } @@ -232,7 +232,7 @@ void HelpWindow::print() { #ifndef TQT_NO_PRINTER TQPrinter printer; - printer.setFullPage(TRUE); + printer.setFullPage(true); if ( printer.setup() ) { TQPainter p( &printer ); TQPaintDeviceMetrics metrics(p.device()); @@ -275,7 +275,7 @@ void HelpWindow::print() break; printer.newPage(); page++; - } while (TRUE); + } while (true); } #endif } @@ -284,10 +284,10 @@ void HelpWindow::pathSelected( const TQString &_path ) { browser->setSource( _path ); TQMap<int, TQString>::Iterator it = mHistory.begin(); - bool exists = FALSE; + bool exists = false; for ( ; it != mHistory.end(); ++it ) { if ( *it == _path ) { - exists = TRUE; + exists = true; break; } } diff --git a/examples/demo/textdrawing/textedit.cpp b/examples/demo/textdrawing/textedit.cpp index 5e203ed16..dc722e35d 100644 --- a/examples/demo/textdrawing/textedit.cpp +++ b/examples/demo/textdrawing/textedit.cpp @@ -110,7 +110,7 @@ void TextEdit::setupTextActions() TQPopupMenu *menu = new TQPopupMenu( this ); menuBar()->insertItem( tr( "For&mat" ), menu ); - comboStyle = new TQComboBox( FALSE, tb ); + comboStyle = new TQComboBox( false, tb ); comboStyle->insertItem( tr("Standard") ); comboStyle->insertItem( tr("Bullet List (Disc)") ); comboStyle->insertItem( tr("Bullet List (Circle)") ); @@ -121,14 +121,14 @@ void TextEdit::setupTextActions() connect( comboStyle, TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( textStyle( int ) ) ); - 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 ) @@ -141,39 +141,39 @@ 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( tr( "Italic" ), TQPixmap( "textdrawing/textitalic.png" ), 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( tr( "Underline" ), TQPixmap( "textdrawing/textunderline.png" ), 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 ); - grp->setExclusive( TRUE ); + grp->setExclusive( true ); connect( grp, TQ_SIGNAL( selected( TQAction* ) ), this, TQ_SLOT( textAlign( TQAction* ) ) ); actionAlignLeft = new TQAction( tr( "Left" ), TQPixmap( "textdrawing/textleft.png" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" ); actionAlignLeft->addTo( tb ); actionAlignLeft->addTo( menu ); - actionAlignLeft->setToggleAction( TRUE ); + actionAlignLeft->setToggleAction( true ); actionAlignCenter = new TQAction( tr( "Center" ), TQPixmap( "textdrawing/textcenter.png" ), tr( "C&enter" ), CTRL + Key_M, grp, "textCenter" ); actionAlignCenter->addTo( tb ); actionAlignCenter->addTo( menu ); - actionAlignCenter->setToggleAction( TRUE ); + actionAlignCenter->setToggleAction( true ); actionAlignRight = new TQAction( tr( "Right" ), TQPixmap( "textdrawing/textright.png" ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" ); actionAlignRight->addTo( tb ); actionAlignRight->addTo( menu ); - actionAlignRight->setToggleAction( TRUE ); + actionAlignRight->setToggleAction( true ); actionAlignJustify = new TQAction( tr( "Justify" ), TQPixmap( "textdrawing/textjustify.png" ), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" ); actionAlignJustify->addTo( tb ); actionAlignJustify->addTo( menu ); - actionAlignJustify->setToggleAction( TRUE ); + actionAlignJustify->setToggleAction( true ); menu->insertSeparator(); @@ -273,7 +273,7 @@ void TextEdit::filePrint() return; #ifndef TQT_NO_PRINTER TQPrinter printer; - printer.setFullPage(TRUE); + printer.setFullPage(true); TQPaintDeviceMetrics screen( this ); printer.setResolution( screen.logicalDpiY() ); if ( printer.setup( this ) ) { @@ -302,7 +302,7 @@ void TextEdit::filePrint() break; printer.newPage(); page++; - } while (TRUE); + } while (true); } #endif } @@ -458,13 +458,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 * ) |
