diff options
Diffstat (limited to 'doc/html/tutorial2-04.html')
-rw-r--r-- | doc/html/tutorial2-04.html | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/html/tutorial2-04.html b/doc/html/tutorial2-04.html index cdbe2b6bf..755c2c927 100644 --- a/doc/html/tutorial2-04.html +++ b/doc/html/tutorial2-04.html @@ -36,29 +36,29 @@ body { background: #ffffff; color: black; } <p> (<tt>main.cpp</tt>.) <p> -<pre> #include <<a href="qapplication-h.html">qapplication.h</a>> +<pre> #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include "chartform.h" int main( int argc, char *argv[] ) { - <a href="qapplication.html">TQApplication</a> app( argc, argv ); + <a href="ntqapplication.html">TQApplication</a> app( argc, argv ); - <a href="qstring.html">TQString</a> filename; - <a name="x2557"></a> if ( app.<a href="qapplication.html#argc">argc</a>() > 1 ) { - <a name="x2558"></a> filename = app.<a href="qapplication.html#argv">argv</a>()[1]; - <a name="x2561"></a> if ( !filename.<a href="qstring.html#endsWith">endsWith</a>( ".cht" ) ) - filename = <a href="qstring.html#TQString-null">TQString::null</a>; + <a href="ntqstring.html">TQString</a> filename; + <a name="x2557"></a> if ( app.<a href="ntqapplication.html#argc">argc</a>() > 1 ) { + <a name="x2558"></a> filename = app.<a href="ntqapplication.html#argv">argv</a>()[1]; + <a name="x2561"></a> if ( !filename.<a href="ntqstring.html#endsWith">endsWith</a>( ".cht" ) ) + filename = <a href="ntqstring.html#TQString-null">TQString::null</a>; } ChartForm *cf = new ChartForm( filename ); - <a name="x2560"></a> app.<a href="qapplication.html#setMainWidget">setMainWidget</a>( cf ); - cf-><a href="qwidget.html#show">show</a>(); + <a name="x2560"></a> app.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( cf ); + cf-><a href="ntqwidget.html#show">show</a>(); - return app.<a href="qapplication.html#exec">exec</a>(); + return app.<a href="ntqapplication.html#exec">exec</a>(); } </pre> <p> We have kept the main() function simple and small. We create a -<a href="qapplication.html">TQApplication</a> object and pass it the command line arguments. We are +<a href="ntqapplication.html">TQApplication</a> object and pass it the command line arguments. We are allowing users to invoke the program with <tt>chart mychart.cht</tt>, so if they've added a filename we pass that through to the chart form constructor. Most of the action takes place within the chart form |