From e6077c30d14e9d662e8843c554db86c0d366d0b6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 6 Jun 2024 13:44:12 +0900 Subject: Rename str nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/tutorial2-05.html | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'doc/html/tutorial2-05.html') 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 TQString& filename ); + ChartForm( const TQString& filename ); ~ChartForm(); int chartType() { return m_chartType; } @@ -81,14 +81,14 @@ conventional document-centric style. private: void init(); - void load( const TQString& filename ); + void load( const TQString& 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 ); - TQString valueLabel( const TQString& label, double value, double total ); - void updateRecentFiles( const TQString& filename ); + TQString valueLabel( const TQString& label, double value, double total ); + void updateRecentFiles( const TQString& filename ); void updateRecentFilesMenu(); void setChartType( ChartType chartType ); @@ -96,8 +96,8 @@ conventional document-centric style. TQAction *optionsPieChartAction; TQAction *optionsHorizontalBarChartAction; TQAction *optionsVerticalBarChartAction; - TQString m_filename; - TQStringList m_recentFiles; + TQString m_filename; + TQStringList m_recentFiles; TQCanvas *m_canvas; CanvasView *m_canvasView; bool m_changed; @@ -143,7 +143,7 @@ GUI, chartform_canvas.cpp for the canvas handling and chartform_fil which we've placed in the images subdirectory.

The Constructor

-

    ChartForm::ChartForm( const TQString& filename )
+

    ChartForm::ChartForm( const TQString& filename )
         : TQMainWindow( 0, 0, WDestructiveClose )
 
...
        TQAction *fileNewAction;
@@ -234,9 +234,9 @@ them back when we construct the form.
         m_font.fromString(
                 settings.readEntry( APP_KEY + "Font", m_font.toString() ) );
         for ( int i = 0; i < MAX_RECENTFILES; ++i ) {
-            TQString filename = settings.readEntry( APP_KEY + "File" +
-                                                   TQString::number( i + 1 ) );
-            if ( !filename.isEmpty() )
+            TQString filename = settings.readEntry( APP_KEY + "File" +
+                                                   TQString::number( i + 1 ) );
+            if ( !filename.isEmpty() )
                 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 CanvasView (our own subclass
 of TQCanvasView) to display the TQCanvas. We make the canvas view the
 chart form's main widget and show it.
-

        if ( !filename.isEmpty() )
+

        if ( !filename.isEmpty() )
             load( filename );
         else {
             init();
@@ -302,7 +302,7 @@ call ensures that a status bar is created for this main window.
 

    void ChartForm::init()
     {
         setCaption( "Chart" );
-        m_filename = TQString::null;
+        m_filename = TQString::null;
         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).
 

    bool ChartForm::okToClear()
     {
         if ( m_changed ) {
-            TQString msg;
+            TQString 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;
 
-        TQString filename = TQFileDialog::getOpenFileName(
+        TQString filename = TQFileDialog::getOpenFileName(
                                 TQString::null, "Charts (*.cht)", this,
                                 "file open", "Chart -- File Open" );
-        if ( !filename.isEmpty() )
+        if ( !filename.isEmpty() )
             load( filename );
         else
             statusBar()->message( "File Open abandoned", 2000 );
@@ -399,10 +399,10 @@ the user wishes to load. If we get a filename we call load().
 
 

    void ChartForm::fileSaveAs()
     {
-        TQString filename = TQFileDialog::getSaveFileName(
+        TQString filename = TQFileDialog::getSaveFileName(
                                 TQString::null, "Charts (*.cht)", this,
                                 "file save as", "Chart -- File Save As" );
-        if ( !filename.isEmpty() ) {
+        if ( !filename.isEmpty() ) {
             int answer = 0;
             if ( TQFile::exists( filename ) )
                 answer = TQMessageBox::warning(
@@ -429,7 +429,7 @@ opened files list and call fileSave() (covered in Fi
 
 

-

        TQStringList m_recentFiles;
+
        TQStringList m_recentFiles;
 

We hold the list of recently opened files in a string list.

@@ -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.

-

    void ChartForm::updateRecentFiles( const TQString& filename )
+
    void ChartForm::updateRecentFiles( const TQString& filename )
     {
         if ( m_recentFiles.find( filename ) != m_recentFiles.end() )
             return;
-- 
cgit v1.2.3