summaryrefslogtreecommitdiffstats
path: root/doc/html/tutorial2-05.html
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-05-30 14:27:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-06-25 16:43:08 +0900
commit35ced32e331ee29fda1642616c803637952f5b22 (patch)
treeda44726777f814e19c7ef1e43854f6a1693dd6fb /doc/html/tutorial2-05.html
parent7dd4848d61e4c52091d6c644356c84c67536bde2 (diff)
downloadtqt-35ced32e.tar.gz
tqt-35ced32e.zip
Replace TRUE/FALSE with boolean values true/false - part 1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit a7f1e6e2552d9cdbb3d76bff089db522248b9a24)
Diffstat (limited to 'doc/html/tutorial2-05.html')
-rw-r--r--doc/html/tutorial2-05.html17
1 files changed, 8 insertions, 9 deletions
diff --git a/doc/html/tutorial2-05.html b/doc/html/tutorial2-05.html
index ade4d2572..81b3394a2 100644
--- a/doc/html/tutorial2-05.html
+++ b/doc/html/tutorial2-05.html
@@ -53,7 +53,7 @@ conventional document-centric style.
~ChartForm();
int chartType() { return m_chartType; }
- void setChanged( bool changed = TRUE ) { m_changed = changed; }
+ void setChanged( bool changed = true ) { m_changed = changed; }
void drawElements();
<a href="ntqpopupmenu.html">TQPopupMenu</a> *optionsMenu; // Why public? See canvasview.cpp
@@ -178,19 +178,19 @@ menu options and toolbar buttons must be automatically unselected.
This behaviour is achieved by creating a <a href="qactiongroup.html">TQActionGroup</a> and placing the
chart type actions in the group.
<p> <pre> <a href="qactiongroup.html">TQActionGroup</a> *chartGroup = new <a href="qactiongroup.html">TQActionGroup</a>( this ); // Connected later
- chartGroup-&gt;<a href="qactiongroup.html#setExclusive">setExclusive</a>( TRUE );
+ chartGroup-&gt;<a href="qactiongroup.html#setExclusive">setExclusive</a>( true );
</pre>
<p> The action group becomes a child of the form (<tt>this</tt>) and the
exlusive behaviour is achieved by the setExclusive() call.
<p> <pre> optionsPieChartAction = new <a href="ntqaction.html">TQAction</a>(
"Pie Chart", TQPixmap( options_piechart ),
"&amp;Pie Chart", CTRL+Key_I, chartGroup, "pie chart" );
- optionsPieChartAction-&gt;<a href="ntqaction.html#setToggleAction">setToggleAction</a>( TRUE );
+ optionsPieChartAction-&gt;<a href="ntqaction.html#setToggleAction">setToggleAction</a>( true );
</pre>
<p> Each action in the group is created in the same way as other actions,
except that the action's parent is the group rather than the form.
Because our chart type actions have an on/off state we call
-setToggleAction(TRUE) for each of them. Note that we do not connect
+setToggleAction(true) for each of them. Note that we do not connect
the actions; instead, later on, we will connect the group to a slot
that will cause the canvas to redraw.
<p> <center><table cellpadding="4" cellspacing="2" border="0">
@@ -300,10 +300,9 @@ call ensures that a status bar is created for this main window.
<p> <h3> init()
</h3>
<a name="2-1"></a><p> <pre> void ChartForm::init()
- {
<a href="ntqwidget.html#setCaption">setCaption</a>( "Chart" );
m_filename = <a href="ntqstring.html#TQString-null">TQString::null</a>;
- m_changed = FALSE;
+ m_changed = false;
m_elements[0] = Element( Element::INVALID, red );
m_elements[1] = Element( Element::INVALID, cyan );
@@ -341,13 +340,13 @@ already have a unique color (which they can change of course).
break;
case 1: // Cancel
default:
- return FALSE;
+ return false;
case 2: // Abandon
break;
}
}
- return TRUE;
+ return true;
}
</pre>
<p> The okToClear() function is used to prompt the user to save their
@@ -556,7 +555,7 @@ elements.
{
SetDataForm *setDataForm = new SetDataForm( &amp;m_elements, m_decimalPlaces, this );
if ( setDataForm-&gt;<a href="ntqdialog.html#exec">exec</a>() ) {
- m_changed = TRUE;
+ m_changed = true;
drawElements();
}
delete setDataForm;