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/sql.html | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'doc/html/sql.html') diff --git a/doc/html/sql.html b/doc/html/sql.html index ed5a06248..161e59d32 100644 --- a/doc/html/sql.html +++ b/doc/html/sql.html @@ -719,7 +719,7 @@ multiple fields. Ascending and descending order can be set using

            TQSqlCursor cur( "staff" );
-            TQStringList fields = TQStringList() << "surname" << "forename";
+            TQStringList fields = TQStringList() << "surname" << "forename";
             TQSqlIndex order = cur.index( fields );
             cur.select( order );
             while ( cur.next() ) {
@@ -739,7 +739,7 @@ can create a filter based on an index.
 

            TQSqlCursor cur( "staff" );
-            TQStringList fields = TQStringList() << "id" << "forename";
+            TQStringList fields = TQStringList() << "id" << "forename";
             TQSqlIndex order = cur.index( fields );
             TQSqlIndex filter = cur.index( "surname" );
             cur.setValue( "surname", "Bloggs" );
@@ -766,10 +766,10 @@ setValue() to ensure that the value used is the one we want.
 

            TQSqlCursor cur( "creditors" );
-            TQStringList orderFields = TQStringList() << "surname" << "forename";
+            TQStringList orderFields = TQStringList() << "surname" << "forename";
             TQSqlIndex order = cur.index( orderFields );
 
-            TQStringList filterFields = TQStringList() << "surname" << "city";
+            TQStringList filterFields = TQStringList() << "surname" << "city";
             TQSqlIndex filter = cur.index( filterFields );
             cur.setValue( "surname", "Chirac" );
             cur.setValue( "city", "Paris" );
@@ -778,9 +778,9 @@ setValue() to ensure that the value used is the one we want.
 
             while ( cur.next() ) {
                 int id = cur.value( "id" ).toInt();
-                TQString name = cur.value( "forename" ).toString() + " " +
+                TQString name = cur.value( "forename" ).toString() + " " +
                                cur.value( "surname" ).toString();
-                tqDebug( TQString::number( id ) + ": " + name );
+                tqDebug( TQString::number( id ) + ": " + name );
             }
 

From sql/overview/extract/main.cpp

@@ -854,7 +854,7 @@ changes to the database are accurately reflected in the cursor.

            TQSqlCursor cur( "prices" );
-            TQStringList names = TQStringList() <<
+            TQStringList names = TQStringList() <<
                 "Screwdriver" << "Hammer" << "Wrench" << "Saw";
             int id = 20;
             for ( TQStringList::Iterator name = names.begin();
@@ -994,7 +994,7 @@ function.
             staffTable->addColumn( "surname",  "Surname" );
             staffTable->addColumn( "salary",   "Annual Salary" );
 
-            TQStringList order = TQStringList() << "surname" << "forename";
+            TQStringList order = TQStringList() << "surname" << "forename";
             staffTable->setSort( order );
 
             staffTable->refresh();
@@ -1220,12 +1220,12 @@ we will only cover the differences here. The full source is in TQWidget *parent=0, const char *name=0 );
-            TQString upperLine() const;
-            void setUpperLine( const TQString &line );
+            TQString upperLine() const;
+            void setUpperLine( const TQString &line );
         public slots:
-            void changed( const TQString &line );
+            void changed( const TQString &line );
         private:
-            TQString upperLineText;
+            TQString upperLineText;
     };
 

We've created a simple subclass of TQLineEdit and added a property, @@ -1240,21 +1240,21 @@ to our FormDialog's private data.

    CustomEdit::CustomEdit( TQWidget *parent, const char *name ) :
         TQLineEdit( parent, name )
     {
-        connect( this, TQ_SIGNAL(textChanged(const TQString &)),
-                 this, TQ_SLOT(changed(const TQString &)) );
+        connect( this, TQ_SIGNAL(textChanged(const TQString &)),
+                 this, TQ_SLOT(changed(const TQString &)) );
     }
 

In the CustomEdit constructor we use the TQLineEdit constructor and add a connection between the textChanged signal and our own changed slot. -

    void CustomEdit::changed( const TQString &line )
+

    void CustomEdit::changed( const TQString &line )
     {
         setUpperLine( line );
     }
 

The changed() slot calls our setUpperLine() function. -

    void CustomEdit::setUpperLine( const TQString &line )
+

    void CustomEdit::setUpperLine( const TQString &line )
     {
-        upperLineText = line.upper();
+        upperLineText = line.upper();
         setText( upperLineText );
     }
 
@@ -1400,7 +1400,7 @@ anything. We also declare the paintField function. if ( field->name() == "statusid" ) { TQSqlQuery query( "SELECT name FROM status WHERE id=" + field->value().toString() ); - TQString text; + TQString text; if ( query.next() ) { text = query.value( 0 ).toString(); } @@ -1493,7 +1493,7 @@ an InvoiceItemCursor instead of a generic TQSqlCursor.

        protected:
-            TQVariant calculateField( const TQString & name );
+            TQVariant calculateField( const TQString & name );
 

From sql/overview/subclass3/main.h

The change in the header file is minimal: we simply add the signature @@ -1508,7 +1508,7 @@ of the calculateField() function since we will be reimplementing it. setCalculated( productName.name(), TRUE ); } - TQVariant InvoiceItemCursor::calculateField( const TQString & name ) + TQVariant InvoiceItemCursor::calculateField( const TQString & name ) { if ( name == "productname" ) { TQSqlQuery query( "SELECT name FROM prices WHERE id=" + @@ -1517,7 +1517,7 @@ of the calculateField() function since we will be reimplementing it. return query.value( 0 ); } - return TQVariant( TQString::null ); + return TQVariant( TQString::null ); }

From sql/overview/subclass3/main.cpp

@@ -1564,7 +1564,7 @@ function require some simple expansion. We'll look at each in turn.

We create two extra fields, price and cost, and append them to the cursor's set of fields. Both are registered as calculated fields with calls to setCalculated(). -

    TQVariant InvoiceItemCursor::calculateField( const TQString & name )
+

    TQVariant InvoiceItemCursor::calculateField( const TQString & name )
     {
 
         if ( name == "productname" ) {
-- 
cgit v1.2.3