From 1f0ce8533cc837aa2d4155b5fc17d2004bed0197 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 5 Jun 2024 19:02:23 +0900 Subject: Rename template library nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/sql.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc/html/sql.html') diff --git a/doc/html/sql.html b/doc/html/sql.html index 6b5687d42..ed5a06248 100644 --- a/doc/html/sql.html +++ b/doc/html/sql.html @@ -857,8 +857,8 @@ changes to the database are accurately reflected in the cursor. TQStringList names = TQStringList() << "Screwdriver" << "Hammer" << "Wrench" << "Saw"; int id = 20; - for ( TQStringList::Iterator name = names.begin(); - name != names.end(); ++name ) { + for ( TQStringList::Iterator name = names.begin(); + name != names.end(); ++name ) { TQSqlRecord *buffer = cur.primeInsert(); buffer->setValue( "id", id ); buffer->setValue( "name", *name ); @@ -1304,13 +1304,13 @@ can use a custom editor. int statusId() const; void setStatusId( int id ); private: - TQMap< int, int > index2id; + TQMap< int, int > index2id; };

From sql/overview/table3/main.h

We create a property, statusid, and define our READ and WRITE methods for it. The statusid's in the status table will probably be different -from the combobox's indexes so we create a TQMap to map combobox indexes +from the combobox's indexes so we create a TQMap to map combobox indexes to/from the statusids that we will list in the combobox.

    class CustomSqlEditorFactory : public TQSqlEditorFactory
     {
@@ -1340,7 +1340,7 @@ function since that is the only function we need to reimplement.
 

In the StatusPicker's constructor we create a cursor over the status table indexed by the name field. We then iterate over each record in the status table inserting each name into the combobox. We store the -statusid for each name in the index2id TQMap using the same TQMap index as +statusid for each name in the index2id TQMap using the same TQMap index as the combobox index.

    int StatusPicker::statusId() const
     {
-- 
cgit v1.2.3