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:29:01 +0900
commita7f1e6e2552d9cdbb3d76bff089db522248b9a24 (patch)
tree2e6dd07698083df817163d572443aaf6fdd26651 /doc/html/tutorial2-05.html
parent2584dba8aabfa2db8297dcfa258d33545ed6af43 (diff)
downloadtqt-a7f1e6e2552d9cdbb3d76bff089db522248b9a24.tar.gz
tqt-a7f1e6e2552d9cdbb3d76bff089db522248b9a24.zip
Replace TRUE/FALSE with boolean values true/false - part 1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/tutorial2-05.html')
-rw-r--r--doc/html/tutorial2-05.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/html/tutorial2-05.html b/doc/html/tutorial2-05.html
index ac2f6ec51..bb3869391 100644
--- a/doc/html/tutorial2-05.html
+++ b/doc/html/tutorial2-05.html
@@ -52,7 +52,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="tqpopupmenu.html">TQPopupMenu</a> *optionsMenu; // Why public? See canvasview.cpp
@@ -177,19 +177,19 @@ menu options and toolbar buttons must be automatically unselected.
This behaviour is achieved by creating a <a href="tqactiongroup.html">TQActionGroup</a> and placing the
chart type actions in the group.
<p> <pre> <a href="tqactiongroup.html">TQActionGroup</a> *chartGroup = new <a href="tqactiongroup.html">TQActionGroup</a>( this ); // Connected later
- chartGroup-&gt;<a href="tqactiongroup.html#setExclusive">setExclusive</a>( TRUE );
+ chartGroup-&gt;<a href="tqactiongroup.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="tqaction.html">TQAction</a>(
"Pie Chart", TQPixmap( options_piechart ),
"&amp;Pie Chart", CTRL+Key_I, chartGroup, "pie chart" );
- optionsPieChartAction-&gt;<a href="tqaction.html#setToggleAction">setToggleAction</a>( TRUE );
+ optionsPieChartAction-&gt;<a href="tqaction.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">
@@ -302,7 +302,7 @@ call ensures that a status bar is created for this main window.
{
<a href="tqwidget.html#setCaption">setCaption</a>( "Chart" );
m_filename = <a href="tqstring.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 );
@@ -340,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
@@ -555,7 +555,7 @@ elements.
{
SetDataForm *setDataForm = new SetDataForm( &amp;m_elements, m_decimalPlaces, this );
if ( setDataForm-&gt;<a href="tqdialog.html#exec">exec</a>() ) {
- m_changed = TRUE;
+ m_changed = true;
drawElements();
}
delete setDataForm;