diff options
Diffstat (limited to 'doc/html/tutorial2-05.html')
-rw-r--r-- | doc/html/tutorial2-05.html | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/doc/html/tutorial2-05.html b/doc/html/tutorial2-05.html index b6f5302fc..afd4014e8 100644 --- a/doc/html/tutorial2-05.html +++ b/doc/html/tutorial2-05.html @@ -49,7 +49,7 @@ conventional document-centric style. enum ChartType { PIE, VERTICAL_BAR, HORIZONTAL_BAR }; enum AddValuesType { NO, YES, AS_PERCENTAGE }; - ChartForm( const <a href="ntqstring.html">TQString</a>& filename ); + ChartForm( const <a href="tqstring.html">TQString</a>& filename ); ~ChartForm(); int chartType() { return m_chartType; } @@ -81,14 +81,14 @@ conventional document-centric style. private: void init(); - void load( const <a href="ntqstring.html">TQString</a>& filename ); + void load( const <a href="tqstring.html">TQString</a>& filename ); bool okToClear(); void drawPieChart( const double scales[], double total, int count ); void drawVerticalBarChart( const double scales[], double total, int count ); void drawHorizontalBarChart( const double scales[], double total, int count ); - <a href="ntqstring.html">TQString</a> valueLabel( const <a href="ntqstring.html">TQString</a>& label, double value, double total ); - void updateRecentFiles( const <a href="ntqstring.html">TQString</a>& filename ); + <a href="tqstring.html">TQString</a> valueLabel( const <a href="tqstring.html">TQString</a>& label, double value, double total ); + void updateRecentFiles( const <a href="tqstring.html">TQString</a>& filename ); void updateRecentFilesMenu(); void setChartType( ChartType chartType ); @@ -96,8 +96,8 @@ conventional document-centric style. <a href="ntqaction.html">TQAction</a> *optionsPieChartAction; <a href="ntqaction.html">TQAction</a> *optionsHorizontalBarChartAction; <a href="ntqaction.html">TQAction</a> *optionsVerticalBarChartAction; - <a href="ntqstring.html">TQString</a> m_filename; - <a href="ntqstringlist.html">TQStringList</a> m_recentFiles; + <a href="tqstring.html">TQString</a> m_filename; + <a href="tqstringlist.html">TQStringList</a> m_recentFiles; <a href="tqcanvas.html">TQCanvas</a> *m_canvas; CanvasView *m_canvasView; bool m_changed; @@ -143,7 +143,7 @@ GUI, <tt>chartform_canvas.cpp</tt> for the canvas handling and <tt>chartform_fil which we've placed in the <tt>images</tt> subdirectory. <p> <h2> The Constructor </h2> -<a name="2"></a><p> <pre> ChartForm::ChartForm( const <a href="ntqstring.html">TQString</a>& filename ) +<a name="2"></a><p> <pre> ChartForm::ChartForm( const <a href="tqstring.html">TQString</a>& filename ) : <a href="ntqmainwindow.html">TQMainWindow</a>( 0, 0, WDestructiveClose ) </pre><tt>...</tt> <pre> <a href="ntqaction.html">TQAction</a> *fileNewAction; @@ -234,9 +234,9 @@ them back when we construct the form. m_font.fromString( settings.<a href="ntqsettings.html#readEntry">readEntry</a>( APP_KEY + "Font", m_font.toString() ) ); for ( int i = 0; i < MAX_RECENTFILES; ++i ) { - <a href="ntqstring.html">TQString</a> filename = settings.<a href="ntqsettings.html#readEntry">readEntry</a>( APP_KEY + "File" + - TQString::<a href="ntqstring.html#number">number</a>( i + 1 ) ); - if ( !filename.<a href="ntqstring.html#isEmpty">isEmpty</a>() ) + <a href="tqstring.html">TQString</a> filename = settings.<a href="ntqsettings.html#readEntry">readEntry</a>( APP_KEY + "File" + + TQString::<a href="tqstring.html#number">number</a>( i + 1 ) ); + if ( !filename.<a href="tqstring.html#isEmpty">isEmpty</a>() ) m_recentFiles.push_back( filename ); } if ( m_recentFiles.count() ) @@ -279,7 +279,7 @@ move the chart form's window accordingly. window's client area. We also create a <tt>CanvasView</tt> (our own subclass of <a href="tqcanvasview.html">TQCanvasView</a>) to display the TQCanvas. We make the canvas view the chart form's main widget and show it. -<p> <pre> if ( !filename.<a href="ntqstring.html#isEmpty">isEmpty</a>() ) +<p> <pre> if ( !filename.<a href="tqstring.html#isEmpty">isEmpty</a>() ) load( filename ); else { init(); @@ -302,7 +302,7 @@ call ensures that a status bar is created for this main window. <a name="2-1"></a><p> <pre> void ChartForm::init() { <a href="tqwidget.html#setCaption">setCaption</a>( "Chart" ); - m_filename = <a href="ntqstring.html#TQString-null">TQString::null</a>; + m_filename = <a href="tqstring.html#TQString-null">TQString::null</a>; m_changed = FALSE; m_elements[0] = Element( Element::INVALID, red ); @@ -325,7 +325,7 @@ already have a unique color (which they can change of course). <a name="3-1"></a><p> <pre> bool ChartForm::okToClear() { if ( m_changed ) { - <a href="ntqstring.html">TQString</a> msg; + <a href="tqstring.html">TQString</a> msg; if ( m_filename.isEmpty() ) msg = "Unnamed chart "; else @@ -383,10 +383,10 @@ added a call to optionsSetData() and see which you prefer. if ( !okToClear() ) return; - <a href="ntqstring.html">TQString</a> filename = TQFileDialog::<a href="ntqfiledialog.html#getOpenFileName">getOpenFileName</a>( + <a href="tqstring.html">TQString</a> filename = TQFileDialog::<a href="ntqfiledialog.html#getOpenFileName">getOpenFileName</a>( TQString::null, "Charts (*.cht)", this, "file open", "Chart -- File Open" ); - <a name="x2567"></a> if ( !filename.<a href="ntqstring.html#isEmpty">isEmpty</a>() ) + <a name="x2567"></a> if ( !filename.<a href="tqstring.html#isEmpty">isEmpty</a>() ) load( filename ); else <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( "File Open abandoned", 2000 ); @@ -399,10 +399,10 @@ the user wishes to load. If we get a filename we call load(). </h3> <a name="3-4"></a><p> <pre> void ChartForm::fileSaveAs() { - <a href="ntqstring.html">TQString</a> filename = TQFileDialog::<a href="ntqfiledialog.html#getSaveFileName">getSaveFileName</a>( + <a href="tqstring.html">TQString</a> filename = TQFileDialog::<a href="ntqfiledialog.html#getSaveFileName">getSaveFileName</a>( TQString::null, "Charts (*.cht)", this, "file save as", "Chart -- File Save As" ); - if ( !filename.<a href="ntqstring.html#isEmpty">isEmpty</a>() ) { + if ( !filename.<a href="tqstring.html#isEmpty">isEmpty</a>() ) { int answer = 0; <a name="x2563"></a> if ( TQFile::<a href="ntqfile.html#exists">exists</a>( filename ) ) <a name="x2566"></a> answer = TQMessageBox::<a href="ntqmessagebox.html#warning">warning</a>( @@ -429,7 +429,7 @@ opened files list and call fileSave() (covered in <a href="tutorial2-07.html">Fi </h2> <a name="4"></a><p> -<pre> <a href="ntqstringlist.html">TQStringList</a> m_recentFiles; +<pre> <a href="tqstringlist.html">TQStringList</a> m_recentFiles; </pre> <p> We hold the list of recently opened files in a string list. <p> @@ -460,7 +460,7 @@ other file menu items had ids created by TQt (all of which are < 0); whereas the menu items we're creating all have ids >= 0. <p> -<pre> void ChartForm::updateRecentFiles( const <a href="ntqstring.html">TQString</a>& filename ) +<pre> void ChartForm::updateRecentFiles( const <a href="tqstring.html">TQString</a>& filename ) { if ( m_recentFiles.find( filename ) != m_recentFiles.end() ) return; |