From 5fffa30386502b5423e45c2ed5e6af756b11c7b4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 28 May 2024 10:17:01 +0900 Subject: Rename nt* sql related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/annotated.html | 42 +- doc/html/classchart.html | 38 +- doc/html/classes.html | 42 +- doc/html/database.html | 40 +- doc/html/designer-manual-8.html | 178 ++-- doc/html/functions.html | 462 ++++----- doc/html/headerfilesynonyms | 4 +- doc/html/headers.html | 38 +- doc/html/hierarchy.html | 42 +- doc/html/index | 900 ++++++++--------- doc/html/mainclasses.html | 16 +- doc/html/ntqdatabrowser.html | 715 ------------- doc/html/ntqdatatable.html | 809 --------------- doc/html/ntqdataview.html | 151 --- doc/html/ntqeditorfactory.html | 104 -- doc/html/ntqsql.html | 121 --- doc/html/ntqsqlcursor.html | 761 -------------- doc/html/ntqsqldatabase.html | 668 ------------ doc/html/ntqsqldriver.html | 295 ------ doc/html/ntqsqldriverplugin.html | 100 -- doc/html/ntqsqleditorfactory.html | 111 -- doc/html/ntqsqlerror.html | 157 --- doc/html/ntqsqlfield.html | 216 ---- doc/html/ntqsqlform.html | 237 ----- doc/html/ntqsqlindex.html | 155 --- doc/html/ntqsqlpropertymap.html | 199 ---- doc/html/ntqsqlquery.html | 595 ----------- doc/html/ntqsqlrecord.html | 294 ------ doc/html/ntqsqlresult.html | 260 ----- doc/html/ntqsqlselectcursor.html | 93 -- doc/html/ntqtable.html | 14 +- doc/html/ntqwidget.html | 2 +- doc/html/plugins-howto.html | 2 +- doc/html/plugins.html | 2 +- doc/html/propertydocs | 236 ++--- doc/html/propertyindex | 60 +- doc/html/qdatabrowser-h.html | 221 ---- doc/html/qdatabrowser-members.html | 394 -------- doc/html/qdatatable-h.html | 288 ------ doc/html/qdatatable-members.html | 604 ----------- doc/html/qdataview-h.html | 134 --- doc/html/qdataview-members.html | 346 ------- doc/html/qeditorfactory-h.html | 120 --- doc/html/qeditorfactory-members.html | 93 -- doc/html/qsql-h.html | 144 --- doc/html/qsql-members.html | 47 - doc/html/qsqlcursor-h.html | 204 ---- doc/html/qsqlcursor-members.html | 121 --- doc/html/qsqldatabase-h.html | 199 ---- doc/html/qsqldatabase-members.html | 124 --- doc/html/qsqldriver-h.html | 169 ---- doc/html/qsqldriver-members.html | 109 -- doc/html/qsqldriverplugin-h.html | 117 --- doc/html/qsqldriverplugin-members.html | 50 - doc/html/qsqleditorfactory-h.html | 121 --- doc/html/qsqleditorfactory-members.html | 93 -- doc/html/qsqlerror-h.html | 137 --- doc/html/qsqlerror-members.html | 59 -- doc/html/qsqlfield-h.html | 198 ---- doc/html/qsqlfield-members.html | 60 -- doc/html/qsqlfieldinfo-members.html | 64 -- doc/html/qsqlfieldinfo.html | 227 ----- doc/html/qsqlform-h.html | 152 --- doc/html/qsqlform-members.html | 104 -- doc/html/qsqlindex-h.html | 143 --- doc/html/qsqlindex-members.html | 75 -- doc/html/qsqlpropertymap-h.html | 122 --- doc/html/qsqlpropertymap-members.html | 54 - doc/html/qsqlquery-h.html | 177 ---- doc/html/qsqlquery-members.html | 77 -- doc/html/qsqlrecord-h.html | 185 ---- doc/html/qsqlrecord-members.html | 68 -- doc/html/qsqlrecordinfo-members.html | 50 - doc/html/qsqlrecordinfo.html | 101 -- doc/html/qsqlresult-h.html | 159 --- doc/html/qsqlresult-members.html | 72 -- doc/html/qsqlselectcursor-h.html | 148 --- doc/html/qsqlselectcursor-members.html | 121 --- doc/html/qt.dcf | 1060 ++++++++++---------- doc/html/sql-driver.html | 46 +- doc/html/sql-overview-basicbrowsing-main-cpp.html | 20 +- doc/html/sql-overview-basicbrowsing2-main-cpp.html | 24 +- doc/html/sql-overview-basicdatamanip-main-cpp.html | 16 +- doc/html/sql-overview-connect1-main-cpp.html | 14 +- .../sql-overview-create_connections-main-cpp.html | 4 +- doc/html/sql-overview-custom1-main-cpp.html | 42 +- doc/html/sql-overview-custom1-main-h.html | 16 +- doc/html/sql-overview-delete-main-cpp.html | 14 +- doc/html/sql-overview-extract-main-cpp.html | 24 +- doc/html/sql-overview-form1-main-cpp.html | 24 +- doc/html/sql-overview-form2-main-h.html | 12 +- doc/html/sql-overview-insert-main-cpp.html | 16 +- doc/html/sql-overview-navigating-main-cpp.html | 22 +- doc/html/sql-overview-order1-main-cpp.html | 18 +- doc/html/sql-overview-order2-main-cpp.html | 22 +- doc/html/sql-overview-retrieve1-main-cpp.html | 14 +- doc/html/sql-overview-retrieve2-main-cpp.html | 16 +- doc/html/sql-overview-subclass1-main-cpp.html | 18 +- doc/html/sql-overview-subclass2-main-cpp.html | 14 +- doc/html/sql-overview-subclass2-main-h.html | 6 +- doc/html/sql-overview-subclass3-main-cpp.html | 30 +- doc/html/sql-overview-subclass3-main-h.html | 6 +- doc/html/sql-overview-subclass4-main-cpp.html | 64 +- doc/html/sql-overview-subclass4-main-h.html | 6 +- doc/html/sql-overview-subclass5-main-cpp.html | 78 +- doc/html/sql-overview-subclass5-main-h.html | 8 +- doc/html/sql-overview-table1-main-cpp.html | 12 +- doc/html/sql-overview-table2-main-cpp.html | 20 +- doc/html/sql-overview-table3-main-cpp.html | 42 +- doc/html/sql-overview-table3-main-h.html | 12 +- doc/html/sql-overview-table4-main-cpp.html | 52 +- doc/html/sql-overview-table4-main-h.html | 22 +- doc/html/sql-overview-update-main-cpp.html | 18 +- doc/html/sql.html | 728 +++++++------- doc/html/sqltable-example.html | 48 +- doc/html/titleindex | 122 +-- doc/html/tqdatabrowser-h.html | 221 ++++ doc/html/tqdatabrowser-members.html | 394 ++++++++ doc/html/tqdatabrowser.html | 715 +++++++++++++ doc/html/tqdatatable-h.html | 288 ++++++ doc/html/tqdatatable-members.html | 604 +++++++++++ doc/html/tqdatatable.html | 809 +++++++++++++++ doc/html/tqdataview-h.html | 134 +++ doc/html/tqdataview-members.html | 346 +++++++ doc/html/tqdataview.html | 151 +++ doc/html/tqeditorfactory-h.html | 120 +++ doc/html/tqeditorfactory-members.html | 93 ++ doc/html/tqeditorfactory.html | 104 ++ doc/html/tqobject.html | 2 +- doc/html/tqsql-h.html | 144 +++ doc/html/tqsql-members.html | 47 + doc/html/tqsql.html | 121 +++ doc/html/tqsqlcursor-h.html | 204 ++++ doc/html/tqsqlcursor-members.html | 121 +++ doc/html/tqsqlcursor.html | 761 ++++++++++++++ doc/html/tqsqldatabase-h.html | 199 ++++ doc/html/tqsqldatabase-members.html | 124 +++ doc/html/tqsqldatabase.html | 668 ++++++++++++ doc/html/tqsqldriver-h.html | 169 ++++ doc/html/tqsqldriver-members.html | 109 ++ doc/html/tqsqldriver.html | 295 ++++++ doc/html/tqsqldriverplugin-h.html | 117 +++ doc/html/tqsqldriverplugin-members.html | 50 + doc/html/tqsqldriverplugin.html | 100 ++ doc/html/tqsqleditorfactory-h.html | 121 +++ doc/html/tqsqleditorfactory-members.html | 93 ++ doc/html/tqsqleditorfactory.html | 111 ++ doc/html/tqsqlerror-h.html | 137 +++ doc/html/tqsqlerror-members.html | 59 ++ doc/html/tqsqlerror.html | 157 +++ doc/html/tqsqlfield-h.html | 198 ++++ doc/html/tqsqlfield-members.html | 60 ++ doc/html/tqsqlfield.html | 216 ++++ doc/html/tqsqlfieldinfo-members.html | 64 ++ doc/html/tqsqlfieldinfo.html | 227 +++++ doc/html/tqsqlform-h.html | 152 +++ doc/html/tqsqlform-members.html | 104 ++ doc/html/tqsqlform.html | 237 +++++ doc/html/tqsqlindex-h.html | 143 +++ doc/html/tqsqlindex-members.html | 75 ++ doc/html/tqsqlindex.html | 155 +++ doc/html/tqsqlpropertymap-h.html | 122 +++ doc/html/tqsqlpropertymap-members.html | 54 + doc/html/tqsqlpropertymap.html | 199 ++++ doc/html/tqsqlquery-h.html | 177 ++++ doc/html/tqsqlquery-members.html | 77 ++ doc/html/tqsqlquery.html | 595 +++++++++++ doc/html/tqsqlrecord-h.html | 185 ++++ doc/html/tqsqlrecord-members.html | 68 ++ doc/html/tqsqlrecord.html | 294 ++++++ doc/html/tqsqlrecordinfo-members.html | 50 + doc/html/tqsqlrecordinfo.html | 101 ++ doc/html/tqsqlresult-h.html | 159 +++ doc/html/tqsqlresult-members.html | 72 ++ doc/html/tqsqlresult.html | 260 +++++ doc/html/tqsqlselectcursor-h.html | 148 +++ doc/html/tqsqlselectcursor-members.html | 121 +++ doc/html/tqsqlselectcursor.html | 93 ++ doc/html/whatsthis | 42 +- 179 files changed, 14738 insertions(+), 14738 deletions(-) delete mode 100644 doc/html/ntqdatabrowser.html delete mode 100644 doc/html/ntqdatatable.html delete mode 100644 doc/html/ntqdataview.html delete mode 100644 doc/html/ntqeditorfactory.html delete mode 100644 doc/html/ntqsql.html delete mode 100644 doc/html/ntqsqlcursor.html delete mode 100644 doc/html/ntqsqldatabase.html delete mode 100644 doc/html/ntqsqldriver.html delete mode 100644 doc/html/ntqsqldriverplugin.html delete mode 100644 doc/html/ntqsqleditorfactory.html delete mode 100644 doc/html/ntqsqlerror.html delete mode 100644 doc/html/ntqsqlfield.html delete mode 100644 doc/html/ntqsqlform.html delete mode 100644 doc/html/ntqsqlindex.html delete mode 100644 doc/html/ntqsqlpropertymap.html delete mode 100644 doc/html/ntqsqlquery.html delete mode 100644 doc/html/ntqsqlrecord.html delete mode 100644 doc/html/ntqsqlresult.html delete mode 100644 doc/html/ntqsqlselectcursor.html delete mode 100644 doc/html/qdatabrowser-h.html delete mode 100644 doc/html/qdatabrowser-members.html delete mode 100644 doc/html/qdatatable-h.html delete mode 100644 doc/html/qdatatable-members.html delete mode 100644 doc/html/qdataview-h.html delete mode 100644 doc/html/qdataview-members.html delete mode 100644 doc/html/qeditorfactory-h.html delete mode 100644 doc/html/qeditorfactory-members.html delete mode 100644 doc/html/qsql-h.html delete mode 100644 doc/html/qsql-members.html delete mode 100644 doc/html/qsqlcursor-h.html delete mode 100644 doc/html/qsqlcursor-members.html delete mode 100644 doc/html/qsqldatabase-h.html delete mode 100644 doc/html/qsqldatabase-members.html delete mode 100644 doc/html/qsqldriver-h.html delete mode 100644 doc/html/qsqldriver-members.html delete mode 100644 doc/html/qsqldriverplugin-h.html delete mode 100644 doc/html/qsqldriverplugin-members.html delete mode 100644 doc/html/qsqleditorfactory-h.html delete mode 100644 doc/html/qsqleditorfactory-members.html delete mode 100644 doc/html/qsqlerror-h.html delete mode 100644 doc/html/qsqlerror-members.html delete mode 100644 doc/html/qsqlfield-h.html delete mode 100644 doc/html/qsqlfield-members.html delete mode 100644 doc/html/qsqlfieldinfo-members.html delete mode 100644 doc/html/qsqlfieldinfo.html delete mode 100644 doc/html/qsqlform-h.html delete mode 100644 doc/html/qsqlform-members.html delete mode 100644 doc/html/qsqlindex-h.html delete mode 100644 doc/html/qsqlindex-members.html delete mode 100644 doc/html/qsqlpropertymap-h.html delete mode 100644 doc/html/qsqlpropertymap-members.html delete mode 100644 doc/html/qsqlquery-h.html delete mode 100644 doc/html/qsqlquery-members.html delete mode 100644 doc/html/qsqlrecord-h.html delete mode 100644 doc/html/qsqlrecord-members.html delete mode 100644 doc/html/qsqlrecordinfo-members.html delete mode 100644 doc/html/qsqlrecordinfo.html delete mode 100644 doc/html/qsqlresult-h.html delete mode 100644 doc/html/qsqlresult-members.html delete mode 100644 doc/html/qsqlselectcursor-h.html delete mode 100644 doc/html/qsqlselectcursor-members.html create mode 100644 doc/html/tqdatabrowser-h.html create mode 100644 doc/html/tqdatabrowser-members.html create mode 100644 doc/html/tqdatabrowser.html create mode 100644 doc/html/tqdatatable-h.html create mode 100644 doc/html/tqdatatable-members.html create mode 100644 doc/html/tqdatatable.html create mode 100644 doc/html/tqdataview-h.html create mode 100644 doc/html/tqdataview-members.html create mode 100644 doc/html/tqdataview.html create mode 100644 doc/html/tqeditorfactory-h.html create mode 100644 doc/html/tqeditorfactory-members.html create mode 100644 doc/html/tqeditorfactory.html create mode 100644 doc/html/tqsql-h.html create mode 100644 doc/html/tqsql-members.html create mode 100644 doc/html/tqsql.html create mode 100644 doc/html/tqsqlcursor-h.html create mode 100644 doc/html/tqsqlcursor-members.html create mode 100644 doc/html/tqsqlcursor.html create mode 100644 doc/html/tqsqldatabase-h.html create mode 100644 doc/html/tqsqldatabase-members.html create mode 100644 doc/html/tqsqldatabase.html create mode 100644 doc/html/tqsqldriver-h.html create mode 100644 doc/html/tqsqldriver-members.html create mode 100644 doc/html/tqsqldriver.html create mode 100644 doc/html/tqsqldriverplugin-h.html create mode 100644 doc/html/tqsqldriverplugin-members.html create mode 100644 doc/html/tqsqldriverplugin.html create mode 100644 doc/html/tqsqleditorfactory-h.html create mode 100644 doc/html/tqsqleditorfactory-members.html create mode 100644 doc/html/tqsqleditorfactory.html create mode 100644 doc/html/tqsqlerror-h.html create mode 100644 doc/html/tqsqlerror-members.html create mode 100644 doc/html/tqsqlerror.html create mode 100644 doc/html/tqsqlfield-h.html create mode 100644 doc/html/tqsqlfield-members.html create mode 100644 doc/html/tqsqlfield.html create mode 100644 doc/html/tqsqlfieldinfo-members.html create mode 100644 doc/html/tqsqlfieldinfo.html create mode 100644 doc/html/tqsqlform-h.html create mode 100644 doc/html/tqsqlform-members.html create mode 100644 doc/html/tqsqlform.html create mode 100644 doc/html/tqsqlindex-h.html create mode 100644 doc/html/tqsqlindex-members.html create mode 100644 doc/html/tqsqlindex.html create mode 100644 doc/html/tqsqlpropertymap-h.html create mode 100644 doc/html/tqsqlpropertymap-members.html create mode 100644 doc/html/tqsqlpropertymap.html create mode 100644 doc/html/tqsqlquery-h.html create mode 100644 doc/html/tqsqlquery-members.html create mode 100644 doc/html/tqsqlquery.html create mode 100644 doc/html/tqsqlrecord-h.html create mode 100644 doc/html/tqsqlrecord-members.html create mode 100644 doc/html/tqsqlrecord.html create mode 100644 doc/html/tqsqlrecordinfo-members.html create mode 100644 doc/html/tqsqlrecordinfo.html create mode 100644 doc/html/tqsqlresult-h.html create mode 100644 doc/html/tqsqlresult-members.html create mode 100644 doc/html/tqsqlresult.html create mode 100644 doc/html/tqsqlselectcursor-h.html create mode 100644 doc/html/tqsqlselectcursor-members.html create mode 100644 doc/html/tqsqlselectcursor.html (limited to 'doc/html') diff --git a/doc/html/annotated.html b/doc/html/annotated.html index a7d41410f..2121d55f3 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -106,10 +106,10 @@ body { background: #ffffff; color: black; } TQCursorMouse cursor with an arbitrary shape TQCustomEventSupport for custom events TQCustomMenuItemAbstract base class for custom menu items in popup menus -TQDataBrowserData manipulation and navigation for data entry forms +TQDataBrowserData manipulation and navigation for data entry forms TQDataStreamSerialization of binary data to a TQIODevice -TQDataTableFlexible SQL table widget that supports browsing and editing -TQDataViewRead-only SQL forms +TQDataTableFlexible SQL table widget that supports browsing and editing +TQDataViewRead-only SQL forms TQDateDate functions TQDateEditDate editor TQDateTimeDate and time functions @@ -149,7 +149,7 @@ body { background: #ffffff; color: black; } TQDragMoveEventEvent which is sent while a drag and drop is in progress TQDragObjectEncapsulates MIME-based data transfer TQDropEventEvent which is sent when a drag and drop is completed -TQEditorFactoryUsed to create editor widgets for TQVariant data types +TQEditorFactoryUsed to create editor widgets for TQVariant data types TQErrorMessageError message display dialog TQEucJpCodecConversion to and from EUC-JP character sets TQEucKrCodecConversion to and from EUC-KR character sets @@ -338,23 +338,23 @@ body { background: #ffffff; color: black; } TQSpinBoxSpin box widget (spin button) TQSplashScreenSplash screen that can be shown during application startup TQSplitterImplements a splitter widget -TQSqlNamespace for TQt SQL identifiers that need to be global-like -TQSqlCursorBrowsing and editing of SQL tables and views -TQSqlDatabaseUsed to create SQL database connections and to provide transaction handling -TQSqlDriverAbstract base class for accessing SQL databases -TQSqlDriverPluginAbstract base for custom TQSqlDriver plugins -TQSqlEditorFactoryUsed to create the editors used by TQDataTable and TQSqlForm -TQSqlErrorSQL database error information -TQSqlFieldManipulates the fields in SQL database tables and views -TQSqlFieldInfoStores meta data associated with a SQL field -TQSqlFormCreates and manages data entry forms tied to SQL databases -TQSqlIndexFunctions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes -TQSqlPropertyMapUsed to map widgets to SQL fields -TQSqlQueryMeans of executing and manipulating SQL statements -TQSqlRecordEncapsulates a database record, i.e. a set of database fields -TQSqlRecordInfoEncapsulates a set of database field meta data -TQSqlResultAbstract interface for accessing data from SQL databases -TQSqlSelectCursorBrowsing of general SQL SELECT statements +TQSqlNamespace for TQt SQL identifiers that need to be global-like +TQSqlCursorBrowsing and editing of SQL tables and views +TQSqlDatabaseUsed to create SQL database connections and to provide transaction handling +TQSqlDriverAbstract base class for accessing SQL databases +TQSqlDriverPluginAbstract base for custom TQSqlDriver plugins +TQSqlEditorFactoryUsed to create the editors used by TQDataTable and TQSqlForm +TQSqlErrorSQL database error information +TQSqlFieldManipulates the fields in SQL database tables and views +TQSqlFieldInfoStores meta data associated with a SQL field +TQSqlFormCreates and manages data entry forms tied to SQL databases +TQSqlIndexFunctions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes +TQSqlPropertyMapUsed to map widgets to SQL fields +TQSqlQueryMeans of executing and manipulating SQL statements +TQSqlRecordEncapsulates a database record, i.e. a set of database fields +TQSqlRecordInfoEncapsulates a set of database field meta data +TQSqlResultAbstract interface for accessing data from SQL databases +TQSqlSelectCursorBrowsing of general SQL SELECT statements TQStatusBarHorizontal bar suitable for presenting status information TQStoredDragSimple stored-value drag object for arbitrary MIME data TQStrIListDoubly-linked list of char* with case-insensitive comparison diff --git a/doc/html/classchart.html b/doc/html/classchart.html index 9c83720b0..92fc386c6 100644 --- a/doc/html/classchart.html +++ b/doc/html/classchart.html @@ -60,11 +60,11 @@ body { background: #ffffff; color: black; } - - - - - + + + + + @@ -87,13 +87,13 @@ body { background: #ffffff; color: black; } - - - - - - - + + + + + + + @@ -121,14 +121,14 @@ body { background: #ffffff; color: black; } - + - - - - - - + + + + + + diff --git a/doc/html/classes.html b/doc/html/classes.html index 8b3e94744..44a39a5d3 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -370,7 +370,7 @@ classes, see TQt's Main Classes. TQButtonGroup E -TQEditorFactory +TQEditorFactory TQListBox @@ -605,7 +605,7 @@ classes, see TQt's Main Classes. TQMimeSource -TQSql +TQSql TQWidgetFactory @@ -616,7 +616,7 @@ classes, see TQt's Main Classes. TQMimeSourceFactory -TQSqlCursor +TQSqlCursor TQWidgetItem @@ -627,7 +627,7 @@ classes, see TQt's Main Classes. TQMotif * -TQSqlDatabase +TQSqlDatabase TQWidgetPlugin @@ -638,7 +638,7 @@ classes, see TQt's Main Classes. TQMotifDialog * -TQSqlDriver +TQSqlDriver TQWidgetStack @@ -649,7 +649,7 @@ classes, see TQt's Main Classes. TQMotifPlusStyle -TQSqlDriverPlugin +TQSqlDriverPlugin TQWindowsMime @@ -660,7 +660,7 @@ classes, see TQt's Main Classes. TQMotifStyle -TQSqlEditorFactory +TQSqlEditorFactory TQWindowsStyle @@ -671,7 +671,7 @@ classes, see TQt's Main Classes. TQMotifWidget * -TQSqlError +TQSqlError TQWizard @@ -682,7 +682,7 @@ classes, see TQt's Main Classes. TQMouseDriverFactory -TQSqlField +TQSqlField TQWMatrix @@ -693,7 +693,7 @@ classes, see TQt's Main Classes. TQMouseDriverPlugin -TQSqlFieldInfo +TQSqlFieldInfo TQWorkspace @@ -704,7 +704,7 @@ classes, see TQt's Main Classes. TQMouseEvent -TQSqlForm +TQSqlForm TQWSDecoration * @@ -715,7 +715,7 @@ classes, see TQt's Main Classes. TQMoveEvent -TQSqlIndex +TQSqlIndex TQWSInputMethod * @@ -726,7 +726,7 @@ classes, see TQt's Main Classes. TQMovie -TQSqlPropertyMap +TQSqlPropertyMap TQWSKeyboardHandler * @@ -737,7 +737,7 @@ classes, see TQt's Main Classes. TQMutex -TQSqlQuery +TQSqlQuery TQWSMouseHandler * @@ -748,7 +748,7 @@ classes, see TQt's Main Classes. TQMutexLocker -TQSqlRecord +TQSqlRecord TQWSServer * @@ -759,7 +759,7 @@ classes, see TQt's Main Classes. N TQNetworkOperation -TQSqlRecordInfo +TQSqlRecordInfo TQWSWindow * @@ -770,7 +770,7 @@ classes, see TQt's Main Classes. TQNetworkProtocol -TQSqlResult +TQSqlResult X TQXmlAttributes @@ -781,7 +781,7 @@ classes, see TQt's Main Classes. TQNPInstance * -TQSqlSelectCursor +TQSqlSelectCursor TQXmlContentHandler @@ -819,7 +819,7 @@ classes, see TQt's Main Classes. TQXmlDTDHandler D -TQDataBrowser +TQDataBrowser TQHebrewCodec O @@ -841,7 +841,7 @@ classes, see TQt's Main Classes. TQXmlErrorHandler -TQDataTable +TQDataTable TQHideEvent @@ -852,7 +852,7 @@ classes, see TQt's Main Classes. TQXmlInputSource -TQDataView +TQDataView TQHostAddress diff --git a/doc/html/database.html b/doc/html/database.html index 68e6833e3..b139ff08c 100644 --- a/doc/html/database.html +++ b/doc/html/database.html @@ -35,26 +35,26 @@ body { background: #ffffff; color: black; }

These classes provide access to SQL databases.

-
TQDataBrowserData manipulation and navigation for data entry forms -
TQDataTableFlexible SQL table widget that supports browsing and editing -
TQDataViewRead-only SQL forms -
TQEditorFactoryUsed to create editor widgets for TQVariant data types -
TQSqlNamespace for TQt SQL identifiers that need to be global-like -
TQSqlCursorBrowsing and editing of SQL tables and views -
TQSqlDatabaseUsed to create SQL database connections and to provide transaction handling -
TQSqlDriverAbstract base class for accessing SQL databases -
TQSqlEditorFactoryUsed to create the editors used by TQDataTable and TQSqlForm -
TQSqlErrorSQL database error information -
TQSqlFieldManipulates the fields in SQL database tables and views -
TQSqlFieldInfoStores meta data associated with a SQL field -
TQSqlFormCreates and manages data entry forms tied to SQL databases -
TQSqlIndexFunctions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes -
TQSqlPropertyMapUsed to map widgets to SQL fields -
TQSqlQueryMeans of executing and manipulating SQL statements -
TQSqlRecordEncapsulates a database record, i.e. a set of database fields -
TQSqlRecordInfoEncapsulates a set of database field meta data -
TQSqlResultAbstract interface for accessing data from SQL databases -
TQSqlSelectCursorBrowsing of general SQL SELECT statements +
TQDataBrowserData manipulation and navigation for data entry forms +
TQDataTableFlexible SQL table widget that supports browsing and editing +
TQDataViewRead-only SQL forms +
TQEditorFactoryUsed to create editor widgets for TQVariant data types +
TQSqlNamespace for TQt SQL identifiers that need to be global-like +
TQSqlCursorBrowsing and editing of SQL tables and views +
TQSqlDatabaseUsed to create SQL database connections and to provide transaction handling +
TQSqlDriverAbstract base class for accessing SQL databases +
TQSqlEditorFactoryUsed to create the editors used by TQDataTable and TQSqlForm +
TQSqlErrorSQL database error information +
TQSqlFieldManipulates the fields in SQL database tables and views +
TQSqlFieldInfoStores meta data associated with a SQL field +
TQSqlFormCreates and manages data entry forms tied to SQL databases +
TQSqlIndexFunctions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes +
TQSqlPropertyMapUsed to map widgets to SQL fields +
TQSqlQueryMeans of executing and manipulating SQL statements +
TQSqlRecordEncapsulates a database record, i.e. a set of database fields +
TQSqlRecordInfoEncapsulates a set of database field meta data +
TQSqlResultAbstract interface for accessing data from SQL databases +
TQSqlSelectCursorBrowsing of general SQL SELECT statements


diff --git a/doc/html/designer-manual-8.html b/doc/html/designer-manual-8.html index 93317ead1..25db3e6b6 100644 --- a/doc/html/designer-manual-8.html +++ b/doc/html/designer-manual-8.html @@ -31,10 +31,10 @@ body { background: #ffffff; color: black; }

[Prev: Creating Custom Widgets] [Home] [Next: Customizing and Integrating TQt Designer]

Creating Database Applications

-

This chapter shows you how to use TQt's data-aware widgets from within TQt Designer. It demonstrates INSERT, UPDATE and DELETE in both TQDataTables (tables) and TQDataBrowsers (forms). It also shows how to code Master-Detail relationships and Drilldown. A simple approach to foreign key handling is presented here; a more sophisticated approach is shown in the online SQL module documentation.

+

This chapter shows you how to use TQt's data-aware widgets from within TQt Designer. It demonstrates INSERT, UPDATE and DELETE in both TQDataTables (tables) and TQDataBrowsers (forms). It also shows how to code Master-Detail relationships and Drilldown. A simple approach to foreign key handling is presented here; a more sophisticated approach is shown in the online SQL module documentation.

If you wish to run the examples or create your own applications using these widgets you need access to an SQL database and a TQt database driver that can connect to the database. At the time of writing the drivers that TQt supports are TQODBC3 (Open Database Connectivity), TQOCI8 (Oracle), TQPSQL7 (PostgreSQL 6 and 7) and TQMYSQL3 (MySQL).

Although you can use the TQt data-aware widgets to browse and edit data in SQL databases without having to write any SQL, a basic understanding of SQL is highly recommended. We assume that you have some familiarity with SELECT, INSERT, UPDATE, and DELETE statements. We also assume a basic understanding of the concepts of normalization and of primary and foreign keys. A standard text covering SQL databases is An Introduction to Database Systems (7th ed.) by C. J. Date, ISBN 0201385902.

-

In the following text we describe the creation of a 'book' database application. The application demonstrates how to use TQDataTables including in-place record editing and how to set up master-detail relationships between TQDataTables. It also explains how to drill down from a TQDataTable to another widget, for example, to a TQDataBrowser or a TQDataView and how to perform record editing in a TQDataBrowser. A great deal of functionality is available from the classes directly in TQt Designer although subclassing is always available for finer control. If you want to build the 'book' examples you will need to create the example schema on your database.

+

In the following text we describe the creation of a 'book' database application. The application demonstrates how to use TQDataTables including in-place record editing and how to set up master-detail relationships between TQDataTables. It also explains how to drill down from a TQDataTable to another widget, for example, to a TQDataBrowser or a TQDataView and how to perform record editing in a TQDataBrowser. A great deal of functionality is available from the classes directly in TQt Designer although subclassing is always available for finer control. If you want to build the 'book' examples you will need to create the example schema on your database.

The Book Application

@@ -68,7 +68,7 @@ body { background: #ffffff; color: black; }

Edit Database Connections Dialog

Choose Project|Database Connections from the menu bar. The Edit Database Connections dialog will appear. Click New Connection. For applications that use a single database it will probably be most convenient to use the default connection name of '(default)'. If you use more than one database then each one must be given a unique name. A driver must be chosen from the Driver combo box. The database name may be available in the Database Name combo box or may have to be typed in. The database name, username, password, hostname and port should be provided by your database system administrator. When the Connection information has been completed click Connect. If the connection is made the connection name will appear in the list box on the left hand side of the dialog. You can now close the dialog; the connection settings will remain in effect until you change or delete them or exit from TQt Designer.

Warning: If you are using an existing SQLite database, ensure that the name you specify in the "Database Name" field is not the same as the existing database file. TQt Designer will create a configuration file using the name given for the database and will overwrite any existing files with the same name.

-

TQt Designer can remember database connection settings in qmake project files. Create a new project, e.g. click File|New, then click the 'C++ Project' icon to invoke the Project Settings dialog. Click the ellipsis button to invoke the Save As dialog; navigate to the project's directory (creating it if necessary). Make sure you're in the project's directory, then enter a project name of 'book.pro'. Click the Save button to return to the Project Settings dialog, then click OK. Next time you start TQt Designer instead of opening individual .ui files open the .pro project file instead and TQt Designer will automatically reload the project's connection settings. To activate the connection click Project|Database Connections. The connections previously saved with the project will be listed in the left hand list box. Click the connection you wish to use and then click Connect. This connection will be used from now on, e.g. for previewing TQDataTables. Opening a project file also causes TQt Designer to load in the list of forms associated with the project into the Project Overview window. In most of the explanation that follows we will assume that you use project files and have clicked Connect so that there is always a connection available when you work in TQt Designer.

+

TQt Designer can remember database connection settings in qmake project files. Create a new project, e.g. click File|New, then click the 'C++ Project' icon to invoke the Project Settings dialog. Click the ellipsis button to invoke the Save As dialog; navigate to the project's directory (creating it if necessary). Make sure you're in the project's directory, then enter a project name of 'book.pro'. Click the Save button to return to the Project Settings dialog, then click OK. Next time you start TQt Designer instead of opening individual .ui files open the .pro project file instead and TQt Designer will automatically reload the project's connection settings. To activate the connection click Project|Database Connections. The connections previously saved with the project will be listed in the left hand list box. Click the connection you wish to use and then click Connect. This connection will be used from now on, e.g. for previewing TQDataTables. Opening a project file also causes TQt Designer to load in the list of forms associated with the project into the Project Overview window. In most of the explanation that follows we will assume that you use project files and have clicked Connect so that there is always a connection available when you work in TQt Designer.

Setting Up Connections for Applications

The applications you create must make their own connections to the SQL database. We provide an example function, createConnections(), that you can use as a basis for your own code.

@@ -112,59 +112,59 @@ bool createConnections()
  

All the examples presented in this chapter call createConnections() after creating the TQApplication object in their main.cpp file and make use of the default connection. If you need to connect to multiple databases use the two-argument form of addDatabase(), passing it both the name of the driver and a unique identifier. This is explained further in the TQt SQL Module documentation.

You do not need to keep a reference to database connections. If you use a single database connection, this becomes the default connection and database functions will use this connection automatically. We can always get a pointer to any of our connections by calling TQSqlDatabase::database().

If you create a main.cpp file using TQt Designer, this file will not include createConnections(). We do not include this function because it needs the username and password for the database connection, and you may prefer to handle these differently from our simple example function. As a result, applications that preview correctly in TQt Designer will not run unless you implement your own database connections function.

-

Using TQDataTable

-

TQDataTables may be placed on any form to provide browsing of database tables and views. TQDataTables can also be used to update or delete records in-place, i.e. inside the cells themselves. Inserting records via a TQDataTable usually requires connecting to the primeInsert() signal, so that we can generate primary keys for example, or provide default values. If we wish to present records using a form view (perhaps combining data from several tables and views) we might use several TQDataBrowsers and TQDataViews.

+

Using TQDataTable

+

TQDataTables may be placed on any form to provide browsing of database tables and views. TQDataTables can also be used to update or delete records in-place, i.e. inside the cells themselves. Inserting records via a TQDataTable usually requires connecting to the primeInsert() signal, so that we can generate primary keys for example, or provide default values. If we wish to present records using a form view (perhaps combining data from several tables and views) we might use several TQDataBrowsers and TQDataViews.

Quickly Viewing a Database Table

This example, along with all the other examples in this chapter, has the project name 'book' and uses the database created by the book.sql script. As we work through the chapter we will build the 'book' application step by step. Create or copy the qt/tools/designer/examples/book/book1/main.cpp file shown earlier. The project file for this first example is qt/tools/designer/examples/book/book1/book.pro. Start a new project by clicking File|New, then click the 'C++ Project' icon to invoke the Project Settings dialog. Click the ellipsis button to invoke the Save As dialog; navigate to the project's directory (creating it if necessary). Make sure you're in the project's directory, then enter a project name of 'book.pro'. Click the Save button to return to the Project Settings dialog, then click OK. Now click Project|Database Connections. Fill in the connection information appropriate to your database then press Connect. The connection name should now appear in the left hand list box. (If this doesn't happen you'll need to contact your database systems administrator for help.) Close the dialog.

-

We will now create a new form with a TQDataTable that's connected to one of our database tables.

+

We will now create a new form with a TQDataTable that's connected to one of our database tables.

Click File|New. The New File dialog presents us with a number of form templates to choose from. Choose the 'Dialog' form and click OK. Now click File|Save. You will be prompted for a filename, call it book.ui.

-
Setting up a TQDataTable
-

To place a TQDataTable widget on the form either click Tools|Views|DataTable or click the DataTable toolbar button. Click on the form and the Data Table Wizard will appear.

-
  1. The Database Connection and Table wizard page is used to set up a connection if one doesn't exist and to choose the table or view for the TQDataTable. (See Setting Up TQt Designer's Connections.)

    +
    Setting up a TQDataTable
    +

    To place a TQDataTable widget on the form either click Tools|Views|DataTable or click the DataTable toolbar button. Click on the form and the Data Table Wizard will appear.

    +
    1. The Database Connection and Table wizard page is used to set up a connection if one doesn't exist and to choose the table or view for the TQDataTable. (See Setting Up TQt Designer's Connections.)

      Click the connection you wish to use, listed in the left hand Database Connection list box, e.g. "(default)". The available tables and views will appear in the right hand Table list box. Click the 'author' table and then click the Next button.

      -
    2. The Displayed Fields wizard page provides a means of selecting which fields should be displayed in the TQDataTable and in what order. By default all fields except the primary key (if there is one) are in the Displayed Fields list box. The left- and right-pointing blue arrow buttons can be used to move fields between the Displayed Fields and the Available Fields list boxes. The blue up and down pointing arrow buttons are used to select the display order of the displayed fields.

      +
    3. The Displayed Fields wizard page provides a means of selecting which fields should be displayed in the TQDataTable and in what order. By default all fields except the primary key (if there is one) are in the Displayed Fields list box. The left- and right-pointing blue arrow buttons can be used to move fields between the Displayed Fields and the Available Fields list boxes. The blue up and down pointing arrow buttons are used to select the display order of the displayed fields.

      The default settings are the ones we want so simply click Next.

      -
    4. The Table Properties wizard page provides convenient access to some of the database-related properties of the TQDataTable.

      +
    5. The Table Properties wizard page provides convenient access to some of the database-related properties of the TQDataTable.

      Make sure the Confirm Deletes checkbox is checked, then click Next.

      -
    6. The SQL wizard page is used to set the TQDataTable's Filter and Sort properties. The Filter is an SQL WHERE clause (without the word 'WHERE'). For example, to only list authors whose surnames begin with 'P', we would enter title LIKE 'P%'. We'll leave the filter empty. The Available Fields list box lists all the fields. The Sort By list box lists the fields that the TQDataTable is to sort by and the direction of their sorting (ASCending or DESCending). The left and right blue arrows are used to move fields between the two list boxes. The up and down blue arrows move fields up and down within the Sort By list box. The ASC or DESC setting is changed with the 'sort order' toolbar button.

      +
    7. The SQL wizard page is used to set the TQDataTable's Filter and Sort properties. The Filter is an SQL WHERE clause (without the word 'WHERE'). For example, to only list authors whose surnames begin with 'P', we would enter title LIKE 'P%'. We'll leave the filter empty. The Available Fields list box lists all the fields. The Sort By list box lists the fields that the TQDataTable is to sort by and the direction of their sorting (ASCending or DESCending). The left and right blue arrows are used to move fields between the two list boxes. The up and down blue arrows move fields up and down within the Sort By list box. The ASC or DESC setting is changed with the 'sort order' toolbar button.

      Move the surname and forename fields into the Sort By list box and click Next.

      -
    8. The Finish wizard page gives us the opportunity to go back and change any of our settings. We will be able to change them later through the TQDataTable's properties so we can finish with the wizard.

      +
    9. The Finish wizard page gives us the opportunity to go back and change any of our settings. We will be able to change them later through the TQDataTable's properties so we can finish with the wizard.

      Click Finish.

      -

    The table will appear on the form with each column labelled with a default column name. If you wish to change the settings then most of them are available in the property window. The display names, the fields they are based upon, and the order of appearance of the columns can be changed using the Edit Table dialog (explained later) by right clicking the TQDataTable and left clicking Edit.

    +

The table will appear on the form with each column labelled with a default column name. If you wish to change the settings then most of them are available in the property window. The display names, the fields they are based upon, and the order of appearance of the columns can be changed using the Edit Table dialog (explained later) by right clicking the TQDataTable and left clicking Edit.

Laying out the Form

Click on the form and click the Lay Out Vertically toolbar button. Now click Preview|Preview Form; the form will run and the table will automatically display all the records.

To turn the form we've created into an executable application we must add the main.cpp file to the project file and make the project. We should also do some renaming to make things easier to understand.

-
  1. Click on the form and change its name to 'BookForm' and its caption to 'Book'. Click on the TQDataTable and change its name to 'AuthorDataTable'.

    +
    1. Click on the form and change its name to 'BookForm' and its caption to 'Book'. Click on the TQDataTable and change its name to 'AuthorDataTable'.

    2. Click File|Save All.

    3. Open the project file, e.g. book.pro, in a plain text editor and add the line: SOURCES += main.cpp at the end of the file.

    4. Run qmake to generate the make file, e.g. qmake -o Makefile book.pro, then make and run the book program.

      -

    This example shows how easy it is to use TQDataTable to show the contents of a database table or view. You can use the application we've just built to update and delete author records. In the examples that follow we will cover insertions, setting up master-detail relationships, drilldown and foreign key lookups.

    +

This example shows how easy it is to use TQDataTable to show the contents of a database table or view. You can use the application we've just built to update and delete author records. In the examples that follow we will cover insertions, setting up master-detail relationships, drilldown and foreign key lookups.

A Note on Foreign Keys

In most relational databases tables contain fields which are foreign keys into other tables. In our 'book' database example the authorid in the book table is a foreign key into the author table. When we present a form to the end user we do not usually want the foreign key itself to be visible but rather the text associated with it. Thus, we would want the author's name to appear rather than the author id when we show book information. In many databases, this can be achieved by using a view. See your database's documentation for details.

-

Inserting Records in TQDataTables

-

Record insertion into a relational database usually requires the generation of a primary key value which uniquely identifies the record in the table. Also we often want to create default values for some fields to minimize the user's work. We will create a slot to capture the TQDataTables primeInsert() signal and populate the TQSqlRecord insertion buffer with a unique primary key.

+

Inserting Records in TQDataTables

+

Record insertion into a relational database usually requires the generation of a primary key value which uniquely identifies the record in the table. Also we often want to create default values for some fields to minimize the user's work. We will create a slot to capture the TQDataTables primeInsert() signal and populate the TQSqlRecord insertion buffer with a unique primary key.

  1. Click Edit|Slots to invoke the Edit Functions dialog. Click New Function, then enter the slot name primeInsertAuthor(TQSqlRecord*) into the Function Properties' Function line edit box. Click OK.

  2. Click the Connect Signals/Slots toolbar button, then click the AuthorDataTable, drag to the form and release the mouse. The Edit Connections dialog will now appear. Click the primeInsert() signal and then the primeInsertAuthor() slot to make the connection. Now click OK.

  3. Click the Members tab of the Object Explorer window (click Window|Views|Object Explorer to make the window visible if necessary). Click the primeInsertAuthor() slot and an editor window will appear.

  4. We must change the BookForm::primeInsertAuthor() slot to specify the parameter name and perform the necessary action:

    -
        void BookForm::primeInsertAuthor( TQSqlRecord * buffer )
    +
        void BookForm::primeInsertAuthor( TQSqlRecord * buffer )
         {
    -        TQSqlQuery query;
    -        query.exec( "UPDATE sequence SET sequence = sequence + 1 WHERE tablename='author';" );
    -        query.exec( "SELECT sequence FROM sequence WHERE tablename='author';" );
    -        if ( query.next() ) {
    -            buffer->setValue( "id", query.value( 0 ) );
    +        TQSqlQuery query;
    +        query.exec( "UPDATE sequence SET sequence = sequence + 1 WHERE tablename='author';" );
    +        query.exec( "SELECT sequence FROM sequence WHERE tablename='author';" );
    +        if ( query.next() ) {
    +            buffer->setValue( "id", query.value( 0 ) );
             }
         }
     
    -

    A TQSqlQuery object is used to increment and retrieve a unique 'sequence' number for the author table. The signal passed us a pointer to the insertion buffer and we then put the value we've retrieved, i.e. the next sequence number, into the buffer's id field. (Again, note that SQL databases often support a native 'sequence' function. The method used here is inappropriate for production systems, and is for example purposes only. See your database's documentation for details on how to generate unique keys in code. In many cases, the database can generate them automatically, or the database may provide a special syntax for dealing with sequences.)

    +

    A TQSqlQuery object is used to increment and retrieve a unique 'sequence' number for the author table. The signal passed us a pointer to the insertion buffer and we then put the value we've retrieved, i.e. the next sequence number, into the buffer's id field. (Again, note that SQL databases often support a native 'sequence' function. The method used here is inappropriate for production systems, and is for example purposes only. See your database's documentation for details on how to generate unique keys in code. In many cases, the database can generate them automatically, or the database may provide a special syntax for dealing with sequences.)

If we rebuild the application it will now support INSERT as well as UPDATE and DELETE. We could easily have added additional code to insert default values, e.g. today's date into a date field, if necessary.

-

Browsing is supported by clicking records and by using the arrow keys. Once a record is active (highlighted) we can edit the it. Press the Insert key to INSERT a new record; press F2 to UPDATE the current record; press the Del key to DELETE the current record. All these operations take place immediately. Users can be given the opportunity to confirm their edits by setting the TQDataTable's confirmEdits property to True. If the confirmEdits property is True then user confirmation will be required for all insertions, updates and deletes. For finer control you can set the confirmInsert, confirmUpdate and confirmDelete properties individually.

+

Browsing is supported by clicking records and by using the arrow keys. Once a record is active (highlighted) we can edit the it. Press the Insert key to INSERT a new record; press F2 to UPDATE the current record; press the Del key to DELETE the current record. All these operations take place immediately. Users can be given the opportunity to confirm their edits by setting the TQDataTable's confirmEdits property to True. If the confirmEdits property is True then user confirmation will be required for all insertions, updates and deletes. For finer control you can set the confirmInsert, confirmUpdate and confirmDelete properties individually.

-

TQDataTable User Interface Interaction

-

The default user-interface behavior for TQDataTables is as follows:

+

TQDataTable User Interface Interaction

+

The default user-interface behavior for TQDataTables is as follows:

  • Users can move to records by clicking the scrollbar and clicking records with the mouse. They can also use the keyboard's navigation keys, e.g. Left Arrow, Right Arrow, Up Arrow, Down Arrow, Page Up, Page Down, Home and End.

  • INSERT is initiated by right-clicking the record and clicking Insert or by pressing the Ins (Insert) key. The user moves between fields using Tab and Shift+Tab. The INSERT will take place if the user presses Enter or Tabs off the last field. If autoEdit is TRUE the insert will take place if the user navigates to another record. INSERT is cancelled by pressing Esc (Escape). If autoEdit is FALSE navigating to another record also cancels the INSERT. Setting confirmInsert to TRUE will require the user to confirm each INSERT.

  • UPDATE is initiated by right-clicking the record and clicking Update or by pressing F2. The update will take place if the user presses Enter or Tabs off the last field. If autoEdit is TRUE the update will take place if the user navigates to another record. UPDATE is cancelled by pressing Esc. If autoEdit is FALSE navigating to another record also cancels the UPDATE. Setting confirmUpdate to TRUE will require the user to confirm each UPDATE.

    @@ -172,25 +172,25 @@ bool createConnections()

You can change this default behavior programmatically if required.

Relating Two Tables Together (Master-Detail)

-

Databases often have pairs of tables that are related. For example, an invoice table might list the numbers, dates and customers for invoices, but not the actual invoice items, which an invoice item table might store. In the 'book' application we wish to have a TQDataTable that we can use to browse through the authors table and a second TQDataTable to show the books they've written.

-

Open the book project if it isn't already open TQt Designer. We will modify this project to show two TQDataTables that relate the author table to the book table.

-
  1. Click the author TQDataTable and then click the Break Layout toolbutton.

    +

    Databases often have pairs of tables that are related. For example, an invoice table might list the numbers, dates and customers for invoices, but not the actual invoice items, which an invoice item table might store. In the 'book' application we wish to have a TQDataTable that we can use to browse through the authors table and a second TQDataTable to show the books they've written.

    +

    Open the book project if it isn't already open TQt Designer. We will modify this project to show two TQDataTables that relate the author table to the book table.

    +
    1. Click the author TQDataTable and then click the Break Layout toolbutton.

    2. Resize the DataTable so that it only occupies the top half of the form.

    3. Now click on the DataTable toolbutton and click on the bottom half of the form. The Table Wizard will appear. (This Wizard is explained in Quickly Viewing a Database Table.)

      1. Click the connection you're using and click the book table. Click the Next button.

      2. Since we do not want them visible, make sure the authorid and id fields are moved to the Available Fields list box by using the arrow buttons. Move the title field to the top of the Displayed Fields, and move the price field above the notes field. Click the Next button.

      3. On the Table Properties page click the Read Only checkbox then click the Next button.

      4. On the SQL page we will leave the Filter (WHERE clause) empty. Move the title field to the Sort By list box and click Next. Now click Finish.

        -
      5. Change this TQDataTable's name to "BookDataTable".

        -
    4. Shift+Click the top TQDataTable so that both TQDataTables are selected and then click the Lay Out Vertically (in Splitter) toolbar button.

      +
    5. Change this TQDataTable's name to "BookDataTable".

      +
  2. Shift+Click the top TQDataTable so that both TQDataTables are selected and then click the Lay Out Vertically (in Splitter) toolbar button.

  3. Click on the form and click the Lay Out Vertically toolbar button.

    -

Preview the form by clicking Preview|Preview Form. All the authors are displayed in the top TQDataTable and all the books are displayed in the bottom TQDataTable. However we only want the books of the currently selected author showing in the bottom TQDataTable. We will deal with this by filtering the records in the book table according to the author selected in the author table.

+

Preview the form by clicking Preview|Preview Form. All the authors are displayed in the top TQDataTable and all the books are displayed in the bottom TQDataTable. However we only want the books of the currently selected author showing in the bottom TQDataTable. We will deal with this by filtering the records in the book table according to the author selected in the author table.

Using the Table Editor

Edit Table Dialog

-

TQDataTables are created and set up using the SQL Table Wizard. Like any other TQt Designer widget their properties may be changed in the Properties window. Some of the column and row based properties can also be be changed using the Edit Table dialog. This dialog is invoked by right clicking the TQDataTable and left clicking the Edit menu item. The right hand half of the Edit Table dialog is where we choose the fields we wish to display, their order and their labels. The procedure for creating columns is as follows:

+

TQDataTables are created and set up using the SQL Table Wizard. Like any other TQt Designer widget their properties may be changed in the Properties window. Some of the column and row based properties can also be be changed using the Edit Table dialog. This dialog is invoked by right clicking the TQDataTable and left clicking the Edit menu item. The right hand half of the Edit Table dialog is where we choose the fields we wish to display, their order and their labels. The procedure for creating columns is as follows:

  1. Click the New Column button.

  2. Drop down the Field combobox to list the available fields.

  3. Click the field you wish to include at this point.

    @@ -198,58 +198,58 @@ bool createConnections()
  4. Optionally click the Pixmap ellipsis (...) button to choose a pixmap to be displayed to the left of the column's label. (The ellipsis button appears when you click in the Value part of the Properties list by a pixmap or iconSet property.)

Repeat the steps listed above for each column you wish to add. Once all the fields have been added you can change their ordering by using the blue up and down arrow buttons. At any point you can press Apply to see how the table will look. Finally click the OK button to save the properties you have set. You can always return to the table editor to change these settings later.

-
Filtering One TQDataTable by Another
-

To filter the book table's records we need to capture the author TQDataTable's currentChanged() signal and change the BookDataTable's filter accordingly.

+
Filtering One TQDataTable by Another
+

To filter the book table's records we need to capture the author TQDataTable's currentChanged() signal and change the BookDataTable's filter accordingly.

  1. Click Edit|Slots. In the Edit Functions dialog click New Function and enter a slot name of newCurrentAuthor(TQSqlRecord*). Click OK.

  2. Click Edit|Connections to invoke the View and Edit Connections dialog. Create a new connection, connecting the AuthorDataTable's currentChanged() signal to the form's newCurrentAuthor() slot. Click OK.

  3. Click the Members tab of the Object Explorer window (click Window|Views|Object Explorer to make the window visible if necessary). Click the newCurrentAuthor() slot and an editor window will appear.

  4. We must change the BookForm::newCurrentAuthor() slot to specify the parameter name and perform the necessary action:

    -
        void BookForm::newCurrentAuthor( TQSqlRecord *author )
    +
        void BookForm::newCurrentAuthor( TQSqlRecord *author )
         {
    -        BookDataTable->setFilter( "authorid=" + author->value( "id" ).toString() );
    +        BookDataTable->setFilter( "authorid=" + author->value( "id" ).toString() );
             BookDataTable->refresh();
         }
     
    -

    All that's required now is to change the BookDataTable's filter and refresh the TQDataTable to show the results of the filter.

    +

    All that's required now is to change the BookDataTable's filter and refresh the TQDataTable to show the results of the filter.

Preparing the Interface for Drilldown
-

We can now browse and edit authors and see their books in the BookDataTable. In the next section we explore TQDataBrowser, which will allow us to drill down to a dialog through which we can edit books. For now we will add some buttons to the main BookForm which we will use to invoke the book editing dialog.

+

We can now browse and edit authors and see their books in the BookDataTable. In the next section we explore TQDataBrowser, which will allow us to drill down to a dialog through which we can edit books. For now we will add some buttons to the main BookForm which we will use to invoke the book editing dialog.

  1. Click the form, then click the Break Layout toolbar button. Resize the form to make room for some buttons at the bottom.

  2. Add two buttons to the bottom of the form. Change their names and labels to the following:

    • EditPushButton -- &Edit Books

    • QuitPushButton -- &Quit

    Hold down the Shift key and Click both buttons (i.e. Shift+Click the buttons) and click the Lay Out Horizontally toolbar button. Click the form and click the Lay Out Vertically toolbar button.

  3. We will provide the Quit button with functionality now and work on the rest shortly. Click Edit|Connections, then connect the the Quit button's clicked() signal to the form's accept() slot. Click OK.

    -

Using TQDataBrowser and TQDataView

+

Using TQDataBrowser and TQDataView

The Book Application's Edit Books Dialog

-

Drilling Down to a Form using TQDataBrowser

-
Setting up a TQDataBrowser
-

We will now create a new form to allow users to edit book records. Click the New toolbar button, click the Dialog template from the New File dialog and click OK. Change the name of the form to EditBookForm and its caption to 'Edit Books'. Click the Save toolbar button and call the file editbook.ui. Now that we have the form we can add a TQDataBrowser to show the book records.

+

Drilling Down to a Form using TQDataBrowser

+
Setting up a TQDataBrowser
+

We will now create a new form to allow users to edit book records. Click the New toolbar button, click the Dialog template from the New File dialog and click OK. Change the name of the form to EditBookForm and its caption to 'Edit Books'. Click the Save toolbar button and call the file editbook.ui. Now that we have the form we can add a TQDataBrowser to show the book records.

  1. Click the Data Browser toolbar button, then click the form. The Data Browser Wizard will appear.

    -
  2. The Database Connection and Table wizard page is used to set up a connection if one doesn't exist and to choose the table or view for the TQDataBrowser. (See Setting Up TQt Designer's Connections.)

    +
  3. The Database Connection and Table wizard page is used to set up a connection if one doesn't exist and to choose the table or view for the TQDataBrowser. (See Setting Up TQt Designer's Connections.)

    Click the connection you wish to use, listed in the Database Connection list box, e.g. "(default)". The available tables and views will appear in the Table list box. Click the book table and then click the Next button.

    -
  4. The Displayed Fields wizard page provides a means of selecting which fields should be displayed in the TQDataBrowser and in what order. By default all fields except the primary key (if there is one) are in the right hand Displayed Fields list box. The left and right blue arrow buttons can be used to move fields between the Displayed Fields and the Available Fields list boxes. The blue up and down arrow buttons are used to select the display order of the displayed fields.

    +
  5. The Displayed Fields wizard page provides a means of selecting which fields should be displayed in the TQDataBrowser and in what order. By default all fields except the primary key (if there is one) are in the right hand Displayed Fields list box. The left and right blue arrow buttons can be used to move fields between the Displayed Fields and the Available Fields list boxes. The blue up and down arrow buttons are used to select the display order of the displayed fields.

    We don't want to see the authorid foreign key field on the form, so move it to the Available Fields list box. Also, move the title field to the top of the Displayed Fields list. Click the Next button.

  6. The Navigation and Editing wizard page allows us to choose which navigation and editing buttons should appear on the form.

    We will accept the defaults and simply click the Next button.

    -
  7. The SQL wizard page is used to set the TQDataBrowser's Filter and Sort properties. The Filter is an SQL WHERE clause (without the word 'WHERE'). For example, to only list books that cost less than 50 (of some currency, e.g. dollars), we would enter price < 50. We will leave the filter empty. The Available Fields list box lists all the fields. The Sort By list box lists the fields that the TQDataBrowser is to sort by and the direction of their sorting (ASCending or DESCending). The left and right blue arrows are used to move fields between the two list boxes. The up and down blue arrows move fields up and down within the Sort By list box. The ASC or DESC setting is changed with the sort order button.

    +
  8. The SQL wizard page is used to set the TQDataBrowser's Filter and Sort properties. The Filter is an SQL WHERE clause (without the word 'WHERE'). For example, to only list books that cost less than 50 (of some currency, e.g. dollars), we would enter price < 50. We will leave the filter empty. The Available Fields list box lists all the fields. The Sort By list box lists the fields that the TQDataBrowser is to sort by and the direction of their sorting (ASCending or DESCending). The left and right blue arrows are used to move fields between the two list boxes. The up and down blue arrows move fields up and down within the Sort By list box. The ASC or DESC setting is changed with the sort order button.

    Move the title field into the Sort By list box and click Next.

  9. The Layout wizard page is used to specify the initial layout of the form.

    Change the Number of Columns to 1, then click Next. Now click Finish.

    -
  10. The TQDataBrowser will now appear on the form. Resize the form to make it smaller. Click the TQDataBrowser then click the Break Layout toolbar button. Click the buttons then click the Break Layout toolbar button. Add another button called 'PushButtonClose' with the text '&Close' and place it to the right of the Delete button.

    -
  11. Shift+Click the Insert, Update, Delete and Close buttons, then click the Lay Out Horizontally toolbar button. Click the TQDataBrowser, then click the Lay Out in a Grid toolbar button. Finally click the form and click the Lay Out Vertically toolbar button. Now click the TQDataBrowser and rename it 'BookDataBrowser'.

    +
  12. The TQDataBrowser will now appear on the form. Resize the form to make it smaller. Click the TQDataBrowser then click the Break Layout toolbar button. Click the buttons then click the Break Layout toolbar button. Add another button called 'PushButtonClose' with the text '&Close' and place it to the right of the Delete button.

    +
  13. Shift+Click the Insert, Update, Delete and Close buttons, then click the Lay Out Horizontally toolbar button. Click the TQDataBrowser, then click the Lay Out in a Grid toolbar button. Finally click the form and click the Lay Out Vertically toolbar button. Now click the TQDataBrowser and rename it 'BookDataBrowser'.

  14. TQt Designer will generate the necessary code to make the browser operational (including generating the appropriate cursor, sort and filter code).

    For finer control over the form, we will be creating our own database cursor. Therefore, set the BookDataBrowser's frameworkCode property to FALSE in the Properties window to prevent TQt Designer from generating redundant code for the cursor.

-

TQDataBrowser User Interface Interaction

-

The user-interface behavior for TQDataBrowsers is created by connecting slots and signals. The slots provided are:

+

TQDataBrowser User Interface Interaction

+

The user-interface behavior for TQDataBrowsers is created by connecting slots and signals. The slots provided are:

  • insert(), update() and del() for editing;

  • first(), next(), prev(), and last() for navigation;

  • refresh() to refresh the cursor from the database;

  • readFields() to read data from the cursor's edit buffer and writeFields() to write the form's data to the cursor's edit buffer;

  • clearValues() to clear the form's values.

    -

If you use TQt Designer's TQDataBrowser wizard you will be given the option of creating a default set of buttons for navigation and editing. The behavior of these buttons is set up using the slots described above to provide the following functionality:

+

If you use TQt Designer's TQDataBrowser wizard you will be given the option of creating a default set of buttons for navigation and editing. The behavior of these buttons is set up using the slots described above to provide the following functionality:

  • TQTextDrag -
  • TQEditorFactory +
  • TQEditorFactory
  • TQEventLoop
      @@ -371,9 +371,9 @@ classes in the TQt API.
    • TQSocket
    • TQSocketNotifier
    • TQSound -
    • TQSqlDatabase -
    • TQSqlDriver -
    • TQSqlForm +
    • TQSqlDatabase +
    • TQSqlDriver +
    • TQSqlForm
    • TQStyle
    • TQComboBox -
    • TQDataBrowser -
    • TQDataView +
    • TQDataBrowser +
    • TQDataView
    • TQDateTimeEdit
    • TQDateTimeEditBase
        @@ -473,7 +473,7 @@ classes in the TQt API.
      • TQListView
      • TQTable
      • TQTextEdit
          diff --git a/doc/html/index b/doc/html/index index b1e2ac680..a281b7085 100644 --- a/doc/html/index +++ b/doc/html/index @@ -1206,76 +1206,76 @@ "QCustomMenuItem::setFont" qcustommenuitem.html#setFont "QCustomMenuItem::sizeHint" qcustommenuitem.html#sizeHint "QCustomMenuItem::~QCustomMenuItem" qcustommenuitem.html#~QCustomMenuItem -"QDataBrowser" ntqdatabrowser.html -"QDataBrowser::Boundary" ntqdatabrowser.html#Boundary -"QDataBrowser::autoEdit" ntqdatabrowser.html#autoEdit -"QDataBrowser::autoEdit" ntqdatabrowser.html#autoEdit-prop -"QDataBrowser::beforeDelete" ntqdatabrowser.html#beforeDelete -"QDataBrowser::beforeInsert" ntqdatabrowser.html#beforeInsert -"QDataBrowser::beforeUpdate" ntqdatabrowser.html#beforeUpdate -"QDataBrowser::boundary" ntqdatabrowser.html#boundary -"QDataBrowser::boundaryChecking" ntqdatabrowser.html#boundaryChecking -"QDataBrowser::boundaryChecking" ntqdatabrowser.html#boundaryChecking-prop -"QDataBrowser::clearValues" ntqdatabrowser.html#clearValues -"QDataBrowser::confirmCancel" ntqdatabrowser.html#confirmCancel -"QDataBrowser::confirmCancels" ntqdatabrowser.html#confirmCancels -"QDataBrowser::confirmCancels" ntqdatabrowser.html#confirmCancels-prop -"QDataBrowser::confirmDelete" ntqdatabrowser.html#confirmDelete -"QDataBrowser::confirmDelete" ntqdatabrowser.html#confirmDelete-prop -"QDataBrowser::confirmEdit" ntqdatabrowser.html#confirmEdit -"QDataBrowser::confirmEdits" ntqdatabrowser.html#confirmEdits -"QDataBrowser::confirmEdits" ntqdatabrowser.html#confirmEdits-prop -"QDataBrowser::confirmInsert" ntqdatabrowser.html#confirmInsert -"QDataBrowser::confirmInsert" ntqdatabrowser.html#confirmInsert-prop -"QDataBrowser::confirmUpdate" ntqdatabrowser.html#confirmUpdate -"QDataBrowser::confirmUpdate" ntqdatabrowser.html#confirmUpdate-prop -"QDataBrowser::currentChanged" ntqdatabrowser.html#currentChanged -"QDataBrowser::currentEdited" ntqdatabrowser.html#currentEdited -"QDataBrowser::cursorChanged" ntqdatabrowser.html#cursorChanged -"QDataBrowser::del" ntqdatabrowser.html#del -"QDataBrowser::deleteCurrent" ntqdatabrowser.html#deleteCurrent -"QDataBrowser::filter" ntqdatabrowser.html#filter -"QDataBrowser::filter" ntqdatabrowser.html#filter-prop -"QDataBrowser::first" ntqdatabrowser.html#first -"QDataBrowser::firstRecordAvailable" ntqdatabrowser.html#firstRecordAvailable -"QDataBrowser::form" ntqdatabrowser.html#form -"QDataBrowser::handleError" ntqdatabrowser.html#handleError -"QDataBrowser::insert" ntqdatabrowser.html#insert -"QDataBrowser::insertCurrent" ntqdatabrowser.html#insertCurrent -"QDataBrowser::isReadOnly" ntqdatabrowser.html#isReadOnly -"QDataBrowser::last" ntqdatabrowser.html#last -"QDataBrowser::lastRecordAvailable" ntqdatabrowser.html#lastRecordAvailable -"QDataBrowser::next" ntqdatabrowser.html#next -"QDataBrowser::nextRecordAvailable" ntqdatabrowser.html#nextRecordAvailable -"QDataBrowser::prev" ntqdatabrowser.html#prev -"QDataBrowser::prevRecordAvailable" ntqdatabrowser.html#prevRecordAvailable -"QDataBrowser::primeDelete" ntqdatabrowser.html#primeDelete -"QDataBrowser::primeInsert" ntqdatabrowser.html#primeInsert -"QDataBrowser::primeUpdate" ntqdatabrowser.html#primeUpdate -"QDataBrowser::readFields" ntqdatabrowser.html#readFields -"QDataBrowser::readOnly" ntqdatabrowser.html#readOnly-prop -"QDataBrowser::refresh" ntqdatabrowser.html#refresh -"QDataBrowser::seek" ntqdatabrowser.html#seek -"QDataBrowser::setAutoEdit" ntqdatabrowser.html#setAutoEdit -"QDataBrowser::setBoundaryChecking" ntqdatabrowser.html#setBoundaryChecking -"QDataBrowser::setConfirmCancels" ntqdatabrowser.html#setConfirmCancels -"QDataBrowser::setConfirmDelete" ntqdatabrowser.html#setConfirmDelete -"QDataBrowser::setConfirmEdits" ntqdatabrowser.html#setConfirmEdits -"QDataBrowser::setConfirmInsert" ntqdatabrowser.html#setConfirmInsert -"QDataBrowser::setConfirmUpdate" ntqdatabrowser.html#setConfirmUpdate -"QDataBrowser::setFilter" ntqdatabrowser.html#setFilter -"QDataBrowser::setForm" ntqdatabrowser.html#setForm -"QDataBrowser::setReadOnly" ntqdatabrowser.html#setReadOnly -"QDataBrowser::setSort" ntqdatabrowser.html#setSort -"QDataBrowser::setSqlCursor" ntqdatabrowser.html#setSqlCursor -"QDataBrowser::sort" ntqdatabrowser.html#sort -"QDataBrowser::sort" ntqdatabrowser.html#sort-prop -"QDataBrowser::sqlCursor" ntqdatabrowser.html#sqlCursor -"QDataBrowser::update" ntqdatabrowser.html#update -"QDataBrowser::updateBoundary" ntqdatabrowser.html#updateBoundary -"QDataBrowser::updateCurrent" ntqdatabrowser.html#updateCurrent -"QDataBrowser::writeFields" ntqdatabrowser.html#writeFields -"QDataBrowser::~QDataBrowser" ntqdatabrowser.html#~QDataBrowser +"TQDataBrowser" tqdatabrowser.html +"TQDataBrowser::Boundary" tqdatabrowser.html#Boundary +"TQDataBrowser::autoEdit" tqdatabrowser.html#autoEdit +"TQDataBrowser::autoEdit" tqdatabrowser.html#autoEdit-prop +"TQDataBrowser::beforeDelete" tqdatabrowser.html#beforeDelete +"TQDataBrowser::beforeInsert" tqdatabrowser.html#beforeInsert +"TQDataBrowser::beforeUpdate" tqdatabrowser.html#beforeUpdate +"TQDataBrowser::boundary" tqdatabrowser.html#boundary +"TQDataBrowser::boundaryChecking" tqdatabrowser.html#boundaryChecking +"TQDataBrowser::boundaryChecking" tqdatabrowser.html#boundaryChecking-prop +"TQDataBrowser::clearValues" tqdatabrowser.html#clearValues +"TQDataBrowser::confirmCancel" tqdatabrowser.html#confirmCancel +"TQDataBrowser::confirmCancels" tqdatabrowser.html#confirmCancels +"TQDataBrowser::confirmCancels" tqdatabrowser.html#confirmCancels-prop +"TQDataBrowser::confirmDelete" tqdatabrowser.html#confirmDelete +"TQDataBrowser::confirmDelete" tqdatabrowser.html#confirmDelete-prop +"TQDataBrowser::confirmEdit" tqdatabrowser.html#confirmEdit +"TQDataBrowser::confirmEdits" tqdatabrowser.html#confirmEdits +"TQDataBrowser::confirmEdits" tqdatabrowser.html#confirmEdits-prop +"TQDataBrowser::confirmInsert" tqdatabrowser.html#confirmInsert +"TQDataBrowser::confirmInsert" tqdatabrowser.html#confirmInsert-prop +"TQDataBrowser::confirmUpdate" tqdatabrowser.html#confirmUpdate +"TQDataBrowser::confirmUpdate" tqdatabrowser.html#confirmUpdate-prop +"TQDataBrowser::currentChanged" tqdatabrowser.html#currentChanged +"TQDataBrowser::currentEdited" tqdatabrowser.html#currentEdited +"TQDataBrowser::cursorChanged" tqdatabrowser.html#cursorChanged +"TQDataBrowser::del" tqdatabrowser.html#del +"TQDataBrowser::deleteCurrent" tqdatabrowser.html#deleteCurrent +"TQDataBrowser::filter" tqdatabrowser.html#filter +"TQDataBrowser::filter" tqdatabrowser.html#filter-prop +"TQDataBrowser::first" tqdatabrowser.html#first +"TQDataBrowser::firstRecordAvailable" tqdatabrowser.html#firstRecordAvailable +"TQDataBrowser::form" tqdatabrowser.html#form +"TQDataBrowser::handleError" tqdatabrowser.html#handleError +"TQDataBrowser::insert" tqdatabrowser.html#insert +"TQDataBrowser::insertCurrent" tqdatabrowser.html#insertCurrent +"TQDataBrowser::isReadOnly" tqdatabrowser.html#isReadOnly +"TQDataBrowser::last" tqdatabrowser.html#last +"TQDataBrowser::lastRecordAvailable" tqdatabrowser.html#lastRecordAvailable +"TQDataBrowser::next" tqdatabrowser.html#next +"TQDataBrowser::nextRecordAvailable" tqdatabrowser.html#nextRecordAvailable +"TQDataBrowser::prev" tqdatabrowser.html#prev +"TQDataBrowser::prevRecordAvailable" tqdatabrowser.html#prevRecordAvailable +"TQDataBrowser::primeDelete" tqdatabrowser.html#primeDelete +"TQDataBrowser::primeInsert" tqdatabrowser.html#primeInsert +"TQDataBrowser::primeUpdate" tqdatabrowser.html#primeUpdate +"TQDataBrowser::readFields" tqdatabrowser.html#readFields +"TQDataBrowser::readOnly" tqdatabrowser.html#readOnly-prop +"TQDataBrowser::refresh" tqdatabrowser.html#refresh +"TQDataBrowser::seek" tqdatabrowser.html#seek +"TQDataBrowser::setAutoEdit" tqdatabrowser.html#setAutoEdit +"TQDataBrowser::setBoundaryChecking" tqdatabrowser.html#setBoundaryChecking +"TQDataBrowser::setConfirmCancels" tqdatabrowser.html#setConfirmCancels +"TQDataBrowser::setConfirmDelete" tqdatabrowser.html#setConfirmDelete +"TQDataBrowser::setConfirmEdits" tqdatabrowser.html#setConfirmEdits +"TQDataBrowser::setConfirmInsert" tqdatabrowser.html#setConfirmInsert +"TQDataBrowser::setConfirmUpdate" tqdatabrowser.html#setConfirmUpdate +"TQDataBrowser::setFilter" tqdatabrowser.html#setFilter +"TQDataBrowser::setForm" tqdatabrowser.html#setForm +"TQDataBrowser::setReadOnly" tqdatabrowser.html#setReadOnly +"TQDataBrowser::setSort" tqdatabrowser.html#setSort +"TQDataBrowser::setSqlCursor" tqdatabrowser.html#setSqlCursor +"TQDataBrowser::sort" tqdatabrowser.html#sort +"TQDataBrowser::sort" tqdatabrowser.html#sort-prop +"TQDataBrowser::sqlCursor" tqdatabrowser.html#sqlCursor +"TQDataBrowser::update" tqdatabrowser.html#update +"TQDataBrowser::updateBoundary" tqdatabrowser.html#updateBoundary +"TQDataBrowser::updateCurrent" tqdatabrowser.html#updateCurrent +"TQDataBrowser::writeFields" tqdatabrowser.html#writeFields +"TQDataBrowser::~TQDataBrowser" tqdatabrowser.html#~TQDataBrowser "QDataSink::eof" qdatasink.html#eof "QDataSink::maybeReady" qdatasink.html#maybeReady "QDataSink::readyToReceive" qdatasink.html#readyToReceive @@ -1305,99 +1305,99 @@ "QDataStream::writeBytes" ntqdatastream.html#writeBytes "QDataStream::writeRawBytes" ntqdatastream.html#writeRawBytes "QDataStream::~QDataStream" ntqdatastream.html#~QDataStream -"QDataTable" ntqdatatable.html -"QDataTable::Refresh" ntqdatatable.html#Refresh -"QDataTable::addColumn" ntqdatatable.html#addColumn -"QDataTable::adjustColumn" ntqdatatable.html#adjustColumn -"QDataTable::autoDelete" ntqdatatable.html#autoDelete -"QDataTable::autoEdit" ntqdatatable.html#autoEdit -"QDataTable::autoEdit" ntqdatatable.html#autoEdit-prop -"QDataTable::beforeDelete" ntqdatatable.html#beforeDelete -"QDataTable::beforeInsert" ntqdatatable.html#beforeInsert -"QDataTable::beforeUpdate" ntqdatatable.html#beforeUpdate -"QDataTable::beginInsert" ntqdatatable.html#beginInsert -"QDataTable::beginUpdate" ntqdatatable.html#beginUpdate -"QDataTable::confirmCancel" ntqdatatable.html#confirmCancel -"QDataTable::confirmCancels" ntqdatatable.html#confirmCancels -"QDataTable::confirmCancels" ntqdatatable.html#confirmCancels-prop -"QDataTable::confirmDelete" ntqdatatable.html#confirmDelete -"QDataTable::confirmDelete" ntqdatatable.html#confirmDelete-prop -"QDataTable::confirmEdit" ntqdatatable.html#confirmEdit -"QDataTable::confirmEdits" ntqdatatable.html#confirmEdits -"QDataTable::confirmEdits" ntqdatatable.html#confirmEdits-prop -"QDataTable::confirmInsert" ntqdatatable.html#confirmInsert -"QDataTable::confirmInsert" ntqdatatable.html#confirmInsert-prop -"QDataTable::confirmUpdate" ntqdatatable.html#confirmUpdate -"QDataTable::confirmUpdate" ntqdatatable.html#confirmUpdate-prop -"QDataTable::currentChanged" ntqdatatable.html#currentChanged -"QDataTable::currentRecord" ntqdatatable.html#currentRecord -"QDataTable::cursorChanged" ntqdatatable.html#cursorChanged -"QDataTable::dateFormat" ntqdatatable.html#dateFormat -"QDataTable::dateFormat" ntqdatatable.html#dateFormat-prop -"QDataTable::deleteCurrent" ntqdatatable.html#deleteCurrent -"QDataTable::falseText" ntqdatatable.html#falseText -"QDataTable::falseText" ntqdatatable.html#falseText-prop -"QDataTable::fieldAlignment" ntqdatatable.html#fieldAlignment -"QDataTable::filter" ntqdatatable.html#filter -"QDataTable::filter" ntqdatatable.html#filter-prop -"QDataTable::find" ntqdatatable.html#find -"QDataTable::handleError" ntqdatatable.html#handleError -"QDataTable::indexOf" ntqdatatable.html#indexOf -"QDataTable::insertCurrent" ntqdatatable.html#insertCurrent -"QDataTable::installEditorFactory" ntqdatatable.html#installEditorFactory -"QDataTable::installPropertyMap" ntqdatatable.html#installPropertyMap -"QDataTable::nullText" ntqdatatable.html#nullText -"QDataTable::nullText" ntqdatatable.html#nullText-prop -"QDataTable::numCols" ntqdatatable.html#numCols -"QDataTable::numCols" ntqdatatable.html#numCols-prop -"QDataTable::numRows" ntqdatatable.html#numRows -"QDataTable::numRows" ntqdatatable.html#numRows-prop -"QDataTable::paintField" ntqdatatable.html#paintField -"QDataTable::primeDelete" ntqdatatable.html#primeDelete -"QDataTable::primeInsert" ntqdatatable.html#primeInsert -"QDataTable::primeUpdate" ntqdatatable.html#primeUpdate -"QDataTable::refresh" ntqdatatable.html#refresh -"QDataTable::removeColumn" ntqdatatable.html#removeColumn -"QDataTable::reset" ntqdatatable.html#reset -"QDataTable::setAutoDelete" ntqdatatable.html#setAutoDelete -"QDataTable::setAutoEdit" ntqdatatable.html#setAutoEdit -"QDataTable::setColumn" ntqdatatable.html#setColumn -"QDataTable::setColumnWidth" ntqdatatable.html#setColumnWidth -"QDataTable::setConfirmCancels" ntqdatatable.html#setConfirmCancels -"QDataTable::setConfirmDelete" ntqdatatable.html#setConfirmDelete -"QDataTable::setConfirmEdits" ntqdatatable.html#setConfirmEdits -"QDataTable::setConfirmInsert" ntqdatatable.html#setConfirmInsert -"QDataTable::setConfirmUpdate" ntqdatatable.html#setConfirmUpdate -"QDataTable::setDateFormat" ntqdatatable.html#setDateFormat -"QDataTable::setFalseText" ntqdatatable.html#setFalseText -"QDataTable::setFilter" ntqdatatable.html#setFilter -"QDataTable::setNullText" ntqdatatable.html#setNullText -"QDataTable::setSize" ntqdatatable.html#setSize -"QDataTable::setSort" ntqdatatable.html#setSort -"QDataTable::setSqlCursor" ntqdatatable.html#setSqlCursor -"QDataTable::setTrueText" ntqdatatable.html#setTrueText -"QDataTable::sort" ntqdatatable.html#sort -"QDataTable::sort" ntqdatatable.html#sort-prop -"QDataTable::sortAscending" ntqdatatable.html#sortAscending -"QDataTable::sortColumn" ntqdatatable.html#sortColumn -"QDataTable::sortDescending" ntqdatatable.html#sortDescending -"QDataTable::sqlCursor" ntqdatatable.html#sqlCursor -"QDataTable::text" ntqdatatable.html#text -"QDataTable::trueText" ntqdatatable.html#trueText -"QDataTable::trueText" ntqdatatable.html#trueText-prop -"QDataTable::updateCurrent" ntqdatatable.html#updateCurrent -"QDataTable::value" ntqdatatable.html#value -"QDataTable::~QDataTable" ntqdatatable.html#~QDataTable -"QDataView" ntqdataview.html -"QDataView::clearValues" ntqdataview.html#clearValues -"QDataView::form" ntqdataview.html#form -"QDataView::readFields" ntqdataview.html#readFields -"QDataView::record" ntqdataview.html#record -"QDataView::refresh" ntqdataview.html#refresh -"QDataView::setForm" ntqdataview.html#setForm -"QDataView::setRecord" ntqdataview.html#setRecord -"QDataView::writeFields" ntqdataview.html#writeFields -"QDataView::~QDataView" ntqdataview.html#~QDataView +"TQDataTable" tqdatatable.html +"TQDataTable::Refresh" tqdatatable.html#Refresh +"TQDataTable::addColumn" tqdatatable.html#addColumn +"TQDataTable::adjustColumn" tqdatatable.html#adjustColumn +"TQDataTable::autoDelete" tqdatatable.html#autoDelete +"TQDataTable::autoEdit" tqdatatable.html#autoEdit +"TQDataTable::autoEdit" tqdatatable.html#autoEdit-prop +"TQDataTable::beforeDelete" tqdatatable.html#beforeDelete +"TQDataTable::beforeInsert" tqdatatable.html#beforeInsert +"TQDataTable::beforeUpdate" tqdatatable.html#beforeUpdate +"TQDataTable::beginInsert" tqdatatable.html#beginInsert +"TQDataTable::beginUpdate" tqdatatable.html#beginUpdate +"TQDataTable::confirmCancel" tqdatatable.html#confirmCancel +"TQDataTable::confirmCancels" tqdatatable.html#confirmCancels +"TQDataTable::confirmCancels" tqdatatable.html#confirmCancels-prop +"TQDataTable::confirmDelete" tqdatatable.html#confirmDelete +"TQDataTable::confirmDelete" tqdatatable.html#confirmDelete-prop +"TQDataTable::confirmEdit" tqdatatable.html#confirmEdit +"TQDataTable::confirmEdits" tqdatatable.html#confirmEdits +"TQDataTable::confirmEdits" tqdatatable.html#confirmEdits-prop +"TQDataTable::confirmInsert" tqdatatable.html#confirmInsert +"TQDataTable::confirmInsert" tqdatatable.html#confirmInsert-prop +"TQDataTable::confirmUpdate" tqdatatable.html#confirmUpdate +"TQDataTable::confirmUpdate" tqdatatable.html#confirmUpdate-prop +"TQDataTable::currentChanged" tqdatatable.html#currentChanged +"TQDataTable::currentRecord" tqdatatable.html#currentRecord +"TQDataTable::cursorChanged" tqdatatable.html#cursorChanged +"TQDataTable::dateFormat" tqdatatable.html#dateFormat +"TQDataTable::dateFormat" tqdatatable.html#dateFormat-prop +"TQDataTable::deleteCurrent" tqdatatable.html#deleteCurrent +"TQDataTable::falseText" tqdatatable.html#falseText +"TQDataTable::falseText" tqdatatable.html#falseText-prop +"TQDataTable::fieldAlignment" tqdatatable.html#fieldAlignment +"TQDataTable::filter" tqdatatable.html#filter +"TQDataTable::filter" tqdatatable.html#filter-prop +"TQDataTable::find" tqdatatable.html#find +"TQDataTable::handleError" tqdatatable.html#handleError +"TQDataTable::indexOf" tqdatatable.html#indexOf +"TQDataTable::insertCurrent" tqdatatable.html#insertCurrent +"TQDataTable::installEditorFactory" tqdatatable.html#installEditorFactory +"TQDataTable::installPropertyMap" tqdatatable.html#installPropertyMap +"TQDataTable::nullText" tqdatatable.html#nullText +"TQDataTable::nullText" tqdatatable.html#nullText-prop +"TQDataTable::numCols" tqdatatable.html#numCols +"TQDataTable::numCols" tqdatatable.html#numCols-prop +"TQDataTable::numRows" tqdatatable.html#numRows +"TQDataTable::numRows" tqdatatable.html#numRows-prop +"TQDataTable::paintField" tqdatatable.html#paintField +"TQDataTable::primeDelete" tqdatatable.html#primeDelete +"TQDataTable::primeInsert" tqdatatable.html#primeInsert +"TQDataTable::primeUpdate" tqdatatable.html#primeUpdate +"TQDataTable::refresh" tqdatatable.html#refresh +"TQDataTable::removeColumn" tqdatatable.html#removeColumn +"TQDataTable::reset" tqdatatable.html#reset +"TQDataTable::setAutoDelete" tqdatatable.html#setAutoDelete +"TQDataTable::setAutoEdit" tqdatatable.html#setAutoEdit +"TQDataTable::setColumn" tqdatatable.html#setColumn +"TQDataTable::setColumnWidth" tqdatatable.html#setColumnWidth +"TQDataTable::setConfirmCancels" tqdatatable.html#setConfirmCancels +"TQDataTable::setConfirmDelete" tqdatatable.html#setConfirmDelete +"TQDataTable::setConfirmEdits" tqdatatable.html#setConfirmEdits +"TQDataTable::setConfirmInsert" tqdatatable.html#setConfirmInsert +"TQDataTable::setConfirmUpdate" tqdatatable.html#setConfirmUpdate +"TQDataTable::setDateFormat" tqdatatable.html#setDateFormat +"TQDataTable::setFalseText" tqdatatable.html#setFalseText +"TQDataTable::setFilter" tqdatatable.html#setFilter +"TQDataTable::setNullText" tqdatatable.html#setNullText +"TQDataTable::setSize" tqdatatable.html#setSize +"TQDataTable::setSort" tqdatatable.html#setSort +"TQDataTable::setSqlCursor" tqdatatable.html#setSqlCursor +"TQDataTable::setTrueText" tqdatatable.html#setTrueText +"TQDataTable::sort" tqdatatable.html#sort +"TQDataTable::sort" tqdatatable.html#sort-prop +"TQDataTable::sortAscending" tqdatatable.html#sortAscending +"TQDataTable::sortColumn" tqdatatable.html#sortColumn +"TQDataTable::sortDescending" tqdatatable.html#sortDescending +"TQDataTable::sqlCursor" tqdatatable.html#sqlCursor +"TQDataTable::text" tqdatatable.html#text +"TQDataTable::trueText" tqdatatable.html#trueText +"TQDataTable::trueText" tqdatatable.html#trueText-prop +"TQDataTable::updateCurrent" tqdatatable.html#updateCurrent +"TQDataTable::value" tqdatatable.html#value +"TQDataTable::~TQDataTable" tqdatatable.html#~TQDataTable +"TQDataView" tqdataview.html +"TQDataView::clearValues" tqdataview.html#clearValues +"TQDataView::form" tqdataview.html#form +"TQDataView::readFields" tqdataview.html#readFields +"TQDataView::record" tqdataview.html#record +"TQDataView::refresh" tqdataview.html#refresh +"TQDataView::setForm" tqdataview.html#setForm +"TQDataView::setRecord" tqdataview.html#setRecord +"TQDataView::writeFields" tqdataview.html#writeFields +"TQDataView::~TQDataView" tqdataview.html#~TQDataView "QDate" qdate.html "QDate::addDays" qdate.html#addDays "QDate::addMonths" qdate.html#addMonths @@ -2019,11 +2019,11 @@ "QDropEvent::setPoint" qdropevent.html#setPoint "QDropEvent::source" qdropevent.html#source "QDropSite::~QDropSite" ntqdropsite.html#~QDropSite -"QEditorFactory" ntqeditorfactory.html -"QEditorFactory::createEditor" ntqeditorfactory.html#createEditor -"QEditorFactory::defaultFactory" ntqeditorfactory.html#defaultFactory -"QEditorFactory::installDefaultFactory" ntqeditorfactory.html#installDefaultFactory -"QEditorFactory::~QEditorFactory" ntqeditorfactory.html#~QEditorFactory +"TQEditorFactory" tqeditorfactory.html +"TQEditorFactory::createEditor" tqeditorfactory.html#createEditor +"TQEditorFactory::defaultFactory" tqeditorfactory.html#defaultFactory +"TQEditorFactory::installDefaultFactory" tqeditorfactory.html#installDefaultFactory +"TQEditorFactory::~TQEditorFactory" tqeditorfactory.html#~TQEditorFactory "QEmbed - File and Image Embedder" qembed.html "QErrorMessage" ntqerrormessage.html "QErrorMessage::message" ntqerrormessage.html#message @@ -5815,288 +5815,288 @@ "QSplitter::setSizes" ntqsplitter.html#setSizes "QSplitter::sizes" ntqsplitter.html#sizes "QSplitter::~QSplitter" ntqsplitter.html#~QSplitter -"QSql" ntqsql.html -"QSql::Confirm" ntqsql.html#Confirm -"QSql::Location" ntqsql.html#Location -"QSql::Op" ntqsql.html#Op -"QSql::ParameterType" ntqsql.html#ParameterType -"QSql::TableType" ntqsql.html#TableType -"QSqlCursor" ntqsqlcursor.html -"QSqlCursor::Mode" ntqsqlcursor.html#Mode -"QSqlCursor::append" ntqsqlcursor.html#append -"QSqlCursor::calculateField" ntqsqlcursor.html#calculateField -"QSqlCursor::canDelete" ntqsqlcursor.html#canDelete -"QSqlCursor::canInsert" ntqsqlcursor.html#canInsert -"QSqlCursor::canUpdate" ntqsqlcursor.html#canUpdate -"QSqlCursor::clear" ntqsqlcursor.html#clear -"QSqlCursor::del" ntqsqlcursor.html#del -"QSqlCursor::editBuffer" ntqsqlcursor.html#editBuffer -"QSqlCursor::filter" ntqsqlcursor.html#filter -"QSqlCursor::index" ntqsqlcursor.html#index -"QSqlCursor::insert" ntqsqlcursor.html#insert -"QSqlCursor::isCalculated" ntqsqlcursor.html#isCalculated -"QSqlCursor::isNull" ntqsqlcursor.html#isNull -"QSqlCursor::isReadOnly" ntqsqlcursor.html#isReadOnly -"QSqlCursor::isTrimmed" ntqsqlcursor.html#isTrimmed -"QSqlCursor::mode" ntqsqlcursor.html#mode -"QSqlCursor::name" ntqsqlcursor.html#name -"QSqlCursor::operator=" ntqsqlcursor.html#operator-eq -"QSqlCursor::primaryIndex" ntqsqlcursor.html#primaryIndex -"QSqlCursor::primeDelete" ntqsqlcursor.html#primeDelete -"QSqlCursor::primeInsert" ntqsqlcursor.html#primeInsert -"QSqlCursor::primeUpdate" ntqsqlcursor.html#primeUpdate -"QSqlCursor::remove" ntqsqlcursor.html#remove -"QSqlCursor::select" ntqsqlcursor.html#select -"QSqlCursor::setCalculated" ntqsqlcursor.html#setCalculated -"QSqlCursor::setFilter" ntqsqlcursor.html#setFilter -"QSqlCursor::setGenerated" ntqsqlcursor.html#setGenerated -"QSqlCursor::setMode" ntqsqlcursor.html#setMode -"QSqlCursor::setName" ntqsqlcursor.html#setName -"QSqlCursor::setPrimaryIndex" ntqsqlcursor.html#setPrimaryIndex -"QSqlCursor::setSort" ntqsqlcursor.html#setSort -"QSqlCursor::setTrimmed" ntqsqlcursor.html#setTrimmed -"QSqlCursor::sort" ntqsqlcursor.html#sort -"QSqlCursor::toString" ntqsqlcursor.html#toString -"QSqlCursor::update" ntqsqlcursor.html#update -"QSqlCursor::~QSqlCursor" ntqsqlcursor.html#~QSqlCursor -"QSqlDatabase" ntqsqldatabase.html -"QSqlDatabase::addDatabase" ntqsqldatabase.html#addDatabase -"QSqlDatabase::close" ntqsqldatabase.html#close -"QSqlDatabase::commit" ntqsqldatabase.html#commit -"QSqlDatabase::connectOptions" ntqsqldatabase.html#connectOptions -"QSqlDatabase::connectOptions" ntqsqldatabase.html#connectOptions-prop -"QSqlDatabase::contains" ntqsqldatabase.html#contains -"QSqlDatabase::database" ntqsqldatabase.html#database -"QSqlDatabase::databaseName" ntqsqldatabase.html#databaseName -"QSqlDatabase::databaseName" ntqsqldatabase.html#databaseName-prop -"QSqlDatabase::driver" ntqsqldatabase.html#driver -"QSqlDatabase::driverName" ntqsqldatabase.html#driverName -"QSqlDatabase::drivers" ntqsqldatabase.html#drivers -"QSqlDatabase::exec" ntqsqldatabase.html#exec -"QSqlDatabase::hostName" ntqsqldatabase.html#hostName -"QSqlDatabase::hostName" ntqsqldatabase.html#hostName-prop -"QSqlDatabase::isDriverAvailable" ntqsqldatabase.html#isDriverAvailable -"QSqlDatabase::isOpen" ntqsqldatabase.html#isOpen -"QSqlDatabase::isOpenError" ntqsqldatabase.html#isOpenError -"QSqlDatabase::lastError" ntqsqldatabase.html#lastError -"QSqlDatabase::open" ntqsqldatabase.html#open -"QSqlDatabase::password" ntqsqldatabase.html#password -"QSqlDatabase::password" ntqsqldatabase.html#password-prop -"QSqlDatabase::port" ntqsqldatabase.html#port -"QSqlDatabase::port" ntqsqldatabase.html#port-prop -"QSqlDatabase::primaryIndex" ntqsqldatabase.html#primaryIndex -"QSqlDatabase::record" ntqsqldatabase.html#record -"QSqlDatabase::recordInfo" ntqsqldatabase.html#recordInfo -"QSqlDatabase::registerSqlDriver" ntqsqldatabase.html#registerSqlDriver -"QSqlDatabase::removeDatabase" ntqsqldatabase.html#removeDatabase -"QSqlDatabase::rollback" ntqsqldatabase.html#rollback -"QSqlDatabase::setConnectOptions" ntqsqldatabase.html#setConnectOptions -"QSqlDatabase::setDatabaseName" ntqsqldatabase.html#setDatabaseName -"QSqlDatabase::setHostName" ntqsqldatabase.html#setHostName -"QSqlDatabase::setPassword" ntqsqldatabase.html#setPassword -"QSqlDatabase::setPort" ntqsqldatabase.html#setPort -"QSqlDatabase::setUserName" ntqsqldatabase.html#setUserName -"QSqlDatabase::tables" ntqsqldatabase.html#tables -"QSqlDatabase::transaction" ntqsqldatabase.html#transaction -"QSqlDatabase::userName" ntqsqldatabase.html#userName -"QSqlDatabase::userName" ntqsqldatabase.html#userName-prop -"QSqlDatabase::~QSqlDatabase" ntqsqldatabase.html#~QSqlDatabase -"QSqlDriver" ntqsqldriver.html -"QSqlDriver::DriverFeature" ntqsqldriver.html#DriverFeature -"QSqlDriver::beginTransaction" ntqsqldriver.html#beginTransaction -"QSqlDriver::close" ntqsqldriver.html#close -"QSqlDriver::commitTransaction" ntqsqldriver.html#commitTransaction -"QSqlDriver::createQuery" ntqsqldriver.html#createQuery -"QSqlDriver::formatValue" ntqsqldriver.html#formatValue -"QSqlDriver::hasFeature" ntqsqldriver.html#hasFeature -"QSqlDriver::isOpen" ntqsqldriver.html#isOpen -"QSqlDriver::isOpenError" ntqsqldriver.html#isOpenError -"QSqlDriver::lastError" ntqsqldriver.html#lastError -"QSqlDriver::nullText" ntqsqldriver.html#nullText -"QSqlDriver::open" ntqsqldriver.html#open -"QSqlDriver::primaryIndex" ntqsqldriver.html#primaryIndex -"QSqlDriver::record" ntqsqldriver.html#record -"QSqlDriver::recordInfo" ntqsqldriver.html#recordInfo -"QSqlDriver::rollbackTransaction" ntqsqldriver.html#rollbackTransaction -"QSqlDriver::setLastError" ntqsqldriver.html#setLastError -"QSqlDriver::setOpen" ntqsqldriver.html#setOpen -"QSqlDriver::setOpenError" ntqsqldriver.html#setOpenError -"QSqlDriver::tables" ntqsqldriver.html#tables -"QSqlDriver::~QSqlDriver" ntqsqldriver.html#~QSqlDriver -"QSqlDriverPlugin" ntqsqldriverplugin.html -"QSqlDriverPlugin::create" ntqsqldriverplugin.html#create -"QSqlDriverPlugin::keys" ntqsqldriverplugin.html#keys -"QSqlDriverPlugin::~QSqlDriverPlugin" ntqsqldriverplugin.html#~QSqlDriverPlugin -"QSqlEditorFactory" ntqsqleditorfactory.html -"QSqlEditorFactory::createEditor" ntqsqleditorfactory.html#createEditor -"QSqlEditorFactory::defaultFactory" ntqsqleditorfactory.html#defaultFactory -"QSqlEditorFactory::installDefaultFactory" ntqsqleditorfactory.html#installDefaultFactory -"QSqlEditorFactory::~QSqlEditorFactory" ntqsqleditorfactory.html#~QSqlEditorFactory -"QSqlError" ntqsqlerror.html -"QSqlError::Type" ntqsqlerror.html#Type -"QSqlError::databaseText" ntqsqlerror.html#databaseText -"QSqlError::driverText" ntqsqlerror.html#driverText -"QSqlError::number" ntqsqlerror.html#number -"QSqlError::operator=" ntqsqlerror.html#operator-eq -"QSqlError::setDatabaseText" ntqsqlerror.html#setDatabaseText -"QSqlError::setDriverText" ntqsqlerror.html#setDriverText -"QSqlError::setNumber" ntqsqlerror.html#setNumber -"QSqlError::setType" ntqsqlerror.html#setType -"QSqlError::text" ntqsqlerror.html#text -"QSqlError::type" ntqsqlerror.html#type -"QSqlError::~QSqlError" ntqsqlerror.html#~QSqlError -"QSqlField" ntqsqlfield.html -"QSqlField::clear" ntqsqlfield.html#clear -"QSqlField::isNull" ntqsqlfield.html#isNull -"QSqlField::isReadOnly" ntqsqlfield.html#isReadOnly -"QSqlField::name" ntqsqlfield.html#name -"QSqlField::operator=" ntqsqlfield.html#operator-eq -"QSqlField::operator==" ntqsqlfield.html#operator-eq-eq -"QSqlField::setName" ntqsqlfield.html#setName -"QSqlField::setNull" ntqsqlfield.html#setNull -"QSqlField::setReadOnly" ntqsqlfield.html#setReadOnly -"QSqlField::setValue" ntqsqlfield.html#setValue -"QSqlField::type" ntqsqlfield.html#type -"QSqlField::value" ntqsqlfield.html#value -"QSqlField::~QSqlField" ntqsqlfield.html#~QSqlField -"QSqlFieldInfo" qsqlfieldinfo.html -"QSqlFieldInfo::defaultValue" qsqlfieldinfo.html#defaultValue -"QSqlFieldInfo::isCalculated" qsqlfieldinfo.html#isCalculated -"QSqlFieldInfo::isGenerated" qsqlfieldinfo.html#isGenerated -"QSqlFieldInfo::isRequired" qsqlfieldinfo.html#isRequired -"QSqlFieldInfo::isTrim" qsqlfieldinfo.html#isTrim -"QSqlFieldInfo::length" qsqlfieldinfo.html#length -"QSqlFieldInfo::name" qsqlfieldinfo.html#name -"QSqlFieldInfo::operator=" qsqlfieldinfo.html#operator-eq -"QSqlFieldInfo::operator==" qsqlfieldinfo.html#operator-eq-eq -"QSqlFieldInfo::precision" qsqlfieldinfo.html#precision -"QSqlFieldInfo::setCalculated" qsqlfieldinfo.html#setCalculated -"QSqlFieldInfo::setGenerated" qsqlfieldinfo.html#setGenerated -"QSqlFieldInfo::setTrim" qsqlfieldinfo.html#setTrim -"QSqlFieldInfo::toField" qsqlfieldinfo.html#toField -"QSqlFieldInfo::type" qsqlfieldinfo.html#type -"QSqlFieldInfo::typeID" qsqlfieldinfo.html#typeID -"QSqlFieldInfo::~QSqlFieldInfo" qsqlfieldinfo.html#~QSqlFieldInfo -"QSqlForm" ntqsqlform.html -"QSqlForm::clear" ntqsqlform.html#clear -"QSqlForm::clearValues" ntqsqlform.html#clearValues -"QSqlForm::count" ntqsqlform.html#count -"QSqlForm::fieldToWidget" ntqsqlform.html#fieldToWidget -"QSqlForm::insert" ntqsqlform.html#insert -"QSqlForm::installPropertyMap" ntqsqlform.html#installPropertyMap -"QSqlForm::readField" ntqsqlform.html#readField -"QSqlForm::readFields" ntqsqlform.html#readFields -"QSqlForm::remove" ntqsqlform.html#remove -"QSqlForm::setRecord" ntqsqlform.html#setRecord -"QSqlForm::widget" ntqsqlform.html#widget -"QSqlForm::widgetToField" ntqsqlform.html#widgetToField -"QSqlForm::writeField" ntqsqlform.html#writeField -"QSqlForm::writeFields" ntqsqlform.html#writeFields -"QSqlForm::~QSqlForm" ntqsqlform.html#~QSqlForm -"QSqlIndex" ntqsqlindex.html -"QSqlIndex::append" ntqsqlindex.html#append -"QSqlIndex::cursorName" ntqsqlindex.html#cursorName -"QSqlIndex::fromStringList" ntqsqlindex.html#fromStringList -"QSqlIndex::isDescending" ntqsqlindex.html#isDescending -"QSqlIndex::name" ntqsqlindex.html#name -"QSqlIndex::operator=" ntqsqlindex.html#operator-eq -"QSqlIndex::setCursorName" ntqsqlindex.html#setCursorName -"QSqlIndex::setDescending" ntqsqlindex.html#setDescending -"QSqlIndex::setName" ntqsqlindex.html#setName -"QSqlIndex::~QSqlIndex" ntqsqlindex.html#~QSqlIndex -"QSqlPropertyMap" ntqsqlpropertymap.html -"QSqlPropertyMap::defaultMap" ntqsqlpropertymap.html#defaultMap -"QSqlPropertyMap::insert" ntqsqlpropertymap.html#insert -"QSqlPropertyMap::installDefaultMap" ntqsqlpropertymap.html#installDefaultMap -"QSqlPropertyMap::property" ntqsqlpropertymap.html#property -"QSqlPropertyMap::remove" ntqsqlpropertymap.html#remove -"QSqlPropertyMap::setProperty" ntqsqlpropertymap.html#setProperty -"QSqlPropertyMap::~QSqlPropertyMap" ntqsqlpropertymap.html#~QSqlPropertyMap -"QSqlQuery" ntqsqlquery.html -"QSqlQuery::addBindValue" ntqsqlquery.html#addBindValue -"QSqlQuery::afterSeek" ntqsqlquery.html#afterSeek -"QSqlQuery::at" ntqsqlquery.html#at -"QSqlQuery::beforeSeek" ntqsqlquery.html#beforeSeek -"QSqlQuery::bindValue" ntqsqlquery.html#bindValue -"QSqlQuery::boundValue" ntqsqlquery.html#boundValue -"QSqlQuery::boundValues" ntqsqlquery.html#boundValues -"QSqlQuery::driver" ntqsqlquery.html#driver -"QSqlQuery::exec" ntqsqlquery.html#exec -"QSqlQuery::executedQuery" ntqsqlquery.html#executedQuery -"QSqlQuery::first" ntqsqlquery.html#first -"QSqlQuery::isActive" ntqsqlquery.html#isActive -"QSqlQuery::isForwardOnly" ntqsqlquery.html#isForwardOnly -"QSqlQuery::isNull" ntqsqlquery.html#isNull -"QSqlQuery::isSelect" ntqsqlquery.html#isSelect -"QSqlQuery::isValid" ntqsqlquery.html#isValid -"QSqlQuery::last" ntqsqlquery.html#last -"QSqlQuery::lastError" ntqsqlquery.html#lastError -"QSqlQuery::lastQuery" ntqsqlquery.html#lastQuery -"QSqlQuery::next" ntqsqlquery.html#next -"QSqlQuery::numRowsAffected" ntqsqlquery.html#numRowsAffected -"QSqlQuery::operator=" ntqsqlquery.html#operator-eq -"QSqlQuery::prepare" ntqsqlquery.html#prepare -"QSqlQuery::prev" ntqsqlquery.html#prev -"QSqlQuery::result" ntqsqlquery.html#result -"QSqlQuery::seek" ntqsqlquery.html#seek -"QSqlQuery::setForwardOnly" ntqsqlquery.html#setForwardOnly -"QSqlQuery::size" ntqsqlquery.html#size -"QSqlQuery::value" ntqsqlquery.html#value -"QSqlQuery::~QSqlQuery" ntqsqlquery.html#~QSqlQuery -"QSqlRecord" ntqsqlrecord.html -"QSqlRecord::append" ntqsqlrecord.html#append -"QSqlRecord::clear" ntqsqlrecord.html#clear -"QSqlRecord::clearValues" ntqsqlrecord.html#clearValues -"QSqlRecord::contains" ntqsqlrecord.html#contains -"QSqlRecord::count" ntqsqlrecord.html#count -"QSqlRecord::field" ntqsqlrecord.html#field -"QSqlRecord::fieldName" ntqsqlrecord.html#fieldName -"QSqlRecord::insert" ntqsqlrecord.html#insert -"QSqlRecord::isEmpty" ntqsqlrecord.html#isEmpty -"QSqlRecord::isGenerated" ntqsqlrecord.html#isGenerated -"QSqlRecord::isNull" ntqsqlrecord.html#isNull -"QSqlRecord::operator=" ntqsqlrecord.html#operator-eq -"QSqlRecord::position" ntqsqlrecord.html#position -"QSqlRecord::remove" ntqsqlrecord.html#remove -"QSqlRecord::setGenerated" ntqsqlrecord.html#setGenerated -"QSqlRecord::setNull" ntqsqlrecord.html#setNull -"QSqlRecord::setValue" ntqsqlrecord.html#setValue -"QSqlRecord::toString" ntqsqlrecord.html#toString -"QSqlRecord::toStringList" ntqsqlrecord.html#toStringList -"QSqlRecord::value" ntqsqlrecord.html#value -"QSqlRecord::~QSqlRecord" ntqsqlrecord.html#~QSqlRecord -"QSqlRecordInfo" qsqlrecordinfo.html -"QSqlRecordInfo::contains" qsqlrecordinfo.html#contains -"QSqlRecordInfo::find" qsqlrecordinfo.html#find -"QSqlRecordInfo::toRecord" qsqlrecordinfo.html#toRecord -"QSqlResult" ntqsqlresult.html -"QSqlResult::at" ntqsqlresult.html#at -"QSqlResult::data" ntqsqlresult.html#data -"QSqlResult::driver" ntqsqlresult.html#driver -"QSqlResult::fetch" ntqsqlresult.html#fetch -"QSqlResult::fetchFirst" ntqsqlresult.html#fetchFirst -"QSqlResult::fetchLast" ntqsqlresult.html#fetchLast -"QSqlResult::fetchNext" ntqsqlresult.html#fetchNext -"QSqlResult::fetchPrev" ntqsqlresult.html#fetchPrev -"QSqlResult::isActive" ntqsqlresult.html#isActive -"QSqlResult::isForwardOnly" ntqsqlresult.html#isForwardOnly -"QSqlResult::isNull" ntqsqlresult.html#isNull -"QSqlResult::isSelect" ntqsqlresult.html#isSelect -"QSqlResult::isValid" ntqsqlresult.html#isValid -"QSqlResult::lastError" ntqsqlresult.html#lastError -"QSqlResult::lastQuery" ntqsqlresult.html#lastQuery -"QSqlResult::numRowsAffected" ntqsqlresult.html#numRowsAffected -"QSqlResult::reset" ntqsqlresult.html#reset -"QSqlResult::setActive" ntqsqlresult.html#setActive -"QSqlResult::setAt" ntqsqlresult.html#setAt -"QSqlResult::setForwardOnly" ntqsqlresult.html#setForwardOnly -"QSqlResult::setLastError" ntqsqlresult.html#setLastError -"QSqlResult::setQuery" ntqsqlresult.html#setQuery -"QSqlResult::setSelect" ntqsqlresult.html#setSelect -"QSqlResult::size" ntqsqlresult.html#size -"QSqlResult::~QSqlResult" ntqsqlresult.html#~QSqlResult -"QSqlSelectCursor" ntqsqlselectcursor.html -"QSqlSelectCursor::~QSqlSelectCursor" ntqsqlselectcursor.html#~QSqlSelectCursor +"TQSql" tqsql.html +"TQSql::Confirm" tqsql.html#Confirm +"TQSql::Location" tqsql.html#Location +"TQSql::Op" tqsql.html#Op +"TQSql::ParameterType" tqsql.html#ParameterType +"TQSql::TableType" tqsql.html#TableType +"TQSqlCursor" tqsqlcursor.html +"TQSqlCursor::Mode" tqsqlcursor.html#Mode +"TQSqlCursor::append" tqsqlcursor.html#append +"TQSqlCursor::calculateField" tqsqlcursor.html#calculateField +"TQSqlCursor::canDelete" tqsqlcursor.html#canDelete +"TQSqlCursor::canInsert" tqsqlcursor.html#canInsert +"TQSqlCursor::canUpdate" tqsqlcursor.html#canUpdate +"TQSqlCursor::clear" tqsqlcursor.html#clear +"TQSqlCursor::del" tqsqlcursor.html#del +"TQSqlCursor::editBuffer" tqsqlcursor.html#editBuffer +"TQSqlCursor::filter" tqsqlcursor.html#filter +"TQSqlCursor::index" tqsqlcursor.html#index +"TQSqlCursor::insert" tqsqlcursor.html#insert +"TQSqlCursor::isCalculated" tqsqlcursor.html#isCalculated +"TQSqlCursor::isNull" tqsqlcursor.html#isNull +"TQSqlCursor::isReadOnly" tqsqlcursor.html#isReadOnly +"TQSqlCursor::isTrimmed" tqsqlcursor.html#isTrimmed +"TQSqlCursor::mode" tqsqlcursor.html#mode +"TQSqlCursor::name" tqsqlcursor.html#name +"TQSqlCursor::operator=" tqsqlcursor.html#operator-eq +"TQSqlCursor::primaryIndex" tqsqlcursor.html#primaryIndex +"TQSqlCursor::primeDelete" tqsqlcursor.html#primeDelete +"TQSqlCursor::primeInsert" tqsqlcursor.html#primeInsert +"TQSqlCursor::primeUpdate" tqsqlcursor.html#primeUpdate +"TQSqlCursor::remove" tqsqlcursor.html#remove +"TQSqlCursor::select" tqsqlcursor.html#select +"TQSqlCursor::setCalculated" tqsqlcursor.html#setCalculated +"TQSqlCursor::setFilter" tqsqlcursor.html#setFilter +"TQSqlCursor::setGenerated" tqsqlcursor.html#setGenerated +"TQSqlCursor::setMode" tqsqlcursor.html#setMode +"TQSqlCursor::setName" tqsqlcursor.html#setName +"TQSqlCursor::setPrimaryIndex" tqsqlcursor.html#setPrimaryIndex +"TQSqlCursor::setSort" tqsqlcursor.html#setSort +"TQSqlCursor::setTrimmed" tqsqlcursor.html#setTrimmed +"TQSqlCursor::sort" tqsqlcursor.html#sort +"TQSqlCursor::toString" tqsqlcursor.html#toString +"TQSqlCursor::update" tqsqlcursor.html#update +"TQSqlCursor::~TQSqlCursor" tqsqlcursor.html#~TQSqlCursor +"TQSqlDatabase" tqsqldatabase.html +"TQSqlDatabase::addDatabase" tqsqldatabase.html#addDatabase +"TQSqlDatabase::close" tqsqldatabase.html#close +"TQSqlDatabase::commit" tqsqldatabase.html#commit +"TQSqlDatabase::connectOptions" tqsqldatabase.html#connectOptions +"TQSqlDatabase::connectOptions" tqsqldatabase.html#connectOptions-prop +"TQSqlDatabase::contains" tqsqldatabase.html#contains +"TQSqlDatabase::database" tqsqldatabase.html#database +"TQSqlDatabase::databaseName" tqsqldatabase.html#databaseName +"TQSqlDatabase::databaseName" tqsqldatabase.html#databaseName-prop +"TQSqlDatabase::driver" tqsqldatabase.html#driver +"TQSqlDatabase::driverName" tqsqldatabase.html#driverName +"TQSqlDatabase::drivers" tqsqldatabase.html#drivers +"TQSqlDatabase::exec" tqsqldatabase.html#exec +"TQSqlDatabase::hostName" tqsqldatabase.html#hostName +"TQSqlDatabase::hostName" tqsqldatabase.html#hostName-prop +"TQSqlDatabase::isDriverAvailable" tqsqldatabase.html#isDriverAvailable +"TQSqlDatabase::isOpen" tqsqldatabase.html#isOpen +"TQSqlDatabase::isOpenError" tqsqldatabase.html#isOpenError +"TQSqlDatabase::lastError" tqsqldatabase.html#lastError +"TQSqlDatabase::open" tqsqldatabase.html#open +"TQSqlDatabase::password" tqsqldatabase.html#password +"TQSqlDatabase::password" tqsqldatabase.html#password-prop +"TQSqlDatabase::port" tqsqldatabase.html#port +"TQSqlDatabase::port" tqsqldatabase.html#port-prop +"TQSqlDatabase::primaryIndex" tqsqldatabase.html#primaryIndex +"TQSqlDatabase::record" tqsqldatabase.html#record +"TQSqlDatabase::recordInfo" tqsqldatabase.html#recordInfo +"TQSqlDatabase::registerSqlDriver" tqsqldatabase.html#registerSqlDriver +"TQSqlDatabase::removeDatabase" tqsqldatabase.html#removeDatabase +"TQSqlDatabase::rollback" tqsqldatabase.html#rollback +"TQSqlDatabase::setConnectOptions" tqsqldatabase.html#setConnectOptions +"TQSqlDatabase::setDatabaseName" tqsqldatabase.html#setDatabaseName +"TQSqlDatabase::setHostName" tqsqldatabase.html#setHostName +"TQSqlDatabase::setPassword" tqsqldatabase.html#setPassword +"TQSqlDatabase::setPort" tqsqldatabase.html#setPort +"TQSqlDatabase::setUserName" tqsqldatabase.html#setUserName +"TQSqlDatabase::tables" tqsqldatabase.html#tables +"TQSqlDatabase::transaction" tqsqldatabase.html#transaction +"TQSqlDatabase::userName" tqsqldatabase.html#userName +"TQSqlDatabase::userName" tqsqldatabase.html#userName-prop +"TQSqlDatabase::~TQSqlDatabase" tqsqldatabase.html#~TQSqlDatabase +"TQSqlDriver" tqsqldriver.html +"TQSqlDriver::DriverFeature" tqsqldriver.html#DriverFeature +"TQSqlDriver::beginTransaction" tqsqldriver.html#beginTransaction +"TQSqlDriver::close" tqsqldriver.html#close +"TQSqlDriver::commitTransaction" tqsqldriver.html#commitTransaction +"TQSqlDriver::createQuery" tqsqldriver.html#createQuery +"TQSqlDriver::formatValue" tqsqldriver.html#formatValue +"TQSqlDriver::hasFeature" tqsqldriver.html#hasFeature +"TQSqlDriver::isOpen" tqsqldriver.html#isOpen +"TQSqlDriver::isOpenError" tqsqldriver.html#isOpenError +"TQSqlDriver::lastError" tqsqldriver.html#lastError +"TQSqlDriver::nullText" tqsqldriver.html#nullText +"TQSqlDriver::open" tqsqldriver.html#open +"TQSqlDriver::primaryIndex" tqsqldriver.html#primaryIndex +"TQSqlDriver::record" tqsqldriver.html#record +"TQSqlDriver::recordInfo" tqsqldriver.html#recordInfo +"TQSqlDriver::rollbackTransaction" tqsqldriver.html#rollbackTransaction +"TQSqlDriver::setLastError" tqsqldriver.html#setLastError +"TQSqlDriver::setOpen" tqsqldriver.html#setOpen +"TQSqlDriver::setOpenError" tqsqldriver.html#setOpenError +"TQSqlDriver::tables" tqsqldriver.html#tables +"TQSqlDriver::~TQSqlDriver" tqsqldriver.html#~TQSqlDriver +"TQSqlDriverPlugin" tqsqldriverplugin.html +"TQSqlDriverPlugin::create" tqsqldriverplugin.html#create +"TQSqlDriverPlugin::keys" tqsqldriverplugin.html#keys +"TQSqlDriverPlugin::~TQSqlDriverPlugin" tqsqldriverplugin.html#~TQSqlDriverPlugin +"TQSqlEditorFactory" tqsqleditorfactory.html +"TQSqlEditorFactory::createEditor" tqsqleditorfactory.html#createEditor +"TQSqlEditorFactory::defaultFactory" tqsqleditorfactory.html#defaultFactory +"TQSqlEditorFactory::installDefaultFactory" tqsqleditorfactory.html#installDefaultFactory +"TQSqlEditorFactory::~TQSqlEditorFactory" tqsqleditorfactory.html#~TQSqlEditorFactory +"TQSqlError" tqsqlerror.html +"TQSqlError::Type" tqsqlerror.html#Type +"TQSqlError::databaseText" tqsqlerror.html#databaseText +"TQSqlError::driverText" tqsqlerror.html#driverText +"TQSqlError::number" tqsqlerror.html#number +"TQSqlError::operator=" tqsqlerror.html#operator-eq +"TQSqlError::setDatabaseText" tqsqlerror.html#setDatabaseText +"TQSqlError::setDriverText" tqsqlerror.html#setDriverText +"TQSqlError::setNumber" tqsqlerror.html#setNumber +"TQSqlError::setType" tqsqlerror.html#setType +"TQSqlError::text" tqsqlerror.html#text +"TQSqlError::type" tqsqlerror.html#type +"TQSqlError::~TQSqlError" tqsqlerror.html#~TQSqlError +"TQSqlField" tqsqlfield.html +"TQSqlField::clear" tqsqlfield.html#clear +"TQSqlField::isNull" tqsqlfield.html#isNull +"TQSqlField::isReadOnly" tqsqlfield.html#isReadOnly +"TQSqlField::name" tqsqlfield.html#name +"TQSqlField::operator=" tqsqlfield.html#operator-eq +"TQSqlField::operator==" tqsqlfield.html#operator-eq-eq +"TQSqlField::setName" tqsqlfield.html#setName +"TQSqlField::setNull" tqsqlfield.html#setNull +"TQSqlField::setReadOnly" tqsqlfield.html#setReadOnly +"TQSqlField::setValue" tqsqlfield.html#setValue +"TQSqlField::type" tqsqlfield.html#type +"TQSqlField::value" tqsqlfield.html#value +"TQSqlField::~TQSqlField" tqsqlfield.html#~TQSqlField +"TQSqlFieldInfo" tqsqlfieldinfo.html +"TQSqlFieldInfo::defaultValue" tqsqlfieldinfo.html#defaultValue +"TQSqlFieldInfo::isCalculated" tqsqlfieldinfo.html#isCalculated +"TQSqlFieldInfo::isGenerated" tqsqlfieldinfo.html#isGenerated +"TQSqlFieldInfo::isRequired" tqsqlfieldinfo.html#isRequired +"TQSqlFieldInfo::isTrim" tqsqlfieldinfo.html#isTrim +"TQSqlFieldInfo::length" tqsqlfieldinfo.html#length +"TQSqlFieldInfo::name" tqsqlfieldinfo.html#name +"TQSqlFieldInfo::operator=" tqsqlfieldinfo.html#operator-eq +"TQSqlFieldInfo::operator==" tqsqlfieldinfo.html#operator-eq-eq +"TQSqlFieldInfo::precision" tqsqlfieldinfo.html#precision +"TQSqlFieldInfo::setCalculated" tqsqlfieldinfo.html#setCalculated +"TQSqlFieldInfo::setGenerated" tqsqlfieldinfo.html#setGenerated +"TQSqlFieldInfo::setTrim" tqsqlfieldinfo.html#setTrim +"TQSqlFieldInfo::toField" tqsqlfieldinfo.html#toField +"TQSqlFieldInfo::type" tqsqlfieldinfo.html#type +"TQSqlFieldInfo::typeID" tqsqlfieldinfo.html#typeID +"TQSqlFieldInfo::~TQSqlFieldInfo" tqsqlfieldinfo.html#~TQSqlFieldInfo +"TQSqlForm" tqsqlform.html +"TQSqlForm::clear" tqsqlform.html#clear +"TQSqlForm::clearValues" tqsqlform.html#clearValues +"TQSqlForm::count" tqsqlform.html#count +"TQSqlForm::fieldToWidget" tqsqlform.html#fieldToWidget +"TQSqlForm::insert" tqsqlform.html#insert +"TQSqlForm::installPropertyMap" tqsqlform.html#installPropertyMap +"TQSqlForm::readField" tqsqlform.html#readField +"TQSqlForm::readFields" tqsqlform.html#readFields +"TQSqlForm::remove" tqsqlform.html#remove +"TQSqlForm::setRecord" tqsqlform.html#setRecord +"TQSqlForm::widget" tqsqlform.html#widget +"TQSqlForm::widgetToField" tqsqlform.html#widgetToField +"TQSqlForm::writeField" tqsqlform.html#writeField +"TQSqlForm::writeFields" tqsqlform.html#writeFields +"TQSqlForm::~TQSqlForm" tqsqlform.html#~TQSqlForm +"TQSqlIndex" tqsqlindex.html +"TQSqlIndex::append" tqsqlindex.html#append +"TQSqlIndex::cursorName" tqsqlindex.html#cursorName +"TQSqlIndex::fromStringList" tqsqlindex.html#fromStringList +"TQSqlIndex::isDescending" tqsqlindex.html#isDescending +"TQSqlIndex::name" tqsqlindex.html#name +"TQSqlIndex::operator=" tqsqlindex.html#operator-eq +"TQSqlIndex::setCursorName" tqsqlindex.html#setCursorName +"TQSqlIndex::setDescending" tqsqlindex.html#setDescending +"TQSqlIndex::setName" tqsqlindex.html#setName +"TQSqlIndex::~TQSqlIndex" tqsqlindex.html#~TQSqlIndex +"TQSqlPropertyMap" tqsqlpropertymap.html +"TQSqlPropertyMap::defaultMap" tqsqlpropertymap.html#defaultMap +"TQSqlPropertyMap::insert" tqsqlpropertymap.html#insert +"TQSqlPropertyMap::installDefaultMap" tqsqlpropertymap.html#installDefaultMap +"TQSqlPropertyMap::property" tqsqlpropertymap.html#property +"TQSqlPropertyMap::remove" tqsqlpropertymap.html#remove +"TQSqlPropertyMap::setProperty" tqsqlpropertymap.html#setProperty +"TQSqlPropertyMap::~TQSqlPropertyMap" tqsqlpropertymap.html#~TQSqlPropertyMap +"TQSqlQuery" tqsqlquery.html +"TQSqlQuery::addBindValue" tqsqlquery.html#addBindValue +"TQSqlQuery::afterSeek" tqsqlquery.html#afterSeek +"TQSqlQuery::at" tqsqlquery.html#at +"TQSqlQuery::beforeSeek" tqsqlquery.html#beforeSeek +"TQSqlQuery::bindValue" tqsqlquery.html#bindValue +"TQSqlQuery::boundValue" tqsqlquery.html#boundValue +"TQSqlQuery::boundValues" tqsqlquery.html#boundValues +"TQSqlQuery::driver" tqsqlquery.html#driver +"TQSqlQuery::exec" tqsqlquery.html#exec +"TQSqlQuery::executedQuery" tqsqlquery.html#executedQuery +"TQSqlQuery::first" tqsqlquery.html#first +"TQSqlQuery::isActive" tqsqlquery.html#isActive +"TQSqlQuery::isForwardOnly" tqsqlquery.html#isForwardOnly +"TQSqlQuery::isNull" tqsqlquery.html#isNull +"TQSqlQuery::isSelect" tqsqlquery.html#isSelect +"TQSqlQuery::isValid" tqsqlquery.html#isValid +"TQSqlQuery::last" tqsqlquery.html#last +"TQSqlQuery::lastError" tqsqlquery.html#lastError +"TQSqlQuery::lastQuery" tqsqlquery.html#lastQuery +"TQSqlQuery::next" tqsqlquery.html#next +"TQSqlQuery::numRowsAffected" tqsqlquery.html#numRowsAffected +"TQSqlQuery::operator=" tqsqlquery.html#operator-eq +"TQSqlQuery::prepare" tqsqlquery.html#prepare +"TQSqlQuery::prev" tqsqlquery.html#prev +"TQSqlQuery::result" tqsqlquery.html#result +"TQSqlQuery::seek" tqsqlquery.html#seek +"TQSqlQuery::setForwardOnly" tqsqlquery.html#setForwardOnly +"TQSqlQuery::size" tqsqlquery.html#size +"TQSqlQuery::value" tqsqlquery.html#value +"TQSqlQuery::~TQSqlQuery" tqsqlquery.html#~TQSqlQuery +"TQSqlRecord" tqsqlrecord.html +"TQSqlRecord::append" tqsqlrecord.html#append +"TQSqlRecord::clear" tqsqlrecord.html#clear +"TQSqlRecord::clearValues" tqsqlrecord.html#clearValues +"TQSqlRecord::contains" tqsqlrecord.html#contains +"TQSqlRecord::count" tqsqlrecord.html#count +"TQSqlRecord::field" tqsqlrecord.html#field +"TQSqlRecord::fieldName" tqsqlrecord.html#fieldName +"TQSqlRecord::insert" tqsqlrecord.html#insert +"TQSqlRecord::isEmpty" tqsqlrecord.html#isEmpty +"TQSqlRecord::isGenerated" tqsqlrecord.html#isGenerated +"TQSqlRecord::isNull" tqsqlrecord.html#isNull +"TQSqlRecord::operator=" tqsqlrecord.html#operator-eq +"TQSqlRecord::position" tqsqlrecord.html#position +"TQSqlRecord::remove" tqsqlrecord.html#remove +"TQSqlRecord::setGenerated" tqsqlrecord.html#setGenerated +"TQSqlRecord::setNull" tqsqlrecord.html#setNull +"TQSqlRecord::setValue" tqsqlrecord.html#setValue +"TQSqlRecord::toString" tqsqlrecord.html#toString +"TQSqlRecord::toStringList" tqsqlrecord.html#toStringList +"TQSqlRecord::value" tqsqlrecord.html#value +"TQSqlRecord::~TQSqlRecord" tqsqlrecord.html#~TQSqlRecord +"TQSqlRecordInfo" tqsqlrecordinfo.html +"TQSqlRecordInfo::contains" tqsqlrecordinfo.html#contains +"TQSqlRecordInfo::find" tqsqlrecordinfo.html#find +"TQSqlRecordInfo::toRecord" tqsqlrecordinfo.html#toRecord +"TQSqlResult" tqsqlresult.html +"TQSqlResult::at" tqsqlresult.html#at +"TQSqlResult::data" tqsqlresult.html#data +"TQSqlResult::driver" tqsqlresult.html#driver +"TQSqlResult::fetch" tqsqlresult.html#fetch +"TQSqlResult::fetchFirst" tqsqlresult.html#fetchFirst +"TQSqlResult::fetchLast" tqsqlresult.html#fetchLast +"TQSqlResult::fetchNext" tqsqlresult.html#fetchNext +"TQSqlResult::fetchPrev" tqsqlresult.html#fetchPrev +"TQSqlResult::isActive" tqsqlresult.html#isActive +"TQSqlResult::isForwardOnly" tqsqlresult.html#isForwardOnly +"TQSqlResult::isNull" tqsqlresult.html#isNull +"TQSqlResult::isSelect" tqsqlresult.html#isSelect +"TQSqlResult::isValid" tqsqlresult.html#isValid +"TQSqlResult::lastError" tqsqlresult.html#lastError +"TQSqlResult::lastQuery" tqsqlresult.html#lastQuery +"TQSqlResult::numRowsAffected" tqsqlresult.html#numRowsAffected +"TQSqlResult::reset" tqsqlresult.html#reset +"TQSqlResult::setActive" tqsqlresult.html#setActive +"TQSqlResult::setAt" tqsqlresult.html#setAt +"TQSqlResult::setForwardOnly" tqsqlresult.html#setForwardOnly +"TQSqlResult::setLastError" tqsqlresult.html#setLastError +"TQSqlResult::setQuery" tqsqlresult.html#setQuery +"TQSqlResult::setSelect" tqsqlresult.html#setSelect +"TQSqlResult::size" tqsqlresult.html#size +"TQSqlResult::~TQSqlResult" tqsqlresult.html#~TQSqlResult +"TQSqlSelectCursor" tqsqlselectcursor.html +"TQSqlSelectCursor::~TQSqlSelectCursor" tqsqlselectcursor.html#~TQSqlSelectCursor "QStatusBar" ntqstatusbar.html "QStatusBar::addWidget" ntqstatusbar.html#addWidget "QStatusBar::clear" ntqstatusbar.html#clear diff --git a/doc/html/mainclasses.html b/doc/html/mainclasses.html index d127720fe..9c12b26a3 100644 --- a/doc/html/mainclasses.html +++ b/doc/html/mainclasses.html @@ -100,7 +100,7 @@ classes), see TQt's Classes. TQPalette -TQSql +TQSql TQTranslator @@ -111,7 +111,7 @@ classes), see TQt's Classes. TQPen -TQSqlDatabase +TQSqlDatabase U TQUrl @@ -122,34 +122,34 @@ classes), see TQt's Classes. TQPixmap -TQSqlDriverPlugin +TQSqlDriverPlugin TQUrlOperator D -TQDataBrowser +TQDataBrowser I TQIconSet TQPoint -TQSqlForm +TQSqlForm V TQValidator -TQDataTable +TQDataTable TQIconView TQPopupMenu -TQSqlQuery +TQSqlQuery TQValueList -TQDataView +TQDataView TQImage diff --git a/doc/html/ntqdatabrowser.html b/doc/html/ntqdatabrowser.html deleted file mode 100644 index baa33d688..000000000 --- a/doc/html/ntqdatabrowser.html +++ /dev/null @@ -1,715 +0,0 @@ - - - - - -TQDataBrowser Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQDataBrowser Class Reference
          [sql module]

          - -

          The TQDataBrowser class provides data manipulation and -navigation for data entry forms. -More... -

          #include <ntqdatabrowser.h> -

          Inherits TQWidget. -

          List of all member functions. -

          Public Members

          - -

          Public Slots

          - -

          Signals

          - -

          Properties

          -
            -
          • bool autoEdit - whether the browser automatically applies edits
          • -
          • bool boundaryChecking - whether boundary checking is active
          • -
          • bool confirmCancels - whether the browser confirms cancel operations
          • -
          • bool confirmDelete - whether the browser confirms deletions
          • -
          • bool confirmEdits - whether the browser confirms edits
          • -
          • bool confirmInsert - whether the data browser confirms insertions
          • -
          • bool confirmUpdate - whether the browser confirms updates
          • -
          • TQString filter - the data browser's filter
          • -
          • bool readOnly - whether the browser is read-only
          • -
          • TQStringList sort - the data browser's sort
          • -
          -

          Protected Members

          - -

          Detailed Description

          - - -The TQDataBrowser class provides data manipulation and -navigation for data entry forms. -

          - - -

          A high-level API is provided for navigating through data records -in a cursor, for inserting, updating and deleting records, and for -refreshing data in the display. -

          If you want a read-only form to present database data use -TQDataView; if you want a table-based presentation of your data use -TQDataTable. -

          A TQDataBrowser is used to associate a dataset with a form in much -the same way as a TQDataTable associates a dataset with a table. -Once the data browser has been constructed it can be associated -with a dataset with setSqlCursor(), and with a form with -setForm(). Boundary checking, sorting and filtering can be set -with setBoundaryChecking(), setSort() and setFilter(), -respectively. -

          The insertCurrent() function reads the fields from the default -form into the default cursor and performs the insert. The -updateCurrent() and deleteCurrent() functions perform similarly to -update and delete the current record respectively. -

          The user can be asked to confirm all edits with setConfirmEdits(). -For more precise control use setConfirmInsert(), -setConfirmUpdate(), setConfirmDelete() and setConfirmCancels(). -Use setAutoEdit() to control the behaviour of the form when the -user edits a record and then navigates. -

          The record set is navigated using first(), next(), prev(), last() -and seek(). The form's display is updated with refresh(). When -navigation takes place the firstRecordAvailable(), -lastRecordAvailable(), nextRecordAvailable() and -prevRecordAvailable() signals are emitted. When the cursor record -is changed due to navigation the cursorChanged() signal is -emitted. -

          If you want finer control of the insert, update and delete -processes then you can use the lower level functions to perform -these operations as described below. -

          The form is populated with data from the database with -readFields(). If the user is allowed to edit, (see setReadOnly()), -write the form's data back to the cursor's edit buffer with -writeFields(). You can clear the values in the form with -clearValues(). Editing is performed as follows: -

            -
          • insert When the data browser enters insertion mode it emits the -primeInsert() signal which you can connect to, for example to -pre-populate fields. Call writeFields() to write the user's edits to -the cursor's edit buffer then call insert() to insert the record -into the database. The beforeInsert() signal is emitted just before -the cursor's edit buffer is inserted into the database; connect to -this for example, to populate fields such as an auto-generated -primary key. -
          • update For updates the primeUpdate() signal is emitted when -the data browser enters update mode. After calling writeFields() -call update() to update the record and connect to the beforeUpdate() -signal to manipulate the user's data before the update takes place. -
          • delete For deletion the primeDelete() signal is emitted when -the data browser enters deletion mode. After calling writeFields() -call del() to delete the record and connect to the beforeDelete() -signal, for example to record an audit of the deleted record. -
          -

          See also Database Classes. - -


          Member Type Documentation

          -

          TQDataBrowser::Boundary

          - -

          This enum describes where the data browser is positioned. -

            -
          • TQDataBrowser::Unknown - the boundary cannot be determined (usually because -there is no default cursor, or the default cursor is not active). -
          • TQDataBrowser::None - the browser is not positioned on a boundary, but it is -positioned on a record somewhere in the middle. -
          • TQDataBrowser::BeforeBeginning - the browser is positioned before the -first available record. -
          • TQDataBrowser::Beginning - the browser is positioned at the first record. -
          • TQDataBrowser::End - the browser is positioned at the last -record. -
          • TQDataBrowser::AfterEnd - the browser is positioned after the last -available record. -
          -

          Member Function Documentation

          -

          TQDataBrowser::TQDataBrowser ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 ) -

          -Constructs a data browser which is a child of parent, with the -name name and widget flags set to fl. - -

          TQDataBrowser::~TQDataBrowser () -

          -Destroys the object and frees any allocated resources. - -

          bool TQDataBrowser::autoEdit () const -

          Returns TRUE if the browser automatically applies edits; otherwise returns FALSE. -See the "autoEdit" property for details. -

          void TQDataBrowser::beforeDelete ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted just before the cursor's edit buffer is -deleted from the database. The buf parameter points to the edit -buffer being deleted. You might connect to this signal to capture -some auditing information about the deletion. - -

          void TQDataBrowser::beforeInsert ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted just before the cursor's edit buffer is -inserted into the database. The buf parameter points to the -edit buffer being inserted. You might connect to this signal to -populate a generated primary key for example. - -

          void TQDataBrowser::beforeUpdate ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted just before the cursor's edit buffer is -updated in the database. The buf parameter points to the edit -buffer being updated. You might connect to this signal to capture -some auditing information about the update. - -

          Boundary TQDataBrowser::boundary () -

          -Returns an enum indicating the boundary status of the browser. -

          This is achieved by moving the default cursor and checking the -position, however the current default form values will not be -altered. After checking for the boundary, the cursor is moved back -to its former position. See TQDataBrowser::Boundary. -

          See also Boundary. - -

          bool TQDataBrowser::boundaryChecking () const -

          Returns TRUE if boundary checking is active; otherwise returns FALSE. -See the "boundaryChecking" property for details. -

          void TQDataBrowser::clearValues () [virtual slot] -

          -Clears all the values in the form. -

          All the edit buffer field values are set to their 'zero state', -e.g. 0 for numeric fields and "" for string fields. Then the -widgets are updated using the property map. For example, a -combobox that is property-mapped to integers would scroll to the -first item. See the TQSqlPropertyMap constructor for the default -mappings of widgets to properties. - -

          TQSql::Confirm TQDataBrowser::confirmCancel ( TQSql::Op m ) [virtual protected] -

          -Protected virtual function which returns a confirmation for -cancelling an edit mode m. Derived classes can reimplement this -function and provide their own confirmation dialog. The default -implementation uses a message box which prompts the user to -confirm the edit action. - -

          bool TQDataBrowser::confirmCancels () const -

          Returns TRUE if the browser confirms cancel operations; otherwise returns FALSE. -See the "confirmCancels" property for details. -

          bool TQDataBrowser::confirmDelete () const -

          Returns TRUE if the browser confirms deletions; otherwise returns FALSE. -See the "confirmDelete" property for details. -

          TQSql::Confirm TQDataBrowser::confirmEdit ( TQSql::Op m ) [virtual protected] -

          -Protected virtual function which returns a confirmation for an -edit of mode m. Derived classes can reimplement this function -and provide their own confirmation dialog. The default -implementation uses a message box which prompts the user to -confirm the edit action. - -

          bool TQDataBrowser::confirmEdits () const -

          Returns TRUE if the browser confirms edits; otherwise returns FALSE. -See the "confirmEdits" property for details. -

          bool TQDataBrowser::confirmInsert () const -

          Returns TRUE if the data browser confirms insertions; otherwise returns FALSE. -See the "confirmInsert" property for details. -

          bool TQDataBrowser::confirmUpdate () const -

          Returns TRUE if the browser confirms updates; otherwise returns FALSE. -See the "confirmUpdate" property for details. -

          void TQDataBrowser::currentChanged ( const TQSqlRecord * record ) [signal] -

          - -

          This signal is emitted whenever the current cursor position -changes. The record parameter points to the contents of the -current cursor's record. - -

          bool TQDataBrowser::currentEdited () [virtual protected] -

          -Returns TRUE if the form's edit buffer differs from the current -cursor buffer; otherwise returns FALSE. - -

          void TQDataBrowser::cursorChanged ( TQSqlCursor::Mode mode ) [signal] -

          - -

          This signal is emitted whenever the cursor record was changed due -to navigation. The mode parameter is the edit that just took -place, e.g. Insert, Update or Delete. See TQSqlCursor::Mode. - -

          void TQDataBrowser::del () [virtual slot] -

          -Performs a delete operation on the data browser's cursor. If there -is no default cursor or no default form, nothing happens. -

          Otherwise, the following happens: -

          The current form's record is deleted from the database, providing -that the data browser is not in insert mode. If the data browser -is actively inserting a record (see insert()), the insert action -is canceled, and the browser navigates to the last valid record -that was current. If there is an error, handleError() is called. - -

          bool TQDataBrowser::deleteCurrent () [virtual protected] -

          -Performs a delete on the default cursor using the values from the -default form and updates the default form. If there is no default -form or no default cursor, nothing happens. If the deletion was -successful, the cursor is repositioned to the nearest record and -TRUE is returned. The nearest record is the next record if there -is one otherwise the previous record if there is one. If an error -occurred during the deletion from the database, handleError() is -called and FALSE is returned. -

          See also cursor, form(), and handleError(). - -

          TQString TQDataBrowser::filter () const -

          Returns the data browser's filter. -See the "filter" property for details. -

          void TQDataBrowser::first () [virtual slot] -

          -Moves the default cursor to the first record and refreshes the -default form to display this record. If there is no default form -or no default cursor, nothing happens. If the data browser -successfully navigated to the first record, the default cursor is -primed for update and the primeUpdate() signal is emitted. -

          If the browser is already positioned on the first record nothing -happens. -

          -

          void TQDataBrowser::firstRecordAvailable ( bool available ) [signal] -

          - -

          This signal is emitted whenever the position of the cursor -changes. The available parameter indicates whether or not the -first record in the default cursor is available. - -

          TQSqlForm * TQDataBrowser::form () -

          -Returns the data browser's default form or 0 if no form has been -set. - -

          void TQDataBrowser::handleError ( const TQSqlError & error ) [virtual protected] -

          -Virtual function which handles the error error. The default -implementation warns the user with a message box. - -

          void TQDataBrowser::insert () [virtual slot] -

          -Performs an insert operation on the data browser's cursor. If -there is no default cursor or no default form, nothing happens. -

          If auto-editing is on (see setAutoEdit()), the following happens: -

            -
          • If the browser is already actively inserting a record, -the current form's data is inserted into the database. -
          • If the browser is not inserting a record, but the current record -was changed by the user, the record is updated in the database with -the current form's data (i.e. with the changes). -
          -

          If there is an error handling any of the above auto-edit actions, -handleError() is called and no insert or update is performed. -

          If no error occurred, or auto-editing is not enabled, the data browser -begins actively inserting a record into the database by performing the -following actions: -

            -
          • The default cursor is primed for insert using TQSqlCursor::primeInsert(). -
          • The primeInsert() signal is emitted. -
          • The form is updated with the values in the default cursor's. -edit buffer so that the user can fill in the values to be inserted. -
          -

          -

          bool TQDataBrowser::insertCurrent () [virtual protected] -

          -Reads the fields from the default form into the default cursor and -performs an insert on the default cursor. If there is no default -form or no default cursor, nothing happens. If an error occurred -during the insert into the database, handleError() is called and -FALSE is returned. If the insert was successfull, the cursor is -refreshed and relocated to the newly inserted record, the -cursorChanged() signal is emitted, and TRUE is returned. -

          See also cursorChanged(), sqlCursor(), form(), and handleError(). - -

          bool TQDataBrowser::isReadOnly () const -

          Returns TRUE if the browser is read-only; otherwise returns FALSE. -See the "readOnly" property for details. -

          void TQDataBrowser::last () [virtual slot] -

          -Moves the default cursor to the last record and refreshes the -default form to display this record. If there is no default form -or no default cursor, nothing happens. If the data browser -successfully navigated to the last record, the default cursor is -primed for update and the primeUpdate() signal is emitted. -

          If the browser is already positioned on the last record nothing -happens. - -

          void TQDataBrowser::lastRecordAvailable ( bool available ) [signal] -

          - -

          This signal is emitted whenever the position of the cursor -changes. The available parameter indicates whether or not the -last record in the default cursor is available. - -

          void TQDataBrowser::next () [virtual slot] -

          -Moves the default cursor to the next record and refreshes the -default form to display this record. If there is no default form -or no default cursor, nothing happens. If the data browser -successfully navigated to the next record, the default cursor is -primed for update and the primeUpdate() signal is emitted. -

          If the browser is positioned on the last record nothing happens. - -

          void TQDataBrowser::nextRecordAvailable ( bool available ) [signal] -

          - -

          This signal is emitted whenever the position of the cursor -changes. The available parameter indicates whether or not the -next record in the default cursor is available. - -

          void TQDataBrowser::prev () [virtual slot] -

          -Moves the default cursor to the previous record and refreshes the -default form to display this record. If there is no default form -or no default cursor, nothing happens. If the data browser -successfully navigated to the previous record, the default cursor -is primed for update and the primeUpdate() signal is emitted. -

          If the browser is positioned on the first record nothing happens. - -

          void TQDataBrowser::prevRecordAvailable ( bool available ) [signal] -

          - -

          This signal is emitted whenever the position of the cursor -changes. The available parameter indicates whether or not the -previous record in the default cursor is available. - -

          void TQDataBrowser::primeDelete ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted when the data browser enters deletion mode. -The buf parameter points to the record buffer being deleted. -(Note that TQSqlCursor::primeDelete() is not called on the -default cursor, as this would corrupt values in the form.) -Connect to this signal in order to, for example, save a copy of -the deleted record for auditing purposes. -

          See also del(). - -

          void TQDataBrowser::primeInsert ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted when the data browser enters insertion -mode. The buf parameter points to the record buffer that is to -be inserted. Connect to this signal to, for example, prime the -record buffer with default data values, auto-numbered fields etc. -(Note that TQSqlCursor::primeInsert() is not called on the -default cursor, as this would corrupt values in the form.) -

          See also insert(). - -

          void TQDataBrowser::primeUpdate ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted when the data browser enters update mode. -Note that during navigation (first(), last(), next(), prev()), -each record that is shown in the default form is primed for -update. The buf parameter points to the record buffer being -updated. (Note that TQSqlCursor::primeUpdate() is not called on -the default cursor, as this would corrupt values in the form.) -Connect to this signal in order to, for example, keep track of -which records have been updated, perhaps for auditing purposes. -

          See also update(). - -

          void TQDataBrowser::readFields () [virtual slot] -

          -Reads the fields from the default cursor's edit buffer and -displays them in the form. If there is no default cursor or no -default form, nothing happens. - -

          void TQDataBrowser::refresh () [virtual slot] -

          -Refreshes the data browser's data using the default cursor. The -browser's current filter and sort are applied if they have been -set. -

          See also filter and sort. - -

          bool TQDataBrowser::seek ( int i, bool relative = FALSE ) [virtual] -

          -Moves the default cursor to the record specified by the index i -and refreshes the default form to display this record. If there is -no default form or no default cursor, nothing happens. If relative is TRUE (the default is FALSE), the cursor is moved -relative to its current position. If the data browser successfully -navigated to the desired record, the default cursor is primed for -update and the primeUpdate() signal is emitted. -

          If the browser is already positioned on the desired record nothing -happens. - -

          void TQDataBrowser::setAutoEdit ( bool autoEdit ) [virtual] -

          Sets whether the browser automatically applies edits to autoEdit. -See the "autoEdit" property for details. -

          void TQDataBrowser::setBoundaryChecking ( bool active ) -

          Sets whether boundary checking is active to active. -See the "boundaryChecking" property for details. -

          void TQDataBrowser::setConfirmCancels ( bool confirm ) [virtual] -

          Sets whether the browser confirms cancel operations to confirm. -See the "confirmCancels" property for details. -

          void TQDataBrowser::setConfirmDelete ( bool confirm ) [virtual] -

          Sets whether the browser confirms deletions to confirm. -See the "confirmDelete" property for details. -

          void TQDataBrowser::setConfirmEdits ( bool confirm ) [virtual] -

          Sets whether the browser confirms edits to confirm. -See the "confirmEdits" property for details. -

          void TQDataBrowser::setConfirmInsert ( bool confirm ) [virtual] -

          Sets whether the data browser confirms insertions to confirm. -See the "confirmInsert" property for details. -

          void TQDataBrowser::setConfirmUpdate ( bool confirm ) [virtual] -

          Sets whether the browser confirms updates to confirm. -See the "confirmUpdate" property for details. -

          void TQDataBrowser::setFilter ( const TQString & filter ) -

          Sets the data browser's filter to filter. -See the "filter" property for details. -

          void TQDataBrowser::setForm ( TQSqlForm * form ) [virtual] -

          -Sets the browser's default form to form. The cursor and all -navigation and data manipulation functions that the browser -provides become available to the form. - -

          void TQDataBrowser::setReadOnly ( bool active ) [virtual] -

          Sets whether the browser is read-only to active. -See the "readOnly" property for details. -

          void TQDataBrowser::setSort ( const TQStringList & sort ) -

          Sets the data browser's sort to sort. -See the "sort" property for details. -

          void TQDataBrowser::setSort ( const TQSqlIndex & sort ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Sets the data browser's sort to the TQSqlIndex sort. To apply -the new sort, use refresh(). -

          -

          void TQDataBrowser::setSqlCursor ( TQSqlCursor * cursor, bool autoDelete = FALSE ) [virtual] -

          -Sets the default cursor used by the data browser to cursor. If -autoDelete is TRUE (the default is FALSE), the data browser -takes ownership of the cursor pointer, which will be deleted -when the browser is destroyed, or when setSqlCursor() is called -again. To activate the cursor use refresh(). The cursor's edit -buffer is used in the default form to browse and edit records. -

          See also sqlCursor(), form(), and setForm(). - -

          TQStringList TQDataBrowser::sort () const -

          Returns the data browser's sort. -See the "sort" property for details. -

          TQSqlCursor * TQDataBrowser::sqlCursor () const -

          -Returns the default cursor used for navigation, or 0 if there is -no default cursor. -

          See also setSqlCursor(). - -

          void TQDataBrowser::update () [virtual slot] -

          -Performs an update operation on the data browser's cursor. -

          If there is no default cursor or no default form, nothing happens. -Otherwise, the following happens: -

          If the data browser is actively inserting a record (see insert()), -that record is inserted into the database using insertCurrent(). -Otherwise, the database is updated with the current form's data -using updateCurrent(). If there is an error handling either -action, handleError() is called. - -

          void TQDataBrowser::updateBoundary () [slot] -

          -If boundaryChecking() is TRUE, checks the boundary of the current -default cursor and emits signals which indicate the position of -the cursor. - -

          bool TQDataBrowser::updateCurrent () [virtual protected] -

          -Reads the fields from the default form into the default cursor and -performs an update on the default cursor. If there is no default -form or no default cursor, nothing happens. If an error occurred -during the update on the database, handleError() is called and -FALSE is returned. If the update was successfull, the cursor is -refreshed and relocated to the updated record, the cursorChanged() -signal is emitted, and TRUE is returned. -

          See also cursor, form(), and handleError(). - -

          void TQDataBrowser::writeFields () [virtual slot] -

          -Writes the form's data to the default cursor's edit buffer. If -there is no default cursor or no default form, nothing happens. - -

          Property Documentation

          -

          bool autoEdit

          -

          This property holds whether the browser automatically applies edits. -

          The default value for this property is TRUE. When the user begins -an insertion or an update on a form there are two possible -outcomes when they navigate to another record: -

            -
          • the insert or update is is performed -- this occurs if autoEdit is TRUE -
          • the insert or update is discarded -- this occurs if autoEdit is FALSE -
          - -

          Set this property's value with setAutoEdit() and get this property's value with autoEdit(). -

          bool boundaryChecking

          -

          This property holds whether boundary checking is active. -

          When boundary checking is active (the default), signals are -emitted indicating the current position of the default cursor. -

          See also boundary(). - -

          Set this property's value with setBoundaryChecking() and get this property's value with boundaryChecking(). -

          bool confirmCancels

          -

          This property holds whether the browser confirms cancel operations. -

          If this property is TRUE, all cancels must be confirmed by the -user through a message box (this behavior can be changed by -overriding the confirmCancel() function), otherwise all cancels -occur immediately. The default is FALSE. -

          See also confirmEdits and confirmCancel(). - -

          Set this property's value with setConfirmCancels() and get this property's value with confirmCancels(). -

          bool confirmDelete

          -

          This property holds whether the browser confirms deletions. -

          If this property is TRUE, the browser confirms deletions, -otherwise deletions happen immediately. -

          See also confirmCancels, confirmEdits, confirmUpdate, confirmInsert, and confirmEdit(). - -

          Set this property's value with setConfirmDelete() and get this property's value with confirmDelete(). -

          bool confirmEdits

          -

          This property holds whether the browser confirms edits. -

          If this property is TRUE, the browser confirms all edit operations -(insertions, updates and deletions), otherwise all edit operations -happen immediately. Confirmation is achieved by presenting the -user with a message box -- this behavior can be changed by -reimplementing the confirmEdit() function, -

          See also confirmEdit(), confirmCancels, confirmInsert, confirmUpdate, and confirmDelete. - -

          Set this property's value with setConfirmEdits() and get this property's value with confirmEdits(). -

          bool confirmInsert

          -

          This property holds whether the data browser confirms insertions. -

          If this property is TRUE, the browser confirms insertions, -otherwise insertions happen immediately. -

          See also confirmCancels, confirmEdits, confirmUpdate, confirmDelete, and confirmEdit(). - -

          Set this property's value with setConfirmInsert() and get this property's value with confirmInsert(). -

          bool confirmUpdate

          -

          This property holds whether the browser confirms updates. -

          If this property is TRUE, the browser confirms updates, otherwise -updates happen immediately. -

          See also confirmCancels, confirmEdits, confirmInsert, confirmDelete, and confirmEdit(). - -

          Set this property's value with setConfirmUpdate() and get this property's value with confirmUpdate(). -

          TQString filter

          -

          This property holds the data browser's filter. -

          The filter applies to the data shown in the browser. Call -refresh() to apply the new filter. A filter is a string containing -a SQL WHERE clause without the WHERE keyword, e.g. "id>1000", -"name LIKE 'A%'", etc. -

          There is no default filter. -

          See also sort. - -

          Set this property's value with setFilter() and get this property's value with filter(). -

          bool readOnly

          -

          This property holds whether the browser is read-only. -

          The default is FALSE, i.e. data can be edited. If the data browser -is read-only, no database edits will be allowed. - -

          Set this property's value with setReadOnly() and get this property's value with isReadOnly(). -

          TQStringList sort

          -

          This property holds the data browser's sort. -

          The data browser's sort affects the order in which records are -viewed in the browser. Call refresh() to apply the new sort. -

          When retrieving the sort property, a string list is returned in -the form 'fieldname order', e.g. 'id ASC', 'surname DESC'. -

          There is no default sort. -

          Note that if you want to iterate over the list, you should iterate -over a copy, e.g. -

          -    TQStringList list = myDataBrowser.sort();
          -    TQStringList::Iterator it = list.begin();
          -    while( it != list.end() ) {
          -        myProcessing( *it );
          -        ++it;
          -    }
          -    
          - - -

          Set this property's value with setSort() and get this property's value with sort(). - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqdatatable.html b/doc/html/ntqdatatable.html deleted file mode 100644 index ae25effa3..000000000 --- a/doc/html/ntqdatatable.html +++ /dev/null @@ -1,809 +0,0 @@ - - - - - -TQDataTable Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQDataTable Class Reference
          [sql module]

          - -

          The TQDataTable class provides a flexible SQL table widget that supports browsing and editing. -More... -

          #include <ntqdatatable.h> -

          Inherits TQTable. -

          List of all member functions. -

          Public Members

          - -

          Public Slots

          - -

          Signals

          - -

          Properties

          -
            -
          • bool autoEdit - whether the data table automatically applies edits
          • -
          • bool confirmCancels - whether the data table confirms cancel operations
          • -
          • bool confirmDelete - whether the data table confirms delete operations
          • -
          • bool confirmEdits - whether the data table confirms edit operations
          • -
          • bool confirmInsert - whether the data table confirms insert operations
          • -
          • bool confirmUpdate - whether the data table confirms update operations
          • -
          • DateFormat dateFormat - the format used for displaying date/time values
          • -
          • TQString falseText - the text used to represent false values
          • -
          • TQString filter - the data filter for the data table
          • -
          • TQString nullText - the text used to represent NULL values
          • -
          • int numCols - the number of columns in the table  (read only)
          • -
          • int numRows - the number of rows in the table  (read only)
          • -
          • TQStringList sort - the data table's sort
          • -
          • TQString trueText - the text used to represent true values
          • -
          -

          Protected Members

          - -

          Detailed Description

          - - -The TQDataTable class provides a flexible SQL table widget that supports browsing and editing. -

          - - -

          TQDataTable supports various functions for presenting and editing -SQL data from a TQSqlCursor in a table. -

          If you want a to present your data in a form use TQDataBrowser, or -for read-only forms, TQDataView. -

          When displaying data, TQDataTable only retrieves data for visible -rows. If the driver supports the 'query size' property the -TQDataTable will have the correct number of rows and the vertical -scrollbar will accurately reflect the number of rows displayed in -proportion to the number of rows in the dataset. If the driver -does not support the 'query size' property, rows are dynamically -fetched from the database on an as-needed basis with the scrollbar -becoming more accurate as the user scrolls down through the -records. This allows extremely large queries to be displayed as -quickly as possible, with minimum memory usage. -

          TQDataTable inherits TQTable's API and extends it with functions to -sort and filter the data and sort columns. See setSqlCursor(), -setFilter(), setSort(), setSorting(), sortColumn() and refresh(). -

          When displaying editable cursors, cell editing will be enabled. -(For more information on editable cursors, see TQSqlCursor). -TQDataTable can be used to modify existing data and to add new -records. When a user makes changes to a field in the table, the -cursor's edit buffer is used. The table will not send changes in -the edit buffer to the database until the user moves to a -different record in the grid or presses Enter. Cell editing is -initiated by pressing F2 (or right clicking and then clicking the -appropriate popup menu item) and canceled by pressing Esc. If -there is a problem updating or adding data, errors are handled -automatically (see handleError() to change this behavior). Note -that if autoEdit() is FALSE navigating to another record will -cancel the insert or update. -

          The user can be asked to confirm all edits with setConfirmEdits(). -For more precise control use setConfirmInsert(), -setConfirmUpdate(), setConfirmDelete() and setConfirmCancels(). -Use setAutoEdit() to control the behaviour of the table when the -user edits a record and then navigates. (Note that setAutoDelete() -is unrelated; it is used to set whether the TQSqlCursor is deleted -when the table is deleted.) -

          Since the data table can perform edits, it must be able to -uniquely identify every record so that edits are correctly -applied. Because of this the underlying cursor must have a valid -primary index to ensure that a unique record is inserted, updated -or deleted within the database otherwise the database may be -changed to an inconsistent state. -

          TQDataTable creates editors using the default TQSqlEditorFactory. -Different editor factories can be used by calling -installEditorFactory(). A property map is used to map between the -cell's value and the editor. You can use your own property map -with installPropertyMap(). -

          The contents of a cell is available as a TQString with text() or as -a TQVariant with value(). The current record is returned by -currentRecord(). Use the find() function to search for a string in -the table. -

          Editing actions can be applied programatically. For example, the -insertCurrent() function reads the fields from the current record -into the cursor and performs the insert. The updateCurrent() and -deleteCurrent() functions perform similarly to update and delete -the current record respectively. -

          Columns in the table can be created automatically based on the -cursor (see setSqlCursor()). Columns can be manipulated manually -using addColumn(), removeColumn() and setColumn(). -

          The table automatically copies many of the properties of the -cursor to format the display of data within cells (alignment, -visibility, etc.). The cursor can be changed with setSqlCursor(). -The filter (see setFilter()) and sort defined within the table are -used instead of the filter and sort set on the cursor. For sorting -options see setSort(), sortColumn(), sortAscending() and -sortDescending(). Note that sorting operations will not behave as -expected if you are using a TQSqlSelectCursor because it uses -user-defined SQL queries to obtain data. -

          The text used to represent NULL, TRUE and FALSE values can be -changed with setNullText(), setTrueText() and setFalseText() -respectively. You can change the appearance of cells by -reimplementing paintField(). -

          Whenever a new row is selected in the table the currentChanged() -signal is emitted. The primeInsert() signal is emitted when an -insert is initiated. The primeUpdate() and primeDelete() signals -are emitted when update and deletion are initiated respectively. -Just before the database is updated a signal is emitted; -beforeInsert(), beforeUpdate() or beforeDelete() as appropriate. -

          See also Database Classes. - -


          Member Type Documentation

          -

          TQDataTable::Refresh

          - -

          This enum describes the refresh options. -

            -
          • TQDataTable::RefreshData - refresh the data, i.e. read it from the database -
          • TQDataTable::RefreshColumns - refresh the list of fields, e.g. the column headings -
          • TQDataTable::RefreshAll - refresh both the data and the list of fields -
          -

          Member Function Documentation

          -

          TQDataTable::TQDataTable ( TQWidget * parent = 0, const char * name = 0 ) -

          -Constructs a data table which is a child of parent, called -name name. - -

          TQDataTable::TQDataTable ( TQSqlCursor * cursor, bool autoPopulate = FALSE, TQWidget * parent = 0, const char * name = 0 ) -

          -Constructs a data table which is a child of parent, called name -name using the cursor cursor. -

          If autoPopulate is TRUE (the default is FALSE), columns are -automatically created based upon the fields in the cursor -record. Note that autoPopulate only governs the creation of -columns; to load the cursor's data into the table use refresh(). -

          If the cursor is read-only, the table also becomes read-only. -In addition, the table adopts the cursor's driver's definition for -representing NULL values as strings. - -

          TQDataTable::~TQDataTable () -

          -Destroys the object and frees any allocated resources. - -

          void TQDataTable::addColumn ( const TQString & fieldName, const TQString & label = TQString::null, int width = -1, const TQIconSet & iconset = TQIconSet ( ) ) [virtual] -

          -Adds the next column to be displayed using the field fieldName, -column label label, width width and iconset iconset. -

          If label is specified, it is used as the column's header label, -otherwise the field's display label is used when setSqlCursor() is -called. The iconset is used to set the icon used by the column -header; by default there is no icon. -

          See also setSqlCursor() and refresh(). - -

          Examples: sql/overview/subclass1/main.cpp, sql/overview/subclass3/main.cpp, sql/overview/table2/main.cpp, and sql/sqltable/main.cpp. -

          void TQDataTable::adjustColumn ( int col ) [virtual slot] -

          -Resizes column col so that the column width is wide enough to -display the widest item the column contains (including the column -label). If the table's TQSqlCursor is not currently active, the -cursor will be refreshed before the column width is calculated. Be -aware that this function may be slow on tables that contain large -result sets. - -

          Reimplemented from TQTable. -

          bool TQDataTable::autoDelete () const -

          -Returns TRUE if the table will automatically delete the cursor -specified by setSqlCursor(); otherwise returns FALSE. - -

          bool TQDataTable::autoEdit () const -

          Returns TRUE if the data table automatically applies edits; otherwise returns FALSE. -See the "autoEdit" property for details. -

          void TQDataTable::beforeDelete ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted just before the currently selected record -is deleted from the database. The buf parameter points to the -edit buffer being deleted. Connect to this signal to, for example, -copy some of the fields for later use. - -

          void TQDataTable::beforeInsert ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted just before the cursor's edit buffer is -inserted into the database. The buf parameter points to the -edit buffer being inserted. Connect to this signal to, for -example, populate a key field with a unique sequence number. - -

          void TQDataTable::beforeUpdate ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted just before the cursor's edit buffer is -updated in the database. The buf parameter points to the edit -buffer being updated. Connect to this signal when you want to -transform the user's data behind-the-scenes. - -

          bool TQDataTable::beginInsert () [virtual protected] -

          -Protected virtual function called when editing is about to begin -on a new record. If the table is read-only, or if there's no -cursor or the cursor does not allow inserts, nothing happens. -

          Editing takes place using the cursor's edit buffer(see -TQSqlCursor::editBuffer()). -

          When editing begins, a new row is created in the table marked with -an asterisk '*' in the row's vertical header column, i.e. at the -left of the row. - -

          TQWidget * TQDataTable::beginUpdate ( int row, int col, bool replace ) [virtual protected] -

          -Protected virtual function called when editing is about to begin -on an existing row. If the table is read-only, or if there's no -cursor, nothing happens. -

          Editing takes place using the cursor's edit buffer (see -TQSqlCursor::editBuffer()). -

          row and col refer to the row and column in the TQDataTable. -

          (replace is provided for reimplementors and reflects the API of -TQTable::beginEdit().) - -

          TQSql::Confirm TQDataTable::confirmCancel ( TQSql::Op m ) [virtual protected] -

          -Protected virtual function which returns a confirmation for -cancelling an edit mode of m. Derived classes can reimplement -this function to provide their own cancel dialog. The default -implementation uses a message box which prompts the user to -confirm the cancel. - -

          bool TQDataTable::confirmCancels () const -

          Returns TRUE if the data table confirms cancel operations; otherwise returns FALSE. -See the "confirmCancels" property for details. -

          bool TQDataTable::confirmDelete () const -

          Returns TRUE if the data table confirms delete operations; otherwise returns FALSE. -See the "confirmDelete" property for details. -

          TQSql::Confirm TQDataTable::confirmEdit ( TQSql::Op m ) [virtual protected] -

          -Protected virtual function which returns a confirmation for an -edit of mode m. Derived classes can reimplement this function -to provide their own confirmation dialog. The default -implementation uses a message box which prompts the user to -confirm the edit action. - -

          bool TQDataTable::confirmEdits () const -

          Returns TRUE if the data table confirms edit operations; otherwise returns FALSE. -See the "confirmEdits" property for details. -

          bool TQDataTable::confirmInsert () const -

          Returns TRUE if the data table confirms insert operations; otherwise returns FALSE. -See the "confirmInsert" property for details. -

          bool TQDataTable::confirmUpdate () const -

          Returns TRUE if the data table confirms update operations; otherwise returns FALSE. -See the "confirmUpdate" property for details. -

          void TQDataTable::currentChanged ( TQSqlRecord * record ) [signal] -

          - -

          This signal is emitted whenever a new row is selected in the -table. The record parameter points to the contents of the newly -selected record. - -

          TQSqlRecord * TQDataTable::currentRecord () const -

          -Returns the currently selected record, or 0 if there is no current -selection. The table owns the pointer, so do not delete it or -otherwise modify it or the cursor it points to. - -

          void TQDataTable::cursorChanged ( TQSql::Op mode ) [signal] -

          - -

          This signal is emitted whenever the cursor record was changed due -to an edit. The mode parameter is the type of edit that just -took place. - -

          DateFormat TQDataTable::dateFormat () const -

          Returns the format used for displaying date/time values. -See the "dateFormat" property for details. -

          bool TQDataTable::deleteCurrent () [virtual protected] -

          -For an editable table, issues a delete on the current cursor's -primary index using the values of the currently selected row. If -there is no current cursor or there is no current selection, -nothing happens. If confirmEdits() or confirmDelete() is TRUE, -confirmEdit() is called to confirm the delete. Returns TRUE if the -delete succeeded; otherwise FALSE. -

          The underlying cursor must have a valid primary index to ensure -that a unique record is deleted within the database otherwise the -database may be changed to an inconsistent state. - -

          TQString TQDataTable::falseText () const -

          Returns the text used to represent false values. -See the "falseText" property for details. -

          int TQDataTable::fieldAlignment ( const TQSqlField * field ) [virtual protected] -

          -Returns the alignment for field. - -

          TQString TQDataTable::filter () const -

          Returns the data filter for the data table. -See the "filter" property for details. -

          void TQDataTable::find ( const TQString & str, bool caseSensitive, bool backwards ) [virtual slot] -

          -Searches the current cursor for a cell containing the string str starting at the current cell and working forwards (or -backwards if backwards is TRUE). If the string is found, the -cell containing the string is set as the current cell. If caseSensitive is FALSE the case of str will be ignored. -

          The search will wrap, i.e. if the first (or if backwards is TRUE, -last) cell is reached without finding str the search will -continue until it reaches the starting cell. If str is not -found the search will fail and the current cell will remain -unchanged. - -

          void TQDataTable::handleError ( const TQSqlError & e ) [virtual protected] -

          -Protected virtual function which is called when an error e has -occurred on the current cursor(). The default implementation -displays a warning message to the user with information about the -error. - -

          int TQDataTable::indexOf ( uint i ) const [protected] -

          -Returns the index of the field within the current SQL query that -is displayed in column i. - -

          bool TQDataTable::insertCurrent () [virtual protected] -

          -For an editable table, issues an insert on the current cursor -using the values in the cursor's edit buffer. If there is no -current cursor or there is no current "insert" row, nothing -happens. If confirmEdits() or confirmInsert() is TRUE, -confirmEdit() is called to confirm the insert. Returns TRUE if the -insert succeeded; otherwise returns FALSE. -

          The underlying cursor must have a valid primary index to ensure -that a unique record is inserted within the database otherwise the -database may be changed to an inconsistent state. - -

          void TQDataTable::installEditorFactory ( TQSqlEditorFactory * f ) -

          -Installs a new SQL editor factory f. This enables the user to -create and instantiate their own editors for use in cell editing. -Note that TQDataTable takes ownership of this pointer, and will -delete it when it is no longer needed or when -installEditorFactory() is called again. -

          See also TQSqlEditorFactory. - -

          void TQDataTable::installPropertyMap ( TQSqlPropertyMap * m ) -

          -Installs a new property map m. This enables the user to create -and instantiate their own property maps for use in cell editing. -Note that TQDataTable takes ownership of this pointer, and will -delete it when it is no longer needed or when installPropertMap() -is called again. -

          See also TQSqlPropertyMap. - -

          TQString TQDataTable::nullText () const -

          Returns the text used to represent NULL values. -See the "nullText" property for details. -

          int TQDataTable::numCols () const [virtual] -

          Returns the number of columns in the table. -See the "numCols" property for details. -

          Reimplemented from TQTable. -

          int TQDataTable::numRows () const [virtual] -

          Returns the number of rows in the table. -See the "numRows" property for details. -

          Reimplemented from TQTable. -

          void TQDataTable::paintField ( TQPainter * p, const TQSqlField * field, const TQRect & cr, bool selected ) [virtual protected] -

          -Paints the field on the painter p. The painter has already -been translated to the appropriate cell's origin where the field is to be rendered. cr describes the cell coordinates in -the content coordinate system. The selected parameter is -ignored. -

          If you want to draw custom field content you must reimplement -paintField() to do the custom drawing. The default implementation -renders the field value as text. If the field is NULL, -nullText() is displayed in the cell. If the field is Boolean, -trueText() or falseText() is displayed as appropriate. - -

          Example: sql/overview/table4/main.cpp. -

          void TQDataTable::primeDelete ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted after the cursor is primed for delete by -the table, when a delete action is beginning on the table. The buf parameter points to the edit buffer being deleted. Connect to -this signal in order to, for example, record auditing information -on deletions. - -

          void TQDataTable::primeInsert ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted after the cursor is primed for insert by -the table, when an insert action is beginning on the table. The buf parameter points to the edit buffer being inserted. Connect to -this signal in order to, for example, prime the record buffer with -default data values. - -

          void TQDataTable::primeUpdate ( TQSqlRecord * buf ) [signal] -

          - -

          This signal is emitted after the cursor is primed for update by -the table, when an update action is beginning on the table. The buf parameter points to the edit buffer being updated. Connect to -this signal in order to, for example, provide some visual feedback -that the user is in 'edit mode'. - -

          void TQDataTable::refresh () [virtual slot] -

          -Refreshes the table. The cursor is refreshed using the current -filter, the current sort, and the currently defined columns. -Equivalent to calling refresh( TQDataTable::RefreshData ). - -

          Examples: sql/overview/subclass1/main.cpp, sql/overview/table1/main.cpp, sql/overview/table2/main.cpp, and sql/sqltable/main.cpp. -

          void TQDataTable::refresh ( Refresh mode ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Refreshes the table. If there is no currently defined cursor (see -setSqlCursor()), nothing happens. The mode parameter determines -which type of refresh will take place. -

          See also Refresh, setSqlCursor(), and addColumn(). - -

          void TQDataTable::removeColumn ( uint col ) [virtual] -

          -Removes column col from the list of columns to be displayed. If -col does not exist, nothing happens. -

          See also TQSqlField. - -

          void TQDataTable::reset () [protected] -

          -Resets the table so that it displays no data. -

          See also setSqlCursor(). - -

          void TQDataTable::setAutoDelete ( bool enable ) [virtual] -

          -Sets the cursor auto-delete flag to enable. If enable is -TRUE, the table will automatically delete the cursor specified by -setSqlCursor(). If enable is FALSE (the default), the cursor -will not be deleted. - -

          void TQDataTable::setAutoEdit ( bool autoEdit ) [virtual] -

          Sets whether the data table automatically applies edits to autoEdit. -See the "autoEdit" property for details. -

          void TQDataTable::setColumn ( uint col, const TQString & fieldName, const TQString & label = TQString::null, int width = -1, const TQIconSet & iconset = TQIconSet ( ) ) [virtual] -

          -Sets the col column to display using the field fieldName, -column label label, width width and iconset iconset. -

          If label is specified, it is used as the column's header label, -otherwise the field's display label is used when setSqlCursor() is -called. The iconset is used to set the icon used by the column -header; by default there is no icon. -

          See also setSqlCursor() and refresh(). - -

          void TQDataTable::setColumnWidth ( int col, int w ) [virtual slot] -

          -Sets the column col to the width w. Note that unlike TQTable -the TQDataTable is not immediately redrawn, you must call -refresh(TQDataTable::RefreshColumns) -yourself. -

          See also refresh(). - -

          Reimplemented from TQTable. -

          void TQDataTable::setConfirmCancels ( bool confirm ) [virtual] -

          Sets whether the data table confirms cancel operations to confirm. -See the "confirmCancels" property for details. -

          void TQDataTable::setConfirmDelete ( bool confirm ) [virtual] -

          Sets whether the data table confirms delete operations to confirm. -See the "confirmDelete" property for details. -

          void TQDataTable::setConfirmEdits ( bool confirm ) [virtual] -

          Sets whether the data table confirms edit operations to confirm. -See the "confirmEdits" property for details. -

          void TQDataTable::setConfirmInsert ( bool confirm ) [virtual] -

          Sets whether the data table confirms insert operations to confirm. -See the "confirmInsert" property for details. -

          void TQDataTable::setConfirmUpdate ( bool confirm ) [virtual] -

          Sets whether the data table confirms update operations to confirm. -See the "confirmUpdate" property for details. -

          void TQDataTable::setDateFormat ( const DateFormat f ) [virtual] -

          Sets the format used for displaying date/time values to f. -See the "dateFormat" property for details. -

          void TQDataTable::setFalseText ( const TQString & falseText ) [virtual] -

          Sets the text used to represent false values to falseText. -See the "falseText" property for details. -

          void TQDataTable::setFilter ( const TQString & filter ) [virtual] -

          Sets the data filter for the data table to filter. -See the "filter" property for details. -

          void TQDataTable::setNullText ( const TQString & nullText ) [virtual] -

          Sets the text used to represent NULL values to nullText. -See the "nullText" property for details. -

          void TQDataTable::setSize ( TQSqlCursor * sql ) [protected] -

          -If the cursor's sql driver supports query sizes, the number of -rows in the table is set to the size of the query. Otherwise, the -table dynamically resizes itself as it is scrolled. If sql is -not active, it is made active by issuing a select() on the cursor -using the sql cursor's current filter and current sort. - -

          void TQDataTable::setSort ( const TQStringList & sort ) [virtual] -

          Sets the data table's sort to sort. -See the "sort" property for details. -

          void TQDataTable::setSort ( const TQSqlIndex & sort ) [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Sets the sort to be applied to the displayed data to sort. If -there is no current cursor, nothing happens. A TQSqlIndex contains -field names and their ordering (ASC or DESC); these are used to -compose the ORDER BY clause. -

          See also sort. - -

          void TQDataTable::setSqlCursor ( TQSqlCursor * cursor = 0, bool autoPopulate = FALSE, bool autoDelete = FALSE ) [virtual] -

          -Sets cursor as the data source for the table. To force the -display of the data from cursor, use refresh(). If autoPopulate is TRUE, columns are automatically created based upon -the fields in the cursor record. If autoDelete is TRUE (the -default is FALSE), the table will take ownership of the cursor -and delete it when appropriate. If the cursor is read-only, the -table becomes read-only. The table adopts the cursor's driver's -definition for representing NULL values as strings. -

          See also refresh(), readOnly, setAutoDelete(), and TQSqlDriver::nullText(). - -

          void TQDataTable::setTrueText ( const TQString & trueText ) [virtual] -

          Sets the text used to represent true values to trueText. -See the "trueText" property for details. -

          TQStringList TQDataTable::sort () const -

          Returns the data table's sort. -See the "sort" property for details. -

          void TQDataTable::sortAscending ( int col ) [virtual slot] -

          -Sorts column col in ascending order. -

          See also sorting. - -

          void TQDataTable::sortColumn ( int col, bool ascending = TRUE, bool wholeRows = FALSE ) [virtual] -

          -Sorts column col in ascending order if ascending is TRUE -(the default); otherwise sorts in descending order. -

          The wholeRows parameter is ignored; TQDataTable always sorts -whole rows by the specified column. - -

          Reimplemented from TQTable. -

          void TQDataTable::sortDescending ( int col ) [virtual slot] -

          -Sorts column col in descending order. -

          See also sorting. - -

          TQSqlCursor * TQDataTable::sqlCursor () const -

          -Returns the cursor used by the data table. - -

          TQString TQDataTable::text ( int row, int col ) const [virtual] -

          -Returns the text in cell row, col, or an empty string if the -cell is empty. If the cell's value is NULL then nullText() will be -returned. If the cell does not exist then TQString::null is -returned. - -

          Reimplemented from TQTable. -

          TQString TQDataTable::trueText () const -

          Returns the text used to represent true values. -See the "trueText" property for details. -

          bool TQDataTable::updateCurrent () [virtual protected] -

          -For an editable table, issues an update using the cursor's edit -buffer. If there is no current cursor or there is no current -selection, nothing happens. If confirmEdits() or confirmUpdate() -is TRUE, confirmEdit() is called to confirm the update. Returns -TRUE if the update succeeded; otherwise returns FALSE. -

          The underlying cursor must have a valid primary index to ensure -that a unique record is updated within the database otherwise the -database may be changed to an inconsistent state. - -

          TQVariant TQDataTable::value ( int row, int col ) const -

          -Returns the value in cell row, col, or an invalid value if -the cell does not exist or has no value. - -

          Property Documentation

          -

          bool autoEdit

          -

          This property holds whether the data table automatically applies edits. -

          The default value for this property is TRUE. When the user begins -an insert or update in the table there are two possible outcomes -when they navigate to another record: -

            -
          1. the insert or update is is performed -- this occurs if autoEdit is TRUE -
          2. the insert or update is abandoned -- this occurs if autoEdit is FALSE -
          - -

          Set this property's value with setAutoEdit() and get this property's value with autoEdit(). -

          bool confirmCancels

          -

          This property holds whether the data table confirms cancel operations. -

          If the confirmCancel property is TRUE, all cancels must be -confirmed by the user through a message box (this behavior can be -changed by overriding the confirmCancel() function), otherwise all -cancels occur immediately. The default is FALSE. -

          See also confirmEdits and confirmCancel(). - -

          Set this property's value with setConfirmCancels() and get this property's value with confirmCancels(). -

          bool confirmDelete

          -

          This property holds whether the data table confirms delete operations. -

          If the confirmDelete property is TRUE, all deletions must be -confirmed by the user through a message box (this behaviour can be -changed by overriding the confirmEdit() function), otherwise all -delete operations occur immediately. -

          See also confirmCancels, confirmEdits, confirmUpdate, and confirmInsert. - -

          Set this property's value with setConfirmDelete() and get this property's value with confirmDelete(). -

          bool confirmEdits

          -

          This property holds whether the data table confirms edit operations. -

          If the confirmEdits property is TRUE, the data table confirms all -edit operations (inserts, updates and deletes). Finer control of -edit confirmation can be achieved using confirmCancels, confirmInsert, confirmUpdate and confirmDelete. -

          See also confirmCancels, confirmInsert, confirmUpdate, and confirmDelete. - -

          Set this property's value with setConfirmEdits() and get this property's value with confirmEdits(). -

          bool confirmInsert

          -

          This property holds whether the data table confirms insert operations. -

          If the confirmInsert property is TRUE, all insertions must be -confirmed by the user through a message box (this behaviour can be -changed by overriding the confirmEdit() function), otherwise all -insert operations occur immediately. -

          See also confirmCancels, confirmEdits, confirmUpdate, and confirmDelete. - -

          Set this property's value with setConfirmInsert() and get this property's value with confirmInsert(). -

          bool confirmUpdate

          -

          This property holds whether the data table confirms update operations. -

          If the confirmUpdate property is TRUE, all updates must be -confirmed by the user through a message box (this behaviour can be -changed by overriding the confirmEdit() function), otherwise all -update operations occur immediately. -

          See also confirmCancels, confirmEdits, confirmInsert, and confirmDelete. - -

          Set this property's value with setConfirmUpdate() and get this property's value with confirmUpdate(). -

          DateFormat dateFormat

          -

          This property holds the format used for displaying date/time values. -

          The dateFormat property is used for displaying date/time values in -the table. The default value is TQt::LocalDate. - -

          Set this property's value with setDateFormat() and get this property's value with dateFormat(). -

          TQString falseText

          -

          This property holds the text used to represent false values. -

          The falseText property will be used to represent NULL values in -the table. The default value is "False". - -

          Set this property's value with setFalseText() and get this property's value with falseText(). -

          TQString filter

          -

          This property holds the data filter for the data table. -

          The filter applies to the data shown in the table. To view data -with a new filter, use refresh(). A filter string is an SQL WHERE -clause without the WHERE keyword. -

          There is no default filter. -

          See also sort. - -

          -

          Set this property's value with setFilter() and get this property's value with filter(). -

          TQString nullText

          -

          This property holds the text used to represent NULL values. -

          The nullText property will be used to represent NULL values in the -table. The default value is provided by the cursor's driver. - -

          Set this property's value with setNullText() and get this property's value with nullText(). -

          int numCols

          -

          This property holds the number of columns in the table. -

          -

          Get this property's value with numCols(). -

          int numRows

          -

          This property holds the number of rows in the table. -

          -

          Get this property's value with numRows(). -

          TQStringList sort

          -

          This property holds the data table's sort. -

          The table's sort affects the order in which data records are -displayed in the table. To apply a sort, use refresh(). -

          When examining the sort property, a string list is returned with -each item having the form 'fieldname order' (e.g., 'id ASC', -'surname DESC'). -

          There is no default sort. -

          Note that if you want to iterate over the sort list, you should -iterate over a copy, e.g. -

          -    TQStringList list = myDataTable.sort();
          -    TQStringList::Iterator it = list.begin();
          -    while( it != list.end() ) {
          -        myProcessing( *it );
          -        ++it;
          -    }
          -    
          - -

          See also filter and refresh(). - -

          Set this property's value with setSort() and get this property's value with sort(). -

          TQString trueText

          -

          This property holds the text used to represent true values. -

          The trueText property will be used to represent NULL values in the -table. The default value is "True". - -

          Set this property's value with setTrueText() and get this property's value with trueText(). - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqdataview.html b/doc/html/ntqdataview.html deleted file mode 100644 index 336364560..000000000 --- a/doc/html/ntqdataview.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - -TQDataView Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQDataView Class Reference
          [sql module]

          - -

          The TQDataView class provides read-only SQL forms. -More... -

          #include <ntqdataview.h> -

          Inherits TQWidget. -

          List of all member functions. -

          Public Members

          -
            -
          • TQDataView ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 )
          • -
          • ~TQDataView ()
          • -
          • virtual void setForm ( TQSqlForm * form )
          • -
          • TQSqlForm * form ()
          • -
          • virtual void setRecord ( TQSqlRecord * record )
          • -
          • TQSqlRecord * record ()
          • -
          -

          Public Slots

          - -

          Detailed Description

          - - -The TQDataView class provides read-only SQL forms. -

          - - -

          This class provides a form which displays SQL field data from a -record buffer. Because TQDataView does not support editing it uses -less resources than a TQDataBrowser. This class is well suited for -displaying read-only data from a SQL database. -

          If you want a to present your data in an editable form use -TQDataBrowser; if you want a table-based presentation of your data -use TQDataTable. -

          The form is associated with the data view with setForm() and the -record is associated with setRecord(). You can also pass a -TQSqlRecord to the refresh() function which will set the record to -the given record and read the record's fields into the form. -

          See also Database Classes. - -


          Member Function Documentation

          -

          TQDataView::TQDataView ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 ) -

          -Constructs a data view which is a child of parent, called name, and with widget flags fl. - -

          TQDataView::~TQDataView () -

          -Destroys the object and frees any allocated resources. - -

          void TQDataView::clearValues () [virtual slot] -

          -Clears the default form's values. If there is no default form, -nothing happens. All the values are set to their 'zero state', -e.g. 0 for numeric fields, "" for string fields. - -

          TQSqlForm * TQDataView::form () -

          -Returns the default form used by the data view, or 0 if there is -none. -

          See also setForm(). - -

          void TQDataView::readFields () [virtual slot] -

          -Causes the default form to read its fields from the record buffer. -If there is no default form, or no record, nothing happens. -

          See also setForm(). - -

          TQSqlRecord * TQDataView::record () -

          -Returns the default record used by the data view, or 0 if there is -none. -

          See also setRecord(). - -

          void TQDataView::refresh ( TQSqlRecord * buf ) [virtual slot] -

          -Causes the default form to display the contents of buf. If -there is no default form, nothing happens.The buf also becomes -the default record for all subsequent calls to readFields() and -writefields(). This slot is equivalant to calling: -

          -    myView.setRecord( record );
          -    myView.readFields();
          -    
          - -

          See also setRecord() and readFields(). - -

          void TQDataView::setForm ( TQSqlForm * form ) [virtual] -

          -Sets the form used by the data view to form. If a record has -already been assigned to the data view, the form will display that -record's data. -

          See also form(). - -

          void TQDataView::setRecord ( TQSqlRecord * record ) [virtual] -

          -Sets the record used by the data view to record. If a form has -already been assigned to the data view, the form will display the -data from record in that form. -

          See also record(). - -

          void TQDataView::writeFields () [virtual slot] -

          -Causes the default form to write its fields to the record buffer. -If there is no default form, or no record, nothing happens. -

          See also setForm(). - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqeditorfactory.html b/doc/html/ntqeditorfactory.html deleted file mode 100644 index b48bbbec5..000000000 --- a/doc/html/ntqeditorfactory.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - -TQEditorFactory Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQEditorFactory Class Reference
          [sql module]

          - -

          The TQEditorFactory class is used to create editor widgets -for TQVariant data types. -More... -

          #include <ntqeditorfactory.h> -

          Inherits TQObject. -

          Inherited by TQSqlEditorFactory. -

          List of all member functions. -

          Public Members

          - -

          Static Public Members

          - -

          Detailed Description

          - - -The TQEditorFactory class is used to create editor widgets -for TQVariant data types. -

          - -

          Each editor factory provides the createEditor() function which -given a TQVariant will create and return a TQWidget that can edit -that TQVariant. For example if you have a TQVariant::String type, a -TQLineEdit would be the default editor returned, whereas a -TQVariant::Int's default editor would be a TQSpinBox. -

          If you want to create different editors for fields with the same -data type, subclass TQEditorFactory and reimplement the -createEditor() function. -

          See also Database Classes. - -


          Member Function Documentation

          -

          TQEditorFactory::TQEditorFactory ( TQObject * parent = 0, const char * name = 0 ) -

          -Constructs an editor factory with parent parent, called name. - -

          TQEditorFactory::~TQEditorFactory () -

          -Destroys the object and frees any allocated resources. - -

          TQWidget * TQEditorFactory::createEditor ( TQWidget * parent, const TQVariant & v ) [virtual] -

          -Creates and returns the appropriate editor for the TQVariant v. -If the TQVariant is invalid, 0 is returned. The parent is passed -to the appropriate editor's constructor. - -

          Reimplemented in TQSqlEditorFactory. -

          TQEditorFactory * TQEditorFactory::defaultFactory () [static] -

          -Returns an instance of a default editor factory. - -

          void TQEditorFactory::installDefaultFactory ( TQEditorFactory * factory ) [static] -

          -Replaces the default editor factory with factory. -TQEditorFactory takes ownership of factory, and destroys it when it is no longer needed. - - -

          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsql.html b/doc/html/ntqsql.html deleted file mode 100644 index 02e5c3ac6..000000000 --- a/doc/html/ntqsql.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - -TQSql Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSql Class Reference
          [sql module]

          - -

          The TQSql class is a namespace for TQt SQL identifiers that -need to be global-like. -More... -

          #include <ntqsql.h> -

          List of all member functions. -

          Public Members

          -
            -
          • TQSql ()
          • -
          • enum Op { None = -1, Insert = 0, Update = 1, Delete = 2 }
          • -
          • enum Location { BeforeFirst = -1, AfterLast = -2 }
          • -
          • enum Confirm { Cancel = -1, No = 0, Yes = 1 }
          • -
          • enum ParameterType { In = 1, Out = 2, InOut = 3 }
          • -
          • enum TableType { Tables = 0x01, SystemTables = 0x02, Views = 0x04, AllTables = 0xff }
          • -
          -

          Detailed Description

          - - -The TQSql class is a namespace for TQt SQL identifiers that -need to be global-like. -

          - - -

          Normally, you can ignore this class. Several TQt SQL classes -inherit it, so all the identifiers in the TQt SQL namespace are -visible without qualification. -

          See also Database Classes. - -


          Member Type Documentation

          -

          TQSql::Confirm

          - -

          This enum type describes edit confirmations. -

            -
          • TQSql::Yes -
          • TQSql::No -
          • TQSql::Cancel -
          -

          TQSql::Location

          - -

          This enum type describes SQL navigation locations. -

            -
          • TQSql::BeforeFirst -
          • TQSql::AfterLast -
          -

          TQSql::Op

          - -

          This enum type describes edit operations. -

            -
          • TQSql::None -
          • TQSql::Insert -
          • TQSql::Update -
          • TQSql::Delete -
          -

          TQSql::ParameterType

          - -

          This enum is used to set the type of a bind parameter -

            -
          • TQSql::In - the bind parameter is used to put data into the database -
          • TQSql::Out - the bind parameter is used to receive data from the database -
          • TQSql::InOut - the bind parameter is used to put data into the -database; it will be overwritten with output data on executing -a query. -
          -

          TQSql::TableType

          - -

          This enum type describes types of tables -

            -
          • TQSql::Tables - All the tables visible to the user -
          • TQSql::SystemTables - Internal tables used by the DBMS -
          • TQSql::Views - All the views visible to the user -
          • TQSql::AllTables - All of the above -
          -

          Member Function Documentation

          -

          TQSql::TQSql () -

          - -

          Constructs a TQt SQL namespace class - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlcursor.html b/doc/html/ntqsqlcursor.html deleted file mode 100644 index e0aa1ff2f..000000000 --- a/doc/html/ntqsqlcursor.html +++ /dev/null @@ -1,761 +0,0 @@ - - - - - -TQSqlCursor Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlCursor Class Reference
          [sql module]

          - -

          The TQSqlCursor class provides browsing and editing of SQL -tables and views. -More... -

          #include <ntqsqlcursor.h> -

          Inherits TQSqlRecord and TQSqlQuery. -

          Inherited by TQSqlSelectCursor. -

          List of all member functions. -

          Public Members

          -
            -
          • TQSqlCursor ( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase * db = 0 )
          • -
          • TQSqlCursor ( const TQSqlCursor & other )
          • -
          • TQSqlCursor & operator= ( const TQSqlCursor & other )
          • -
          • ~TQSqlCursor ()
          • -
          • enum Mode { ReadOnly = 0, Insert = 1, Update = 2, Delete = 4, Writable = 7 }
          • -
          • virtual TQSqlIndex primaryIndex ( bool setFromCursor = TRUE ) const
          • -
          • virtual TQSqlIndex index ( const TQStringList & fieldNames ) const
          • -
          • TQSqlIndex index ( const TQString & fieldName ) const
          • -
          • TQSqlIndex index ( const char * fieldName ) const
          • -
          • virtual void setPrimaryIndex ( const TQSqlIndex & idx )
          • -
          • virtual void append ( const TQSqlFieldInfo & fieldInfo )
          • -
          • virtual void insert ( int pos, const TQSqlFieldInfo & fieldInfo )
          • -
          • virtual void remove ( int pos )
          • -
          • virtual void clear ()
          • -
          • virtual void setGenerated ( const TQString & name, bool generated )
          • -
          • virtual void setGenerated ( int i, bool generated )
          • -
          • virtual TQSqlRecord * editBuffer ( bool copy = FALSE )
          • -
          • virtual TQSqlRecord * primeInsert ()
          • -
          • virtual TQSqlRecord * primeUpdate ()
          • -
          • virtual TQSqlRecord * primeDelete ()
          • -
          • virtual int insert ( bool invalidate = TRUE )
          • -
          • virtual int update ( bool invalidate = TRUE )
          • -
          • virtual int del ( bool invalidate = TRUE )
          • -
          • virtual void setMode ( int mode )
          • -
          • int mode () const
          • -
          • virtual void setCalculated ( const TQString & name, bool calculated )
          • -
          • bool isCalculated ( const TQString & name ) const
          • -
          • virtual void setTrimmed ( const TQString & name, bool trim )
          • -
          • bool isTrimmed ( const TQString & name ) const
          • -
          • bool isReadOnly () const
          • -
          • bool canInsert () const
          • -
          • bool canUpdate () const
          • -
          • bool canDelete () const
          • -
          • bool select ()
          • -
          • bool select ( const TQSqlIndex & sort )
          • -
          • bool select ( const TQSqlIndex & filter, const TQSqlIndex & sort )
          • -
          • virtual bool select ( const TQString & filter, const TQSqlIndex & sort = TQSqlIndex ( ) )
          • -
          • virtual void setSort ( const TQSqlIndex & sort )
          • -
          • TQSqlIndex sort () const
          • -
          • virtual void setFilter ( const TQString & filter )
          • -
          • TQString filter () const
          • -
          • virtual void setName ( const TQString & name, bool autopopulate = TRUE )
          • -
          • TQString name () const
          • -
          • bool isNull ( int i ) const
          • -
          • bool isNull ( const TQString & name ) const
          • -
          -

          Protected Members

          -
            -
          • virtual TQVariant calculateField ( const TQString & name )
          • -
          • virtual int update ( const TQString & filter, bool invalidate = TRUE )
          • -
          • virtual int del ( const TQString & filter, bool invalidate = TRUE )
          • -
          • virtual TQString toString ( const TQString & prefix, TQSqlField * field, const TQString & fieldSep ) const
          • -
          • virtual TQString toString ( TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const
          • -
          • virtual TQString toString ( const TQSqlIndex & i, TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const
          • -
          -

          Detailed Description

          - - -The TQSqlCursor class provides browsing and editing of SQL -tables and views. -

          - -

          A TQSqlCursor is a database record (see TQSqlRecord) that -corresponds to a table or view within an SQL database (see TQSqlDatabase). There are two buffers in a cursor, one used for -browsing and one used for editing records. Each buffer contains a -list of fields which correspond to the fields in the table or -view. -

          When positioned on a valid record, the browse buffer contains the -values of the current record's fields from the database. The edit -buffer is separate, and is used for editing existing records and -inserting new records. -

          For browsing data, a cursor must first select() data from the -database. After a successful select() the cursor is active -(isActive() returns TRUE), but is initially not positioned on a -valid record (isValid() returns FALSE). To position the cursor on -a valid record, use one of the navigation functions, next(), -prev(), first(), last(), or seek(). Once positioned on a valid -record, data can be retrieved from the browse buffer using -value(). If a navigation function is not successful, it returns -FALSE, the cursor will no longer be positioned on a valid record -and the values returned by value() are undefined. -

          For example: -

          - -

                      TQSqlCursor cur( "staff" ); // Specify the table/view name
          -            cur.select(); // We'll retrieve every record
          -            while ( cur.next() ) {
          -                tqDebug( cur.value( "id" ).toString() + ": " +
          -                        cur.value( "surname" ).toString() + " " +
          -                        cur.value( "salary" ).toString() );
          -            }
          -
          -

          In the above example, a cursor is created specifying a table or -view name in the database. Then, select() is called, which can be -optionally parameterised to filter and order the records -retrieved. Each record in the cursor is retrieved using next(). -When next() returns FALSE, there are no more records to process, -and the loop terminates. -

          For editing records (rows of data), a cursor contains a separate -edit buffer which is independent of the fields used when browsing. -The functions insert(), update() and del() operate on the edit -buffer. This allows the cursor to be repositioned to other -records while simultaneously maintaining a separate buffer for -edits. You can get a pointer to the edit buffer using -editBuffer(). The primeInsert(), primeUpdate() and primeDelete() -functions also return a pointer to the edit buffer and prepare it -for insert, update and delete respectively. Edit operations only -affect a single row at a time. Note that update() and del() -require that the table or view contain a primaryIndex() to ensure -that edit operations affect a unique record within the database. -

          For example: -

          - -

                      TQSqlCursor cur( "prices" );
          -            cur.select( "id=202" );
          -            if ( cur.next() ) {
          -                TQSqlRecord *buffer = cur.primeUpdate();
          -                double price = buffer->value( "price" ).toDouble();
          -                double newprice = price * 1.05;
          -                buffer->setValue( "price", newprice );
          -                cur.update();
          -            }
          -
          -

          To edit an existing database record, first move to the record you -wish to update. Call primeUpdate() to get the pointer to the -cursor's edit buffer. Then use this pointer to modify the values -in the edit buffer. Finally, call update() to save the changes to -the database. The values in the edit buffer will be used to -locate the appropriate record when updating the database (see -primaryIndex()). -

          Similarly, when deleting an existing database record, first move -to the record you wish to delete. Then, call primeDelete() to get -the pointer to the edit buffer. Finally, call del() to delete the -record from the database. Again, the values in the edit buffer -will be used to locate and delete the appropriate record. -

          To insert a new record, call primeInsert() to get the pointer to -the edit buffer. Use this pointer to populate the edit buffer -with new values and then insert() the record into the database. -

          After calling insert(), update() or del(), the cursor is no longer -positioned on a valid record and can no longer be navigated -(isValid() return FALSE). The reason for this is that any changes -made to the database will not be visible until select() is called -to refresh the cursor. You can change this behavior by passing -FALSE to insert(), update() or del() which will prevent the cursor -from becoming invalid. The edits will still not be visible when -navigating the cursor until select() is called. -

          TQSqlCursor contains virtual methods which allow editing behavior -to be customized by subclasses. This allows custom cursors to be -created that encapsulate the editing behavior of a database table -for an entire application. For example, a cursor can be customized -to always auto-number primary index fields, or provide fields with -suitable default values, when inserting new records. TQSqlCursor -generates SQL statements which are sent to the database engine; -you can control which fields are included in these statements -using setGenerated(). -

          Note that TQSqlCursor does not inherit from TQObject. This means -that you are responsible for destroying instances of this class -yourself. However if you create a TQSqlCursor and use it in a -TQDataTable, TQDataBrowser or a TQDataView these classes will -usually take ownership of the cursor and destroy it when they -don't need it anymore. The documentation for TQDataTable, -TQDataBrowser and TQDataView explicitly states which calls take -ownership of the cursor. -

          See also Database Classes. - -


          Member Type Documentation

          -

          TQSqlCursor::Mode

          - -

          This enum type describes how TQSqlCursor operates on records in the -database. -

            -
          • TQSqlCursor::ReadOnly - the cursor can only SELECT records from the -database. -
          • TQSqlCursor::Insert - the cursor can INSERT records into the database. -
          • TQSqlCursor::Update - the cursor can UPDATE records in the database. -
          • TQSqlCursor::Delete - the cursor can DELETE records from the database. -
          • TQSqlCursor::Writable - the cursor can INSERT, UPDATE and DELETE records -in the database. -
          -

          Member Function Documentation

          -

          TQSqlCursor::TQSqlCursor ( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase * db = 0 ) -

          -Constructs a cursor on database db using table or view name. -

          If autopopulate is TRUE (the default), the name of the -cursor must correspond to an existing table or view name in the -database so that field information can be automatically created. -If the table or view does not exist, the cursor will not be -functional. -

          The cursor is created with an initial mode of TQSqlCursor::Writable -(meaning that records can be inserted, updated or deleted using -the cursor). If the cursor does not have a unique primary index, -update and deletes cannot be performed. -

          Note that autopopulate refers to populating the cursor with -meta-data, e.g. the names of the table's fields, not with -retrieving data. The select() function is used to populate the -cursor with data. -

          See also setName() and setMode(). - -

          TQSqlCursor::TQSqlCursor ( const TQSqlCursor & other ) -

          -Constructs a copy of other. - -

          TQSqlCursor::~TQSqlCursor () -

          -Destroys the object and frees any allocated resources. - -

          void TQSqlCursor::append ( const TQSqlFieldInfo & fieldInfo ) [virtual] -

          -Append a copy of field fieldInfo to the end of the cursor. Note -that all references to the cursor edit buffer become invalidated. - -

          TQVariant TQSqlCursor::calculateField ( const TQString & name ) [virtual protected] -

          -Protected virtual function which is called whenever a field needs -to be calculated. If calculated fields are being used, derived -classes must reimplement this function and return the appropriate -value for field name. The default implementation returns an -invalid TQVariant. -

          See also setCalculated(). - -

          Examples: sql/overview/subclass3/main.cpp and sql/overview/subclass4/main.cpp. -

          bool TQSqlCursor::canDelete () const -

          -Returns TRUE if the cursor will perform deletes; otherwise returns -FALSE. -

          See also setMode(). - -

          bool TQSqlCursor::canInsert () const -

          -Returns TRUE if the cursor will perform inserts; otherwise returns -FALSE. -

          See also setMode(). - -

          bool TQSqlCursor::canUpdate () const -

          -Returns TRUE if the cursor will perform updates; otherwise returns -FALSE. -

          See also setMode(). - -

          void TQSqlCursor::clear () [virtual] -

          -Removes all fields from the cursor. Note that all references to -the cursor edit buffer become invalidated. - -

          Reimplemented from TQSqlRecord. -

          int TQSqlCursor::del ( bool invalidate = TRUE ) [virtual] -

          -Deletes a record from the database using the cursor's primary -index and the contents of the cursor edit buffer. Returns the -number of records which were deleted. -For error information, use lastError(). -

          Only records which meet the filter criteria specified by the -cursor's primary index are deleted. If the cursor does not contain -a primary index, no delete is performed and 0 is returned. If invalidate is TRUE (the default), the current cursor can no longer -be navigated. A new select() call must be made before you can move -to a valid record. For example: -

          - -

                      TQSqlCursor cur( "prices" );
          -            cur.select( "id=999" );
          -            if ( cur.next() ) {
          -                cur.primeDelete();
          -                cur.del();
          -            }
          -
          -

          In the above example, a cursor is created on the 'prices' table -and positioned to the record to be deleted. First primeDelete() is -called to populate the edit buffer with the current cursor values, -e.g. with an id of 999, and then del() is called to actually -delete the record from the database. Remember: all edit operations -(insert(), update() and delete()) operate on the contents of the -cursor edit buffer and not on the contents of the cursor itself. -

          See also primeDelete(), setMode(), and lastError(). - -

          Example: sql/overview/delete/main.cpp. -

          int TQSqlCursor::del ( const TQString & filter, bool invalidate = TRUE ) [virtual protected] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Deletes the current cursor record from the database using the -filter filter. Only records which meet the filter criteria are -deleted. Returns the number of records which were deleted. If invalidate is TRUE (the default), the current cursor can no longer -be navigated. A new select() call must be made before you can move -to a valid record. For error information, use lastError(). -

          The filter is an SQL WHERE clause, e.g. id=500. -

          See also setMode() and lastError(). - -

          TQSqlRecord * TQSqlCursor::editBuffer ( bool copy = FALSE ) [virtual] -

          -Returns the current internal edit buffer. If copy is TRUE (the -default is FALSE), the current cursor field values are first -copied into the edit buffer. The edit buffer is valid as long as -the cursor remains valid. The cursor retains ownership of the -returned pointer, so it must not be deleted or modified. -

          See also primeInsert(), primeUpdate(), and primeDelete(). - -

          TQString TQSqlCursor::filter () const -

          -Returns the current filter, or an empty string if there is no -current filter. - -

          TQSqlIndex TQSqlCursor::index ( const TQStringList & fieldNames ) const [virtual] -

          -Returns an index composed of fieldNames, all in ASCending -order. Note that all field names must exist in the cursor, -otherwise an empty index is returned. -

          See also TQSqlIndex. - -

          Examples: sql/overview/extract/main.cpp, sql/overview/order1/main.cpp, sql/overview/order2/main.cpp, and sql/overview/table3/main.cpp. -

          TQSqlIndex TQSqlCursor::index ( const TQString & fieldName ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns an index based on fieldName. - -

          TQSqlIndex TQSqlCursor::index ( const char * fieldName ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns an index based on fieldName. - -

          void TQSqlCursor::insert ( int pos, const TQSqlFieldInfo & fieldInfo ) [virtual] -

          -Insert a copy of fieldInfo at position pos. If a field -already exists at pos, it is removed. Note that all references -to the cursor edit buffer become invalidated. - -

          Examples: sql/overview/insert/main.cpp and sql/overview/insert2/main.cpp. -

          int TQSqlCursor::insert ( bool invalidate = TRUE ) [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Inserts the current contents of the cursor's edit record buffer -into the database, if the cursor allows inserts. Returns the -number of rows affected by the insert. For error information, use -lastError(). -

          If invalidate is TRUE (the default), the cursor will no longer -be positioned on a valid record and can no longer be navigated. A -new select() call must be made before navigating to a valid -record. -

          - -

                      TQSqlCursor cur( "prices" );
          -            TQSqlRecord *buffer = cur.primeInsert();
          -            buffer->setValue( "id",    53981 );
          -            buffer->setValue( "name",  "Thingy" );
          -            buffer->setValue( "price", 105.75 );
          -            cur.insert();
          -
          -

          In the above example, a cursor is created on the 'prices' table -and a pointer to the insert buffer is acquired using primeInsert(). -Each field's value is set to the desired value and then insert() -is called to insert the data into the database. Remember: all edit -operations (insert(), update() and delete()) operate on the -contents of the cursor edit buffer and not on the contents of the -cursor itself. -

          See also setMode() and lastError(). - -

          bool TQSqlCursor::isCalculated ( const TQString & name ) const -

          -Returns TRUE if the field name exists and is calculated; -otherwise returns FALSE. -

          See also setCalculated(). - -

          bool TQSqlCursor::isNull ( int i ) const -

          -Returns TRUE if the field i is NULL or if there is no field at -position i; otherwise returns FALSE. -

          This is the same as calling TQSqlRecord::isNull( i ) - -

          bool TQSqlCursor::isNull ( const TQString & name ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns TRUE if the field called name is NULL or if there is no -field called name; otherwise returns FALSE. -

          This is the same as calling TQSqlRecord::isNull( name ) - -

          bool TQSqlCursor::isReadOnly () const -

          -Returns TRUE if the cursor is read-only; otherwise returns FALSE. -The default is FALSE. Read-only cursors cannot be edited using -insert(), update() or del(). -

          See also setMode(). - -

          bool TQSqlCursor::isTrimmed ( const TQString & name ) const -

          -Returns TRUE if the field name exists and is trimmed; otherwise -returns FALSE. -

          When a trimmed field of type string or cstring is read from the -database any trailing (right-most) spaces are removed. -

          See also setTrimmed(). - -

          int TQSqlCursor::mode () const -

          -Returns the current cursor mode. -

          See also setMode(). - -

          TQString TQSqlCursor::name () const -

          -Returns the name of the cursor. - -

          TQSqlCursor & TQSqlCursor::operator= ( const TQSqlCursor & other ) -

          -Sets the cursor equal to other. - -

          TQSqlIndex TQSqlCursor::primaryIndex ( bool setFromCursor = TRUE ) const [virtual] -

          -Returns the primary index associated with the cursor as defined in -the database, or an empty index if there is no primary index. If -setFromCursor is TRUE (the default), the index fields are -populated with the corresponding values in the cursor's current -record. - -

          TQSqlRecord * TQSqlCursor::primeDelete () [virtual] -

          -This function primes the edit buffer's field values for delete and -returns the edit buffer. The default implementation copies the -field values from the current cursor record into the edit buffer -(therefore, this function is equivalent to calling editBuffer( -TRUE ) ). The cursor retains ownership of the returned pointer, so -it must not be deleted or modified. -

          See also editBuffer() and del(). - -

          Example: sql/overview/delete/main.cpp. -

          TQSqlRecord * TQSqlCursor::primeInsert () [virtual] -

          -This function primes the edit buffer's field values for insert and -returns the edit buffer. The default implementation clears all -field values in the edit buffer. The cursor retains ownership of -the returned pointer, so it must not be deleted or modified. -

          See also editBuffer() and insert(). - -

          Examples: sql/overview/insert/main.cpp, sql/overview/insert2/main.cpp, sql/overview/subclass5/main.cpp, and sql/sqltable/main.cpp. -

          TQSqlRecord * TQSqlCursor::primeUpdate () [virtual] -

          -This function primes the edit buffer's field values for update and -returns the edit buffer. The default implementation copies the -field values from the current cursor record into the edit buffer -(therefore, this function is equivalent to calling editBuffer( -TRUE ) ). The cursor retains ownership of the returned pointer, so -it must not be deleted or modified. -

          See also editBuffer() and update(). - -

          Examples: sql/overview/custom1/main.cpp, sql/overview/form1/main.cpp, and sql/overview/update/main.cpp. -

          void TQSqlCursor::remove ( int pos ) [virtual] -

          -Removes the field at pos. If pos does not exist, nothing -happens. Note that all references to the cursor edit buffer become -invalidated. - -

          Reimplemented from TQSqlRecord. -

          bool TQSqlCursor::select ( const TQString & filter, const TQSqlIndex & sort = TQSqlIndex ( ) ) [virtual] -

          -Selects all fields in the cursor from the database matching the -filter criteria filter. The data is returned in the order -specified by the index sort. Returns TRUE if the data was -successfully selected; otherwise returns FALSE. -

          The filter is a string containing a SQL WHERE clause but -without the 'WHERE' keyword. The cursor is initially positioned at -an invalid row after this function is called. To move to a valid -row, use seek(), first(), last(), prev() or next(). -

          Example: -

          -    TQSqlCursor cur( "Employee" ); // Use the Employee table or view
          -    cur.select( "deptno=10" ); // select all records in department 10
          -    while( cur.next() ) {
          -        ... // process data
          -    }
          -    ...
          -    // select records in other departments, ordered by department number
          -    cur.select( "deptno>10", cur.index( "deptno" ) );
          -    ...
          -    
          - -

          The filter will apply to any subsequent select() calls that do not -explicitly specify another filter. Similarly the sort will apply -to any subsequent select() calls that do not explicitly specify -another sort. -

          -    TQSqlCursor cur( "Employee" );
          -    cur.select( "deptno=10" ); // select all records in department 10
          -    while( cur.next() ) {
          -        ... // process data
          -    }
          -    ...
          -    cur.select(); // re-selects all records in department 10
          -    ...
          -    
          - -

          -

          Examples: sql/overview/delete/main.cpp, sql/overview/extract/main.cpp, sql/overview/order1/main.cpp, sql/overview/order2/main.cpp, sql/overview/retrieve2/main.cpp, sql/overview/table3/main.cpp, and sql/overview/update/main.cpp. -

          bool TQSqlCursor::select () -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Selects all fields in the cursor from the database. The rows are -returned in the order specified by the last call to setSort() or -the last call to select() that specified a sort, whichever is the -most recent. If there is no current sort, the order in which the -rows are returned is undefined. The records are filtered according -to the filter specified by the last call to setFilter() or the -last call to select() that specified a filter, whichever is the -most recent. If there is no current filter, all records are -returned. The cursor is initially positioned at an invalid row. To -move to a valid row, use seek(), first(), last(), prev() or -next(). -

          See also setSort() and setFilter(). - -

          bool TQSqlCursor::select ( const TQSqlIndex & sort ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Selects all fields in the cursor from the database. The data is -returned in the order specified by the index sort. The records -are filtered according to the filter specified by the last call to -setFilter() or the last call to select() that specified a filter, -whichever is the most recent. The cursor is initially positioned -at an invalid row. To move to a valid row, use seek(), first(), -last(), prev() or next(). - -

          bool TQSqlCursor::select ( const TQSqlIndex & filter, const TQSqlIndex & sort ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Selects all fields in the cursor matching the filter index filter. The data is returned in the order specified by the index -sort. The filter index works by constructing a WHERE clause -using the names of the fields from the filter and their values -from the current cursor record. The cursor is initially positioned -at an invalid row. To move to a valid row, use seek(), first(), -last(), prev() or next(). This function is useful, for example, -for retrieving data based upon a table's primary index: -

          -    TQSqlCursor cur( "Employee" );
          -    TQSqlIndex pk = cur.primaryIndex();
          -    cur.setValue( "id", 10 );
          -    cur.select( pk, pk ); // generates "SELECT ... FROM Employee WHERE id=10 ORDER BY id"
          -    ...
          -    
          - -

          In this example the TQSqlIndex, pk, is used for two different -purposes. When used as the filter (first) argument, the field -names it contains are used to construct the WHERE clause, each set -to the current cursor value, WHERE id=10, in this case. When -used as the sort (second) argument the field names it contains are -used for the ORDER BY clause, ORDER BY id in this example. - -

          void TQSqlCursor::setCalculated ( const TQString & name, bool calculated ) [virtual] -

          -Sets field name to calculated. If the field name does not -exist, nothing happens. The value of a calculated field is set by -the calculateField() virtual function which you must reimplement -(or the field value will be an invalid TQVariant). Calculated -fields do not appear in generated SQL statements sent to the -database. -

          See also calculateField() and TQSqlRecord::setGenerated(). - -

          void TQSqlCursor::setFilter ( const TQString & filter ) [virtual] -

          -Sets the current filter to filter. Note that no new records are -selected. To select new records, use select(). The filter will -apply to any subsequent select() calls that do not explicitly -specify a filter. -

          The filter is a SQL WHERE clause without the keyword 'WHERE', -e.g. name='Dave' which will be processed by the DBMS. - -

          void TQSqlCursor::setGenerated ( const TQString & name, bool generated ) [virtual] -

          -Sets the generated flag for the field name to generated. If -the field does not exist, nothing happens. Only fields that have -generated set to TRUE are included in the SQL that is -generated by insert(), update() or del(). -

          See also isGenerated(). - -

          Reimplemented from TQSqlRecord. -

          void TQSqlCursor::setGenerated ( int i, bool generated ) [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Sets the generated flag for the field i to generated. -

          See also isGenerated(). - -

          Reimplemented from TQSqlRecord. -

          void TQSqlCursor::setMode ( int mode ) [virtual] -

          -Sets the cursor mode to mode. This value can be an OR'ed -combination of TQSqlCursor::Mode values. The default mode for a -cursor is TQSqlCursor::Writable. -

          -    TQSqlCursor cur( "Employee" );
          -    cur.setMode( TQSqlCursor::Writable ); // allow insert/update/delete
          -    ...
          -    cur.setMode( TQSqlCursor::Insert | TQSqlCursor::Update ); // allow inserts and updates only
          -    ...
          -    cur.setMode( TQSqlCursor::ReadOnly ); // no inserts/updates/deletes allowed
          -
          -    
          - - -

          void TQSqlCursor::setName ( const TQString & name, bool autopopulate = TRUE ) [virtual] -

          -Sets the name of the cursor to name. If autopopulate is TRUE -(the default), the name must correspond to a valid table or -view name in the database. Also, note that all references to the -cursor edit buffer become invalidated when fields are -auto-populated. See the TQSqlCursor constructor documentation for -more information. - -

          void TQSqlCursor::setPrimaryIndex ( const TQSqlIndex & idx ) [virtual] -

          -Sets the primary index associated with the cursor to the index idx. Note that this index must contain a field or set of fields -which identify a unique record within the underlying database -table or view so that update() and del() will execute as expected. -

          See also update() and del(). - -

          void TQSqlCursor::setSort ( const TQSqlIndex & sort ) [virtual] -

          -Sets the current sort to sort. Note that no new records are -selected. To select new records, use select(). The sort will -apply to any subsequent select() calls that do not explicitly -specify a sort. - -

          void TQSqlCursor::setTrimmed ( const TQString & name, bool trim ) [virtual] -

          -Sets field name's trimmed status to trim. If the field name does not exist, nothing happens. -

          When a trimmed field of type string or cstring is read from the -database any trailing (right-most) spaces are removed. -

          See also isTrimmed() and TQVariant. - -

          TQSqlIndex TQSqlCursor::sort () const -

          -Returns the current sort, or an empty index if there is no current -sort. - -

          TQString TQSqlCursor::toString ( TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const [virtual protected] -

          -Returns a formatted string composed of all the fields in rec. -Each field is composed of the prefix (e.g. table or view name), -".", the field name, the fieldSep and the field value. If the -prefix is empty then each field will begin with the field name. -The fields are then joined together separated by sep. Fields -where isGenerated() returns FALSE are not included. This function -is useful for generating SQL statements. - -

          TQString TQSqlCursor::toString ( const TQString & prefix, TQSqlField * field, const TQString & fieldSep ) const [virtual protected] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns a formatted string composed of the prefix (e.g. table -or view name), ".", the field name, the fieldSep and the -field value. If the prefix is empty then the string will begin -with the field name. This function is useful for generating SQL -statements. - -

          TQString TQSqlCursor::toString ( const TQSqlIndex & i, TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const [virtual protected] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns a formatted string composed of all the fields in the index -i. Each field is composed of the prefix (e.g. table or view -name), ".", the field name, the fieldSep and the field value. -If the prefix is empty then each field will begin with the field -name. The field values are taken from rec. The fields are then -joined together separated by sep. Fields where isGenerated() -returns FALSE are ignored. This function is useful for generating -SQL statements. - -

          int TQSqlCursor::update ( bool invalidate = TRUE ) [virtual] -

          -Updates the database with the current contents of the edit buffer. -Returns the number of records which were updated. -For error information, use lastError(). -

          Only records which meet the filter criteria specified by the -cursor's primary index are updated. If the cursor does not contain -a primary index, no update is performed and 0 is returned. -

          If invalidate is TRUE (the default), the current cursor can no -longer be navigated. A new select() call must be made before you -can move to a valid record. For example: -

          - -

                      TQSqlCursor cur( "prices" );
          -            cur.select( "id=202" );
          -            if ( cur.next() ) {
          -                TQSqlRecord *buffer = cur.primeUpdate();
          -                double price = buffer->value( "price" ).toDouble();
          -                double newprice = price * 1.05;
          -                buffer->setValue( "price", newprice );
          -                cur.update();
          -            }
          -
          -

          In the above example, a cursor is created on the 'prices' table -and is positioned on the record to be updated. Then a pointer to -the cursor's edit buffer is acquired using primeUpdate(). A new -value is calculated and placed into the edit buffer with the -setValue() call. Finally, an update() call is made on the cursor -which uses the tables's primary index to update the record in the -database with the contents of the cursor's edit buffer. Remember: -all edit operations (insert(), update() and delete()) operate on -the contents of the cursor edit buffer and not on the contents of -the cursor itself. -

          Note that if the primary index does not uniquely distinguish -records the database may be changed into an inconsistent state. -

          See also setMode() and lastError(). - -

          Example: sql/overview/update/main.cpp. -

          int TQSqlCursor::update ( const TQString & filter, bool invalidate = TRUE ) [virtual protected] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Updates the database with the current contents of the cursor edit -buffer using the specified filter. Returns the number of -records which were updated. -For error information, use lastError(). -

          Only records which meet the filter criteria are updated, otherwise -all records in the table are updated. -

          If invalidate is TRUE (the default), the cursor can no longer -be navigated. A new select() call must be made before you can move -to a valid record. -

          See also primeUpdate(), setMode(), and lastError(). - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqldatabase.html b/doc/html/ntqsqldatabase.html deleted file mode 100644 index b9d908512..000000000 --- a/doc/html/ntqsqldatabase.html +++ /dev/null @@ -1,668 +0,0 @@ - - - - - -TQSqlDatabase Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlDatabase Class Reference
          [sql module]

          - -

          The TQSqlDatabase class is used to create SQL database -connections and to provide transaction handling. -More... -

          #include <ntqsqldatabase.h> -

          Inherits TQObject. -

          List of all member functions. -

          Public Members

          - -

          Static Public Members

          -
            -
          • TQSqlDatabase * addDatabase ( const TQString & type, const TQString & connectionName = defaultConnection )
          • -
          • TQSqlDatabase * addDatabase ( TQSqlDriver * driver, const TQString & connectionName = defaultConnection )
          • -
          • TQSqlDatabase * database ( const TQString & connectionName = defaultConnection, bool open = TRUE )
          • -
          • void removeDatabase ( const TQString & connectionName )
          • -
          • void removeDatabase ( TQSqlDatabase * db )
          • -
          • bool contains ( const TQString & connectionName = defaultConnection )
          • -
          • TQStringList drivers ()
          • -
          • void registerSqlDriver ( const TQString & name, const TQSqlDriverCreatorBase * creator )
          • -
          • bool isDriverAvailable ( const TQString & name )
          • -
          -

          Properties

          -
            -
          • TQString connectOptions - the database connect options
          • -
          • TQString databaseName - the name of the database
          • -
          • TQString hostName - the host name where the database resides
          • -
          • TQString password - the password used to connect to the database
          • -
          • int port - the port used to connect to the database
          • -
          • TQString userName - the user name connected to the database
          • -
          -

          Protected Members

          -
            -
          • TQSqlDatabase ( const TQString & type, const TQString & name, TQObject * parent = 0, const char * objname = 0 )
          • -
          • TQSqlDatabase ( TQSqlDriver * driver, TQObject * parent = 0, const char * objname = 0 )
          • -
          -

          Detailed Description

          - - -The TQSqlDatabase class is used to create SQL database -connections and to provide transaction handling. -

          - - -

          Note that transaction handling is not supported by every SQL -database. You can find out whether transactions are supported -using TQSqlDriver::hasFeature(). -

          The TQSqlDatabase class provides an abstract interface for -accessing many types of database backends. Database-specific -drivers are used internally to actually access and manipulate -data, (see TQSqlDriver). Result set objects provide the interface -for executing and manipulating SQL queries (see TQSqlQuery). -

          See also Database Classes. - -


          Member Function Documentation

          -

          TQSqlDatabase::TQSqlDatabase ( const TQString & type, const TQString & name, TQObject * parent = 0, const char * objname = 0 ) [protected] -

          -Creates a TQSqlDatabase connection called name that uses the -driver referred to by type, with the parent parent and the -object name objname. If the type is not recognized, the -database connection will have no functionality. -

          The currently available drivers are: -

          -
          Driver Type Description -
          TQODBC3 ODBC Driver (includes Microsoft SQL Server) -
          TQOCI8 Oracle Call Interface Driver -
          TQPSQL7 PostgreSQL v6.x and v7.x Driver -
          TQTDS7 Sybase Adaptive Server -
          TQMYSQL3 MySQL Driver -
          TQDB2 IBM DB2, v7.1 and higher -
          TQSQLITE SQLite Driver -
          TQIBASE Borland Interbase Driver -
          -

          Additional third party drivers, including your own custom drivers, -can be loaded dynamically. -

          See also registerSqlDriver(). - -

          TQSqlDatabase::TQSqlDatabase ( TQSqlDriver * driver, TQObject * parent = 0, const char * objname = 0 ) [protected] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Creates a database connection using the driver driver, with -the parent parent and the object name objname. -

          Warning: The framework takes ownership of the driver pointer, -so it should not be deleted. - -

          TQSqlDatabase::~TQSqlDatabase () -

          -Destroys the object and frees any allocated resources. - -

          TQSqlDatabase * TQSqlDatabase::addDatabase ( const TQString & type, const TQString & connectionName = defaultConnection ) [static] -

          -Adds a database to the list of database connections using the -driver type and the connection name connectionName. -

          The database connection is referred to by connectionName. The -newly added database connection is returned. This pointer is owned -by TQSqlDatabase and will be deleted on program exit or when -removeDatabase() is called. -

          If connectionName is not specified, the newly added database -connection becomes the default database connection for the -application, and subsequent calls to database() (without a -database name parameter) will return a pointer to it. If connectionName is given, use database(connectionName) to retrieve a pointer to the -database connection. -

          Warning: If you add a database with the same name as an -existing database, the new database will replace the old one. -This will happen automatically if you call this function more -than once without specifying connectionName. -

          See also database() and removeDatabase(). - -

          Examples: sql/overview/connect1/main.cpp, sql/overview/connection.cpp, and sql/sqltable/main.cpp. -

          TQSqlDatabase * TQSqlDatabase::addDatabase ( TQSqlDriver * driver, const TQString & connectionName = defaultConnection ) [static] -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          This function is useful if you need to set up the database -connection and instantiate the driver yourself. If you do this, it -is recommended that you include the driver code in your own -application. For example, setting up a custom PostgreSQL -connection and instantiating the TQPSQL7 driver can be done the -following way: -

          -    #include "qtdir/src/sql/drivers/psql/qsql_psql.cpp"
          -    
          - -(We assume that qtdir is the directory where TQt is installed.) -This will pull in the code that is needed to use the PostgreSQL -client library and to instantiate a TQPSQLDriver object, assuming -that you have the PostgreSQL headers somewhere in your include -search path. -

          -    PGconn* con = PQconnectdb( "host=server user=bart password=simpson dbname=springfield" );
          -    TQPSQLDriver* drv =  new TQPSQLDriver( con );
          -    TQSqlDatabase* db = TQSqlDatabase::addDatabase( drv ); // becomes the new default connection
          -    TQSqlQuery q;
          -    q.exec( "SELECT * FROM people" );
          -    ...
          -    
          - -

          The above code sets up a PostgreSQL connection and instantiates a -TQPSQLDriver object. Next, addDatabase() is called to add the -connection to the known connections so that it can be used by the -TQt SQL classes. When a driver is instantiated with a connection -handle (or set of handles), TQt assumes that you have already -opened the database connection. -

          Remember that you must link your application against the database -client library as well. The simplest way to do this is to add -lines like those below to your .pro file: -

          -    unix:LIBS += -lpq
          -    win32:LIBS += libpqdll.lib
          -    
          - -

          You will need to have the client library in your linker's search -path. -

          The method described above will work for all the drivers, the only -difference is the arguments the driver constructors take. Below is -an overview of the drivers and their constructor arguments. -

          - - - - - - - - -
          Driver Class name Constructor arguments File to include -
          TQPSQL7 -TQPSQLDriver -PGconn* connection -qsql_psql.cpp -
          TQMYSQL3 -TQMYSQLDriver -MYSQL* connection -qsql_mysql.cpp -
          TQOCI8 -TQOCIDriver -OCIEnv* environment, OCIError* error, OCISvcCtx* serviceContext -qsql_oci.cpp -
          TQODBC3 -TQODBCDriver -SQLHANDLE environment, SQLHANDLE connection -qsql_odbc.cpp -
          TQDB2 -TQDB2 -SQLHANDLE environment, SQLHANDLE connection -qsql_db2.cpp -
          TQTDS7 -TQTDSDriver -LOGINREC* loginRecord, DBPROCESS* dbProcess, const TQString& hostName -qsql_tds.cpp -
          TQSQLITE -TQSQLiteDriver -sqlite* connection -qsql_sqlite.cpp -
          TQIBASE -TQIBaseDriver -isc_db_handle connection -qsql_ibase.cpp -
          -

          Note: The host name (or service name) is needed when constructing -the TQTDSDriver for creating new connections for internal -queries. This is to prevent the simultaneous usage of several -TQSqlQuery/TQSqlCursor objects from blocking each other. -

          Warning: The SQL framework takes ownership of the driver pointer, -and it should not be deleted. The returned TQSqlDatabase object is -owned by the framework and must not be deleted. If you want to -explicitly remove the connection, use removeDatabase() -

          See also drivers(). - -

          void TQSqlDatabase::close () -

          -Closes the database connection, freeing any resources acquired. -

          See also removeDatabase(). - -

          bool TQSqlDatabase::commit () -

          -Commits a transaction to the database if the driver supports -transactions. Returns TRUE if the operation succeeded; otherwise -returns FALSE. -

          See also TQSqlDriver::hasFeature() and rollback(). - -

          TQString TQSqlDatabase::connectOptions () const -

          Returns the database connect options. -See the "connectOptions" property for details. -

          bool TQSqlDatabase::contains ( const TQString & connectionName = defaultConnection ) [static] -

          -Returns TRUE if the list of database connections contains connectionName; otherwise returns FALSE. - -

          TQSqlDatabase * TQSqlDatabase::database ( const TQString & connectionName = defaultConnection, bool open = TRUE ) [static] -

          -Returns the database connection called connectionName. The -database connection must have been previously added with -addDatabase(). If open is TRUE (the default) and the database -connection is not already open it is opened now. If no connectionName is specified the default connection is used. If connectionName does not exist in the list of databases, 0 is -returned. The pointer returned is owned by TQSqlDatabase and should -not be deleted. -

          Warning: There are restrictions on the use of database connections -in threaded applications. Please see the Thread Support in TQt document for more information about -threading and SQL databases. - -

          Examples: sql/overview/basicbrowsing/main.cpp and sql/overview/create_connections/main.cpp. -

          TQString TQSqlDatabase::databaseName () const -

          Returns the name of the database. -See the "databaseName" property for details. -

          TQSqlDriver * TQSqlDatabase::driver () const -

          -Returns the database driver used to access the database -connection. - -

          TQString TQSqlDatabase::driverName () const -

          -Returns the name of the driver used by the database connection. - -

          TQStringList TQSqlDatabase::drivers () [static] -

          -Returns a list of all the available database drivers. -

          Note that if you want to iterate over the list, you should iterate -over a copy, e.g. -

          -    TQStringList list = TQSqlDatabase::drivers();
          -    TQStringList::Iterator it = list.begin();
          -    while( it != list.end() ) {
          -        myProcessing( *it );
          -        ++it;
          -    }
          -    
          - - -

          TQSqlQuery TQSqlDatabase::exec ( const TQString & query = TQString::null ) const -

          -Executes a SQL statement (e.g. an INSERT, UPDATE or DELETE statement) on the database, and returns a TQSqlQuery object. -Use lastError() to retrieve error information. If query is -TQString::null, an empty, invalid query is returned and lastError() -is not affected. -

          See also TQSqlQuery and lastError(). - -

          TQString TQSqlDatabase::hostName () const -

          Returns the host name where the database resides. -See the "hostName" property for details. -

          bool TQSqlDatabase::isDriverAvailable ( const TQString & name ) [static] -

          -Returns TRUE if a driver called name is available; otherwise -returns FALSE. -

          See also drivers(). - -

          bool TQSqlDatabase::isOpen () const -

          -Returns TRUE if the database connection is currently open; -otherwise returns FALSE. - -

          bool TQSqlDatabase::isOpenError () const -

          -Returns TRUE if there was an error opening the database -connection; otherwise returns FALSE. Error information can be -retrieved using the lastError() function. - -

          TQSqlError TQSqlDatabase::lastError () const -

          -Returns information about the last error that occurred on the -database. See TQSqlError for more information. - -

          Examples: sql/overview/connection.cpp and sql/sqltable/main.cpp. -

          bool TQSqlDatabase::open () -

          -Opens the database connection using the current connection values. -Returns TRUE on success; otherwise returns FALSE. Error -information can be retrieved using the lastError() function. -

          See also lastError(). - -

          Examples: sql/overview/connect1/main.cpp, sql/overview/connection.cpp, and sql/sqltable/main.cpp. -

          bool TQSqlDatabase::open ( const TQString & user, const TQString & password ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Opens the database connection using the given user name and password. Returns TRUE on success; otherwise returns FALSE. Error -information can be retrieved using the lastError() function. -

          This function does not store the password it is given. Instead, -the password is passed directly to the driver for opening a -connection and is then discarded. -

          See also lastError(). - -

          TQString TQSqlDatabase::password () const -

          Returns the password used to connect to the database. -See the "password" property for details. -

          int TQSqlDatabase::port () const -

          Returns the port used to connect to the database. -See the "port" property for details. -

          TQSqlIndex TQSqlDatabase::primaryIndex ( const TQString & tablename ) const -

          -Returns the primary index for table tablename. If no primary -index exists an empty TQSqlIndex will be returned. - -

          TQSqlRecord TQSqlDatabase::record ( const TQString & tablename ) const -

          -Returns a TQSqlRecord populated with the names of all the fields in -the table (or view) called tablename. The order in which the -fields appear in the record is undefined. If no such table (or -view) exists, an empty record is returned. -

          See also recordInfo(). - -

          TQSqlRecord TQSqlDatabase::record ( const TQSqlQuery & query ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns a TQSqlRecord populated with the names of all the fields -used in the SQL query. If the query is a "SELECT *" the order -in which fields appear in the record is undefined. -

          See also recordInfo(). - -

          TQSqlRecordInfo TQSqlDatabase::recordInfo ( const TQString & tablename ) const -

          -Returns a TQSqlRecordInfo populated with meta data about the table -or view tablename. If no such table (or view) exists, an empty -record is returned. -

          See also TQSqlRecordInfo, TQSqlFieldInfo, and record(). - -

          TQSqlRecordInfo TQSqlDatabase::recordInfo ( const TQSqlQuery & query ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns a TQSqlRecordInfo object with meta data for the TQSqlQuery -query. Note that this overloaded function may return less -information than the recordInfo() function which takes the name of -a table as parameter. -

          See also TQSqlRecordInfo, TQSqlFieldInfo, and record(). - -

          void TQSqlDatabase::registerSqlDriver ( const TQString & name, const TQSqlDriverCreatorBase * creator ) [static] -

          -This function registers a new SQL driver called name, within -the SQL framework. This is useful if you have a custom SQL driver -and don't want to compile it as a plugin. -

          Example usage: -

          -    TQSqlDatabase::registerSqlDriver( "MYDRIVER", new TQSqlDriverCreator<MyDatabaseDriver> );
          -    TQSqlDatabase* db = TQSqlDatabase::addDatabase( "MYDRIVER" );
          -    ...
          -    
          - -

          Warning: The framework takes ownership of the creator pointer, -so it should not be deleted. - -

          void TQSqlDatabase::removeDatabase ( const TQString & connectionName ) [static] -

          -Removes the database connection connectionName from the list of -database connections. -

          Warning: There should be no open queries on the database -connection when this function is called, otherwise a resource leak -will occur. - -

          void TQSqlDatabase::removeDatabase ( TQSqlDatabase * db ) [static] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Removes the database connection db from the list of database -connections. The TQSqlDatabase object is destroyed when it is removed -from the list. -

          Warning: The db pointer is not valid after this function has -been called. There should be no open queries on the database -connection when this function is called, otherwise a resource leak -will occur. - -

          bool TQSqlDatabase::rollback () -

          -Rolls a transaction back on the database if the driver supports -transactions. Returns TRUE if the operation succeeded; otherwise -returns FALSE. -

          See also TQSqlDriver::hasFeature(), commit(), and transaction(). - -

          void TQSqlDatabase::setConnectOptions ( const TQString & options = TQString::null ) -

          Sets the database connect options to options. -See the "connectOptions" property for details. -

          void TQSqlDatabase::setDatabaseName ( const TQString & name ) [virtual] -

          Sets the name of the database to name. -See the "databaseName" property for details. -

          void TQSqlDatabase::setHostName ( const TQString & host ) [virtual] -

          Sets the host name where the database resides to host. -See the "hostName" property for details. -

          void TQSqlDatabase::setPassword ( const TQString & password ) [virtual] -

          Sets the password used to connect to the database to password. -See the "password" property for details. -

          void TQSqlDatabase::setPort ( int p ) [virtual] -

          Sets the port used to connect to the database to p. -See the "port" property for details. -

          void TQSqlDatabase::setUserName ( const TQString & name ) [virtual] -

          Sets the user name connected to the database to name. -See the "userName" property for details. -

          TQStringList TQSqlDatabase::tables ( TQSql::TableType type ) const -

          -Returns a list of the database's tables, system tables and views, -as specified by the parameter type. -

          Note that if you want to iterate over the list, you should iterate -over a copy, e.g. -

          -    TQStringList list = myDatabase.tables( TQSql::Tables | TQSql::Views );
          -    TQStringList::Iterator it = list.begin();
          -    while( it != list.end() ) {
          -        myProcessing( *it );
          -        ++it;
          -    }
          -    
          - - -

          Example: sql/sqltable/main.cpp. -

          TQStringList TQSqlDatabase::tables () const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns a list of the database's tables that are visible to the -user. To include views or system tables, use the version of this -function that takes a table type parameter. -

          Note that if you want to iterate over the list, you should iterate -over a copy, e.g. -

          -    TQStringList list = myDatabase.tables();
          -    TQStringList::Iterator it = list.begin();
          -    while( it != list.end() ) {
          -        myProcessing( *it );
          -        ++it;
          -    }
          -    
          - - -

          bool TQSqlDatabase::transaction () -

          -Begins a transaction on the database if the driver supports -transactions. Returns TRUE if the operation succeeded; otherwise -returns FALSE. -

          See also TQSqlDriver::hasFeature(), commit(), and rollback(). - -

          TQString TQSqlDatabase::userName () const -

          Returns the user name connected to the database. -See the "userName" property for details. -


          Property Documentation

          -

          TQString connectOptions

          -

          This property holds the database connect options. -

          The format of the options string is a semi-colon separated list of -option names or option = value pairs. The options depend on the -database client used: -

          - -

          -

          ODBC MySQL PostgreSQL -
          -
            -
          • SQL_ATTR_ACCESS_MODE -
          • SQL_ATTR_LOGIN_TIMEOUT -
          • SQL_ATTR_CONNECTION_TIMEOUT -
          • SQL_ATTR_CURRENT_CATALOG -
          • SQL_ATTR_METADATA_ID -
          • SQL_ATTR_PACKET_SIZE -
          • SQL_ATTR_TRACEFILE -
          • SQL_ATTR_TRACE -
          -

          -
            -
          • CLIENT_COMPRESS -
          • CLIENT_FOUND_ROWS -
          • CLIENT_IGNORE_SPACE -
          • CLIENT_SSL -
          • CLIENT_ODBC -
          • CLIENT_NO_SCHEMA -
          • CLIENT_INTERACTIVE -
          -

          -
            -
          • connect_timeout -
          • options -
          • tty -
          • requiressl -
          • service -
          -
          DB2 OCI TDS -
          -
            -
          • SQL_ATTR_ACCESS_MODE -
          • SQL_ATTR_LOGIN_TIMEOUT -
          -

          -none -

          -none -

          -

          Example of usage: -

          -    ...
          -    // MySQL connection
          -    db->setConnectOptions( "CLIENT_SSL;CLIENT_IGNORE_SPACE" ); // use an SSL connection to the server
          -    if ( !db->open() ) {
          -        db->setConnectOptions(); // clears the connect option string
          -        ...
          -    }
          -    ...
          -    // PostgreSQL connection
          -    db->setConnectOptions( "requiressl=1" ); // enable PostgreSQL SSL connections
          -    if ( !db->open() ) {
          -        db->setConnectOptions(); // clear options
          -        ...
          -    }
          -    ...
          -    // ODBC connection
          -    db->setConnectOptions( "SQL_ATTR_ACCESS_MODE=SQL_MODE_READ_ONLY;SQL_ATTR_TRACE=SQL_OPT_TRACE_ON" ); // set ODBC options
          -    if ( !db->open() ) {
          -        db->setConnectOptions(); // don't try to set this option
          -        ...
          -    }
          -    
          - -

          Please refer to the client library documentation for more -information about the different options. The options will be set -prior to opening the database connection. Setting new options -without re-opening the connection does nothing. -

          See also -

          Set this property's value with setConnectOptions() and get this property's value with connectOptions(). -

          TQString databaseName

          -

          This property holds the name of the database. -

          Note that the database name is the TNS Service Name for the TQOCI8 -(Oracle) driver. -

          For the TQODBC3 driver it can either be a DSN, a DSN filename (the -file must have a .dsn extension), or a connection string. MS -Access users can for example use the following connection string -to open a .mdb file directly, instead of having to create a DSN -entry in the ODBC manager: -

          -    ...
          -    db = TQSqlDatabase::addDatabase( "TQODBC3" );
          -    db->setDatabaseName( "DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=myaccessfile.mdb" );
          -    if ( db->open() ) {
          -        // success!
          -    }
          -    ...
          -    
          - -("FIL" is the required spelling in Microsoft's API.) -

          There is no default value. - -

          Set this property's value with setDatabaseName() and get this property's value with databaseName(). -

          TQString hostName

          -

          This property holds the host name where the database resides. -

          There is no default value. - -

          Set this property's value with setHostName() and get this property's value with hostName(). -

          TQString password

          -

          This property holds the password used to connect to the database. -

          There is no default value. -

          Warning: This function stores the password in plain text within -TQt. Use the open() call that takes a password as parameter to -avoid this behaviour. -

          See also open(). - -

          Set this property's value with setPassword() and get this property's value with password(). -

          int port

          -

          This property holds the port used to connect to the database. -

          There is no default value. - -

          Set this property's value with setPort() and get this property's value with port(). -

          TQString userName

          -

          This property holds the user name connected to the database. -

          There is no default value. - -

          Set this property's value with setUserName() and get this property's value with userName(). - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqldriver.html b/doc/html/ntqsqldriver.html deleted file mode 100644 index 8f6e652b7..000000000 --- a/doc/html/ntqsqldriver.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - -TQSqlDriver Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlDriver Class Reference
          [sql module]

          - -

          The TQSqlDriver class is an abstract base class for accessing -SQL databases. -More... -

          #include <ntqsqldriver.h> -

          Inherits TQObject. -

          List of all member functions. -

          Public Members

          -
            -
          • enum DriverFeature { Transactions, QuerySize, BLOB, Unicode, PreparedQueries, NamedPlaceholders, PositionalPlaceholders }
          • -
          • TQSqlDriver ( TQObject * parent = 0, const char * name = 0 )
          • -
          • ~TQSqlDriver ()
          • -
          • bool isOpen () const
          • -
          • bool isOpenError () const
          • -
          • virtual bool beginTransaction ()
          • -
          • virtual bool commitTransaction ()
          • -
          • virtual bool rollbackTransaction ()
          • -
          • virtual TQStringList tables ( const TQString & tableType ) const
          • -
          • virtual TQSqlIndex primaryIndex ( const TQString & tableName ) const
          • -
          • virtual TQSqlRecord record ( const TQString & tableName ) const
          • -
          • virtual TQSqlRecord record ( const TQSqlQuery & query ) const
          • -
          • virtual TQSqlRecordInfo recordInfo ( const TQString & tablename ) const
          • -
          • virtual TQSqlRecordInfo recordInfo ( const TQSqlQuery & query ) const
          • -
          • virtual TQString nullText () const
          • -
          • virtual TQString formatValue ( const TQSqlField * field, bool trimStrings = FALSE ) const
          • -
          • TQSqlError lastError () const
          • -
          • virtual bool hasFeature ( DriverFeature f ) const = 0
          • -
          • virtual bool open ( const TQString & db, const TQString & user = TQString::null, const TQString & password = TQString::null, const TQString & host = TQString::null, int port = -1 ) = 0
          • -
          • virtual void close () = 0
          • -
          • virtual TQSqlQuery createQuery () const = 0
          • -
          • bool open ( const TQString & db, const TQString & user, const TQString & password, const TQString & host, int port, const TQString & connOpts )
          • -
          -

          Protected Members

          - -

          Detailed Description

          - - -The TQSqlDriver class is an abstract base class for accessing -SQL databases. -

          - -

          This class should not be used directly. Use TQSqlDatabase instead. -

          See also Database Classes. - -


          Member Type Documentation

          -

          TQSqlDriver::DriverFeature

          - -

          This enum contains a list of features a driver may support. Use -hasFeature() to query whether a feature is supported or not. -

            -
          • TQSqlDriver::Transactions - whether the driver supports SQL transactions -
          • TQSqlDriver::QuerySize - whether the database is capable of reporting the size -of a query. Note that some databases do not support returning the size -(i.e. number of rows returned) of a query, in which case -TQSqlQuery::size() will return -1 -
          • TQSqlDriver::BLOB - whether the driver supports Binary Large Object fields -
          • TQSqlDriver::Unicode - whether the driver supports Unicode strings if the -database server does -
          • TQSqlDriver::PreparedQueries - whether the driver supports prepared query execution -
          • TQSqlDriver::NamedPlaceholders - whether the driver supports usage of named placeholders -
          • TQSqlDriver::PositionalPlaceholders - whether the driver supports usage of positional placeholders -

          More information about supported features can be found in the -TQt SQL driver documentation. -

          See also hasFeature(). - -


          Member Function Documentation

          -

          TQSqlDriver::TQSqlDriver ( TQObject * parent = 0, const char * name = 0 ) -

          -Default constructor. Creates a new driver with parent parent, -called name. -

          -

          TQSqlDriver::~TQSqlDriver () -

          -Destroys the object and frees any allocated resources. - -

          bool TQSqlDriver::beginTransaction () [virtual] -

          -Protected function which derived classes can reimplement to begin -a transaction. If successful, return TRUE, otherwise return FALSE. -The default implementation returns FALSE. -

          See also commitTransaction() and rollbackTransaction(). - -

          void TQSqlDriver::close () [pure virtual] -

          - -

          Derived classes must reimplement this abstract virtual function in -order to close the database connection. Return TRUE on success, -FALSE on failure. -

          See also setOpen(). - -

          -

          bool TQSqlDriver::commitTransaction () [virtual] -

          -Protected function which derived classes can reimplement to commit -a transaction. If successful, return TRUE, otherwise return FALSE. -The default implementation returns FALSE. -

          See also beginTransaction() and rollbackTransaction(). - -

          TQSqlQuery TQSqlDriver::createQuery () const [pure virtual] -

          - -

          Creates an empty SQL result on the database. Derived classes must -reimplement this function and return a TQSqlQuery object -appropriate for their database to the caller. -

          -

          TQString TQSqlDriver::formatValue ( const TQSqlField * field, bool trimStrings = FALSE ) const [virtual] -

          -Returns a string representation of the field value for the -database. This is used, for example, when constructing INSERT and -UPDATE statements. -

          The default implementation returns the value formatted as a string -according to the following rules: -

            -

          • If field is NULL, nullText() is returned. -

          • If field is character data, the value is returned enclosed -in single quotation marks, which is appropriate for many SQL -databases. Any embedded single-quote characters are escaped -(replaced with two single-quote characters). If trimStrings is -TRUE (the default is FALSE), all trailing whitespace is trimmed -from the field. -

          • If field is date/time data, the value is formatted in ISO -format and enclosed in single quotation marks. If the date/time -data is invalid, nullText() is returned. -

          • If field is bytearray data, and the driver can edit binary -fields, the value is formatted as a hexadecimal string. -

          • For any other field type toString() will be called on its value -and the result returned. -

          -

          See also TQVariant::toString(). - -

          -

          bool TQSqlDriver::hasFeature ( DriverFeature f ) const [pure virtual] -

          - -

          Returns TRUE if the driver supports feature f; otherwise -returns FALSE. -

          Note that some databases need to be open() before this can be -determined. -

          See also DriverFeature. - -

          bool TQSqlDriver::isOpen () const -

          -Returns TRUE if the database connection is open; otherwise returns -FALSE. - -

          bool TQSqlDriver::isOpenError () const -

          -Returns TRUE if the there was an error opening the database -connection; otherwise returns FALSE. - -

          TQSqlError TQSqlDriver::lastError () const -

          -Returns a TQSqlError object which contains information about the -last error that occurred on the database. - -

          TQString TQSqlDriver::nullText () const [virtual] -

          -Returns a string representation of the NULL value for the -database. This is used, for example, when constructing INSERT and -UPDATE statements. The default implementation returns the string -"NULL". - -

          bool TQSqlDriver::open ( const TQString & db, const TQString & user = TQString::null, const TQString & password = TQString::null, const TQString & host = TQString::null, int port = -1 ) [pure virtual] -

          - -

          Derived classes must reimplement this abstract virtual function in -order to open a database connection on database db, using user -name user, password password, host host and port port. -

          The function must return TRUE on success and FALSE on failure. -

          See also setOpen(). - -

          -

          bool TQSqlDriver::open ( const TQString & db, const TQString & user, const TQString & password, const TQString & host, int port, const TQString & connOpts ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Open a database connection on database db, using user name user, password password, host host, port port and -connection options connOpts. -

          Returns TRUE on success and FALSE on failure. -

          See also setOpen(). - -

          TQSqlIndex TQSqlDriver::primaryIndex ( const TQString & tableName ) const [virtual] -

          -Returns the primary index for table tableName. Returns an empty -TQSqlIndex if the table doesn't have a primary index. The default -implementation returns an empty index. - -

          TQSqlRecord TQSqlDriver::record ( const TQString & tableName ) const [virtual] -

          -Returns a TQSqlRecord populated with the names of the fields in -table tableName. If no such table exists, an empty record is -returned. The default implementation returns an empty record. - -

          TQSqlRecord TQSqlDriver::record ( const TQSqlQuery & query ) const [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns a TQSqlRecord populated with the names of the fields in the -SQL query. The default implementation returns an empty record. - -

          TQSqlRecordInfo TQSqlDriver::recordInfo ( const TQString & tablename ) const [virtual] -

          -Returns a TQSqlRecordInfo object with meta data about the table tablename. - -

          TQSqlRecordInfo TQSqlDriver::recordInfo ( const TQSqlQuery & query ) const [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns a TQSqlRecordInfo object with meta data for the TQSqlQuery -query. Note that this overloaded function may return less -information than the recordInfo() function which takes the name of -a table as parameter. - -

          bool TQSqlDriver::rollbackTransaction () [virtual] -

          -Protected function which derived classes can reimplement to -rollback a transaction. If successful, return TRUE, otherwise -return FALSE. The default implementation returns FALSE. -

          See also beginTransaction() and commitTransaction(). - -

          void TQSqlDriver::setLastError ( const TQSqlError & e ) [virtual protected] -

          -Protected function which allows derived classes to set the value -of the last error, e, that occurred on the database. -

          See also lastError(). - -

          void TQSqlDriver::setOpen ( bool o ) [virtual protected] -

          -Protected function which sets the open state of the database to o. Derived classes can use this function to report the status of -open(). -

          See also open() and setOpenError(). - -

          void TQSqlDriver::setOpenError ( bool e ) [virtual protected] -

          -Protected function which sets the open error state of the database -to e. Derived classes can use this function to report the -status of open(). Note that if e is TRUE the open state of the -database is set to closed (i.e. isOpen() returns FALSE). -

          See also open(). - -

          TQStringList TQSqlDriver::tables ( const TQString & tableType ) const [virtual] -

          -Returns a list of tables in the database. The default -implementation returns an empty list. -

          The tableType argument describes what types of tables -should be returned. Due to binary compatibility, the string -contains the value of the enum TQSql::TableTypes as text. -An empty string should be treated as TQSql::Tables for -downward compatibility. -

          See also TQSql::TableType. - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqldriverplugin.html b/doc/html/ntqsqldriverplugin.html deleted file mode 100644 index 4a948e20e..000000000 --- a/doc/html/ntqsqldriverplugin.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - -TQSqlDriverPlugin Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlDriverPlugin Class Reference

          - -

          The TQSqlDriverPlugin class provides an abstract base for custom TQSqlDriver plugins. -More... -

          #include <ntqsqldriverplugin.h> -

          List of all member functions. -

          Public Members

          - -

          Detailed Description

          - - -The TQSqlDriverPlugin class provides an abstract base for custom TQSqlDriver plugins. -

          - -

          The SQL driver plugin is a simple plugin interface that makes it -easy to create your own SQL driver plugins that can be loaded -dynamically by TQt. -

          Writing a SQL plugin is achieved by subclassing this base class, -reimplementing the pure virtual functions keys() and create(), and -exporting the class with the TQ_EXPORT_PLUGIN macro. See the SQL -plugins that come with TQt for example implementations (in the -plugins/src/sqldrivers subdirectory of the source -distribution). Read the plugins - documentation for more information on plugins. -

          See also Plugins. - -


          Member Function Documentation

          -

          TQSqlDriverPlugin::TQSqlDriverPlugin () -

          -Constructs a SQL driver plugin. This is invoked automatically by -the TQ_EXPORT_PLUGIN macro. - -

          TQSqlDriverPlugin::~TQSqlDriverPlugin () -

          -Destroys the SQL driver plugin. -

          You never have to call this explicitly. TQt destroys a plugin -automatically when it is no longer used. - -

          TQSqlDriver * TQSqlDriverPlugin::create ( const TQString & key ) [pure virtual] -

          - -

          Creates and returns a TQSqlDriver object for the driver key key. -The driver key is usually the class name of the required driver. -

          See also keys(). - -

          TQStringList TQSqlDriverPlugin::keys () const [pure virtual] -

          - -

          Returns the list of drivers (keys) this plugin supports. -

          These keys are usually the class names of the custom drivers that -are implemented in the plugin. -

          See also create(). - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqleditorfactory.html b/doc/html/ntqsqleditorfactory.html deleted file mode 100644 index 8ce355d79..000000000 --- a/doc/html/ntqsqleditorfactory.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - -TQSqlEditorFactory Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlEditorFactory Class Reference
          [sql module]

          - -

          The TQSqlEditorFactory class is used to create the editors -used by TQDataTable and TQSqlForm. -More... -

          #include <ntqsqleditorfactory.h> -

          Inherits TQEditorFactory. -

          List of all member functions. -

          Public Members

          - -

          Static Public Members

          - -

          Detailed Description

          - - -The TQSqlEditorFactory class is used to create the editors -used by TQDataTable and TQSqlForm. -

          - -

          TQSqlEditorFactory is used by TQDataTable and TQSqlForm to -automatically create appropriate editors for a given TQSqlField. -For example if the field is a TQVariant::String a TQLineEdit would -be the default editor, whereas a TQVariant::Int's default editor -would be a TQSpinBox. -

          If you want to create different editors for fields with the same -data type, subclass TQSqlEditorFactory and reimplement the -createEditor() function. -

          See also TQDataTable, TQSqlForm, and Database Classes. - -


          Member Function Documentation

          -

          TQSqlEditorFactory::TQSqlEditorFactory ( TQObject * parent = 0, const char * name = 0 ) -

          -Constructs a SQL editor factory with parent parent, called name. - -

          TQSqlEditorFactory::~TQSqlEditorFactory () -

          -Destroys the object and frees any allocated resources. - -

          TQWidget * TQSqlEditorFactory::createEditor ( TQWidget * parent, const TQVariant & variant ) [virtual] -

          -Creates and returns the appropriate editor widget for the TQVariant -variant. -

          The widget that is returned has the parent parent (which may be -zero). If variant is invalid, 0 is returned. - -

          Reimplemented from TQEditorFactory. -

          TQWidget * TQSqlEditorFactory::createEditor ( TQWidget * parent, const TQSqlField * field ) [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Creates and returns the appropriate editor for the TQSqlField field. - -

          TQSqlEditorFactory * TQSqlEditorFactory::defaultFactory () [static] -

          -Returns an instance of a default editor factory. - -

          void TQSqlEditorFactory::installDefaultFactory ( TQSqlEditorFactory * factory ) [static] -

          -Replaces the default editor factory with factory. All -TQDataTable and TQSqlForm instantiations will use this new factory -for creating field editors. TQSqlEditorFactory takes ownership of \a factory, and destroys it when it is no longer needed. - - -

          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlerror.html b/doc/html/ntqsqlerror.html deleted file mode 100644 index 37c25dfd5..000000000 --- a/doc/html/ntqsqlerror.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - -TQSqlError Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlError Class Reference
          [sql module]

          - -

          The TQSqlError class provides SQL database error information. -More... -

          #include <ntqsqlerror.h> -

          List of all member functions. -

          Public Members

          -
            -
          • enum Type { None, Connection, Statement, Transaction, Unknown }
          • -
          • TQSqlError ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 )
          • -
          • TQSqlError ( const TQSqlError & other )
          • -
          • TQSqlError & operator= ( const TQSqlError & other )
          • -
          • virtual ~TQSqlError ()
          • -
          • TQString driverText () const
          • -
          • virtual void setDriverText ( const TQString & driverText )
          • -
          • TQString databaseText () const
          • -
          • virtual void setDatabaseText ( const TQString & databaseText )
          • -
          • int type () const
          • -
          • virtual void setType ( int type )
          • -
          • int number () const
          • -
          • virtual void setNumber ( int number )
          • -
          • TQString text () const
          • -
          • void showMessage ( const TQString & msg = TQString::null ) const  (obsolete)
          • -
          -

          Detailed Description

          - - -The TQSqlError class provides SQL database error information. -

          - -

          This class is used to report database-specific errors. An error -description and (if appropriate) a database-specific error number -can be obtained using this class. -

          See also Database Classes. - -


          Member Type Documentation

          -

          TQSqlError::Type

          - -

          This enum type describes the type of SQL error that occurred. -

            -
          • TQSqlError::None - no error occurred -
          • TQSqlError::Connection - connection error -
          • TQSqlError::Statement - SQL statement syntax error -
          • TQSqlError::Transaction - transaction failed error -
          • TQSqlError::Unknown - unknown error -
          -

          Member Function Documentation

          -

          TQSqlError::TQSqlError ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 ) -

          -Constructs an error containing the driver error text driverText, the database-specific error text databaseText, the -type type and the optional error number number. - -

          TQSqlError::TQSqlError ( const TQSqlError & other ) -

          -Creates a copy of other. - -

          TQSqlError::~TQSqlError () [virtual] -

          -Destroys the object and frees any allocated resources. - -

          TQString TQSqlError::databaseText () const -

          -Returns the text of the error as reported by the database. This -may contain database-specific descriptions. - -

          TQString TQSqlError::driverText () const -

          -Returns the text of the error as reported by the driver. This may -contain database-specific descriptions. - -

          int TQSqlError::number () const -

          -Returns the database-specific error number, or -1 if it cannot be -determined. - -

          TQSqlError & TQSqlError::operator= ( const TQSqlError & other ) -

          -Sets the error equal to other. - -

          void TQSqlError::setDatabaseText ( const TQString & databaseText ) [virtual] -

          -Sets the database error text to the value of databaseText. - -

          void TQSqlError::setDriverText ( const TQString & driverText ) [virtual] -

          -Sets the driver error text to the value of driverText. - -

          void TQSqlError::setNumber ( int number ) [virtual] -

          -Sets the database-specific error number to number. - -

          void TQSqlError::setType ( int type ) [virtual] -

          -Sets the error type to the value of type. - -

          void TQSqlError::showMessage ( const TQString & msg = TQString::null ) const -

          -This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

          This is a convenience function that pops up a TQMessageBox -containing the message returned by text(). An additional string -can be passed in via the msg parameter, which will be -concatenated with the text() message. -

          See also text(), driverText(), and databaseText(). - -

          TQString TQSqlError::text () const -

          -This is a convenience function that returns databaseText() and -driverText() concatenated into a single string. -

          See also showMessage(), driverText(), and databaseText(). - -

          int TQSqlError::type () const -

          -Returns the error type, or -1 if the type cannot be determined. -

          See also TQSqlError::Type. - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlfield.html b/doc/html/ntqsqlfield.html deleted file mode 100644 index ba809da54..000000000 --- a/doc/html/ntqsqlfield.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - -TQSqlField Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlField Class Reference
          [sql module]

          - -

          The TQSqlField class manipulates the fields in SQL database tables -and views. -More... -

          #include <ntqsqlfield.h> -

          List of all member functions. -

          Public Members

          -
            -
          • TQSqlField ( const TQString & fieldName = TQString::null, TQVariant::Type type = TQVariant::Invalid )
          • -
          • TQSqlField ( const TQSqlField & other )
          • -
          • TQSqlField & operator= ( const TQSqlField & other )
          • -
          • bool operator== ( const TQSqlField & other ) const
          • -
          • virtual ~TQSqlField ()
          • -
          • virtual void setValue ( const TQVariant & value )
          • -
          • virtual TQVariant value () const
          • -
          • virtual void setName ( const TQString & name )
          • -
          • TQString name () const
          • -
          • virtual void setNull ()
          • -
          • bool isNull () const
          • -
          • virtual void setReadOnly ( bool readOnly )
          • -
          • bool isReadOnly () const
          • -
          • void clear ( bool nullify = TRUE )
          • -
          • TQVariant::Type type () const
          • -
          -

          Detailed Description

          - - -The TQSqlField class manipulates the fields in SQL database tables -and views. -

          - -

          TQSqlField represents the characteristics of a single column in a -database table or view, such as the data type and column name. A -field also contains the value of the database column, which can be -viewed or changed. -

          Field data values are stored as TQVariants. Using an incompatible -type is not permitted. For example: -

          -    TQSqlField f( "myfield", TQVariant::Int );
          -    f.setValue( TQPixmap() );  // will not work
          -    
          - -

          However, the field will attempt to cast certain data types to the -field data type where possible: -

          -    TQSqlField f( "myfield", TQVariant::Int );
          -    f.setValue( TQString("123") ); // casts TQString to int
          -    
          - -

          TQSqlField objects are rarely created explicitly in application -code. They are usually accessed indirectly through TQSqlRecord -or TQSqlCursor which already contain a list of fields. For -example: -

          -    TQSqlCursor cur( "Employee" );        // create cursor using the 'Employee' table
          -    TQSqlField* f = cur.field( "name" );  // use the 'name' field
          -    f->setValue( "Dave" );               // set field value
          -    ...
          -    
          - -

          In practice we rarely need to extract a pointer to a field at all. -The previous example would normally be written: -

          -    TQSqlCursor cur( "Employee" );
          -    cur.setValue( "name", "Dave" );
          -    ...
          -    
          - -

          See also Database Classes. - -


          Member Function Documentation

          -

          TQSqlField::TQSqlField ( const TQString & fieldName = TQString::null, TQVariant::Type type = TQVariant::Invalid ) -

          -Constructs an empty field called fieldName of type type. - -

          TQSqlField::TQSqlField ( const TQSqlField & other ) -

          -Constructs a copy of other. - -

          TQSqlField::~TQSqlField () [virtual] -

          -Destroys the object and frees any allocated resources. - -

          void TQSqlField::clear ( bool nullify = TRUE ) -

          -Clears the value of the field. If the field is read-only, nothing -happens. If nullify is TRUE (the default), the field is set to -NULL. - -

          bool TQSqlField::isNull () const -

          - -

          Returns TRUE if the field is currently NULL; otherwise returns -FALSE. - -

          bool TQSqlField::isReadOnly () const -

          - -

          Returns TRUE if the field's value is read only; otherwise returns -FALSE. - -

          TQString TQSqlField::name () const -

          - -

          Returns the name of the field. - -

          Example: sql/overview/table4/main.cpp. -

          TQSqlField & TQSqlField::operator= ( const TQSqlField & other ) -

          -Sets the field equal to other. - -

          bool TQSqlField::operator== ( const TQSqlField & other ) const -

          -Returns TRUE if the field is equal to other; otherwise returns -FALSE. Fields are considered equal when the following field -properties are the same: -

          -

          -

          void TQSqlField::setName ( const TQString & name ) [virtual] -

          - -

          Sets the name of the field to name. - -

          void TQSqlField::setNull () [virtual] -

          - -

          Sets the field to NULL and clears the value using clear(). If the -field is read-only, nothing happens. -

          See also isReadOnly() and clear(). - -

          void TQSqlField::setReadOnly ( bool readOnly ) [virtual] -

          - -

          Sets the read only flag of the field's value to readOnly. -

          See also setValue(). - -

          void TQSqlField::setValue ( const TQVariant & value ) [virtual] -

          -Sets the value of the field to value. If the field is read-only -(isReadOnly() returns TRUE), nothing happens. If the data type of -value differs from the field's current data type, an attempt is -made to cast it to the proper type. This preserves the data type -of the field in the case of assignment, e.g. a TQString to an -integer data type. For example: -

          -    TQSqlCursor cur( "Employee" );                 // 'Employee' table
          -    TQSqlField* f = cur.field( "student_count" );  // an integer field
          -    ...
          -    f->setValue( myLineEdit->text() );            // cast the line edit text to an integer
          -    
          - -

          See also isReadOnly(). - -

          TQVariant::Type TQSqlField::type () const -

          - -

          Returns the field's type as stored in the database. -Note that the actual value might have a different type, -Numerical values that are too large to store in a long -int or double are usually stored as strings to prevent -precision loss. - -

          TQVariant TQSqlField::value () const [virtual] -

          - -

          Returns the value of the field as a TQVariant. - -

          Example: sql/overview/table4/main.cpp. - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlform.html b/doc/html/ntqsqlform.html deleted file mode 100644 index 7140ba469..000000000 --- a/doc/html/ntqsqlform.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - -TQSqlForm Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlForm Class Reference
          [sql module]

          - -

          The TQSqlForm class creates and manages data entry forms -tied to SQL databases. -More... -

          #include <ntqsqlform.h> -

          Inherits TQObject. -

          List of all member functions. -

          Public Members

          -
            -
          • TQSqlForm ( TQObject * parent = 0, const char * name = 0 )
          • -
          • ~TQSqlForm ()
          • -
          • virtual void insert ( TQWidget * widget, const TQString & field )
          • -
          • virtual void remove ( const TQString & field )
          • -
          • uint count () const
          • -
          • TQWidget * widget ( uint i ) const
          • -
          • TQSqlField * widgetToField ( TQWidget * widget ) const
          • -
          • TQWidget * fieldToWidget ( TQSqlField * field ) const
          • -
          • void installPropertyMap ( TQSqlPropertyMap * pmap )
          • -
          • virtual void setRecord ( TQSqlRecord * buf )
          • -
          -

          Public Slots

          - -

          Protected Members

          -
            -
          • virtual void insert ( TQWidget * widget, TQSqlField * field )
          • -
          • virtual void remove ( TQWidget * widget )
          • -
          -

          Detailed Description

          - - -The TQSqlForm class creates and manages data entry forms -tied to SQL databases. -

          - - -

          Typical use of a TQSqlForm consists of the following steps: -

            -
          • Create the widgets you want to appear in the form. -
          • Create a cursor and navigate to the record to be edited. -
          • Create the TQSqlForm. -
          • Set the form's record buffer to the cursor's update buffer. -
          • Insert each widget and the field it is to edit into the form. -
          • Use readFields() to update the editor widgets with values from -the database's fields. -
          • Display the form and let the user edit values etc. -
          • Use writeFields() to update the database's field values with -the values in the editor widgets. -
          -

          Note that a TQSqlForm does not access the database directly, but -most often via TQSqlFields which are part of a TQSqlCursor. A -TQSqlCursor::insert(), TQSqlCursor::update() or TQSqlCursor::del() -call is needed to actually write values to the database. -

          Some sample code to initialize a form successfully: -

          -    TQLineEdit  myEditor( this );
          -    TQSqlForm   myForm( this );
          -    TQSqlCursor myCursor( "mytable" );
          -
          -    // Execute a query to make the cursor valid
          -    myCursor.select();
          -    // Move the cursor to a valid record (the first record)
          -    myCursor.next();
          -    // Set the form's record pointer to the cursor's edit buffer (which
          -    // contains the current record's values)
          -    myForm.setRecord( myCursor.primeUpdate() );
          -
          -    // Insert a field into the form that uses myEditor to edit the
          -    // field 'somefield' in 'mytable'
          -    myForm.insert( &myEditor, "somefield" );
          -
          -    // Update myEditor with the value from the mapped database field
          -    myForm.readFields();
          -    ...
          -    // Let the user edit the form
          -    ...
          -    // Update the database
          -    myForm.writeFields();  // Update the cursor's edit buffer from the form
          -    myCursor.update();  // Update the database from the cursor's buffer
          -    
          - -

          If you want to use custom editors for displaying and editing data -fields, you must install a custom TQSqlPropertyMap. The form -uses this object to get or set the value of a widget. -

          Note that TQt Designer provides -a visual means of creating data-aware forms. -

          See also installPropertyMap(), TQSqlPropertyMap, and Database Classes. - -


          Member Function Documentation

          -

          TQSqlForm::TQSqlForm ( TQObject * parent = 0, const char * name = 0 ) -

          -Constructs a TQSqlForm with parent parent and called name. - -

          TQSqlForm::~TQSqlForm () -

          -Destroys the object and frees any allocated resources. - -

          void TQSqlForm::clear () [virtual slot] -

          -Removes every widget, and the fields they're mapped to, from the form. - -

          void TQSqlForm::clearValues ( bool nullify = FALSE ) [virtual slot] -

          -Clears the values in all the widgets, and the fields they are -mapped to, in the form. If nullify is TRUE (the default is -FALSE), each field is also set to NULL. - -

          uint TQSqlForm::count () const -

          -Returns the number of widgets in the form. - -

          TQWidget * TQSqlForm::fieldToWidget ( TQSqlField * field ) const -

          -Returns the widget that field field is mapped to. - -

          void TQSqlForm::insert ( TQWidget * widget, const TQString & field ) [virtual] -

          -Inserts a widget, and the name of the field it is to be -mapped to, into the form. To actually associate inserted widgets -with an edit buffer, use setRecord(). -

          See also setRecord(). - -

          Examples: sql/overview/form1/main.cpp and sql/overview/form2/main.cpp. -

          void TQSqlForm::insert ( TQWidget * widget, TQSqlField * field ) [virtual protected] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Inserts a widget, and the field it is to be mapped to, into -the form. - -

          void TQSqlForm::installPropertyMap ( TQSqlPropertyMap * pmap ) -

          -Installs a custom TQSqlPropertyMap. This is useful if you plan to -create your own custom editor widgets. -

          TQSqlForm takes ownership of pmap, so pmap is deleted when -TQSqlForm goes out of scope. -

          See also TQDataTable::installEditorFactory(). - -

          Example: sql/overview/custom1/main.cpp. -

          void TQSqlForm::readField ( TQWidget * widget ) [virtual slot] -

          -Updates the widget widget with the value from the SQL field it -is mapped to. Nothing happens if no SQL field is mapped to the widget. - -

          void TQSqlForm::readFields () [virtual slot] -

          -Updates the widgets in the form with current values from the SQL -fields they are mapped to. - -

          Examples: sql/overview/form1/main.cpp and sql/overview/form2/main.cpp. -

          void TQSqlForm::remove ( TQWidget * widget ) [virtual protected] -

          -Removes a widget, and hence the field it's mapped to, from the -form. - -

          void TQSqlForm::remove ( const TQString & field ) [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Removes field from the form. - -

          void TQSqlForm::setRecord ( TQSqlRecord * buf ) [virtual] -

          -Sets buf as the record buffer for the form. To force the -display of the data from buf, use readFields(). -

          See also readFields() and writeFields(). - -

          Examples: sql/overview/custom1/main.cpp, sql/overview/form1/main.cpp, and sql/overview/form2/main.cpp. -

          TQWidget * TQSqlForm::widget ( uint i ) const -

          -Returns the i-th widget in the form. Useful for traversing -the widgets in the form. - -

          TQSqlField * TQSqlForm::widgetToField ( TQWidget * widget ) const -

          -Returns the SQL field that widget widget is mapped to. - -

          void TQSqlForm::writeField ( TQWidget * widget ) [virtual slot] -

          -Updates the SQL field with the value from the widget it is -mapped to. Nothing happens if no SQL field is mapped to the widget. - -

          void TQSqlForm::writeFields () [virtual slot] -

          -Updates the SQL fields with values from the widgets they are -mapped to. To actually update the database with the contents of -the record buffer, use TQSqlCursor::insert(), TQSqlCursor::update() -or TQSqlCursor::del() as appropriate. - -

          Example: sql/overview/form2/main.cpp. - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlindex.html b/doc/html/ntqsqlindex.html deleted file mode 100644 index 453e195c5..000000000 --- a/doc/html/ntqsqlindex.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - -TQSqlIndex Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlIndex Class Reference
          [sql module]

          - -

          The TQSqlIndex class provides functions to manipulate and -describe TQSqlCursor and TQSqlDatabase indexes. -More... -

          #include <ntqsqlindex.h> -

          Inherits TQSqlRecord. -

          List of all member functions. -

          Public Members

          -
            -
          • TQSqlIndex ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null )
          • -
          • TQSqlIndex ( const TQSqlIndex & other )
          • -
          • ~TQSqlIndex ()
          • -
          • TQSqlIndex & operator= ( const TQSqlIndex & other )
          • -
          • virtual void setCursorName ( const TQString & cursorName )
          • -
          • TQString cursorName () const
          • -
          • virtual void setName ( const TQString & name )
          • -
          • TQString name () const
          • -
          • virtual void append ( const TQSqlField & field )
          • -
          • virtual void append ( const TQSqlField & field, bool desc )
          • -
          • bool isDescending ( int i ) const
          • -
          • virtual void setDescending ( int i, bool desc )
          • -
          -

          Static Public Members

          -
            -
          • TQSqlIndex fromStringList ( const TQStringList & l, const TQSqlCursor * cursor )
          • -
          -

          Detailed Description

          - - -The TQSqlIndex class provides functions to manipulate and -describe TQSqlCursor and TQSqlDatabase indexes. -

          - -

          This class is used to describe and manipulate TQSqlCursor and -TQSqlDatabase indexes. An index refers to a single table or view -in a database. Information about the fields that comprise the -index can be used to generate SQL statements, or to affect the -behavior of a TQSqlCursor object. -

          Normally, TQSqlIndex objects are created by TQSqlDatabase or -TQSqlCursor. -

          See also Database Classes. - -


          Member Function Documentation

          -

          TQSqlIndex::TQSqlIndex ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null ) -

          -Constructs an empty index using the cursor name cursorname and -index name name. - -

          TQSqlIndex::TQSqlIndex ( const TQSqlIndex & other ) -

          -Constructs a copy of other. - -

          TQSqlIndex::~TQSqlIndex () -

          -Destroys the object and frees any allocated resources. - -

          void TQSqlIndex::append ( const TQSqlField & field ) [virtual] -

          -Appends the field field to the list of indexed fields. The -field is appended with an ascending sort order. - -

          Reimplemented from TQSqlRecord. -

          void TQSqlIndex::append ( const TQSqlField & field, bool desc ) [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Appends the field field to the list of indexed fields. The -field is appended with an ascending sort order, unless desc is -TRUE. - -

          TQString TQSqlIndex::cursorName () const -

          - -

          Returns the name of the cursor which the index is associated with. - -

          TQSqlIndex TQSqlIndex::fromStringList ( const TQStringList & l, const TQSqlCursor * cursor ) [static] -

          -Returns an index based on the field descriptions in l and the -cursor cursor. The field descriptions should be in the same -format that toStringList() produces, for example, a surname field -in the people table might be in one of these forms: "surname", -"surname DESC" or "people.surname ASC". -

          See also toStringList(). - -

          bool TQSqlIndex::isDescending ( int i ) const -

          -Returns TRUE if field i in the index is sorted in descending -order; otherwise returns FALSE. - -

          TQString TQSqlIndex::name () const -

          - -

          Returns the name of the index. - -

          TQSqlIndex & TQSqlIndex::operator= ( const TQSqlIndex & other ) -

          -Sets the index equal to other. - -

          void TQSqlIndex::setCursorName ( const TQString & cursorName ) [virtual] -

          -Sets the name of the cursor that the index is associated with to -cursorName. - -

          void TQSqlIndex::setDescending ( int i, bool desc ) [virtual] -

          -If desc is TRUE, field i is sorted in descending order. -Otherwise, field i is sorted in ascending order (the default). -If the field does not exist, nothing happens. - -

          void TQSqlIndex::setName ( const TQString & name ) [virtual] -

          -Sets the name of the index to name. - - -

          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlpropertymap.html b/doc/html/ntqsqlpropertymap.html deleted file mode 100644 index 4f2b65864..000000000 --- a/doc/html/ntqsqlpropertymap.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - -TQSqlPropertyMap Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlPropertyMap Class Reference
          [sql module]

          - -

          The TQSqlPropertyMap class is used to map widgets to SQL fields. -More... -

          #include <ntqsqlpropertymap.h> -

          List of all member functions. -

          Public Members

          - -

          Static Public Members

          - -

          Detailed Description

          - - -The TQSqlPropertyMap class is used to map widgets to SQL fields. -

          - -

          The SQL module uses TQt object - properties to insert and extract values from editor -widgets. -

          This class is used to map editors to SQL fields. This works by -associating SQL editor class names to the properties used to -insert and extract values to/from the editor. -

          For example, a TQLineEdit can be used to edit text strings and -other data types in TQDataTables or TQSqlForms. Several properties -are defined in TQLineEdit, but only the text property is used to -insert and extract text from a TQLineEdit. Both TQDataTable and -TQSqlForm use the global TQSqlPropertyMap for inserting and -extracting values to and from an editor widget. The global -property map defines several common widgets and properties that -are suitable for many applications. You can add and remove widget -properties to suit your specific needs. -

          If you want to use custom editors with your TQDataTable or -TQSqlForm, you must install your own TQSqlPropertyMap for that table -or form. Example: -

          -    TQSqlPropertyMap *myMap  = new TQSqlPropertyMap();
          -    TQSqlForm        *myForm = new TQSqlForm( this );
          -    MyEditor myEditor( this );
          -
          -    // Set the TQSqlForm's record buffer to the update buffer of
          -    // a pre-existing TQSqlCursor called 'cur'.
          -    myForm->setRecord( cur->primeUpdate() );
          -
          -    // Install the customized map
          -    myMap->insert( "MyEditor", "content" );
          -    myForm->installPropertyMap( myMap ); // myForm now owns myMap
          -    ...
          -    // Insert a field into the form that uses a myEditor to edit the
          -    // field 'somefield'
          -    myForm->insert( &myEditor, "somefield" );
          -
          -    // Update myEditor with the value from the mapped database field
          -    myForm->readFields();
          -    ...
          -    // Let the user edit the form
          -    ...
          -    // Update the database fields with the values in the form
          -    myForm->writeFields();
          -    ...
          -    
          - -

          You can also replace the global TQSqlPropertyMap that is used by -default. (Bear in mind that TQSqlPropertyMap takes ownership of the -new default map.) -

          -    TQSqlPropertyMap *myMap = new TQSqlPropertyMap;
          -
          -    myMap->insert( "MyEditor", "content" );
          -    TQSqlPropertyMap::installDefaultMap( myMap );
          -    ...
          -    
          - -

          See also TQDataTable, TQSqlForm, TQSqlEditorFactory, and Database Classes. - -


          Member Function Documentation

          -

          TQSqlPropertyMap::TQSqlPropertyMap () -

          -

          Constructs a TQSqlPropertyMap. -

          The default property mappings used by TQt widgets are: -

          -
          Widgets Property -
          TQCheckBox, -TQRadioButton -checked -
          TQComboBox, -TQListBox -currentItem -
          TQDateEdit -date -
          TQDateTimeEdit -dateTime -
          TQTextBrowser -source -
          TQButton, -TQDial, -TQLabel, -TQLineEdit, -TQMultiLineEdit, -TQPushButton, -TQTextEdit, -text -
          TQTimeEdit -time -
          TQLCDNumber, -TQScrollBar -TQSlider, -TQSpinBox -value -
          - -

          TQSqlPropertyMap::~TQSqlPropertyMap () [virtual] -

          -Destroys the TQSqlPropertyMap. -

          Note that if the TQSqlPropertyMap is installed with -installPropertyMap() the object it was installed into, e.g. the -TQSqlForm, takes ownership and will delete the TQSqlPropertyMap when -necessary. - -

          TQSqlPropertyMap * TQSqlPropertyMap::defaultMap () [static] -

          -Returns the application global TQSqlPropertyMap. - -

          void TQSqlPropertyMap::insert ( const TQString & classname, const TQString & property ) -

          -Insert a new classname/property pair, which is used for custom SQL -field editors. There must be a TQ_PROPERTY clause in the classname class declaration for the property. - -

          Example: sql/overview/custom1/main.cpp. -

          void TQSqlPropertyMap::installDefaultMap ( TQSqlPropertyMap * map ) [static] -

          -Replaces the global default property map with map. All -TQDataTable and TQSqlForm instantiations will use this new map for -inserting and extracting values to and from editors. -TQSqlPropertyMap takes ownership of \a map, and destroys it when it is no longer needed. - -

          TQVariant TQSqlPropertyMap::property ( TQWidget * widget ) -

          -Returns the mapped property of widget as a TQVariant. - -

          void TQSqlPropertyMap::remove ( const TQString & classname ) -

          -Removes classname from the map. - -

          void TQSqlPropertyMap::setProperty ( TQWidget * widget, const TQVariant & value ) [virtual] -

          -Sets the property of widget to value. - - -

          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlquery.html b/doc/html/ntqsqlquery.html deleted file mode 100644 index 9cda539c0..000000000 --- a/doc/html/ntqsqlquery.html +++ /dev/null @@ -1,595 +0,0 @@ - - - - - -TQSqlQuery Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlQuery Class Reference
          [sql module]

          - -

          The TQSqlQuery class provides a means of executing and -manipulating SQL statements. -More... -

          #include <ntqsqlquery.h> -

          Inherited by TQSqlCursor. -

          List of all member functions. -

          Public Members

          -
            -
          • TQSqlQuery ( TQSqlResult * r )
          • -
          • TQSqlQuery ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 )
          • -
          • explicit TQSqlQuery ( TQSqlDatabase * db )
          • -
          • TQSqlQuery ( const TQSqlQuery & other )
          • -
          • TQSqlQuery & operator= ( const TQSqlQuery & other )
          • -
          • virtual ~TQSqlQuery ()
          • -
          • bool isValid () const
          • -
          • bool isActive () const
          • -
          • bool isNull ( int field ) const
          • -
          • int at () const
          • -
          • TQString lastQuery () const
          • -
          • int numRowsAffected () const
          • -
          • TQSqlError lastError () const
          • -
          • bool isSelect () const
          • -
          • int size () const
          • -
          • const TQSqlDriver * driver () const
          • -
          • const TQSqlResult * result () const
          • -
          • bool isForwardOnly () const
          • -
          • void setForwardOnly ( bool forward )
          • -
          • virtual bool exec ( const TQString & query )
          • -
          • virtual TQVariant value ( int i ) const
          • -
          • virtual bool seek ( int i, bool relative = FALSE )
          • -
          • virtual bool next ()
          • -
          • virtual bool prev ()
          • -
          • virtual bool first ()
          • -
          • virtual bool last ()
          • -
          • bool exec ()
          • -
          • bool prepare ( const TQString & query )
          • -
          • void bindValue ( const TQString & placeholder, const TQVariant & val )
          • -
          • void bindValue ( int pos, const TQVariant & val )
          • -
          • void addBindValue ( const TQVariant & val )
          • -
          • void bindValue ( const TQString & placeholder, const TQVariant & val, TQSql::ParameterType type )
          • -
          • void bindValue ( int pos, const TQVariant & val, TQSql::ParameterType type )
          • -
          • void addBindValue ( const TQVariant & val, TQSql::ParameterType type )
          • -
          • TQVariant boundValue ( const TQString & placeholder ) const
          • -
          • TQVariant boundValue ( int pos ) const
          • -
          • TQMap<TQString, TQVariant> boundValues () const
          • -
          • TQString executedQuery () const
          • -
          -

          Protected Members

          - -

          Detailed Description

          - - -The TQSqlQuery class provides a means of executing and -manipulating SQL statements. -

          - - -

          TQSqlQuery encapsulates the functionality involved in creating, -navigating and retrieving data from SQL queries which are executed -on a TQSqlDatabase. It can be used to execute DML (data -manipulation language) statements, e.g. SELECT, INSERT, UPDATE and DELETE, and also DDL (data definition language) -statements, e.g. CREATE TABLE. It can also be used to -execute database-specific commands which are not standard SQL -(e.g. SET DATESTYLE=ISO for PostgreSQL). -

          Successfully executed SQL statements set the query's state to -active (isActive() returns TRUE); otherwise the query's state is -set to inactive. In either case, when executing a new SQL -statement, the query is positioned on an invalid record; an active -query must be navigated to a valid record (so that isValid() -returns TRUE) before values can be retrieved. -

          Navigating records is performed with the following functions: -

          -

          These functions allow the programmer to move forward, backward or -arbitrarily through the records returned by the query. If you only -need to move forward through the results, e.g. using next() or -using seek() with a positive offset, you can use setForwardOnly() -and save a significant amount of memory overhead. Once an active -query is positioned on a valid record, data can be retrieved using -value(). All data is transferred from the SQL backend using -TQVariants. -

          For example: -

          -    TQSqlQuery query( "SELECT name FROM customer" );
          -    while ( query.next() ) {
          -        TQString name = query.value(0).toString();
          -        doSomething( name );
          -    }
          -    
          - -

          To access the data returned by a query, use the value() method. -Each field in the data returned by a SELECT statement is accessed -by passing the field's position in the statement, starting from 0. -Information about the fields can be obtained via TQSqlDatabase::record(). -For the sake of efficiency there are no functions to access a field -by name. (The TQSqlCursor class provides a higher-level interface -with field access by name and automatic SQL generation.) -

          TQSqlQuery supports prepared query execution and the binding of -parameter values to placeholders. Some databases don't support -these features, so for them TQt emulates the required -functionality. For example, the Oracle and ODBC drivers have -proper prepared query support, and TQt makes use of it; but for -databases that don't have this support, TQt implements the feature -itself, e.g. by replacing placeholders with actual values when a -query is executed. The exception is positional binding using named -placeholders, which requires that the database supports prepared -queries. -

          Oracle databases identify placeholders by using a colon-name -syntax, e.g :name. ODBC simply uses ? characters. TQt -supports both syntaxes (although you can't mix them in the same -query). -

          Below we present the same example using each of the four different -binding approaches. -

          Named binding using named placeholders -

          -    TQSqlQuery query;
          -    query.prepare( "INSERT INTO atable (id, forename, surname) "
          -                   "VALUES (:id, :forename, :surname)" );
          -    query.bindValue( ":id", 1001 );
          -    query.bindValue( ":forename", "Bart" );
          -    query.bindValue( ":surname", "Simpson" );
          -    query.exec();
          -    
          - -

          Positional binding using named placeholders -

          -    TQSqlQuery query;
          -    query.prepare( "INSERT INTO atable (id, forename, surname) "
          -                   "VALUES (:id, :forename, :surname)" );
          -    query.bindValue( 0, 1001 );
          -    query.bindValue( 1, "Bart" );
          -    query.bindValue( 2, "Simpson" );
          -    query.exec();
          -    
          - -Note: Using positional binding with named placeholders will -only work if the database supports prepared queries. This can be -checked with TQSqlDriver::hasFeature() using TQSqlDriver::PreparedQueries -as argument for driver feature. -

          Binding values using positional placeholders #1 -

          -    TQSqlQuery query;
          -    query.prepare( "INSERT INTO atable (id, forename, surname) "
          -                   "VALUES (?, ?, ?)" );
          -    query.bindValue( 0, 1001 );
          -    query.bindValue( 1, "Bart" );
          -    query.bindValue( 2, "Simpson" );
          -    query.exec();
          -    
          - -

          Binding values using positional placeholders #2 -

          -    query.prepare( "INSERT INTO atable (id, forename, surname) "
          -                   "VALUES (?, ?, ?)" );
          -    query.addBindValue( 1001 );
          -    query.addBindValue( "Bart" );
          -    query.addBindValue( "Simpson" );
          -    query.exec();
          -    
          - -

          Binding values to a stored procedure -This code calls a stored procedure called AsciiToInt(), passing -it a character through its in parameter, and taking its result in -the out parameter. -

          -    TQSqlQuery query;
          -    query.prepare( "call AsciiToInt(?, ?)" );
          -    query.bindValue( 0, "A" );
          -    query.bindValue( 1, 0, TQSql::Out );
          -    query.exec();
          -    int i = query.boundValue( 1 ).toInt(); // i is 65.
          -    
          - -

          See also TQSqlDatabase, TQSqlCursor, TQVariant, and Database Classes. - -


          Member Function Documentation

          -

          TQSqlQuery::TQSqlQuery ( TQSqlResult * r ) -

          -Creates a TQSqlQuery object which uses the TQSqlResult r to -communicate with a database. - -

          TQSqlQuery::TQSqlQuery ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 ) -

          -Creates a TQSqlQuery object using the SQL query and the database -db. If db is 0, (the default), the application's default -database is used. If query is not a null string, it will be -executed. -

          See also TQSqlDatabase. - -

          explicit TQSqlQuery::TQSqlQuery ( TQSqlDatabase * db ) -

          -Creates a TQSqlQuery object using the database db. If db is -0, the application's default database is used. -

          See also TQSqlDatabase. - -

          TQSqlQuery::TQSqlQuery ( const TQSqlQuery & other ) -

          -Constructs a copy of other. - -

          TQSqlQuery::~TQSqlQuery () [virtual] -

          -Destroys the object and frees any allocated resources. - -

          void TQSqlQuery::addBindValue ( const TQVariant & val, TQSql::ParameterType type ) -

          -Adds the value val to the list of values when using positional -value binding. The order of the addBindValue() calls determines -which placeholder a value will be bound to in the prepared query. -If type is TQSql::Out or TQSql::InOut, the placeholder will -be overwritten with data from the database after the exec() call. -

          See also bindValue(), prepare(), and exec(). - -

          void TQSqlQuery::addBindValue ( const TQVariant & val ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Binds the placeholder with type TQSql::In. - -

          void TQSqlQuery::afterSeek () [virtual protected] -

          -Protected virtual function called after the internal record -pointer is moved to a new record. The default implementation does -nothing. - -

          int TQSqlQuery::at () const -

          -Returns the current internal position of the query. The first -record is at position zero. If the position is invalid, a -TQSql::Location will be returned indicating the invalid position. -

          See also prev(), next(), first(), last(), seek(), isActive(), and isValid(). - -

          Example: sql/overview/navigating/main.cpp. -

          void TQSqlQuery::beforeSeek () [virtual protected] -

          -Protected virtual function called before the internal record -pointer is moved to a new record. The default implementation does -nothing. - -

          void TQSqlQuery::bindValue ( const TQString & placeholder, const TQVariant & val, TQSql::ParameterType type ) -

          -Set the placeholder placeholder to be bound to value val in -the prepared statement. Note that the placeholder mark (e.g :) -must be included when specifying the placeholder name. If type -is TQSql::Out or TQSql::InOut, the placeholder will be -overwritten with data from the database after the exec() call. -

          See also addBindValue(), prepare(), and exec(). - -

          void TQSqlQuery::bindValue ( const TQString & placeholder, const TQVariant & val ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Binds the placeholder with type TQSql::In. - -

          void TQSqlQuery::bindValue ( int pos, const TQVariant & val ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Binds the placeholder at position pos with type TQSql::In. - -

          void TQSqlQuery::bindValue ( int pos, const TQVariant & val, TQSql::ParameterType type ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Set the placeholder in position pos to be bound to value val -in the prepared statement. Field numbering starts at 0. If type -is TQSql::Out or TQSql::InOut, the placeholder will be -overwritten with data from the database after the exec() call. -

          See also addBindValue(), prepare(), and exec(). - -

          TQVariant TQSqlQuery::boundValue ( const TQString & placeholder ) const -

          -Returns the value for the placeholder. - -

          TQVariant TQSqlQuery::boundValue ( int pos ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns the value for the placeholder at position pos. - -

          TQMap<TQString, TQVariant> TQSqlQuery::boundValues () const -

          -Returns a map of the bound values. -

          The bound values can be examined in the following way: -

          -    TQSqlQuery query;
          -    ...
          -    // Examine the bound values - bound using named binding
          -    TQMap<TQString, TQVariant>::ConstIterator it;
          -    TQMap<TQString, TQVariant> vals = query.boundValues();
          -    for ( it = vals.begin(); it != vals.end(); ++it )
          -        tqWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
          -    ...
          -
          -    // Examine the bound values - bound using positional binding
          -    TQValueList<TQVariant>::ConstIterator it;
          -    TQValueList<TQVariant> list = query.boundValues().values();
          -    int i = 0;
          -    for ( it = list.begin(); it != list.end(); ++it )
          -        tqWarning( "Placeholder pos: %d, Value: " + (*it).toString(), i++ );
          -    ...
          -
          -    
          - - -

          const TQSqlDriver * TQSqlQuery::driver () const -

          -Returns the database driver associated with the query. - -

          bool TQSqlQuery::exec ( const TQString & query ) [virtual] -

          -Executes the SQL in query. Returns TRUE and sets the query -state to active if the query was successful; otherwise returns -FALSE and sets the query state to inactive. The query string -must use syntax appropriate for the SQL database being queried, -for example, standard SQL. -

          After the query is executed, the query is positioned on an invalid record, and must be navigated to a valid record before -data values can be retrieved, e.g. using next(). -

          Note that the last error for this query is reset when exec() is -called. -

          See also isActive(), isValid(), next(), prev(), first(), last(), and seek(). - -

          Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/basicdatamanip/main.cpp, and sql/overview/connection.cpp. -

          bool TQSqlQuery::exec () -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Executes a previously prepared SQL query. Returns TRUE if the -query executed successfully; otherwise returns FALSE. -

          See also prepare(), bindValue(), and addBindValue(). - -

          TQString TQSqlQuery::executedQuery () const -

          -Returns the last query that was executed. -

          In most cases this function returns the same as lastQuery(). If a -prepared query with placeholders is executed on a DBMS that does -not support it, the preparation of this query is emulated. The -placeholders in the original query are replaced with their bound -values to form a new query. This function returns the modified -query. Useful for debugging purposes. -

          See also lastQuery(). - -

          bool TQSqlQuery::first () [virtual] -

          -Retrieves the first record in the result, if available, and -positions the query on the retrieved record. Note that the result -must be in an active state and isSelect() must return TRUE before -calling this function or it will do nothing and return FALSE. -Returns TRUE if successful. If unsuccessful the query position is -set to an invalid position and FALSE is returned. -

          See also next(), prev(), last(), seek(), at(), isActive(), and isValid(). - -

          Example: sql/overview/navigating/main.cpp. -

          bool TQSqlQuery::isActive () const -

          -Returns TRUE if the query is currently active; otherwise returns -FALSE. - -

          Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/basicdatamanip/main.cpp, sql/overview/navigating/main.cpp, and sql/overview/retrieve1/main.cpp. -

          bool TQSqlQuery::isForwardOnly () const -

          -Returns TRUE if you can only scroll forward through a result -set; otherwise returns FALSE. -

          See also setForwardOnly(). - -

          bool TQSqlQuery::isNull ( int field ) const -

          -Returns TRUE if the query is active and positioned on a valid -record and the field is NULL; otherwise returns FALSE. Note -that for some drivers isNull() will not return accurate -information until after an attempt is made to retrieve data. -

          See also isActive(), isValid(), and value(). - -

          bool TQSqlQuery::isSelect () const -

          -Returns TRUE if the current query is a SELECT statement; -otherwise returns FALSE. - -

          bool TQSqlQuery::isValid () const -

          -Returns TRUE if the query is currently positioned on a valid -record; otherwise returns FALSE. - -

          bool TQSqlQuery::last () [virtual] -

          -Retrieves the last record in the result, if available, and -positions the query on the retrieved record. Note that the result -must be in an active state and isSelect() must return TRUE before -calling this function or it will do nothing and return FALSE. -Returns TRUE if successful. If unsuccessful the query position is -set to an invalid position and FALSE is returned. -

          See also next(), prev(), first(), seek(), at(), isActive(), and isValid(). - -

          Example: sql/overview/navigating/main.cpp. -

          TQSqlError TQSqlQuery::lastError () const -

          -Returns error information about the last error (if any) that -occurred. -

          See also TQSqlError. - -

          TQString TQSqlQuery::lastQuery () const -

          -Returns the text of the current query being used, or TQString::null -if there is no current query text. -

          See also executedQuery(). - -

          bool TQSqlQuery::next () [virtual] -

          -Retrieves the next record in the result, if available, and -positions the query on the retrieved record. Note that the result -must be in an active state and isSelect() must return TRUE before -calling this function or it will do nothing and return FALSE. -

          The following rules apply: -

            -
          • If the result is currently located before the first -record, e.g. immediately after a query is executed, an attempt is -made to retrieve the first record. -

          • If the result is currently located after the last record, -there is no change and FALSE is returned. -

          • If the result is located somewhere in the middle, an attempt -is made to retrieve the next record. -
          -

          If the record could not be retrieved, the result is positioned after -the last record and FALSE is returned. If the record is successfully -retrieved, TRUE is returned. -

          See also prev(), first(), last(), seek(), at(), isActive(), and isValid(). - -

          Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/delete/main.cpp, sql/overview/order1/main.cpp, sql/overview/retrieve1/main.cpp, sql/overview/subclass4/main.cpp, and sql/overview/subclass5/main.cpp. -

          int TQSqlQuery::numRowsAffected () const -

          -Returns the number of rows affected by the result's SQL statement, -or -1 if it cannot be determined. Note that for SELECT -statements, the value is undefined; see size() instead. If the -query is not active (isActive() returns FALSE), -1 is returned. -

          See also size() and TQSqlDriver::hasFeature(). - -

          Examples: sql/overview/basicbrowsing2/main.cpp and sql/overview/basicdatamanip/main.cpp. -

          TQSqlQuery & TQSqlQuery::operator= ( const TQSqlQuery & other ) -

          -Assigns other to the query. - -

          bool TQSqlQuery::prepare ( const TQString & query ) -

          -Prepares the SQL query query for execution. The query may -contain placeholders for binding values. Both Oracle style -colon-name (e.g. :surname), and ODBC style (e.g. ?) -placeholders are supported; but they cannot be mixed in the same -query. See the Description for examples. -

          See also exec(), bindValue(), and addBindValue(). - -

          bool TQSqlQuery::prev () [virtual] -

          -Retrieves the previous record in the result, if available, and -positions the query on the retrieved record. Note that the result -must be in an active state and isSelect() must return TRUE before -calling this function or it will do nothing and return FALSE. -

          The following rules apply: -

            -
          • If the result is currently located before the first record, -there is no change and FALSE is returned. -

          • If the result is currently located after the last record, an -attempt is made to retrieve the last record. -

          • If the result is somewhere in the middle, an attempt is made -to retrieve the previous record. -
          -

          If the record could not be retrieved, the result is positioned -before the first record and FALSE is returned. If the record is -successfully retrieved, TRUE is returned. -

          See also next(), first(), last(), seek(), at(), isActive(), and isValid(). - -

          const TQSqlResult * TQSqlQuery::result () const -

          -Returns the result associated with the query. - -

          bool TQSqlQuery::seek ( int i, bool relative = FALSE ) [virtual] -

          -Retrieves the record at position (offset) i, if available, and -positions the query on the retrieved record. The first record is -at position 0. Note that the query must be in an active state and -isSelect() must return TRUE before calling this function. -

          If relative is FALSE (the default), the following rules apply: -

            -
          • If i is negative, the result is positioned before the -first record and FALSE is returned. -
          • Otherwise, an attempt is made to move to the record at position -i. If the record at position i could not be retrieved, the -result is positioned after the last record and FALSE is returned. If -the record is successfully retrieved, TRUE is returned. -
          -

          If relative is TRUE, the following rules apply: -

            -
          • If the result is currently positioned before the first -record or on the first record, and i is negative, there is no -change, and FALSE is returned. -
          • If the result is currently located after the last record, and -i is positive, there is no change, and FALSE is returned. -
          • If the result is currently located somewhere in the middle, -and the relative offset i moves the result below zero, the -result is positioned before the first record and FALSE is -returned. -
          • Otherwise, an attempt is made to move to the record i -records ahead of the current record (or i records behind the -current record if i is negative). If the record at offset i -could not be retrieved, the result is positioned after the last -record if i >= 0, (or before the first record if i is -negative), and FALSE is returned. If the record is successfully -retrieved, TRUE is returned. -
          -

          See also next(), prev(), first(), last(), at(), isActive(), and isValid(). - -

          Example: sql/overview/navigating/main.cpp. -

          void TQSqlQuery::setForwardOnly ( bool forward ) -

          -Sets forward only mode to forward. If forward is TRUE only -next(), and seek() with positive values, are allowed for -navigating the results. Forward only mode needs far less memory -since results do not need to be cached. -

          Forward only mode is off by default. -

          Forward only mode cannot be used with data aware widgets like -TQDataTable, since they must to be able to scroll backward as well -as forward. -

          See also isForwardOnly(), next(), and seek(). - -

          int TQSqlQuery::size () const -

          -Returns the size of the result, (number of rows returned), or -1 -if the size cannot be determined or if the database does not -support reporting information about query sizes. Note that for -non-SELECT statements (isSelect() returns FALSE), size() will -return -1. If the query is not active (isActive() returns FALSE), --1 is returned. -

          To determine the number of rows affected by a non-SELECT -statement, use numRowsAffected(). -

          See also isActive(), numRowsAffected(), and TQSqlDriver::hasFeature(). - -

          Example: sql/overview/navigating/main.cpp. -

          TQVariant TQSqlQuery::value ( int i ) const [virtual] -

          -Returns the value of the i-th field in the query (zero based). -

          The fields are numbered from left to right using the text of the -SELECT statement, e.g. in SELECT forename, surname FROM people, -field 0 is forename and field 1 is surname. Using SELECT * -is not recommended because the order of the fields in the query is -undefined. -

          An invalid TQVariant is returned if field i does not exist, if -the query is inactive, or if the query is positioned on an invalid -record. -

          See also prev(), next(), first(), last(), seek(), isActive(), and isValid(). - -

          Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/retrieve1/main.cpp, sql/overview/subclass3/main.cpp, sql/overview/subclass4/main.cpp, sql/overview/subclass5/main.cpp, and sql/overview/table4/main.cpp. - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlrecord.html b/doc/html/ntqsqlrecord.html deleted file mode 100644 index 9d13a2470..000000000 --- a/doc/html/ntqsqlrecord.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - -TQSqlRecord Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlRecord Class Reference
          [sql module]

          - -

          The TQSqlRecord class encapsulates a database record, i.e. a -set of database fields. -More... -

          #include <ntqsqlrecord.h> -

          Inherited by TQSqlCursor and TQSqlIndex. -

          List of all member functions. -

          Public Members

          -
            -
          • TQSqlRecord ()
          • -
          • TQSqlRecord ( const TQSqlRecord & other )
          • -
          • TQSqlRecord & operator= ( const TQSqlRecord & other )
          • -
          • virtual ~TQSqlRecord ()
          • -
          • virtual TQVariant value ( int i ) const
          • -
          • virtual TQVariant value ( const TQString & name ) const
          • -
          • virtual void setValue ( int i, const TQVariant & val )
          • -
          • virtual void setValue ( const TQString & name, const TQVariant & val )
          • -
          • bool isGenerated ( int i ) const
          • -
          • bool isGenerated ( const TQString & name ) const
          • -
          • virtual void setGenerated ( const TQString & name, bool generated )
          • -
          • virtual void setGenerated ( int i, bool generated )
          • -
          • virtual void setNull ( int i )
          • -
          • virtual void setNull ( const TQString & name )
          • -
          • bool isNull ( int i ) const
          • -
          • bool isNull ( const TQString & name ) const
          • -
          • int position ( const TQString & name ) const
          • -
          • TQString fieldName ( int i ) const
          • -
          • TQSqlField * field ( int i )
          • -
          • TQSqlField * field ( const TQString & name )
          • -
          • const TQSqlField * field ( int i ) const
          • -
          • const TQSqlField * field ( const TQString & name ) const
          • -
          • virtual void append ( const TQSqlField & field )
          • -
          • virtual void insert ( int pos, const TQSqlField & field )
          • -
          • virtual void remove ( int pos )
          • -
          • bool isEmpty () const
          • -
          • bool contains ( const TQString & name ) const
          • -
          • virtual void clear ()
          • -
          • virtual void clearValues ( bool nullify = FALSE )
          • -
          • uint count () const
          • -
          • virtual TQString toString ( const TQString & prefix = TQString::null, const TQString & sep = "," ) const
          • -
          • virtual TQStringList toStringList ( const TQString & prefix = TQString::null ) const
          • -
          -

          Detailed Description

          - - -The TQSqlRecord class encapsulates a database record, i.e. a -set of database fields. -

          - -

          The TQSqlRecord class encapsulates the functionality and -characteristics of a database record (usually a table or view within -the database). TQSqlRecords support adding and removing fields as -well as setting and retrieving field values. -

          TQSqlRecord is implicitly shared. This means you can make copies of -the record in time O(1). If multiple TQSqlRecord instances share -the same data and one is modifying the record's data then this -modifying instance makes a copy and modifies its private copy - -thus it does not affect other instances. -

          See also TQSqlRecordInfo and Database Classes. - -


          Member Function Documentation

          -

          TQSqlRecord::TQSqlRecord () -

          -Constructs an empty record. - -

          TQSqlRecord::TQSqlRecord ( const TQSqlRecord & other ) -

          -Constructs a copy of other. - -

          TQSqlRecord::~TQSqlRecord () [virtual] -

          -Destroys the object and frees any allocated resources. - -

          void TQSqlRecord::append ( const TQSqlField & field ) [virtual] -

          -Append a copy of field field to the end of the record. - -

          Reimplemented in TQSqlIndex. -

          void TQSqlRecord::clear () [virtual] -

          -Removes all the record's fields. -

          See also clearValues(). - -

          Reimplemented in TQSqlCursor. -

          void TQSqlRecord::clearValues ( bool nullify = FALSE ) [virtual] -

          -Clears the value of all fields in the record. If nullify is -TRUE, (the default is FALSE), each field is set to NULL. - -

          bool TQSqlRecord::contains ( const TQString & name ) const -

          -Returns TRUE if there is a field in the record called name; -otherwise returns FALSE. - -

          uint TQSqlRecord::count () const -

          -Returns the number of fields in the record. - -

          TQSqlField * TQSqlRecord::field ( int i ) -

          -Returns the field at position i within the record, or 0 if it -cannot be found. - -

          TQSqlField * TQSqlRecord::field ( const TQString & name ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns the field called name within the record, or 0 if it -cannot be found. Field names are not case-sensitive. - -

          const TQSqlField * TQSqlRecord::field ( int i ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          -

          const TQSqlField * TQSqlRecord::field ( const TQString & name ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns the field called name within the record, or 0 if it -cannot be found. Field names are not case-sensitive. - -

          TQString TQSqlRecord::fieldName ( int i ) const -

          -Returns the name of the field at position i. If the field does -not exist, TQString::null is returned. - -

          void TQSqlRecord::insert ( int pos, const TQSqlField & field ) [virtual] -

          -Insert a copy of field at position pos. If a field already -exists at pos, it is removed. - -

          bool TQSqlRecord::isEmpty () const -

          -Returns TRUE if there are no fields in the record; otherwise -returns FALSE. - -

          bool TQSqlRecord::isGenerated ( const TQString & name ) const -

          -Returns TRUE if the record has a field called name and this -field is to be generated (the default); otherwise returns FALSE. -

          See also setGenerated(). - -

          bool TQSqlRecord::isGenerated ( int i ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns TRUE if the record has a field at position i and this -field is to be generated (the default); otherwise returns FALSE. -

          See also setGenerated(). - -

          bool TQSqlRecord::isNull ( const TQString & name ) const -

          -Returns TRUE if the field called name is NULL or if there is no -field called name; otherwise returns FALSE. -

          See also position(). - -

          bool TQSqlRecord::isNull ( int i ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns TRUE if the field i is NULL or if there is no field at -position i; otherwise returns FALSE. -

          See also fieldName(). - -

          TQSqlRecord & TQSqlRecord::operator= ( const TQSqlRecord & other ) -

          -Sets the record equal to other. - -

          int TQSqlRecord::position ( const TQString & name ) const -

          -Returns the position of the field called name within the -record, or -1 if it cannot be found. Field names are not -case-sensitive. If more than one field matches, the first one is -returned. - -

          void TQSqlRecord::remove ( int pos ) [virtual] -

          -Removes the field at pos. If pos does not exist, nothing -happens. - -

          Reimplemented in TQSqlCursor. -

          void TQSqlRecord::setGenerated ( const TQString & name, bool generated ) [virtual] -

          -Sets the generated flag for the field called name to generated. If the field does not exist, nothing happens. Only -fields that have generated set to TRUE are included in the SQL -that is generated, e.g. by TQSqlCursor. -

          See also isGenerated(). - -

          Reimplemented in TQSqlCursor. -

          void TQSqlRecord::setGenerated ( int i, bool generated ) [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Sets the generated flag for the field i to generated. -

          See also isGenerated(). - -

          Reimplemented in TQSqlCursor. -

          void TQSqlRecord::setNull ( int i ) [virtual] -

          -Sets the value of field i to NULL. If the field does not exist, -nothing happens. - -

          void TQSqlRecord::setNull ( const TQString & name ) [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Sets the value of the field called name to NULL. If the field -does not exist, nothing happens. - -

          void TQSqlRecord::setValue ( int i, const TQVariant & val ) [virtual] -

          -Sets the value of the field at position i to val. If the -field does not exist, nothing happens. - -

          Examples: sql/overview/insert/main.cpp, sql/overview/insert2/main.cpp, sql/overview/subclass5/main.cpp, sql/overview/update/main.cpp, and sql/sqltable/main.cpp. -

          void TQSqlRecord::setValue ( const TQString & name, const TQVariant & val ) [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Sets the value of the field called name to val. If the field -does not exist, nothing happens. - -

          TQString TQSqlRecord::toString ( const TQString & prefix = TQString::null, const TQString & sep = "," ) const [virtual] -

          -Returns a list of all the record's field names as a string -separated by sep. -

          Note that fields which are not generated are not included (see -isGenerated()). The returned string is suitable, for example, for -generating SQL SELECT statements. If a prefix is specified, -e.g. a table name, all fields are prefixed in the form: -

          "prefix.<fieldname>" - -

          TQStringList TQSqlRecord::toStringList ( const TQString & prefix = TQString::null ) const [virtual] -

          -Returns a list of all the record's field names, each having the -prefix prefix. -

          Note that fields which have generated set to FALSE are not -included. (See isGenerated()). If prefix is supplied, e.g. -a table name, all fields are prefixed in the form: -

          "prefix.<fieldname>" - -

          TQVariant TQSqlRecord::value ( int i ) const [virtual] -

          -Returns the value of the field located at position i in the -record. If field i does not exist the resultant behaviour is -undefined. -

          This function should be used with TQSqlQuerys. When working -with a TQSqlCursor the value(const - TQString&) overload which uses field names is more -appropriate. - -

          Example: sql/overview/update/main.cpp. -

          TQVariant TQSqlRecord::value ( const TQString & name ) const [virtual] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Returns the value of the field called name in the record. If -field name does not exist the resultant behaviour is undefined. - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlresult.html b/doc/html/ntqsqlresult.html deleted file mode 100644 index c05ad1743..000000000 --- a/doc/html/ntqsqlresult.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - -TQSqlResult Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlResult Class Reference
          [sql module]

          - -

          The TQSqlResult class provides an abstract interface for -accessing data from SQL databases. -More... -

          #include <ntqsqlresult.h> -

          List of all member functions. -

          Public Members

          - -

          Protected Members

          - -

          Detailed Description

          - - -The TQSqlResult class provides an abstract interface for -accessing data from SQL databases. -

          - -

          Normally you would use TQSqlQuery instead of TQSqlResult since TQSqlQuery -provides a generic wrapper for database-specific implementations of -TQSqlResult. -

          See also TQSql and Database Classes. - -


          Member Function Documentation

          -

          TQSqlResult::TQSqlResult ( const TQSqlDriver * db ) [protected] -

          -Protected constructor which creates a TQSqlResult using database db. The object is initialized to an inactive state. - -

          TQSqlResult::~TQSqlResult () [virtual] -

          -Destroys the object and frees any allocated resources. - -

          int TQSqlResult::at () const [protected] -

          -Returns the current (zero-based) position of the result. - -

          TQVariant TQSqlResult::data ( int i ) [pure virtual protected] -

          - -

          Returns the data for field i (zero-based) as a TQVariant. This -function is only called if the result is in an active state and is -positioned on a valid record and i is non-negative. -Derived classes must reimplement this function and return the value -of field i, or TQVariant() if it cannot be determined. - -

          const TQSqlDriver * TQSqlResult::driver () const [protected] -

          -Returns the driver associated with the result. - -

          bool TQSqlResult::fetch ( int i ) [pure virtual protected] -

          - -

          Positions the result to an arbitrary (zero-based) index i. This -function is only called if the result is in an active state. Derived -classes must reimplement this function and position the result to the -index i, and call setAt() with an appropriate value. Return TRUE -to indicate success, or FALSE to signify failure. - -

          bool TQSqlResult::fetchFirst () [pure virtual protected] -

          - -

          Positions the result to the first record in the result. This -function is only called if the result is in an active state. -Derived classes must reimplement this function and position the result -to the first record, and call setAt() with an appropriate value. -Return TRUE to indicate success, or FALSE to signify failure. - -

          bool TQSqlResult::fetchLast () [pure virtual protected] -

          - -

          Positions the result to the last record in the result. This -function is only called if the result is in an active state. -Derived classes must reimplement this function and position the result -to the last record, and call setAt() with an appropriate value. -Return TRUE to indicate success, or FALSE to signify failure. - -

          bool TQSqlResult::fetchNext () [virtual protected] -

          -Positions the result to the next available record in the result. -This function is only called if the result is in an active state. -The default implementation calls fetch() with the next index. -Derived classes can reimplement this function and position the result -to the next record in some other way, and call setAt() with an -appropriate value. Return TRUE to indicate success, or FALSE to -signify failure. - -

          bool TQSqlResult::fetchPrev () [virtual protected] -

          -Positions the result to the previous available record in the -result. This function is only called if the result is in an active -state. The default implementation calls fetch() with the previous -index. Derived classes can reimplement this function and position the -result to the next record in some other way, and call setAt() with -an appropriate value. Return TRUE to indicate success, or FALSE to -signify failure. - -

          bool TQSqlResult::isActive () const [protected] -

          -Returns TRUE if the result has records to be retrieved; otherwise -returns FALSE. - -

          bool TQSqlResult::isForwardOnly () const [protected] -

          -Returns TRUE if you can only scroll forward through a result set; -otherwise returns FALSE. - -

          bool TQSqlResult::isNull ( int i ) [pure virtual protected] -

          - -

          Returns TRUE if the field at position i is NULL; otherwise -returns FALSE. - -

          bool TQSqlResult::isSelect () const [protected] -

          -Returns TRUE if the current result is from a SELECT statement; -otherwise returns FALSE. - -

          bool TQSqlResult::isValid () const [protected] -

          -Returns TRUE if the result is positioned on a valid record (that -is, the result is not positioned before the first or after the -last record); otherwise returns FALSE. - -

          TQSqlError TQSqlResult::lastError () const [protected] -

          -Returns the last error associated with the result. - -

          TQString TQSqlResult::lastQuery () const [protected] -

          -Returns the current SQL query text, or TQString::null if there is none. - -

          int TQSqlResult::numRowsAffected () [pure virtual protected] -

          - -

          Returns the number of rows affected by the last query executed. - -

          bool TQSqlResult::reset ( const TQString & query ) [pure virtual protected] -

          - -

          Sets the result to use the SQL statement query for subsequent -data retrieval. Derived classes must reimplement this function and -apply the query to the database. This function is called only -after the result is set to an inactive state and is positioned -before the first record of the new result. Derived classes should -return TRUE if the query was successful and ready to be used, -or FALSE otherwise. - -

          void TQSqlResult::setActive ( bool a ) [virtual protected] -

          -Protected function provided for derived classes to set the -internal active state to the value of a. -

          See also isActive(). - -

          void TQSqlResult::setAt ( int at ) [virtual protected] -

          -Protected function provided for derived classes to set the -internal (zero-based) result index to at. -

          See also at(). - -

          void TQSqlResult::setForwardOnly ( bool forward ) [virtual protected] -

          -Sets forward only mode to forward. If forward is TRUE only -fetchNext() is allowed for navigating the results. Forward only -mode needs far less memory since results do not have to be cached. -forward only mode is off by default. -

          See also fetchNext(). - -

          void TQSqlResult::setLastError ( const TQSqlError & e ) [virtual protected] -

          -Protected function provided for derived classes to set the last -error to the value of e. -

          See also lastError(). - -

          void TQSqlResult::setQuery ( const TQString & query ) [virtual protected] -

          -Sets the current query for the result to query. The result must -be reset() in order to execute the query on the database. - -

          void TQSqlResult::setSelect ( bool s ) [virtual protected] -

          -Protected function provided for derived classes to indicate -whether or not the current statement is a SQL SELECT statement. -The s parameter should be TRUE if the statement is a SELECT -statement, or FALSE otherwise. - -

          int TQSqlResult::size () [pure virtual protected] -

          - -

          Returns the size of the result or -1 if it cannot be determined. - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsqlselectcursor.html b/doc/html/ntqsqlselectcursor.html deleted file mode 100644 index e1a943498..000000000 --- a/doc/html/ntqsqlselectcursor.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - -TQSqlSelectCursor Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSqlSelectCursor Class Reference
          [sql module]

          - -

          The TQSqlSelectCursor class provides browsing of general SQL -SELECT statements. -More... -

          #include <ntqsqlselectcursor.h> -

          Inherits TQSqlCursor. -

          List of all member functions. -

          Public Members

          - -

          Detailed Description

          - - -The TQSqlSelectCursor class provides browsing of general SQL -SELECT statements. -

          - -

          TQSqlSelectCursor is a convenience class that makes it possible to -display result sets from general SQL SELECT statements in -data-aware TQt widgets. TQSqlSelectCursor is read-only and does not -support INSERT, UPDATE or DELETE operations. -

          Pass the query in at construction time, or use the -TQSqlSelectCursor::exec() function. -

          Example: -

          -    ...
          -    TQSqlSelectCursor* cur = new TQSqlSelectCursor( "SELECT id, firstname, lastname FROM author" );
          -    TQDataTable* table = new TQDataTable( this );
          -    table->setSqlCursor( cur, TRUE, TRUE );
          -    table->refresh();
          -    ...
          -    cur->exec( "SELECT * FROM books" );
          -    table->refresh();
          -    ...
          -    
          - -

          See also Database Classes. - -


          Member Function Documentation

          -

          TQSqlSelectCursor::TQSqlSelectCursor ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 ) -

          -Constructs a read only cursor on database db using the query query. - -

          TQSqlSelectCursor::TQSqlSelectCursor ( const TQSqlSelectCursor & other ) -

          Constructs a copy of other -

          TQSqlSelectCursor::~TQSqlSelectCursor () -

          Destroys the object and frees any allocated resources - -

          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqtable.html b/doc/html/ntqtable.html index c47a87dc2..0e7981c67 100644 --- a/doc/html/ntqtable.html +++ b/doc/html/ntqtable.html @@ -35,7 +35,7 @@ body { background: #ffffff; color: black; } More...

          #include <ntqtable.h>

          Inherits TQScrollView. -

          Inherited by TQDataTable. +

          Inherited by TQDataTable.

          List of all member functions.

          Public Members

            @@ -482,7 +482,7 @@ display the widest item the column contains.

            See also adjustRow().

            Example: regexptester/regexptester.cpp. -

            Reimplemented in TQDataTable. +

            Reimplemented in TQDataTable.

            void TQTable::adjustRow ( int row ) [virtual slot]

            Resizes row row so that the row height is tall enough to @@ -910,11 +910,11 @@ function: see the notes on large t

            int TQTable::numCols () const [virtual]

            Returns the number of columns in the table. See the "numCols" property for details. -

            Reimplemented in TQDataTable. +

            Reimplemented in TQDataTable.

            int TQTable::numRows () const [virtual]

            Returns the number of rows in the table. See the "numRows" property for details. -

            Reimplemented in TQDataTable. +

            Reimplemented in TQDataTable.

            int TQTable::numSelections () const

            Returns the number of selections. See the "numSelections" property for details. @@ -1160,7 +1160,7 @@ Resizes column col to be w pixels wide.

            See also columnWidth() and setRowHeight().

            Example: chart/setdataform.cpp. -

            Reimplemented in TQDataTable. +

            Reimplemented in TQDataTable.

            void TQTable::setCurrentCell ( int row, int col ) [virtual slot]

            Moves the focus to the cell at row, col. @@ -1302,7 +1302,7 @@ reimplement swapRows() and swapCells(). (See the swapRows().

            Example: table/statistics/statistics.cpp. -

            Reimplemented in TQDataTable. +

            Reimplemented in TQDataTable.

            bool TQTable::sorting () const

            Returns TRUE if a click on the header of a column sorts that column; otherwise returns FALSE. See the "sorting" property for details. @@ -1367,7 +1367,7 @@ if the relevant item does not exist or has no text.

            See also setText() and setPixmap().

            Example: chart/setdataform.cpp. -

            Reimplemented in TQDataTable. +

            Reimplemented in TQDataTable.

            void TQTable::updateCell ( int row, int col )

            Repaints the cell at row, col. diff --git a/doc/html/ntqwidget.html b/doc/html/ntqwidget.html index 7697bf18e..10e22604a 100644 --- a/doc/html/ntqwidget.html +++ b/doc/html/ntqwidget.html @@ -35,7 +35,7 @@ body { background: #ffffff; color: black; } More...

            #include <ntqwidget.h>

            Inherits TQObject and TQPaintDevice. -

            Inherited by TQAxWidget, TQButton, TQFrame, TQDialog, TQComboBox, TQDataBrowser, TQDataView, TQDateTimeEditBase, TQDateTimeEdit, TQDesktopWidget, TQDial, TQDockArea, TQGLWidget, TQHeader, TQMainWindow, TQMotifWidget, TQNPWidget, TQScrollBar, TQSizeGrip, TQSlider, TQSpinBox, TQSplashScreen, TQStatusBar, TQTabBar, TQTabWidget, TQWorkspace, and TQXtWidget. +

            Inherited by TQAxWidget, TQButton, TQFrame, TQDialog, TQComboBox, TQDataBrowser, TQDataView, TQDateTimeEditBase, TQDateTimeEdit, TQDesktopWidget, TQDial, TQDockArea, TQGLWidget, TQHeader, TQMainWindow, TQMotifWidget, TQNPWidget, TQScrollBar, TQSizeGrip, TQSlider, TQSpinBox, TQSplashScreen, TQStatusBar, TQTabBar, TQTabWidget, TQWorkspace, and TQXtWidget.

            List of all member functions.

            Public Members

              diff --git a/doc/html/plugins-howto.html b/doc/html/plugins-howto.html index 8ae14f2a7..de9973159 100644 --- a/doc/html/plugins-howto.html +++ b/doc/html/plugins-howto.html @@ -49,7 +49,7 @@ by default in the standard plugin directory. TQImageFormatPlugin pluginsbase/imageformats * -TQSqlDriverPlugin +TQSqlDriverPlugin pluginsbase/sqldrivers * TQStylePlugin diff --git a/doc/html/plugins.html b/doc/html/plugins.html index ad8df58cd..ed970d721 100644 --- a/doc/html/plugins.html +++ b/doc/html/plugins.html @@ -44,7 +44,7 @@ Windows. TQKbdDriverPluginAbstract base for TQt/Embedded keyboard driver plugins TQLibraryWrapper for handling shared libraries TQMouseDriverPluginAbstract base for TQt/Embedded mouse driver plugins -TQSqlDriverPluginAbstract base for custom TQSqlDriver plugins +TQSqlDriverPluginAbstract base for custom TQSqlDriver plugins TQStylePluginAbstract base for custom TQStyle plugins TQTextCodecPluginAbstract base for custom TQTextCodec plugins TQWidgetPluginAbstract base for custom TQWidget plugins diff --git a/doc/html/propertydocs b/doc/html/propertydocs index a79766127..1cdde30a8 100644 --- a/doc/html/propertydocs +++ b/doc/html/propertydocs @@ -520,8 +520,8 @@ than lines, a scrollbar is added. - QDataBrowser::autoEdit - + TQDataBrowser::autoEdit + <p>This property holds whether the browser automatically applies edits. <p>The default value for this property is TRUE. When the user begins an insertion or an update on a form there are two possible @@ -531,110 +531,110 @@ outcomes when they navigate to another record: <li> the insert or update is discarded -- this occurs if autoEdit is FALSE </ul> -<p>Set this property's value with <a href="ntqdatabrowser.html#setAutoEdit">setAutoEdit</a>() and get this property's value with <a href="ntqdatabrowser.html#autoEdit">autoEdit</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setAutoEdit">setAutoEdit</a>() and get this property's value with <a href="tqdatabrowser.html#autoEdit">autoEdit</a>(). - QDataBrowser::boundaryChecking - + TQDataBrowser::boundaryChecking + <p>This property holds whether boundary checking is active. <p>When boundary checking is active (the default), signals are emitted indicating the current position of the default cursor. -<p> <p>See also <a href="ntqdatabrowser.html#boundary">boundary</a>(). +<p> <p>See also <a href="tqdatabrowser.html#boundary">boundary</a>(). -<p>Set this property's value with <a href="ntqdatabrowser.html#setBoundaryChecking">setBoundaryChecking</a>() and get this property's value with <a href="ntqdatabrowser.html#boundaryChecking">boundaryChecking</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setBoundaryChecking">setBoundaryChecking</a>() and get this property's value with <a href="tqdatabrowser.html#boundaryChecking">boundaryChecking</a>(). - QDataBrowser::confirmCancels - + TQDataBrowser::confirmCancels + <p>This property holds whether the browser confirms cancel operations. <p>If this property is TRUE, all cancels must be confirmed by the user through a message box (this behavior can be changed by -overriding the <a href="ntqdatabrowser.html#confirmCancel">confirmCancel</a>() function), otherwise all cancels +overriding the <a href="tqdatabrowser.html#confirmCancel">confirmCancel</a>() function), otherwise all cancels occur immediately. The default is FALSE. -<p> <p>See also <a href="ntqdatabrowser.html#confirmEdits-prop">confirmEdits</a> and <a href="ntqdatabrowser.html#confirmCancel">confirmCancel</a>(). +<p> <p>See also <a href="tqdatabrowser.html#confirmEdits-prop">confirmEdits</a> and <a href="tqdatabrowser.html#confirmCancel">confirmCancel</a>(). -<p>Set this property's value with <a href="ntqdatabrowser.html#setConfirmCancels">setConfirmCancels</a>() and get this property's value with <a href="ntqdatabrowser.html#confirmCancels">confirmCancels</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setConfirmCancels">setConfirmCancels</a>() and get this property's value with <a href="tqdatabrowser.html#confirmCancels">confirmCancels</a>(). - QDataBrowser::confirmDelete - + TQDataBrowser::confirmDelete + <p>This property holds whether the browser confirms deletions. <p>If this property is TRUE, the browser confirms deletions, otherwise deletions happen immediately. -<p> <p>See also <a href="ntqdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="ntqdatabrowser.html#confirmEdits-prop">confirmEdits</a>, <a href="ntqdatabrowser.html#confirmUpdate-prop">confirmUpdate</a>, <a href="ntqdatabrowser.html#confirmInsert-prop">confirmInsert</a>, and <a href="ntqdatabrowser.html#confirmEdit">confirmEdit</a>(). +<p> <p>See also <a href="tqdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="tqdatabrowser.html#confirmEdits-prop">confirmEdits</a>, <a href="tqdatabrowser.html#confirmUpdate-prop">confirmUpdate</a>, <a href="tqdatabrowser.html#confirmInsert-prop">confirmInsert</a>, and <a href="tqdatabrowser.html#confirmEdit">confirmEdit</a>(). -<p>Set this property's value with <a href="ntqdatabrowser.html#setConfirmDelete">setConfirmDelete</a>() and get this property's value with <a href="ntqdatabrowser.html#confirmDelete">confirmDelete</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setConfirmDelete">setConfirmDelete</a>() and get this property's value with <a href="tqdatabrowser.html#confirmDelete">confirmDelete</a>(). - QDataBrowser::confirmEdits - + TQDataBrowser::confirmEdits + <p>This property holds whether the browser confirms edits. <p>If this property is TRUE, the browser confirms all edit operations (insertions, updates and deletions), otherwise all edit operations happen immediately. Confirmation is achieved by presenting the user with a message box -- this behavior can be changed by -reimplementing the <a href="ntqdatabrowser.html#confirmEdit">confirmEdit</a>() function, -<p> <p>See also <a href="ntqdatabrowser.html#confirmEdit">confirmEdit</a>(), <a href="ntqdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="ntqdatabrowser.html#confirmInsert-prop">confirmInsert</a>, <a href="ntqdatabrowser.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="ntqdatabrowser.html#confirmDelete-prop">confirmDelete</a>. +reimplementing the <a href="tqdatabrowser.html#confirmEdit">confirmEdit</a>() function, +<p> <p>See also <a href="tqdatabrowser.html#confirmEdit">confirmEdit</a>(), <a href="tqdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="tqdatabrowser.html#confirmInsert-prop">confirmInsert</a>, <a href="tqdatabrowser.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="tqdatabrowser.html#confirmDelete-prop">confirmDelete</a>. -<p>Set this property's value with <a href="ntqdatabrowser.html#setConfirmEdits">setConfirmEdits</a>() and get this property's value with <a href="ntqdatabrowser.html#confirmEdits">confirmEdits</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setConfirmEdits">setConfirmEdits</a>() and get this property's value with <a href="tqdatabrowser.html#confirmEdits">confirmEdits</a>(). - QDataBrowser::confirmInsert - + TQDataBrowser::confirmInsert + <p>This property holds whether the data browser confirms insertions. <p>If this property is TRUE, the browser confirms insertions, otherwise insertions happen immediately. -<p> <p>See also <a href="ntqdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="ntqdatabrowser.html#confirmEdits-prop">confirmEdits</a>, <a href="ntqdatabrowser.html#confirmUpdate-prop">confirmUpdate</a>, <a href="ntqdatabrowser.html#confirmDelete-prop">confirmDelete</a>, and <a href="ntqdatabrowser.html#confirmEdit">confirmEdit</a>(). +<p> <p>See also <a href="tqdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="tqdatabrowser.html#confirmEdits-prop">confirmEdits</a>, <a href="tqdatabrowser.html#confirmUpdate-prop">confirmUpdate</a>, <a href="tqdatabrowser.html#confirmDelete-prop">confirmDelete</a>, and <a href="tqdatabrowser.html#confirmEdit">confirmEdit</a>(). -<p>Set this property's value with <a href="ntqdatabrowser.html#setConfirmInsert">setConfirmInsert</a>() and get this property's value with <a href="ntqdatabrowser.html#confirmInsert">confirmInsert</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setConfirmInsert">setConfirmInsert</a>() and get this property's value with <a href="tqdatabrowser.html#confirmInsert">confirmInsert</a>(). - QDataBrowser::confirmUpdate - + TQDataBrowser::confirmUpdate + <p>This property holds whether the browser confirms updates. <p>If this property is TRUE, the browser confirms updates, otherwise updates happen immediately. -<p> <p>See also <a href="ntqdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="ntqdatabrowser.html#confirmEdits-prop">confirmEdits</a>, <a href="ntqdatabrowser.html#confirmInsert-prop">confirmInsert</a>, <a href="ntqdatabrowser.html#confirmDelete-prop">confirmDelete</a>, and <a href="ntqdatabrowser.html#confirmEdit">confirmEdit</a>(). +<p> <p>See also <a href="tqdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="tqdatabrowser.html#confirmEdits-prop">confirmEdits</a>, <a href="tqdatabrowser.html#confirmInsert-prop">confirmInsert</a>, <a href="tqdatabrowser.html#confirmDelete-prop">confirmDelete</a>, and <a href="tqdatabrowser.html#confirmEdit">confirmEdit</a>(). -<p>Set this property's value with <a href="ntqdatabrowser.html#setConfirmUpdate">setConfirmUpdate</a>() and get this property's value with <a href="ntqdatabrowser.html#confirmUpdate">confirmUpdate</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setConfirmUpdate">setConfirmUpdate</a>() and get this property's value with <a href="tqdatabrowser.html#confirmUpdate">confirmUpdate</a>(). - QDataBrowser::filter - + TQDataBrowser::filter + <p>This property holds the data browser's filter. <p>The filter applies to the data shown in the browser. Call -<a href="ntqdatabrowser.html#refresh">refresh</a>() to apply the new filter. A filter is a string containing +<a href="tqdatabrowser.html#refresh">refresh</a>() to apply the new filter. A filter is a string containing a SQL WHERE clause without the WHERE keyword, e.g. "id>1000", "name LIKE 'A%'", etc. <p> There is no default filter. -<p> <p>See also <a href="ntqdatabrowser.html#sort-prop">sort</a>. +<p> <p>See also <a href="tqdatabrowser.html#sort-prop">sort</a>. -<p>Set this property's value with <a href="ntqdatabrowser.html#setFilter">setFilter</a>() and get this property's value with <a href="ntqdatabrowser.html#filter">filter</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setFilter">setFilter</a>() and get this property's value with <a href="tqdatabrowser.html#filter">filter</a>(). - QDataBrowser::readOnly - + TQDataBrowser::readOnly + <p>This property holds whether the browser is read-only. <p>The default is FALSE, i.e. data can be edited. If the data browser is read-only, no database edits will be allowed. -<p>Set this property's value with <a href="ntqdatabrowser.html#setReadOnly">setReadOnly</a>() and get this property's value with <a href="ntqdatabrowser.html#isReadOnly">isReadOnly</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setReadOnly">setReadOnly</a>() and get this property's value with <a href="tqdatabrowser.html#isReadOnly">isReadOnly</a>(). - QDataBrowser::sort - + TQDataBrowser::sort + <p>This property holds the data browser's sort. <p>The data browser's sort affects the order in which records are -viewed in the browser. Call <a href="ntqdatabrowser.html#refresh">refresh</a>() to apply the new sort. +viewed in the browser. Call <a href="tqdatabrowser.html#refresh">refresh</a>() to apply the new sort. <p> When retrieving the sort property, a string list is returned in the form 'fieldname order', e.g. 'id ASC', 'surname DESC'. <p> There is no default sort. @@ -650,12 +650,12 @@ over a copy, e.g. </pre> -<p>Set this property's value with <a href="ntqdatabrowser.html#setSort">setSort</a>() and get this property's value with <a href="ntqdatabrowser.html#sort">sort</a>(). +<p>Set this property's value with <a href="tqdatabrowser.html#setSort">setSort</a>() and get this property's value with <a href="tqdatabrowser.html#sort">sort</a>(). - QDataTable::autoEdit - + TQDataTable::autoEdit + <p>This property holds whether the data table automatically applies edits. <p>The default value for this property is TRUE. When the user begins an insert or update in the table there are two possible outcomes @@ -665,139 +665,139 @@ when they navigate to another record: <li> the insert or update is abandoned -- this occurs if autoEdit is FALSE </ol> -<p>Set this property's value with <a href="ntqdatatable.html#setAutoEdit">setAutoEdit</a>() and get this property's value with <a href="ntqdatatable.html#autoEdit">autoEdit</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setAutoEdit">setAutoEdit</a>() and get this property's value with <a href="tqdatatable.html#autoEdit">autoEdit</a>(). - QDataTable::confirmCancels - + TQDataTable::confirmCancels + <p>This property holds whether the data table confirms cancel operations. <p>If the confirmCancel property is TRUE, all cancels must be confirmed by the user through a message box (this behavior can be -changed by overriding the <a href="ntqdatatable.html#confirmCancel">confirmCancel</a>() function), otherwise all +changed by overriding the <a href="tqdatatable.html#confirmCancel">confirmCancel</a>() function), otherwise all cancels occur immediately. The default is FALSE. -<p> <p>See also <a href="ntqdatatable.html#confirmEdits-prop">confirmEdits</a> and <a href="ntqdatatable.html#confirmCancel">confirmCancel</a>(). +<p> <p>See also <a href="tqdatatable.html#confirmEdits-prop">confirmEdits</a> and <a href="tqdatatable.html#confirmCancel">confirmCancel</a>(). -<p>Set this property's value with <a href="ntqdatatable.html#setConfirmCancels">setConfirmCancels</a>() and get this property's value with <a href="ntqdatatable.html#confirmCancels">confirmCancels</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setConfirmCancels">setConfirmCancels</a>() and get this property's value with <a href="tqdatatable.html#confirmCancels">confirmCancels</a>(). - QDataTable::confirmDelete - + TQDataTable::confirmDelete + <p>This property holds whether the data table confirms delete operations. <p>If the confirmDelete property is TRUE, all deletions must be confirmed by the user through a message box (this behaviour can be -changed by overriding the <a href="ntqdatatable.html#confirmEdit">confirmEdit</a>() function), otherwise all +changed by overriding the <a href="tqdatatable.html#confirmEdit">confirmEdit</a>() function), otherwise all delete operations occur immediately. -<p> <p>See also <a href="ntqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="ntqdatatable.html#confirmEdits-prop">confirmEdits</a>, <a href="ntqdatatable.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="ntqdatatable.html#confirmInsert-prop">confirmInsert</a>. +<p> <p>See also <a href="tqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="tqdatatable.html#confirmEdits-prop">confirmEdits</a>, <a href="tqdatatable.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="tqdatatable.html#confirmInsert-prop">confirmInsert</a>. -<p>Set this property's value with <a href="ntqdatatable.html#setConfirmDelete">setConfirmDelete</a>() and get this property's value with <a href="ntqdatatable.html#confirmDelete">confirmDelete</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setConfirmDelete">setConfirmDelete</a>() and get this property's value with <a href="tqdatatable.html#confirmDelete">confirmDelete</a>(). - QDataTable::confirmEdits - + TQDataTable::confirmEdits + <p>This property holds whether the data table confirms edit operations. <p>If the confirmEdits property is TRUE, the data table confirms all edit operations (inserts, updates and deletes). Finer control of -edit confirmation can be achieved using <a href="ntqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="ntqdatatable.html#confirmInsert-prop">confirmInsert</a>, <a href="ntqdatatable.html#confirmUpdate-prop">confirmUpdate</a> and <a href="ntqdatatable.html#confirmDelete-prop">confirmDelete</a>. -<p> <p>See also <a href="ntqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="ntqdatatable.html#confirmInsert-prop">confirmInsert</a>, <a href="ntqdatatable.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="ntqdatatable.html#confirmDelete-prop">confirmDelete</a>. +edit confirmation can be achieved using <a href="tqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="tqdatatable.html#confirmInsert-prop">confirmInsert</a>, <a href="tqdatatable.html#confirmUpdate-prop">confirmUpdate</a> and <a href="tqdatatable.html#confirmDelete-prop">confirmDelete</a>. +<p> <p>See also <a href="tqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="tqdatatable.html#confirmInsert-prop">confirmInsert</a>, <a href="tqdatatable.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="tqdatatable.html#confirmDelete-prop">confirmDelete</a>. -<p>Set this property's value with <a href="ntqdatatable.html#setConfirmEdits">setConfirmEdits</a>() and get this property's value with <a href="ntqdatatable.html#confirmEdits">confirmEdits</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setConfirmEdits">setConfirmEdits</a>() and get this property's value with <a href="tqdatatable.html#confirmEdits">confirmEdits</a>(). - QDataTable::confirmInsert - + TQDataTable::confirmInsert + <p>This property holds whether the data table confirms insert operations. <p>If the confirmInsert property is TRUE, all insertions must be confirmed by the user through a message box (this behaviour can be -changed by overriding the <a href="ntqdatatable.html#confirmEdit">confirmEdit</a>() function), otherwise all +changed by overriding the <a href="tqdatatable.html#confirmEdit">confirmEdit</a>() function), otherwise all insert operations occur immediately. -<p> <p>See also <a href="ntqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="ntqdatatable.html#confirmEdits-prop">confirmEdits</a>, <a href="ntqdatatable.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="ntqdatatable.html#confirmDelete-prop">confirmDelete</a>. +<p> <p>See also <a href="tqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="tqdatatable.html#confirmEdits-prop">confirmEdits</a>, <a href="tqdatatable.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="tqdatatable.html#confirmDelete-prop">confirmDelete</a>. -<p>Set this property's value with <a href="ntqdatatable.html#setConfirmInsert">setConfirmInsert</a>() and get this property's value with <a href="ntqdatatable.html#confirmInsert">confirmInsert</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setConfirmInsert">setConfirmInsert</a>() and get this property's value with <a href="tqdatatable.html#confirmInsert">confirmInsert</a>(). - QDataTable::confirmUpdate - + TQDataTable::confirmUpdate + <p>This property holds whether the data table confirms update operations. <p>If the confirmUpdate property is TRUE, all updates must be confirmed by the user through a message box (this behaviour can be -changed by overriding the <a href="ntqdatatable.html#confirmEdit">confirmEdit</a>() function), otherwise all +changed by overriding the <a href="tqdatatable.html#confirmEdit">confirmEdit</a>() function), otherwise all update operations occur immediately. -<p> <p>See also <a href="ntqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="ntqdatatable.html#confirmEdits-prop">confirmEdits</a>, <a href="ntqdatatable.html#confirmInsert-prop">confirmInsert</a>, and <a href="ntqdatatable.html#confirmDelete-prop">confirmDelete</a>. +<p> <p>See also <a href="tqdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="tqdatatable.html#confirmEdits-prop">confirmEdits</a>, <a href="tqdatatable.html#confirmInsert-prop">confirmInsert</a>, and <a href="tqdatatable.html#confirmDelete-prop">confirmDelete</a>. -<p>Set this property's value with <a href="ntqdatatable.html#setConfirmUpdate">setConfirmUpdate</a>() and get this property's value with <a href="ntqdatatable.html#confirmUpdate">confirmUpdate</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setConfirmUpdate">setConfirmUpdate</a>() and get this property's value with <a href="tqdatatable.html#confirmUpdate">confirmUpdate</a>(). - QDataTable::dateFormat - + TQDataTable::dateFormat + <p>This property holds the format used for displaying date/time values. <p>The dateFormat property is used for displaying date/time values in the table. The default value is <a href="ntqt.html#DateFormat-enum">TQt::LocalDate</a>. -<p>Set this property's value with <a href="ntqdatatable.html#setDateFormat">setDateFormat</a>() and get this property's value with <a href="ntqdatatable.html#dateFormat">dateFormat</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setDateFormat">setDateFormat</a>() and get this property's value with <a href="tqdatatable.html#dateFormat">dateFormat</a>(). - QDataTable::falseText - + TQDataTable::falseText + <p>This property holds the text used to represent false values. <p>The falseText property will be used to represent NULL values in the table. The default value is "False". -<p>Set this property's value with <a href="ntqdatatable.html#setFalseText">setFalseText</a>() and get this property's value with <a href="ntqdatatable.html#falseText">falseText</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setFalseText">setFalseText</a>() and get this property's value with <a href="tqdatatable.html#falseText">falseText</a>(). - QDataTable::filter - + TQDataTable::filter + <p>This property holds the data filter for the data table. <p>The filter applies to the data shown in the table. To view data -with a new filter, use <a href="ntqdatatable.html#refresh">refresh</a>(). A filter string is an SQL WHERE +with a new filter, use <a href="tqdatatable.html#refresh">refresh</a>(). A filter string is an SQL WHERE clause without the WHERE keyword. <p> There is no default filter. -<p> <p>See also <a href="ntqdatatable.html#sort-prop">sort</a>. +<p> <p>See also <a href="tqdatatable.html#sort-prop">sort</a>. <p> -<p>Set this property's value with <a href="ntqdatatable.html#setFilter">setFilter</a>() and get this property's value with <a href="ntqdatatable.html#filter">filter</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setFilter">setFilter</a>() and get this property's value with <a href="tqdatatable.html#filter">filter</a>(). - QDataTable::nullText - + TQDataTable::nullText + <p>This property holds the text used to represent NULL values. <p>The nullText property will be used to represent NULL values in the table. The default value is provided by the cursor's driver. -<p>Set this property's value with <a href="ntqdatatable.html#setNullText">setNullText</a>() and get this property's value with <a href="ntqdatatable.html#nullText">nullText</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setNullText">setNullText</a>() and get this property's value with <a href="tqdatatable.html#nullText">nullText</a>(). - QDataTable::numCols - + TQDataTable::numCols + <p>This property holds the number of columns in the table. <p> -<p>Get this property's value with <a href="ntqdatatable.html#numCols">numCols</a>(). +<p>Get this property's value with <a href="tqdatatable.html#numCols">numCols</a>(). - QDataTable::numRows - + TQDataTable::numRows + <p>This property holds the number of rows in the table. <p> -<p>Get this property's value with <a href="ntqdatatable.html#numRows">numRows</a>(). +<p>Get this property's value with <a href="tqdatatable.html#numRows">numRows</a>(). - QDataTable::sort - + TQDataTable::sort + <p>This property holds the data table's sort. <p>The table's sort affects the order in which data records are -displayed in the table. To apply a sort, use <a href="ntqdatatable.html#refresh">refresh</a>(). +displayed in the table. To apply a sort, use <a href="tqdatatable.html#refresh">refresh</a>(). <p> When examining the sort property, a string list is returned with each item having the form 'fieldname order' (e.g., 'id ASC', 'surname DESC'). @@ -813,19 +813,19 @@ iterate over a copy, e.g. } </pre> -<p> <p>See also <a href="ntqdatatable.html#filter-prop">filter</a> and <a href="ntqdatatable.html#refresh">refresh</a>(). +<p> <p>See also <a href="tqdatatable.html#filter-prop">filter</a> and <a href="tqdatatable.html#refresh">refresh</a>(). -<p>Set this property's value with <a href="ntqdatatable.html#setSort">setSort</a>() and get this property's value with <a href="ntqdatatable.html#sort">sort</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setSort">setSort</a>() and get this property's value with <a href="tqdatatable.html#sort">sort</a>(). - QDataTable::trueText - + TQDataTable::trueText + <p>This property holds the text used to represent true values. <p>The trueText property will be used to represent NULL values in the table. The default value is "True". -<p>Set this property's value with <a href="ntqdatatable.html#setTrueText">setTrueText</a>() and get this property's value with <a href="ntqdatatable.html#trueText">trueText</a>(). +<p>Set this property's value with <a href="tqdatatable.html#setTrueText">setTrueText</a>() and get this property's value with <a href="tqdatatable.html#trueText">trueText</a>(). @@ -3498,8 +3498,8 @@ side). The possible orientations are <a href="ntqt.html#Orientation-enum"> - QSqlDatabase::connectOptions - + TQSqlDatabase::connectOptions + <p>This property holds the database connect options. <p>The format of the options string is a semi-colon separated list of option names or option = value pairs. The options depend on the @@ -3578,12 +3578,12 @@ information about the different options. The options will be set prior to opening the database connection. Setting new options without re-opening the connection does nothing. <p> <p>See also -<p>Set this property's value with <a href="ntqsqldatabase.html#setConnectOptions">setConnectOptions</a>() and get this property's value with <a href="ntqsqldatabase.html#connectOptions">connectOptions</a>(). +<p>Set this property's value with <a href="tqsqldatabase.html#setConnectOptions">setConnectOptions</a>() and get this property's value with <a href="tqsqldatabase.html#connectOptions">connectOptions</a>(). - QSqlDatabase::databaseName - + TQSqlDatabase::databaseName + <p>This property holds the name of the database. <p>Note that the database name is the TNS Service Name for the <a href="sql-driver.html#QOCI8">QOCI8</a> (Oracle) driver. @@ -3594,7 +3594,7 @@ to open a <tt>.mdb</tt> file directly, instead of having to create a entry in the ODBC manager: <p> <pre> ... - db = QSqlDatabase::<a href="ntqsqldatabase.html#addDatabase">addDatabase</a>( "QODBC3" ); + db = TQSqlDatabase::<a href="tqsqldatabase.html#addDatabase">addDatabase</a>( "QODBC3" ); db-&gt;setDatabaseName( "DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=myaccessfile.mdb" ); if ( db-&gt;open() ) { // success! @@ -3605,47 +3605,47 @@ entry in the ODBC manager: ("FIL" is the required spelling in Microsoft's API.) <p> There is no default value. -<p>Set this property's value with <a href="ntqsqldatabase.html#setDatabaseName">setDatabaseName</a>() and get this property's value with <a href="ntqsqldatabase.html#databaseName">databaseName</a>(). +<p>Set this property's value with <a href="tqsqldatabase.html#setDatabaseName">setDatabaseName</a>() and get this property's value with <a href="tqsqldatabase.html#databaseName">databaseName</a>(). - QSqlDatabase::hostName - + TQSqlDatabase::hostName + <p>This property holds the host name where the database resides. <p>There is no default value. -<p>Set this property's value with <a href="ntqsqldatabase.html#setHostName">setHostName</a>() and get this property's value with <a href="ntqsqldatabase.html#hostName">hostName</a>(). +<p>Set this property's value with <a href="tqsqldatabase.html#setHostName">setHostName</a>() and get this property's value with <a href="tqsqldatabase.html#hostName">hostName</a>(). - QSqlDatabase::password - + TQSqlDatabase::password + <p>This property holds the password used to connect to the database. <p>There is no default value. <p> <b>Warning:</b> This function stores the password in plain text within -Qt. Use the <a href="ntqsqldatabase.html#open">open</a>() call that takes a password as parameter to +Qt. Use the <a href="tqsqldatabase.html#open">open</a>() call that takes a password as parameter to avoid this behaviour. -<p> <p>See also <a href="ntqsqldatabase.html#open">open</a>(). +<p> <p>See also <a href="tqsqldatabase.html#open">open</a>(). -<p>Set this property's value with <a href="ntqsqldatabase.html#setPassword">setPassword</a>() and get this property's value with <a href="ntqsqldatabase.html#password">password</a>(). +<p>Set this property's value with <a href="tqsqldatabase.html#setPassword">setPassword</a>() and get this property's value with <a href="tqsqldatabase.html#password">password</a>(). - QSqlDatabase::port - + TQSqlDatabase::port + <p>This property holds the port used to connect to the database. <p>There is no default value. -<p>Set this property's value with <a href="ntqsqldatabase.html#setPort">setPort</a>() and get this property's value with <a href="ntqsqldatabase.html#port">port</a>(). +<p>Set this property's value with <a href="tqsqldatabase.html#setPort">setPort</a>() and get this property's value with <a href="tqsqldatabase.html#port">port</a>(). - QSqlDatabase::userName - + TQSqlDatabase::userName + <p>This property holds the user name connected to the database. <p>There is no default value. -<p>Set this property's value with <a href="ntqsqldatabase.html#setUserName">setUserName</a>() and get this property's value with <a href="ntqsqldatabase.html#userName">userName</a>(). +<p>Set this property's value with <a href="tqsqldatabase.html#setUserName">setUserName</a>() and get this property's value with <a href="tqsqldatabase.html#userName">userName</a>(). diff --git a/doc/html/propertyindex b/doc/html/propertyindex index d1b1cbcc1..13ef970a2 100644 --- a/doc/html/propertyindex +++ b/doc/html/propertyindex @@ -38,30 +38,30 @@ "QComboBox/insertionPolicy" ntqcombobox.html#insertionPolicy-prop "QComboBox/maxCount" ntqcombobox.html#maxCount-prop "QComboBox/sizeLimit" ntqcombobox.html#sizeLimit-prop -"QDataBrowser/autoEdit" ntqdatabrowser.html#autoEdit-prop -"QDataBrowser/boundaryChecking" ntqdatabrowser.html#boundaryChecking-prop -"QDataBrowser/confirmCancels" ntqdatabrowser.html#confirmCancels-prop -"QDataBrowser/confirmDelete" ntqdatabrowser.html#confirmDelete-prop -"QDataBrowser/confirmEdits" ntqdatabrowser.html#confirmEdits-prop -"QDataBrowser/confirmInsert" ntqdatabrowser.html#confirmInsert-prop -"QDataBrowser/confirmUpdate" ntqdatabrowser.html#confirmUpdate-prop -"QDataBrowser/filter" ntqdatabrowser.html#filter-prop -"QDataBrowser/readOnly" ntqdatabrowser.html#readOnly-prop -"QDataBrowser/sort" ntqdatabrowser.html#sort-prop -"QDataTable/autoEdit" ntqdatatable.html#autoEdit-prop -"QDataTable/confirmCancels" ntqdatatable.html#confirmCancels-prop -"QDataTable/confirmDelete" ntqdatatable.html#confirmDelete-prop -"QDataTable/confirmEdits" ntqdatatable.html#confirmEdits-prop -"QDataTable/confirmInsert" ntqdatatable.html#confirmInsert-prop -"QDataTable/confirmUpdate" ntqdatatable.html#confirmUpdate-prop -"QDataTable/dateFormat" ntqdatatable.html#dateFormat-prop -"QDataTable/falseText" ntqdatatable.html#falseText-prop -"QDataTable/filter" ntqdatatable.html#filter-prop -"QDataTable/nullText" ntqdatatable.html#nullText-prop -"QDataTable/numCols" ntqdatatable.html#numCols-prop -"QDataTable/numRows" ntqdatatable.html#numRows-prop -"QDataTable/sort" ntqdatatable.html#sort-prop -"QDataTable/trueText" ntqdatatable.html#trueText-prop +"TQDataBrowser/autoEdit" tqdatabrowser.html#autoEdit-prop +"TQDataBrowser/boundaryChecking" tqdatabrowser.html#boundaryChecking-prop +"TQDataBrowser/confirmCancels" tqdatabrowser.html#confirmCancels-prop +"TQDataBrowser/confirmDelete" tqdatabrowser.html#confirmDelete-prop +"TQDataBrowser/confirmEdits" tqdatabrowser.html#confirmEdits-prop +"TQDataBrowser/confirmInsert" tqdatabrowser.html#confirmInsert-prop +"TQDataBrowser/confirmUpdate" tqdatabrowser.html#confirmUpdate-prop +"TQDataBrowser/filter" tqdatabrowser.html#filter-prop +"TQDataBrowser/readOnly" tqdatabrowser.html#readOnly-prop +"TQDataBrowser/sort" tqdatabrowser.html#sort-prop +"TQDataTable/autoEdit" tqdatatable.html#autoEdit-prop +"TQDataTable/confirmCancels" tqdatatable.html#confirmCancels-prop +"TQDataTable/confirmDelete" tqdatatable.html#confirmDelete-prop +"TQDataTable/confirmEdits" tqdatatable.html#confirmEdits-prop +"TQDataTable/confirmInsert" tqdatatable.html#confirmInsert-prop +"TQDataTable/confirmUpdate" tqdatatable.html#confirmUpdate-prop +"TQDataTable/dateFormat" tqdatatable.html#dateFormat-prop +"TQDataTable/falseText" tqdatatable.html#falseText-prop +"TQDataTable/filter" tqdatatable.html#filter-prop +"TQDataTable/nullText" tqdatatable.html#nullText-prop +"TQDataTable/numCols" tqdatatable.html#numCols-prop +"TQDataTable/numRows" tqdatatable.html#numRows-prop +"TQDataTable/sort" tqdatatable.html#sort-prop +"TQDataTable/trueText" tqdatatable.html#trueText-prop "QDateEdit/autoAdvance" qdateedit.html#autoAdvance-prop "QDateEdit/date" qdateedit.html#date-prop "QDateEdit/maxValue" qdateedit.html#maxValue-prop @@ -288,12 +288,12 @@ "QSplitter/handleWidth" ntqsplitter.html#handleWidth-prop "QSplitter/opaqueResize" ntqsplitter.html#opaqueResize-prop "QSplitter/orientation" ntqsplitter.html#orientation-prop -"QSqlDatabase/connectOptions" ntqsqldatabase.html#connectOptions-prop -"QSqlDatabase/databaseName" ntqsqldatabase.html#databaseName-prop -"QSqlDatabase/hostName" ntqsqldatabase.html#hostName-prop -"QSqlDatabase/password" ntqsqldatabase.html#password-prop -"QSqlDatabase/port" ntqsqldatabase.html#port-prop -"QSqlDatabase/userName" ntqsqldatabase.html#userName-prop +"TQSqlDatabase/connectOptions" tqsqldatabase.html#connectOptions-prop +"TQSqlDatabase/databaseName" tqsqldatabase.html#databaseName-prop +"TQSqlDatabase/hostName" tqsqldatabase.html#hostName-prop +"TQSqlDatabase/password" tqsqldatabase.html#password-prop +"TQSqlDatabase/port" tqsqldatabase.html#port-prop +"TQSqlDatabase/userName" tqsqldatabase.html#userName-prop "QStatusBar/sizeGripEnabled" ntqstatusbar.html#sizeGripEnabled-prop "QTabBar/count" ntqtabbar.html#count-prop "QTabBar/currentTab" ntqtabbar.html#currentTab-prop diff --git a/doc/html/qdatabrowser-h.html b/doc/html/qdatabrowser-h.html deleted file mode 100644 index e0028d74a..000000000 --- a/doc/html/qdatabrowser-h.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - -ntqdatabrowser.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqdatabrowser.h

              - -

              This is the verbatim text of the ntqdatabrowser.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQDataBrowser class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQDATABROWSER_H
              -#define TQDATABROWSER_H
              -
              -#ifndef QT_H
              -#include "ntqwidget.h"
              -#include "ntqstring.h"
              -#include "ntqstringlist.h"
              -#include "ntqsql.h"
              -#include "ntqsqlindex.h"
              -#include "ntqsqlcursor.h"
              -#include "ntqsqlerror.h"
              -#endif // QT_H
              -
              -#ifndef TQT_NO_SQL_VIEW_WIDGETS
              -
              -class TQSqlForm;
              -class TQDataBrowserPrivate;
              -
              -class TQ_EXPORT TQDataBrowser : public TQWidget
              -{
              -    TQ_OBJECT
              -    TQ_PROPERTY( bool boundaryChecking READ boundaryChecking WRITE setBoundaryChecking )
              -    TQ_PROPERTY( TQString filter READ filter WRITE setFilter )
              -    TQ_PROPERTY( TQStringList sort READ sort WRITE setSort )
              -    TQ_PROPERTY( bool confirmEdits READ confirmEdits WRITE setConfirmEdits )
              -    TQ_PROPERTY( bool confirmInsert READ confirmInsert WRITE setConfirmInsert )
              -    TQ_PROPERTY( bool confirmUpdate READ confirmUpdate WRITE setConfirmUpdate )
              -    TQ_PROPERTY( bool confirmDelete READ confirmDelete WRITE setConfirmDelete )
              -    TQ_PROPERTY( bool confirmCancels READ confirmCancels WRITE setConfirmCancels )
              -    TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
              -    TQ_PROPERTY( bool autoEdit READ autoEdit WRITE setAutoEdit )
              -
              -public:
              -    TQDataBrowser( TQWidget* parent=0, const char* name=0, WFlags fl = 0 );
              -    ~TQDataBrowser();
              -
              -    enum Boundary {
              -	Unknown,
              -	None,
              -	BeforeBeginning,
              -	Beginning,
              -	End,
              -	AfterEnd
              -    };
              -
              -    Boundary boundary();
              -    void setBoundaryChecking( bool active );
              -    bool boundaryChecking() const;
              -
              -    void setSort( const TQSqlIndex& sort );
              -    void setSort( const TQStringList& sort );
              -    TQStringList  sort() const;
              -    void setFilter( const TQString& filter );
              -    TQString filter() const;
              -    virtual void setSqlCursor( TQSqlCursor* cursor, bool autoDelete = FALSE );
              -    TQSqlCursor* sqlCursor() const;
              -    virtual void setForm( TQSqlForm* form );
              -    TQSqlForm* form();
              -
              -    virtual void setConfirmEdits( bool confirm );
              -    virtual void setConfirmInsert( bool confirm );
              -    virtual void setConfirmUpdate( bool confirm );
              -    virtual void setConfirmDelete( bool confirm );
              -    virtual void setConfirmCancels( bool confirm );
              -    bool confirmEdits() const;
              -    bool confirmInsert() const;
              -    bool confirmUpdate() const;
              -    bool confirmDelete() const;
              -    bool confirmCancels() const;
              -
              -    virtual void setReadOnly( bool active );
              -    bool isReadOnly() const;
              -    virtual void setAutoEdit( bool autoEdit );
              -    bool autoEdit() const;
              -
              -    virtual bool seek( int i, bool relative = FALSE );
              -
              -signals:
              -    void firstRecordAvailable( bool available );
              -    void lastRecordAvailable( bool available );
              -    void nextRecordAvailable( bool available );
              -    void prevRecordAvailable( bool available );
              -
              -    void currentChanged( const TQSqlRecord* record );
              -    void primeInsert( TQSqlRecord* buf );
              -    void primeUpdate( TQSqlRecord* buf );
              -    void primeDelete( TQSqlRecord* buf );
              -    void beforeInsert( TQSqlRecord* buf );
              -    void beforeUpdate( TQSqlRecord* buf );
              -    void beforeDelete( TQSqlRecord* buf );
              -    void cursorChanged( TQSqlCursor::Mode mode );
              -
              -public slots:
              -    virtual void refresh();
              -
              -    virtual void insert();
              -    virtual void update();
              -    virtual void del();
              -
              -    virtual void first();
              -    virtual void last();
              -    virtual void next();
              -    virtual void prev();
              -
              -    virtual void readFields();
              -    virtual void writeFields();
              -    virtual void clearValues();
              -
              -    void updateBoundary();
              -
              -protected:
              -    virtual bool insertCurrent();
              -    virtual bool updateCurrent();
              -    virtual bool deleteCurrent();
              -    virtual bool currentEdited();
              -
              -    virtual TQSql::Confirm confirmEdit( TQSql::Op m );
              -    virtual TQSql::Confirm confirmCancel( TQSql::Op m );
              -
              -    virtual void handleError( const TQSqlError& error );
              -
              -private:
              -    typedef bool (TQSqlCursor::*Nav)();
              -    bool preNav();
              -    void postNav( bool primeUpd );
              -    void nav( Nav nav );
              -    TQDataBrowserPrivate* d;
              -
              -#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
              -    TQDataBrowser( const TQDataBrowser & );
              -    TQDataBrowser &operator=( const TQDataBrowser & );
              -#endif
              -};
              -
              -
              -#endif
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qdatabrowser-members.html b/doc/html/qdatabrowser-members.html deleted file mode 100644 index a0338c6a4..000000000 --- a/doc/html/qdatabrowser-members.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - -TQDataBrowser Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQDataBrowser

              - -

              This is the complete list of member functions for -TQDataBrowser, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qdatatable-h.html b/doc/html/qdatatable-h.html deleted file mode 100644 index 36fca8a47..000000000 --- a/doc/html/qdatatable-h.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - -ntqdatatable.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqdatatable.h

              - -

              This is the verbatim text of the ntqdatatable.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQDataTable class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQDATATABLE_H
              -#define TQDATATABLE_H
              -
              -#ifndef QT_H
              -#include "ntqstring.h"
              -#include "ntqvariant.h"
              -#include "ntqtable.h"
              -#include "ntqsql.h"
              -#include "ntqsqlcursor.h"
              -#include "ntqsqlindex.h"
              -#include "ntqsqleditorfactory.h"
              -#include "ntqiconset.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL_VIEW_WIDGETS
              -
              -class TQPainter;
              -class TQSqlField;
              -class TQSqlPropertyMap;
              -class TQDataTablePrivate;
              -
              -class TQM_EXPORT_SQL TQDataTable : public TQTable
              -{
              -    TQ_OBJECT
              -
              -    TQ_PROPERTY( TQString nullText READ nullText WRITE setNullText )
              -    TQ_PROPERTY( TQString trueText READ trueText WRITE setTrueText )
              -    TQ_PROPERTY( TQString falseText READ falseText WRITE setFalseText )
              -    TQ_PROPERTY( DateFormat dateFormat READ dateFormat WRITE setDateFormat )
              -    TQ_PROPERTY( bool confirmEdits READ confirmEdits WRITE setConfirmEdits )
              -    TQ_PROPERTY( bool confirmInsert READ confirmInsert WRITE setConfirmInsert )
              -    TQ_PROPERTY( bool confirmUpdate READ confirmUpdate WRITE setConfirmUpdate )
              -    TQ_PROPERTY( bool confirmDelete READ confirmDelete WRITE setConfirmDelete )
              -    TQ_PROPERTY( bool confirmCancels READ confirmCancels WRITE setConfirmCancels )
              -    TQ_PROPERTY( bool autoEdit READ autoEdit WRITE setAutoEdit )
              -    TQ_PROPERTY( TQString filter READ filter WRITE setFilter )
              -    TQ_PROPERTY( TQStringList sort READ sort WRITE setSort )
              -    TQ_PROPERTY( int numCols READ numCols )
              -    TQ_PROPERTY( int numRows READ numRows )
              -
              -public:
              -    TQDataTable ( TQWidget* parent=0, const char* name=0 );
              -    TQDataTable ( TQSqlCursor* cursor, bool autoPopulate = FALSE, TQWidget* parent=0, const char* name=0 );
              -    ~TQDataTable();
              -
              -    virtual void addColumn( const TQString& fieldName,
              -			    const TQString& label = TQString::null,
              -			    int width = -1,
              -			    const TQIconSet& iconset = TQIconSet() );
              -    virtual void removeColumn( uint col );
              -    virtual void setColumn( uint col, const TQString& fieldName,
              -			    const TQString& label = TQString::null,
              -			    int width = -1,
              -			    const TQIconSet& iconset = TQIconSet() );
              -
              -    TQString      nullText() const;
              -    TQString      trueText() const;
              -    TQString      falseText() const;
              -    DateFormat   dateFormat() const;
              -    bool         confirmEdits() const;
              -    bool         confirmInsert() const;
              -    bool         confirmUpdate() const;
              -    bool         confirmDelete() const;
              -    bool         confirmCancels() const;
              -    bool         autoDelete() const;
              -    bool         autoEdit() const;
              -    TQString      filter() const;
              -    TQStringList  sort() const;
              -
              -    virtual void setSqlCursor( TQSqlCursor* cursor = 0,
              -			    bool autoPopulate = FALSE, bool autoDelete = FALSE );
              -    TQSqlCursor* sqlCursor() const;
              -
              -    virtual void setNullText( const TQString& nullText );
              -    virtual void setTrueText( const TQString& trueText );
              -    virtual void setFalseText( const TQString& falseText );
              -    virtual void setDateFormat( const DateFormat f );
              -    virtual void setConfirmEdits( bool confirm );
              -    virtual void setConfirmInsert( bool confirm );
              -    virtual void setConfirmUpdate( bool confirm );
              -    virtual void setConfirmDelete( bool confirm );
              -    virtual void setConfirmCancels( bool confirm );
              -    virtual void setAutoDelete( bool enable );
              -    virtual void setAutoEdit( bool autoEdit );
              -    virtual void setFilter( const TQString& filter );
              -    virtual void setSort( const TQStringList& sort );
              -    virtual void setSort( const TQSqlIndex& sort );
              -
              -    enum Refresh {
              -	RefreshData = 1,
              -	RefreshColumns = 2,
              -	RefreshAll = 3
              -    };
              -    void         refresh( Refresh mode );
              -    void         sortColumn ( int col, bool ascending = TRUE,
              -			      bool wholeRows = FALSE );
              -    TQString      text ( int row, int col ) const;
              -    TQVariant     value ( int row, int col ) const;
              -    TQSqlRecord*  currentRecord() const;
              -
              -    void         installEditorFactory( TQSqlEditorFactory * f );
              -    void         installPropertyMap( TQSqlPropertyMap* m );
              -
              -    int          numCols() const;
              -    int          numRows() const;
              -    void         setNumCols( int c );
              -    void         setNumRows ( int r );
              -    bool         findBuffer( const TQSqlIndex& idx, int atHint = 0 );
              -
              -    void 	 hideColumn( int col );
              -    void 	 showColumn( int col );
              -signals:
              -    void         currentChanged( TQSqlRecord* record );
              -    void         primeInsert( TQSqlRecord* buf );
              -    void         primeUpdate( TQSqlRecord* buf );
              -    void         primeDelete( TQSqlRecord* buf );
              -    void         beforeInsert( TQSqlRecord* buf );
              -    void         beforeUpdate( TQSqlRecord* buf );
              -    void         beforeDelete( TQSqlRecord* buf );
              -    void         cursorChanged( TQSql::Op mode );
              -
              -public slots:
              -    virtual void find( const TQString & str, bool caseSensitive,
              -			     bool backwards );
              -    virtual void sortAscending( int col );
              -    virtual void sortDescending( int col );
              -    virtual void refresh();
              -    void setColumnWidth( int col, int w );
              -    void adjustColumn( int col );
              -    void setColumnStretchable( int col, bool stretch );
              -    void swapColumns( int col1, int col2, bool swapHeaders = FALSE );
              -
              -protected:
              -    virtual bool insertCurrent();
              -    virtual bool updateCurrent();
              -    virtual bool deleteCurrent();
              -
              -    virtual TQSql::Confirm confirmEdit( TQSql::Op m );
              -    virtual TQSql::Confirm confirmCancel( TQSql::Op m );
              -
              -    virtual void handleError( const TQSqlError& e );
              -
              -    virtual bool beginInsert();
              -    virtual TQWidget* beginUpdate ( int row, int col, bool replace );
              -
              -    bool         eventFilter( TQObject *o, TQEvent *e );
              -    void         keyPressEvent( TQKeyEvent* );
              -    void         resizeEvent ( TQResizeEvent * );
              -    void         contentsMousePressEvent( TQMouseEvent* e );
              -    void         contentsContextMenuEvent( TQContextMenuEvent* e );
              -    void         endEdit( int row, int col, bool accept, bool replace );
              -    TQWidget *    createEditor( int row, int col, bool initFromCell ) const;
              -    void         activateNextCell();
              -    int          indexOf( uint i ) const; // ### make this public in 4.0
              -    void         reset();
              -    void         setSize( TQSqlCursor* sql );
              -    void         repaintCell( int row, int col );
              -    void         paintCell ( TQPainter * p, int row, int col, const TQRect & cr,
              -			     bool selected, const TQColorGroup &cg );
              -    virtual void paintField( TQPainter * p, const TQSqlField* field, const TQRect & cr,
              -			     bool selected );
              -    void	 drawContents( TQPainter * p, int cx, int cy, int cw, int ch );
              -    virtual int  fieldAlignment( const TQSqlField* field );
              -    void         columnClicked ( int col );
              -    void         resizeData ( int len );
              -
              -    TQTableItem * item ( int row, int col ) const;
              -    void         setItem ( int row, int col, TQTableItem * item );
              -    void         clearCell ( int row, int col ) ;
              -    void         setPixmap ( int row, int col, const TQPixmap & pix );
              -    void         takeItem ( TQTableItem * i );
              -
              -private slots:
              -    void         loadNextPage();
              -    void         setCurrentSelection( int row, int col );
              -    void         updateCurrentSelection();
              -    void 	 sliderPressed();
              -    void 	 sliderReleased();
              -    void	 doInsertCurrent();
              -    void	 doUpdateCurrent();
              -    
              -private:
              -    TQString 	 fieldToString( const TQSqlField * field );
              -    void         init();
              -    TQWidget*     beginEdit ( int row, int col, bool replace );
              -    void         updateRow( int row );
              -    void         endInsert();
              -    void         endUpdate();
              -    TQDataTablePrivate* d;
              -
              -#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
              -    TQDataTable( const TQDataTable & );
              -    TQDataTable &operator=( const TQDataTable & );
              -#endif
              -};
              -
              -#endif
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qdatatable-members.html b/doc/html/qdatatable-members.html deleted file mode 100644 index b5a27d1dd..000000000 --- a/doc/html/qdatatable-members.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - - -TQDataTable Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQDataTable

              - -

              This is the complete list of member functions for -TQDataTable, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qdataview-h.html b/doc/html/qdataview-h.html deleted file mode 100644 index 9f9710812..000000000 --- a/doc/html/qdataview-h.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - -ntqdataview.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqdataview.h

              - -

              This is the verbatim text of the ntqdataview.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQDataView class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQDATAVIEW_H
              -#define TQDATAVIEW_H
              -
              -#ifndef QT_H
              -#include "ntqwidget.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL_VIEW_WIDGETS
              -
              -class TQSqlForm;
              -class TQSqlRecord;
              -class TQDataViewPrivate;
              -
              -class TQM_EXPORT_SQL TQDataView : public TQWidget
              -{
              -    TQ_OBJECT
              -
              -public:
              -    TQDataView( TQWidget* parent=0, const char* name=0, WFlags fl = 0 );
              -    ~TQDataView();
              -
              -    virtual void setForm( TQSqlForm* form );
              -    TQSqlForm* form();
              -    virtual void setRecord( TQSqlRecord* record );
              -    TQSqlRecord* record();
              -
              -public slots:
              -    virtual void refresh( TQSqlRecord* buf );
              -    virtual void readFields();
              -    virtual void writeFields();
              -    virtual void clearValues();
              -
              -private:
              -    TQDataViewPrivate* d;
              -
              -#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
              -    TQDataView( const TQDataView & );
              -    TQDataView &operator=( const TQDataView & );
              -#endif
              -};
              -
              -
              -#endif
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qdataview-members.html b/doc/html/qdataview-members.html deleted file mode 100644 index 6717271a0..000000000 --- a/doc/html/qdataview-members.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - -TQDataView Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQDataView

              - -

              This is the complete list of member functions for -TQDataView, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qeditorfactory-h.html b/doc/html/qeditorfactory-h.html deleted file mode 100644 index a067a81f9..000000000 --- a/doc/html/qeditorfactory-h.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - -ntqeditorfactory.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqeditorfactory.h

              - -

              This is the verbatim text of the ntqeditorfactory.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQEditorFactory class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQEDITORFACTORY_H
              -#define TQEDITORFACTORY_H
              -
              -#ifndef QT_H
              -#include "tqobject.h"
              -#include "ntqvariant.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL_EDIT_WIDGETS
              -
              -class TQM_EXPORT_SQL TQEditorFactory : public TQObject
              -{
              -public:
              -    TQEditorFactory ( TQObject * parent = 0, const char * name = 0 );
              -    ~TQEditorFactory();
              -    
              -    virtual TQWidget * createEditor( TQWidget * parent, const TQVariant & v );
              -    
              -    static TQEditorFactory * defaultFactory();
              -    static void installDefaultFactory( TQEditorFactory * factory);
              -
              -private:
              -#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
              -    TQEditorFactory( const TQEditorFactory & );
              -    TQEditorFactory &operator=( const TQEditorFactory & );
              -#endif
              -}; 
              -
              -#endif // TQT_NO_SQL
              -#endif // TQEDITORFACTORY_H
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qeditorfactory-members.html b/doc/html/qeditorfactory-members.html deleted file mode 100644 index b4c22d02e..000000000 --- a/doc/html/qeditorfactory-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - -TQEditorFactory Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQEditorFactory

              - -

              This is the complete list of member functions for -TQEditorFactory, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsql-h.html b/doc/html/qsql-h.html deleted file mode 100644 index c6aefa61d..000000000 --- a/doc/html/qsql-h.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - -ntqsql.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsql.h

              - -

              This is the verbatim text of the ntqsql.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSql class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQL_H
              -#define TQSQL_H
              -
              -#ifndef QT_H
              -#include "ntqglobal.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQM_EXPORT_SQL TQSql
              -{
              -public:
              -    TQSql() {}
              -    enum Op {
              -	None = -1,
              -	Insert = 0,
              -	Update = 1,
              -	Delete = 2
              -    };
              -
              -    enum Location {
              -	BeforeFirst = -1,
              -	AfterLast = -2
              -    };
              -
              -    enum Confirm {
              -	Cancel = -1,
              -	No = 0,
              -	Yes = 1
              -    };
              -
              -    enum ParameterType {
              -	In = 1,
              -	Out = 2,
              -	InOut = 3  //InOut = In | Out
              -    };
              -
              -    enum TableType { 
              -	Tables = 0x01,
              -	SystemTables = 0x02,
              -	Views = 0x04,
              -	AllTables = 0xff
              -    };
              -
              -private:	// Disabled copy constructor and operator=
              -#if defined(TQ_DISABLE_COPY)
              -    TQSql( const TQSql & );
              -    TQSql &operator=( const TQSql & );
              -#endif
              -
              -};
              -
              -#endif
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsql-members.html b/doc/html/qsql-members.html deleted file mode 100644 index 988e8c21f..000000000 --- a/doc/html/qsql-members.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - -TQSql Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSql

              - -

              This is the complete list of member functions for -TQSql, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlcursor-h.html b/doc/html/qsqlcursor-h.html deleted file mode 100644 index 1378a70ab..000000000 --- a/doc/html/qsqlcursor-h.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - -ntqsqlcursor.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlcursor.h

              - -

              This is the verbatim text of the ntqsqlcursor.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlCursor class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLCURSOR_H
              -#define TQSQLCURSOR_H
              -
              -#ifndef QT_H
              -#include "ntqsqlrecord.h"
              -#include "ntqstringlist.h"
              -#include "ntqsqlquery.h"
              -#include "ntqsqlindex.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQSqlDatabase;
              -class TQSqlCursorPrivate;
              -
              -class TQM_EXPORT_SQL TQSqlCursor : public TQSqlRecord, public TQSqlQuery
              -{
              -public:
              -    TQSqlCursor( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase* db = 0 );
              -    TQSqlCursor( const TQSqlCursor & other );
              -    TQSqlCursor& operator=( const TQSqlCursor& other );
              -    ~TQSqlCursor();
              -
              -    enum Mode {
              -	ReadOnly = 0,
              -	Insert = 1,
              -	Update = 2,
              -	Delete = 4,
              -	Writable = 7
              -    };
              -
              -    TQVariant		value( int i ) const;
              -    TQVariant		value( const TQString& name ) const;
              -    void         	setValue( int i, const TQVariant& val );
              -    void         	setValue( const TQString& name, const TQVariant& val );
              -    virtual TQSqlIndex	primaryIndex( bool prime = TRUE ) const;
              -    virtual TQSqlIndex	index( const TQStringList& fieldNames ) const;
              -    TQSqlIndex		index( const TQString& fieldName ) const;
              -    TQSqlIndex		index( const char* fieldName ) const;
              -    virtual void	setPrimaryIndex( const TQSqlIndex& idx );
              -
              -    virtual void	append( const TQSqlFieldInfo& fieldInfo );
              -    virtual void	insert( int pos, const TQSqlFieldInfo& fieldInfo );
              -    void		remove( int pos );
              -    void		clear();
              -    void		setGenerated( const TQString& name, bool generated );
              -    void		setGenerated( int i, bool generated );
              -
              -    virtual TQSqlRecord*	editBuffer( bool copy = FALSE );
              -    virtual TQSqlRecord*	primeInsert();
              -    virtual TQSqlRecord*	primeUpdate();
              -    virtual TQSqlRecord*	primeDelete();
              -    virtual int		insert( bool invalidate = TRUE );
              -    virtual int		update( bool invalidate = TRUE );
              -    virtual int		del( bool invalidate = TRUE );
              -
              -    virtual void	setMode( int flags );
              -    int			mode() const;
              -    virtual void	setCalculated( const TQString& name, bool calculated );
              -    bool		isCalculated( const TQString& name ) const;
              -    virtual void	setTrimmed( const TQString& name, bool trim );
              -    bool		isTrimmed( const TQString& name ) const;
              -
              -    bool		isReadOnly() const;
              -    bool		canInsert() const;
              -    bool		canUpdate() const;
              -    bool		canDelete() const;
              -
              -    bool		select();
              -    bool		select( const TQSqlIndex& sort );
              -    bool		select( const TQSqlIndex & filter, const TQSqlIndex & sort );
              -    virtual bool	select( const TQString & filter, const TQSqlIndex & sort = TQSqlIndex() );
              -
              -    virtual void	setSort( const TQSqlIndex& sort );
              -    TQSqlIndex		sort() const;
              -    virtual void	setFilter( const TQString& filter );
              -    TQString		filter() const;
              -    virtual void	setName( const TQString& name, bool autopopulate = TRUE );
              -    TQString		name() const;
              -    TQString		toString( const TQString& prefix = TQString::null,
              -				const TQString& sep = "," ) const;
              -    bool 		isNull( int i ) const;
              -    bool 		isNull( const TQString& name ) const;
              -    
              -protected:
              -    void		afterSeek();
              -    bool		exec( const TQString & sql );
              -
              -    virtual TQVariant	calculateField( const TQString& name );
              -    virtual int		update( const TQString & filter, bool invalidate = TRUE );
              -    virtual int		del( const TQString & filter, bool invalidate = TRUE );
              -
              -    virtual TQString	toString( const TQString& prefix, TQSqlField* field, const TQString& fieldSep ) const;
              -    virtual TQString	toString( TQSqlRecord* rec, const TQString& prefix, const TQString& fieldSep,
              -				const TQString& sep ) const;
              -    virtual TQString	toString( const TQSqlIndex& i, TQSqlRecord* rec, const TQString& prefix,
              -				const TQString& fieldSep, const TQString& sep ) const;
              -
              -private:
              -    void		sync();
              -    int			apply( const TQString& q, bool invalidate );
              -    int			applyPrepared( const TQString& q, bool invalidate );
              -    TQSqlRecord&		operator=( const TQSqlRecord & list );
              -    void 		append( const TQSqlField& field );
              -    void 		insert( int pos, const TQSqlField& field );
              -
              -    TQSqlCursorPrivate*	d;
              -};
              -
              -
              -
              -
              -#endif	// TQT_NO_SQL
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlcursor-members.html b/doc/html/qsqlcursor-members.html deleted file mode 100644 index fc859ccc4..000000000 --- a/doc/html/qsqlcursor-members.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - -TQSqlCursor Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlCursor

              - -

              This is the complete list of member functions for -TQSqlCursor, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqldatabase-h.html b/doc/html/qsqldatabase-h.html deleted file mode 100644 index 570c27af9..000000000 --- a/doc/html/qsqldatabase-h.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - -ntqsqldatabase.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqldatabase.h

              - -

              This is the verbatim text of the ntqsqldatabase.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlDatabase class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLDATABASE_H
              -#define TQSQLDATABASE_H
              -
              -#ifndef QT_H
              -#include "tqobject.h"
              -#include "ntqstring.h"
              -#include "ntqsqlquery.h"
              -#include "ntqstringlist.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQSqlError;
              -class TQSqlDriver;
              -class TQSqlIndex;
              -class TQSqlRecord;
              -class TQSqlRecordInfo;
              -class TQSqlDatabasePrivate;
              -
              -class TQM_EXPORT_SQL TQSqlDriverCreatorBase
              -{
              -public:
              -    virtual TQSqlDriver* createObject() = 0;
              -};
              -
              -template <class type>
              -class TQM_EXPORT_SQL TQSqlDriverCreator: public TQSqlDriverCreatorBase
              -{
              -public:
              -    TQSqlDriver* createObject() { return new type; }
              -};
              -
              -class TQM_EXPORT_SQL TQSqlDatabase : public TQObject
              -{
              -    TQ_OBJECT
              -    TQ_PROPERTY( TQString databaseName  READ databaseName WRITE setDatabaseName )
              -    TQ_PROPERTY( TQString userName  READ userName WRITE setUserName )
              -    TQ_PROPERTY( TQString password  READ password WRITE setPassword )
              -    TQ_PROPERTY( TQString hostName  READ hostName WRITE setHostName )
              -    TQ_PROPERTY( int port READ port WRITE setPort )
              -    TQ_PROPERTY( TQString connectOptions READ connectOptions WRITE setConnectOptions )
              -
              -public:
              -    ~TQSqlDatabase();
              -
              -    bool		open();
              -    bool		open( const TQString& user, const TQString& password );
              -    void		close();
              -    bool		isOpen() const;
              -    bool		isOpenError() const;
              -    TQStringList		tables() const;
              -    TQStringList		tables( TQSql::TableType type ) const;
              -    TQSqlIndex		primaryIndex( const TQString& tablename ) const;
              -    TQSqlRecord		record( const TQString& tablename ) const;
              -    TQSqlRecord		record( const TQSqlQuery& query ) const;
              -    TQSqlRecordInfo	recordInfo( const TQString& tablename ) const;
              -    TQSqlRecordInfo	recordInfo( const TQSqlQuery& query ) const;
              -    TQSqlQuery		exec( const TQString& query = TQString::null ) const;
              -    TQSqlError		lastError() const;
              -
              -    bool		transaction();
              -    bool		commit();
              -    bool		rollback();
              -
              -    virtual void	setDatabaseName( const TQString& name );
              -    virtual void	setUserName( const TQString& name );
              -    virtual void	setPassword( const TQString& password );
              -    virtual void	setHostName( const TQString& host );
              -    virtual void	setPort( int p );
              -    void 		setConnectOptions( const TQString& options = TQString::null );
              -    TQString		databaseName() const;
              -    TQString		userName() const;
              -    TQString		password() const;
              -    TQString		hostName() const;
              -    TQString		driverName() const;
              -    int         	port() const;
              -    TQString 		connectOptions() const;
              -
              -    TQSqlDriver*		driver() const;
              -    
              -    // MOC_SKIP_BEGIN
              -    static const char * const defaultConnection;
              -    // MOC_SKIP_END
              -
              -    static TQSqlDatabase* addDatabase( const TQString& type, const TQString& connectionName = defaultConnection );
              -    static TQSqlDatabase* addDatabase( TQSqlDriver* driver, const TQString& connectionName = defaultConnection );
              -    static TQSqlDatabase* database( const TQString& connectionName = defaultConnection, bool open = TRUE );
              -    static void          removeDatabase( const TQString& connectionName );
              -    static void          removeDatabase( TQSqlDatabase* db );
              -    static bool          contains( const TQString& connectionName = defaultConnection );
              -    static TQStringList   drivers();
              -    static void          registerSqlDriver( const TQString& name, const TQSqlDriverCreatorBase* creator ); // ### 4.0: creator should not be const
              -    static bool 	 isDriverAvailable( const TQString& name );
              -    
              -protected:
              -    TQSqlDatabase( const TQString& type, const TQString& name, TQObject * parent=0, const char * objname=0 );
              -    TQSqlDatabase( TQSqlDriver* driver, TQObject * parent=0, const char * objname=0 );
              -private:
              -    void 	init( const TQString& type, const TQString& name );
              -    TQSqlDatabasePrivate* d;
              -#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
              -    TQSqlDatabase( const TQSqlDatabase & );
              -    TQSqlDatabase &operator=( const TQSqlDatabase & );
              -#endif
              -
              -};
              -
              -#endif // TQT_NO_SQL
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqldatabase-members.html b/doc/html/qsqldatabase-members.html deleted file mode 100644 index d3780884b..000000000 --- a/doc/html/qsqldatabase-members.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - -TQSqlDatabase Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlDatabase

              - -

              This is the complete list of member functions for -TQSqlDatabase, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqldriver-h.html b/doc/html/qsqldriver-h.html deleted file mode 100644 index 1d420d5ab..000000000 --- a/doc/html/qsqldriver-h.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - -ntqsqldriver.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqldriver.h

              - -

              This is the verbatim text of the ntqsqldriver.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlDriver class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLDRIVER_H
              -#define TQSQLDRIVER_H
              -
              -#ifndef QT_H
              -#include "tqobject.h"
              -#include "ntqptrdict.h"
              -#include "ntqstring.h"
              -#include "ntqsqlerror.h"
              -#include "ntqsqlquery.h"
              -#include "ntqsqlfield.h"
              -#include "ntqsqlindex.h"
              -#include "ntqstringlist.h"
              -#include "ntqmap.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQSqlDriverExtension;
              -
              -class TQSqlDatabase;
              -
              -class TQM_EXPORT_SQL TQSqlDriver : public TQObject
              -{
              -    friend class TQSqlDatabase;
              -    TQ_OBJECT
              -public:
              -    enum DriverFeature { Transactions, QuerySize, BLOB, Unicode, PreparedQueries,
              -			 NamedPlaceholders, PositionalPlaceholders };
              -
              -    TQSqlDriver( TQObject * parent=0, const char * name=0 );
              -    ~TQSqlDriver();
              -    bool			isOpen() const;
              -    bool			isOpenError() const;
              -
              -    virtual bool		beginTransaction();
              -    virtual bool		commitTransaction();
              -    virtual bool		rollbackTransaction();
              -    virtual TQStringList		tables( const TQString& tableType ) const;
              -    virtual TQSqlIndex		primaryIndex( const TQString& tableName ) const;
              -    virtual TQSqlRecord		record( const TQString& tableName ) const;
              -    virtual TQSqlRecord		record( const TQSqlQuery& query ) const;
              -    virtual TQSqlRecordInfo	recordInfo( const TQString& tablename ) const;
              -    virtual TQSqlRecordInfo	recordInfo( const TQSqlQuery& query ) const;
              -    virtual TQString		nullText() const;
              -    virtual TQString		formatValue( const TQSqlField* field, bool trimStrings = FALSE ) const;
              -    TQSqlError			lastError() const;
              -
              -    virtual bool		hasFeature( DriverFeature f ) const = 0;
              -    virtual bool		open( const TQString & db,
              -				      const TQString & user = TQString::null,
              -				      const TQString & password = TQString::null,
              -				      const TQString & host = TQString::null,
              -				      int port = -1 ) = 0;
              -    virtual void		close() = 0;
              -    virtual TQSqlQuery		createQuery() const = 0;
              -
              -    // ### remove for 4.0
              -    bool			open( const TQString& db,
              -				      const TQString& user,
              -				      const TQString& password,
              -				      const TQString& host,
              -				      int port,
              -				      const TQString& connOpts );
              -protected:
              -    virtual void		setOpen( bool o );
              -    virtual void		setOpenError( bool e );
              -    virtual void		setLastError( const TQSqlError& e );
              -private:
              -    // ### This class needs a d-pointer in 4.0.
              -    int		          dbState;
              -    TQSqlError	          error;
              -#if defined(TQ_DISABLE_COPY)
              -    TQSqlDriver( const TQSqlDriver & );
              -    TQSqlDriver &operator=( const TQSqlDriver & );
              -#endif
              -};
              -
              -#endif	// TQT_NO_SQL
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqldriver-members.html b/doc/html/qsqldriver-members.html deleted file mode 100644 index 826b31e6c..000000000 --- a/doc/html/qsqldriver-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - -TQSqlDriver Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlDriver

              - -

              This is the complete list of member functions for -TQSqlDriver, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqldriverplugin-h.html b/doc/html/qsqldriverplugin-h.html deleted file mode 100644 index 442a23fa7..000000000 --- a/doc/html/qsqldriverplugin-h.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -ntqsqldriverplugin.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqldriverplugin.h

              - -

              This is the verbatim text of the ntqsqldriverplugin.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -** $Id: qt/ntqsqldriverplugin.h   3.3.8   edited Jan 11 14:46 $
              -**
              -** Definition of TQSqlDriverPlugin class
              -**
              -** Created : 2001-09-20
              -**
              -** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLDRIVERPLUGIN_H
              -#define TQSQLDRIVERPLUGIN_H
              -
              -#ifndef QT_H
              -#include "ntqgplugin.h"
              -#include "ntqstringlist.h"
              -#endif // QT_H
              -
              -#ifndef TQT_NO_SQL
              -#ifndef TQT_NO_COMPONENT
              -
              -class TQSqlDriver;
              -class TQSqlDriverPluginPrivate;
              -
              -class TQ_EXPORT TQSqlDriverPlugin : public TQGPlugin
              -{
              -    TQ_OBJECT
              -public:
              -    TQSqlDriverPlugin();
              -    ~TQSqlDriverPlugin();
              -
              -    virtual TQStringList keys() const = 0;
              -    virtual TQSqlDriver *create( const TQString &key ) = 0;
              -
              -private:
              -    TQSqlDriverPluginPrivate *d;
              -};
              -
              -#endif // TQT_NO_COMPONENT
              -#endif // TQT_NO_SQL
              -
              -#endif // TQSQLDRIVERPLUGIN_H
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqldriverplugin-members.html b/doc/html/qsqldriverplugin-members.html deleted file mode 100644 index 649aa6667..000000000 --- a/doc/html/qsqldriverplugin-members.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - -TQSqlDriverPlugin Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlDriverPlugin

              - -

              This is the complete list of member functions for -TQSqlDriverPlugin, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqleditorfactory-h.html b/doc/html/qsqleditorfactory-h.html deleted file mode 100644 index cd1185ef8..000000000 --- a/doc/html/qsqleditorfactory-h.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - -ntqsqleditorfactory.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqleditorfactory.h

              - -

              This is the verbatim text of the ntqsqleditorfactory.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlEditorFactory class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLEDITORFACTORY_H
              -#define TQSQLEDITORFACTORY_H
              -
              -#ifndef QT_H
              -#include "ntqeditorfactory.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL_EDIT_WIDGETS
              -
              -class TQSqlField;
              -
              -class TQM_EXPORT_SQL TQSqlEditorFactory : public TQEditorFactory
              -{
              -public:
              -    TQSqlEditorFactory ( TQObject * parent = 0, const char * name = 0 );
              -    ~TQSqlEditorFactory();
              -    virtual TQWidget * createEditor( TQWidget * parent, const TQVariant & variant );
              -    virtual TQWidget * createEditor( TQWidget * parent, const TQSqlField * field );
              -
              -    static TQSqlEditorFactory * defaultFactory();
              -    static void installDefaultFactory( TQSqlEditorFactory * factory );
              -
              -private:
              -#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
              -    TQSqlEditorFactory( const TQSqlEditorFactory & );
              -    TQSqlEditorFactory &operator=( const TQSqlEditorFactory & );
              -#endif
              -};
              -
              -#endif // TQT_NO_SQL
              -#endif // TQSQLEDITORFACTORY_H
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqleditorfactory-members.html b/doc/html/qsqleditorfactory-members.html deleted file mode 100644 index 7d8cb8a27..000000000 --- a/doc/html/qsqleditorfactory-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - -TQSqlEditorFactory Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlEditorFactory

              - -

              This is the complete list of member functions for -TQSqlEditorFactory, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlerror-h.html b/doc/html/qsqlerror-h.html deleted file mode 100644 index 4b1a2bdf6..000000000 --- a/doc/html/qsqlerror-h.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - -ntqsqlerror.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlerror.h

              - -

              This is the verbatim text of the ntqsqlerror.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlError class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLERROR_H
              -#define TQSQLERROR_H
              -
              -#ifndef QT_H
              -#include "ntqstring.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQM_EXPORT_SQL TQSqlError
              -{
              -public:
              -    enum Type {
              -	None,
              -	Connection,
              -	Statement,
              -	Transaction,
              -	Unknown
              -    };
              -    TQSqlError(  const TQString& driverText = TQString::null,
              -		const TQString& databaseText = TQString::null,
              -		int type = TQSqlError::None,
              -		int number = -1 );
              -    TQSqlError( const TQSqlError& other );
              -    TQSqlError& operator=( const TQSqlError& other );
              -    virtual ~TQSqlError();
              -
              -    TQString	driverText() const;
              -    virtual void setDriverText( const TQString& driverText );
              -    TQString	databaseText() const;
              -    virtual void setDatabaseText( const TQString& databaseText );
              -    int		type() const;
              -    virtual void setType( int type );
              -    int		number() const;
              -    virtual void setNumber( int number );
              -    TQString 	text() const;
              -    void 	showMessage( const TQString& msg = TQString::null ) const;
              -    
              -private:
              -    TQString	driverError;
              -    TQString	databaseError;
              -    int		errorType;
              -    int	errorNumber;
              -};
              -
              -#endif // TQT_NO_SQL
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlerror-members.html b/doc/html/qsqlerror-members.html deleted file mode 100644 index 3e742f449..000000000 --- a/doc/html/qsqlerror-members.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - -TQSqlError Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlError

              - -

              This is the complete list of member functions for -TQSqlError, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlfield-h.html b/doc/html/qsqlfield-h.html deleted file mode 100644 index b7b6365cd..000000000 --- a/doc/html/qsqlfield-h.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - -ntqsqlfield.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlfield.h

              - -

              This is the verbatim text of the ntqsqlfield.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlField class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLFIELD_H
              -#define TQSQLFIELD_H
              -
              -#ifndef QT_H
              -#include "ntqstring.h"
              -#include "ntqvariant.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQSqlFieldPrivate
              -{
              -public:
              -    TQVariant::Type type;
              -};
              -
              -class TQM_EXPORT_SQL TQSqlField
              -{
              -public:
              -    TQSqlField( const TQString& fieldName = TQString::null, TQVariant::Type type = TQVariant::Invalid );
              -    TQSqlField( const TQSqlField& other );
              -    TQSqlField& operator=( const TQSqlField& other );
              -    bool operator==(const TQSqlField& other) const;
              -    virtual ~TQSqlField();
              -
              -    virtual void	setValue( const TQVariant& value );
              -    virtual TQVariant	value() const;
              -    virtual void	setName( const TQString& name );
              -    TQString		name() const;
              -    virtual void	setNull();
              -    bool		isNull() const;
              -    virtual void	setReadOnly( bool readOnly );
              -    bool		isReadOnly() const;
              -    void		clear( bool nullify = TRUE );
              -    TQVariant::Type	type() const;
              -
              -private:
              -    TQString       nm;
              -    TQVariant      val;
              -    uint          ro: 1;
              -    uint          nul: 1;
              -    TQSqlFieldPrivate* d;
              -};
              -
              -inline TQVariant TQSqlField::value() const
              -{ return val; }
              -
              -inline TQString TQSqlField::name() const
              -{ return nm; }
              -
              -inline bool TQSqlField::isNull() const
              -{ return nul; }
              -
              -inline bool TQSqlField::isReadOnly() const
              -{ return ro; }
              -
              -inline TQVariant::Type TQSqlField::type() const
              -{ return d->type; }
              -
              -
              -/******************************************/
              -/*******     TQSqlFieldInfo Class     ******/
              -/******************************************/
              -
              -struct TQSqlFieldInfoPrivate;
              -
              -class TQM_EXPORT_SQL TQSqlFieldInfo
              -{
              -public:
              -    TQSqlFieldInfo( const TQString& name = TQString::null,
              -		   TQVariant::Type typ = TQVariant::Invalid,
              -		   int required = -1,
              -		   int len = -1,
              -		   int prec = -1,
              -		   const TQVariant& defValue = TQVariant(),
              -		   int sqlType = 0,
              -		   bool generated = TRUE,
              -		   bool trim = FALSE,
              -		   bool calculated = FALSE );
              -    TQSqlFieldInfo( const TQSqlFieldInfo & other );
              -    TQSqlFieldInfo( const TQSqlField & other, bool generated = TRUE );
              -    virtual ~TQSqlFieldInfo();
              -    TQSqlFieldInfo& operator=( const TQSqlFieldInfo& other );
              -    bool operator==( const TQSqlFieldInfo& f ) const;
              -
              -    TQSqlField		toField() const;
              -    int			isRequired() const;
              -    TQVariant::Type	type() const;
              -    int			length() const;
              -    int			precision() const;
              -    TQVariant		defaultValue() const;
              -    TQString		name() const;
              -    int			typeID() const;
              -    bool		isGenerated() const;
              -    bool		isTrim() const;
              -    bool		isCalculated() const;
              -
              -    virtual void	setTrim( bool trim );
              -    virtual void	setGenerated( bool gen );
              -    virtual void	setCalculated( bool calc );
              -
              -private:
              -    TQSqlFieldInfoPrivate* d;
              -};
              -
              -
              -#endif	// TQT_NO_SQL
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlfield-members.html b/doc/html/qsqlfield-members.html deleted file mode 100644 index 7c249e576..000000000 --- a/doc/html/qsqlfield-members.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - -TQSqlField Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlField

              - -

              This is the complete list of member functions for -TQSqlField, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlfieldinfo-members.html b/doc/html/qsqlfieldinfo-members.html deleted file mode 100644 index 7782c4aa3..000000000 --- a/doc/html/qsqlfieldinfo-members.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -TQSqlFieldInfo Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlFieldInfo

              - -

              This is the complete list of member functions for -TQSqlFieldInfo, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlfieldinfo.html b/doc/html/qsqlfieldinfo.html deleted file mode 100644 index 19e834a56..000000000 --- a/doc/html/qsqlfieldinfo.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - -TQSqlFieldInfo Class - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              TQSqlFieldInfo Class Reference
              [sql module]

              - -

              The TQSqlFieldInfo class stores meta data associated with a SQL field. -More... -

              #include <ntqsqlfield.h> -

              List of all member functions. -

              Public Members

              - -

              Detailed Description

              - - -The TQSqlFieldInfo class stores meta data associated with a SQL field. -

              - -

              TQSqlFieldInfo objects only store meta data; field values are -stored in TQSqlField objects. -

              All values must be set in the constructor, and may be retrieved -using isRequired(), type(), length(), precision(), defaultValue(), -name(), isGenerated() and typeID(). -

              See also Database Classes. - -


              Member Function Documentation

              -

              TQSqlFieldInfo::TQSqlFieldInfo ( const TQString & name = TQString::null, TQVariant::Type typ = TQVariant::Invalid, int required = -1, int len = -1, int prec = -1, const TQVariant & defValue = TQVariant ( ), int typeID = 0, bool generated = TRUE, bool trim = FALSE, bool calculated = FALSE ) -

              -Constructs a TQSqlFieldInfo with the following parameters: -
              -
              name the name of the field. -
              typ the field's type in a TQVariant. -
              required greater than 0 if the field is required, 0 -if its value can be NULL and less than 0 if it cannot be -determined whether the field is required or not. -
              len the length of the field. Note that for -non-character types some databases return either the length in -bytes or the number of digits. -1 signifies that the length cannot -be determined. -
              prec the precision of the field, or -1 if the field -has no precision or it cannot be determined. -
              defValue the default value that is inserted into -the table if none is specified by the user. TQVariant() if there is -no default value or it cannot be determined. -
              typeID the internal typeID of the database system -(only useful for low-level programming). 0 if unknown. -
              generated TRUE indicates that this field should be -included in auto-generated SQL statments, e.g. in TQSqlCursor. -
              trim TRUE indicates that widgets should remove -trailing whitespace from character fields. This does not affect -the field value but only its representation inside widgets. -
              calculated TRUE indicates that the value of this -field is calculated. The value of calculated fields can by -modified by subclassing TQSqlCursor and overriding -TQSqlCursor::calculateField(). -
              - -

              TQSqlFieldInfo::TQSqlFieldInfo ( const TQSqlFieldInfo & other ) -

              -Constructs a copy of other. - -

              TQSqlFieldInfo::TQSqlFieldInfo ( const TQSqlField & other, bool generated = TRUE ) -

              -Creates a TQSqlFieldInfo object with the type and the name of the -TQSqlField other. If generated is TRUE this field will be -included in auto-generated SQL statments, e.g. in TQSqlCursor. - -

              TQSqlFieldInfo::~TQSqlFieldInfo () [virtual] -

              -Destroys the object and frees any allocated resources. - -

              TQVariant TQSqlFieldInfo::defaultValue () const -

              -Returns the field's default value or an empty TQVariant if the -field has no default value or the value couldn't be determined. -The default value is the value inserted in the database when it -is not explicitly specified by the user. - -

              bool TQSqlFieldInfo::isCalculated () const -

              -Returns TRUE if the field is calculated; otherwise returns FALSE. -

              See also setCalculated(). - -

              bool TQSqlFieldInfo::isGenerated () const -

              -Returns TRUE if the field should be included in auto-generated -SQL statments, e.g. in TQSqlCursor; otherwise returns FALSE. -

              See also setGenerated(). - -

              int TQSqlFieldInfo::isRequired () const -

              -Returns a value greater than 0 if the field is required (NULL -values are not allowed), 0 if it isn't required (NULL values are -allowed) or less than 0 if it cannot be determined whether the -field is required or not. - -

              bool TQSqlFieldInfo::isTrim () const -

              -Returns TRUE if trailing whitespace should be removed from -character fields; otherwise returns FALSE. -

              See also setTrim(). - -

              int TQSqlFieldInfo::length () const -

              -Returns the field's length. For fields storing text the return -value is the maximum number of characters the field can hold. For -non-character fields some database systems return the number of -bytes needed or the number of digits allowed. If the length cannot -be determined -1 is returned. - -

              TQString TQSqlFieldInfo::name () const -

              -Returns the name of the field in the SQL table. - -

              Examples: sql/overview/subclass3/main.cpp and sql/overview/subclass4/main.cpp. -

              TQSqlFieldInfo & TQSqlFieldInfo::operator= ( const TQSqlFieldInfo & other ) -

              -Assigns other to this field info and returns a reference to it. - -

              bool TQSqlFieldInfo::operator== ( const TQSqlFieldInfo & f ) const -

              -Returns TRUE if this fieldinfo is equal to f; otherwise returns -FALSE. -

              Two field infos are considered equal if all their attributes -match. - -

              int TQSqlFieldInfo::precision () const -

              -Returns the field's precision or -1 if the field has no precision -or it cannot be determined. - -

              void TQSqlFieldInfo::setCalculated ( bool calc ) [virtual] -

              -calc set to TRUE indicates that this field is a calculated -field. The value of calculated fields can by modified by subclassing -TQSqlCursor and overriding TQSqlCursor::calculateField(). -

              See also isCalculated(). - -

              void TQSqlFieldInfo::setGenerated ( bool gen ) [virtual] -

              -gen set to FALSE indicates that this field should not appear -in auto-generated SQL statements (for example in TQSqlCursor). -

              See also isGenerated(). - -

              void TQSqlFieldInfo::setTrim ( bool trim ) [virtual] -

              -If trim is TRUE widgets should remove trailing whitespace from -character fields. This does not affect the field value but only -its representation inside widgets. -

              See also isTrim(). - -

              TQSqlField TQSqlFieldInfo::toField () const -

              -Returns an empty TQSqlField based on the information in this -TQSqlFieldInfo. - -

              TQVariant::Type TQSqlFieldInfo::type () const -

              -Returns the field's type or TQVariant::Invalid if the type is -unknown. - -

              int TQSqlFieldInfo::typeID () const -

              -Returns the internal type identifier as returned from the database -system. The return value is 0 if the type is unknown. -

              Warning: This information is only useful for low-level database -programming and is not database independent. - - -


              -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlform-h.html b/doc/html/qsqlform-h.html deleted file mode 100644 index 46126e802..000000000 --- a/doc/html/qsqlform-h.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - -ntqsqlform.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlform.h

              - -

              This is the verbatim text of the ntqsqlform.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlForm class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLFORM_H
              -#define TQSQLFORM_H
              -
              -#ifndef QT_H
              -#include "tqobject.h"
              -#include "ntqmap.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL_FORM
              -
              -class TQSqlField;
              -class TQSqlRecord;
              -class TQSqlEditorFactory;
              -class TQSqlPropertyMap;
              -class TQWidget;
              -class TQSqlFormPrivate;
              -
              -class TQM_EXPORT_SQL TQSqlForm : public TQObject
              -{
              -    TQ_OBJECT
              -public:
              -    TQSqlForm( TQObject * parent = 0, const char * name = 0 );
              -    ~TQSqlForm();
              -
              -    virtual void insert( TQWidget * widget, const TQString& field );
              -    virtual void remove( const TQString& field );
              -    uint         count() const;
              -
              -    TQWidget *   widget( uint i ) const;
              -    TQSqlField * widgetToField( TQWidget * widget ) const;
              -    TQWidget *   fieldToWidget( TQSqlField * field ) const;
              -
              -    void        installPropertyMap( TQSqlPropertyMap * map );
              -
              -    virtual void setRecord( TQSqlRecord* buf );
              -
              -public slots:
              -    virtual void readField( TQWidget * widget );
              -    virtual void writeField( TQWidget * widget );
              -    virtual void readFields();
              -    virtual void writeFields();
              -
              -    virtual void clear();
              -    virtual void clearValues( bool nullify = FALSE );
              -
              -protected:
              -    virtual void insert( TQWidget * widget, TQSqlField * field );
              -    virtual void remove( TQWidget * widget );
              -    void clearMap();
              -
              -private:
              -    virtual void sync();
              -    TQSqlFormPrivate* d;
              -
              -#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
              -    TQSqlForm( const TQSqlForm & );
              -    TQSqlForm &operator=( const TQSqlForm & );
              -#endif
              -};
              -
              -#endif // TQT_NO_SQL
              -#endif // TQSQLFORM_H
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlform-members.html b/doc/html/qsqlform-members.html deleted file mode 100644 index 0fd701171..000000000 --- a/doc/html/qsqlform-members.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - -TQSqlForm Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlForm

              - -

              This is the complete list of member functions for -TQSqlForm, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlindex-h.html b/doc/html/qsqlindex-h.html deleted file mode 100644 index ecc1b1969..000000000 --- a/doc/html/qsqlindex-h.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - -ntqsqlindex.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlindex.h

              - -

              This is the verbatim text of the ntqsqlindex.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlIndex class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLINDEX_H
              -#define TQSQLINDEX_H
              -
              -#ifndef QT_H
              -#include "ntqstring.h"
              -#include "ntqstringlist.h"
              -#include "ntqsqlfield.h"
              -#include "ntqsqlrecord.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#define TQM_TEMPLATE_EXTERN_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#define TQM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN
              -#endif
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQSqlCursor;
              -
              -class TQM_EXPORT_SQL TQSqlIndex : public TQSqlRecord
              -{
              -public:
              -    TQSqlIndex( const TQString& cursorName = TQString::null, const TQString& name = TQString::null );
              -    TQSqlIndex( const TQSqlIndex& other );
              -    ~TQSqlIndex();
              -    TQSqlIndex&       operator=( const TQSqlIndex& other );
              -    virtual void     setCursorName( const TQString& cursorName );
              -    TQString          cursorName() const { return cursor; }
              -    virtual void     setName( const TQString& name );
              -    TQString          name() const { return nm; }
              -
              -    void             append( const TQSqlField& field );
              -    virtual void     append( const TQSqlField& field, bool desc );
              -
              -    bool             isDescending( int i ) const;
              -    virtual void     setDescending( int i, bool desc );
              -
              -    TQString          toString( const TQString& prefix = TQString::null,
              -			       const TQString& sep = ",",
              -			       bool verbose = TRUE ) const;
              -    TQStringList      toStringList( const TQString& prefix = TQString::null,
              -				   bool verbose = TRUE ) const;
              -
              -    static TQSqlIndex fromStringList( const TQStringList& l, const TQSqlCursor* cursor );
              -
              -private:
              -    TQString          createField( int i, const TQString& prefix, bool verbose ) const;
              -    TQString          cursor;
              -    TQString          nm;
              -    TQValueList<bool> sorts;
              -};
              -
              -#define Q_DEFINED_QSQLINDEX
              -#include "ntqwinexport.h"
              -#endif	// TQT_NO_SQL
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlindex-members.html b/doc/html/qsqlindex-members.html deleted file mode 100644 index a0ed28b4f..000000000 --- a/doc/html/qsqlindex-members.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - -TQSqlIndex Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlIndex

              - -

              This is the complete list of member functions for -TQSqlIndex, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlpropertymap-h.html b/doc/html/qsqlpropertymap-h.html deleted file mode 100644 index 299e5ee5f..000000000 --- a/doc/html/qsqlpropertymap-h.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - -ntqsqlpropertymap.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlpropertymap.h

              - -

              This is the verbatim text of the ntqsqlpropertymap.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlPropertyMap class
              -**
              -** Created : 2000-11-20
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLPROPERTYMAP_H
              -#define TQSQLPROPERTYMAP_H
              -
              -#ifndef QT_H
              -#include "ntqvariant.h"
              -#include "ntqstring.h"
              -#endif // QT_H
              -
              -#ifndef TQT_NO_SQL_FORM
              -
              -class TQWidget;
              -class TQSqlPropertyMapPrivate;
              -
              -class TQ_EXPORT TQSqlPropertyMap {
              -public:
              -    TQSqlPropertyMap();
              -    virtual ~TQSqlPropertyMap();
              -
              -    TQVariant      property( TQWidget * widget );
              -    virtual void  setProperty( TQWidget * widget, const TQVariant & value );
              -
              -    void insert( const TQString & classname, const TQString & property );
              -    void remove( const TQString & classname );
              -
              -    static TQSqlPropertyMap * defaultMap();
              -    static void installDefaultMap( TQSqlPropertyMap * map );
              -
              -private:	// Disabled copy constructor and operator=
              -#if defined(TQ_DISABLE_COPY)
              -    TQSqlPropertyMap( const TQSqlPropertyMap & );
              -    TQSqlPropertyMap &operator=( const TQSqlPropertyMap & );
              -#endif
              -    TQSqlPropertyMapPrivate* d;
              -
              -};
              -
              -#endif // TQT_NO_SQL_FORM
              -#endif // TQSQLPROPERTYMAP_H
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlpropertymap-members.html b/doc/html/qsqlpropertymap-members.html deleted file mode 100644 index a7724e3af..000000000 --- a/doc/html/qsqlpropertymap-members.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - -TQSqlPropertyMap Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlPropertyMap

              - -

              This is the complete list of member functions for -TQSqlPropertyMap, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlquery-h.html b/doc/html/qsqlquery-h.html deleted file mode 100644 index 690576bde..000000000 --- a/doc/html/qsqlquery-h.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - -ntqsqlquery.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlquery.h

              - -

              This is the verbatim text of the ntqsqlquery.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlQuery class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLQUERY_H
              -#define TQSQLQUERY_H
              -
              -#ifndef QT_H
              -#include "tqobject.h"
              -#include "ntqstring.h"
              -#include "ntqvariant.h"
              -#include "ntqvaluelist.h"
              -#include "ntqsqlerror.h"
              -#include "ntqsqlfield.h"
              -#include "ntqsql.h"
              -#endif // QT_H
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQSqlDriver;
              -class TQSqlResult;
              -class TQSqlDatabase;
              -
              -class TQ_EXPORT TQSqlResultShared : public TQObject, public TQShared
              -{
              -    TQ_OBJECT
              -public:
              -    TQSqlResultShared( TQSqlResult* result );
              -    virtual ~TQSqlResultShared();
              -    TQSqlResult* sqlResult;
              -    TQString executedQuery;
              -private slots:
              -    void slotResultDestroyed();
              -};
              -
              -class TQ_EXPORT TQSqlQuery
              -{
              -public:
              -    TQSqlQuery( TQSqlResult * r );
              -    TQSqlQuery( const TQString& query = TQString::null, TQSqlDatabase* db = 0 );
              -    Q_EXPLICIT TQSqlQuery( TQSqlDatabase* db );
              -    TQSqlQuery( const TQSqlQuery& other );
              -    TQSqlQuery& operator=( const TQSqlQuery& other );
              -    virtual ~TQSqlQuery();
              -
              -    bool                isValid() const;
              -    bool                isActive() const;
              -    bool	        isNull( int field ) const;
              -    int                 at() const;
              -    TQString             lastQuery() const;
              -    int                 numRowsAffected() const;
              -    TQSqlError	        lastError() const;
              -    bool                isSelect() const;
              -    int                 size() const;
              -    const TQSqlDriver*   driver() const;
              -    const TQSqlResult*   result() const;
              -    bool		isForwardOnly() const;
              -    void		setForwardOnly( bool forward );
              -
              -    virtual bool	exec ( const TQString& query );
              -    virtual TQVariant    value( int i ) const;
              -
              -    virtual bool	seek( int i, bool relative = FALSE );
              -    virtual bool        next();
              -    virtual bool        prev();
              -    virtual bool        first();
              -    virtual bool        last();
              -
              -    // prepared query support
              -    bool		exec();
              -    bool		prepare( const TQString& query );
              -    void		bindValue( const TQString& placeholder, const TQVariant& val );
              -    void		bindValue( int pos, const TQVariant& val );
              -    void		addBindValue( const TQVariant& val );
              -    // remove these overloads in 4.0
              -    void		bindValue( const TQString& placeholder, const TQVariant& val, TQSql::ParameterType type );
              -    void		bindValue( int pos, const TQVariant& val, TQSql::ParameterType type );
              -    void		addBindValue( const TQVariant& val, TQSql::ParameterType type );
              -    TQVariant		boundValue( const TQString& placeholder ) const;
              -    TQVariant		boundValue( int pos ) const;
              -    TQMap<TQString, TQVariant> boundValues() const;
              -    TQString             executedQuery() const;
              -    
              -protected:
              -    virtual void        beforeSeek();
              -    virtual void        afterSeek();
              -
              -private:
              -    void 		init( const TQString& query, TQSqlDatabase* db );
              -    void                deref();
              -    bool                checkDetach();
              -    TQSqlResultShared*   d;
              -};
              -
              -
              -#endif // TQT_NO_SQL
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlquery-members.html b/doc/html/qsqlquery-members.html deleted file mode 100644 index c37dc8598..000000000 --- a/doc/html/qsqlquery-members.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - -TQSqlQuery Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlQuery

              - -

              This is the complete list of member functions for -TQSqlQuery, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlrecord-h.html b/doc/html/qsqlrecord-h.html deleted file mode 100644 index f6c74f6f3..000000000 --- a/doc/html/qsqlrecord-h.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - -ntqsqlrecord.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlrecord.h

              - -

              This is the verbatim text of the ntqsqlrecord.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlRecord class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLRECORD_H
              -#define TQSQLRECORD_H
              -
              -#ifndef QT_H
              -#include "ntqstring.h"
              -#include "ntqstringlist.h"
              -#include "ntqvariant.h"
              -#include "ntqsqlfield.h"
              -#endif // QT_H
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQSqlRecordPrivate;
              -
              -class TQSqlRecordShared : public TQShared
              -{
              -public:
              -    TQSqlRecordShared( TQSqlRecordPrivate* sqlRecordPrivate )
              -    : d( sqlRecordPrivate )
              -    {}
              -    virtual ~TQSqlRecordShared();
              -    TQSqlRecordPrivate* d;
              -};
              -
              -class TQ_EXPORT TQSqlRecord
              -{
              -public:
              -    TQSqlRecord();
              -    TQSqlRecord( const TQSqlRecord& other );
              -    TQSqlRecord& operator=( const TQSqlRecord& other );
              -    virtual ~TQSqlRecord();
              -    virtual TQVariant     value( int i ) const;
              -    virtual TQVariant     value( const TQString& name ) const;
              -    virtual void         setValue( int i, const TQVariant& val );
              -    virtual void         setValue( const TQString& name, const TQVariant& val );
              -    bool                 isGenerated( int i ) const;
              -    bool                 isGenerated( const TQString& name ) const;
              -    virtual void         setGenerated( const TQString& name, bool generated );
              -    virtual void         setGenerated( int i, bool generated );
              -    virtual void         setNull( int i );
              -    virtual void         setNull( const TQString& name );
              -    bool                 isNull( int i ); // remove in 4.0
              -    bool                 isNull( const TQString& name ); // remove in 4.0
              -    bool                 isNull( int i ) const;
              -    bool                 isNull( const TQString& name ) const;
              -
              -    int                  position( const TQString& name ) const;
              -    TQString              fieldName( int i ) const;
              -    TQSqlField*           field( int i );
              -    TQSqlField*           field( const TQString& name );
              -    const TQSqlField*     field( int i ) const;
              -    const TQSqlField*     field( const TQString& name ) const;
              -
              -    virtual void         append( const TQSqlField& field );
              -    virtual void         insert( int pos, const TQSqlField& field );
              -    virtual void         remove( int pos );
              -
              -    bool                 isEmpty() const;
              -    bool                 contains( const TQString& name ) const;
              -    virtual void         clear();
              -    virtual void         clearValues( bool nullify = FALSE );
              -    uint                 count() const;
              -    virtual TQString      toString( const TQString& prefix = TQString::null,
              -				   const TQString& sep = "," ) const;
              -    virtual TQStringList  toStringList( const TQString& prefix = TQString::null ) const;
              -
              -private:
              -    TQString              createField( int i, const TQString& prefix ) const;
              -    void                 deref();
              -    bool                 checkDetach();
              -    TQSqlRecordShared*    sh;
              -};
              -
              -/******************************************/
              -/*******     TQSqlRecordInfo Class    ******/
              -/******************************************/
              -
              -#if defined(Q_TEMPLATEDLL)
              -// MOC_SKIP_BEGIN
              -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList<TQSqlFieldInfo>;
              -// MOC_SKIP_END
              -#endif
              -
              -typedef TQValueList<TQSqlFieldInfo> TQSqlFieldInfoList;
              -
              -class TQ_EXPORT TQSqlRecordInfo: public TQSqlFieldInfoList
              -{
              -public:
              -    TQSqlRecordInfo(): TQSqlFieldInfoList() {}
              -    TQSqlRecordInfo( const TQSqlFieldInfoList& other ): TQSqlFieldInfoList( other ) {}
              -    TQSqlRecordInfo( const TQSqlRecord& other );
              -
              -    size_type contains( const TQString& fieldName ) const;
              -    TQSqlFieldInfo find( const TQString& fieldName ) const;
              -    TQSqlRecord toRecord() const;
              -
              -};
              -
              -
              -#endif	// TQT_NO_SQL
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlrecord-members.html b/doc/html/qsqlrecord-members.html deleted file mode 100644 index 55a06353d..000000000 --- a/doc/html/qsqlrecord-members.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - -TQSqlRecord Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlRecord

              - -

              This is the complete list of member functions for -TQSqlRecord, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlrecordinfo-members.html b/doc/html/qsqlrecordinfo-members.html deleted file mode 100644 index c9bf79395..000000000 --- a/doc/html/qsqlrecordinfo-members.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - -TQSqlRecordInfo Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlRecordInfo

              - -

              This is the complete list of member functions for -TQSqlRecordInfo, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlrecordinfo.html b/doc/html/qsqlrecordinfo.html deleted file mode 100644 index f6b5820c1..000000000 --- a/doc/html/qsqlrecordinfo.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - -TQSqlRecordInfo Class - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              TQSqlRecordInfo Class Reference
              [sql module]

              - -

              The TQSqlRecordInfo class encapsulates a set of database field meta data. -More... -

              #include <ntqsqlrecord.h> -

              List of all member functions. -

              Public Members

              - -

              Detailed Description

              - - -The TQSqlRecordInfo class encapsulates a set of database field meta data. -

              - -

              This class is a TQValueList that holds a set of database field meta -data. Use contains() to see if a given field name exists in the -record, and use find() to get a TQSqlFieldInfo record for a named -field. -

              See also TQValueList, TQSqlFieldInfo, and Database Classes. - -


              Member Function Documentation

              -

              TQSqlRecordInfo::TQSqlRecordInfo () -

              - -

              Constructs an empty record info object - -

              TQSqlRecordInfo::TQSqlRecordInfo ( const TQSqlFieldInfoList & other ) -

              - -

              Constructs a copy of other. - -

              TQSqlRecordInfo::TQSqlRecordInfo ( const TQSqlRecord & other ) -

              -Constructs a TQSqlRecordInfo object based on the fields in the -TQSqlRecord other. - -

              size_type TQSqlRecordInfo::contains ( const TQString & fieldName ) const -

              -Returns the number of times a field called fieldName occurs in -the record. Returns 0 if no field by that name could be found. - -

              TQSqlFieldInfo TQSqlRecordInfo::find ( const TQString & fieldName ) const -

              -Returns a TQSqlFieldInfo object for the first field in the record -which has the field name fieldName. If no matching field is -found then an empty TQSqlFieldInfo object is returned. - -

              TQSqlRecord TQSqlRecordInfo::toRecord () const -

              -Returns an empty TQSqlRecord based on the field information -in this TQSqlRecordInfo. - - -

              -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlresult-h.html b/doc/html/qsqlresult-h.html deleted file mode 100644 index 58d32909a..000000000 --- a/doc/html/qsqlresult-h.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - -ntqsqlresult.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlresult.h

              - -

              This is the verbatim text of the ntqsqlresult.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlResult class
              -**
              -** Created : 2000-11-03
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLRESULT_H
              -#define TQSQLRESULT_H
              -
              -#ifndef QT_H
              -#include "ntqstring.h"
              -#include "ntqvariant.h"
              -#include "ntqsqlerror.h"
              -#include "ntqsqlfield.h"
              -#include "ntqsql.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQSqlDriver;
              -class TQSql;
              -class TQSqlResultPrivate;
              -class TQSqlExtension;
              -
              -class TQM_EXPORT_SQL TQSqlResult
              -{
              -friend class TQSqlQuery;
              -friend class TQSqlResultShared;
              -public:
              -    virtual ~TQSqlResult();
              -    
              -    // BCI HACK - remove in 4.0
              -    void 	    setExtension( TQSqlExtension * ext );
              -    TQSqlExtension * extension();
              -
              -protected:
              -    TQSqlResult(const TQSqlDriver * db );
              -    int		    at() const;
              -    TQString         lastQuery() const;
              -    TQSqlError       lastError() const;
              -    bool            isValid() const;
              -    bool            isActive() const;
              -    bool            isSelect() const;
              -    bool            isForwardOnly() const;
              -    const TQSqlDriver* driver() const;
              -    virtual void    setAt( int at );
              -    virtual void    setActive( bool a );
              -    virtual void    setLastError( const TQSqlError& e );
              -    virtual void    setQuery( const TQString& query );
              -    virtual void    setSelect( bool s );
              -    virtual void    setForwardOnly( bool forward );
              -
              -    virtual TQVariant data( int i ) = 0;
              -    virtual bool    isNull( int i ) = 0;
              -    virtual bool    reset ( const TQString& sqlquery ) = 0;
              -    virtual bool    fetch( int i ) = 0;
              -    virtual bool    fetchNext();
              -    virtual bool    fetchPrev();
              -    virtual bool    fetchFirst() = 0;
              -    virtual bool    fetchLast() = 0;
              -    virtual int     size() = 0;
              -    virtual int     numRowsAffected() = 0;
              -private:
              -    TQSqlResultPrivate* d;
              -    bool forwardOnly;
              -
              -private:	// Disabled copy constructor and operator=
              -#if defined(TQ_DISABLE_COPY)
              -    TQSqlResult( const TQSqlResult & );
              -    TQSqlResult &operator=( const TQSqlResult & );
              -#endif
              -};
              -
              -#endif	// TQT_NO_SQL
              -#endif
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlresult-members.html b/doc/html/qsqlresult-members.html deleted file mode 100644 index b31895878..000000000 --- a/doc/html/qsqlresult-members.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - -TQSqlResult Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlResult

              - -

              This is the complete list of member functions for -TQSqlResult, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlselectcursor-h.html b/doc/html/qsqlselectcursor-h.html deleted file mode 100644 index 0f96650e4..000000000 --- a/doc/html/qsqlselectcursor-h.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - -ntqsqlselectcursor.h Include File - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              ntqsqlselectcursor.h

              - -

              This is the verbatim text of the ntqsqlselectcursor.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


              -
              -/****************************************************************************
              -**
              -** Definition of TQSqlSelectCursor class
              -**
              -** Created : 2002-11-13
              -**
              -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
              -**
              -** This file is part of the sql module of the TQt GUI Toolkit.
              -**
              -** This file may be used under the terms of the GNU General Public
              -** License versions 2.0 or 3.0 as published by the Free Software
              -** Foundation and appearing in the file LICENSE.GPL included in the
              -** packaging of this file. Alternatively you may (at your option) use any
              -** later version of the GNU General Public License if such license has
              -** been publicly approved by Trolltech ASA (or its successors, if any)
              -** and the KDE Free TQt Foundation.
              -**
              -** Please review the following information to ensure GNU General
              -** Public Licensing requirements will be met:
              -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
              -** If you are unsure which license is appropriate for your use, please
              -** review the following information:
              -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
              -** or contact the sales department at sales@trolltech.com.
              -**
              -** This file may be used under the terms of the Q Public License as
              -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
              -** included in the packaging of this file.  Licensees holding valid TQt
              -** Commercial licenses may use this file in accordance with the TQt
              -** Commercial License Agreement provided with the Software.
              -**
              -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
              -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
              -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
              -** herein.
              -**
              -**********************************************************************/
              -
              -#ifndef TQSQLSELECTCURSOR_H
              -#define TQSQLSELECTCURSOR_H
              -
              -#ifndef QT_H
              -#include "ntqsqlcursor.h"
              -#endif // QT_H
              -
              -#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
              -#define TQM_EXPORT_SQL
              -#else
              -#define TQM_EXPORT_SQL TQ_EXPORT
              -#endif
              -
              -#ifndef TQT_NO_SQL
              -
              -class TQSqlSelectCursorPrivate;
              -
              -class TQM_EXPORT_SQL TQSqlSelectCursor : public TQSqlCursor
              -{
              -public:
              -    TQSqlSelectCursor( const TQString& query = TQString::null, TQSqlDatabase* db = 0 );
              -    TQSqlSelectCursor( const TQSqlSelectCursor& other );
              -    ~TQSqlSelectCursor();
              -    bool exec( const TQString& query );
              -    bool select() { return TQSqlCursor::select(); }
              -    
              -protected:
              -    TQSqlIndex primaryIndex( bool = TRUE ) const { return TQSqlIndex(); }
              -    TQSqlIndex index( const TQStringList& ) const { return TQSqlIndex(); }
              -    TQSqlIndex index( const TQString& ) const { return TQSqlIndex(); }
              -    TQSqlIndex index( const char* ) const { return TQSqlIndex(); }
              -    void setPrimaryIndex( const TQSqlIndex& ) {}
              -    void append( const TQSqlFieldInfo& ) {}
              -    void insert( int, const TQSqlFieldInfo& ) {}
              -    void remove( int ) {}
              -    void clear() {}
              -    void setGenerated( const TQString&, bool ) {}
              -    void setGenerated( int, bool ) {}
              -    TQSqlRecord*	editBuffer( bool = FALSE ) { return 0; }
              -    TQSqlRecord*	primeInsert() { return 0; }
              -    TQSqlRecord*	primeUpdate() { return 0; }
              -    TQSqlRecord*	primeDelete() { return 0; }
              -    int	insert( bool = TRUE ) { return 0; }
              -    int	update( bool = TRUE ) { return 0; }
              -    int	del( bool = TRUE ) { return 0; }
              -    void setMode( int ) {}
              -
              -    void setSort( const TQSqlIndex& ) {}
              -    TQSqlIndex sort() const { return TQSqlIndex(); }
              -    void setFilter( const TQString& ) {}
              -    TQString filter() const { return TQString::null; }
              -    void setName( const TQString&, bool = TRUE ) {}
              -    TQString name() const { return TQString::null; }
              -    TQString toString( const TQString& = TQString::null, const TQString& = "," ) const { return TQString::null; }
              -    bool select( const TQString &, const TQSqlIndex& = TQSqlIndex() );
              -
              -private:
              -    void populateCursor();
              -    
              -    TQSqlSelectCursorPrivate * d;
              -};
              -
              -#endif // TQT_NO_SQL
              -#endif // TQSQLSELECTCURSOR_H
              -
              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qsqlselectcursor-members.html b/doc/html/qsqlselectcursor-members.html deleted file mode 100644 index a92ba729a..000000000 --- a/doc/html/qsqlselectcursor-members.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - -TQSqlSelectCursor Member List - - - - - - - -
              - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

              Complete Member List for TQSqlSelectCursor

              - -

              This is the complete list of member functions for -TQSqlSelectCursor, including inherited members. - -

              - -


              - -
              Copyright © 2007 -TrolltechTrademarks -
              TQt 3.3.8
              -
              - diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf index 928a1f74c..3920da97e 100644 --- a/doc/html/qt.dcf +++ b/doc/html/qt.dcf @@ -1409,79 +1409,79 @@
              -
              - QDataBrowser - Boundary - autoEdit - autoEdit - beforeDelete - beforeInsert - beforeUpdate - boundary - boundaryChecking - boundaryChecking - clearValues - confirmCancel - confirmCancels - confirmCancels - confirmDelete - confirmDelete - confirmEdit - confirmEdits - confirmEdits - confirmInsert - confirmInsert - confirmUpdate - confirmUpdate - currentChanged - currentEdited - cursorChanged - del - deleteCurrent - filter - filter - first - firstRecordAvailable - form - handleError - insert - insertCurrent - isReadOnly - last - lastRecordAvailable - next - nextRecordAvailable - prev - prevRecordAvailable - primeDelete - primeInsert - primeUpdate - readFields - readOnly - refresh - seek - setAutoEdit - setBoundaryChecking - setConfirmCancels - setConfirmDelete - setConfirmEdits - setConfirmInsert - setConfirmUpdate - setFilter - setForm - setReadOnly - setSort - setSqlCursor - sort - sort - sqlCursor - update - updateBoundary - updateCurrent - writeFields - ~QDataBrowser -
              -
              +
              + TQDataBrowser + Boundary + autoEdit + autoEdit + beforeDelete + beforeInsert + beforeUpdate + boundary + boundaryChecking + boundaryChecking + clearValues + confirmCancel + confirmCancels + confirmCancels + confirmDelete + confirmDelete + confirmEdit + confirmEdits + confirmEdits + confirmInsert + confirmInsert + confirmUpdate + confirmUpdate + currentChanged + currentEdited + cursorChanged + del + deleteCurrent + filter + filter + first + firstRecordAvailable + form + handleError + insert + insertCurrent + isReadOnly + last + lastRecordAvailable + next + nextRecordAvailable + prev + prevRecordAvailable + primeDelete + primeInsert + primeUpdate + readFields + readOnly + refresh + seek + setAutoEdit + setBoundaryChecking + setConfirmCancels + setConfirmDelete + setConfirmEdits + setConfirmInsert + setConfirmUpdate + setFilter + setForm + setReadOnly + setSort + setSqlCursor + sort + sort + sqlCursor + update + updateBoundary + updateCurrent + writeFields + ~TQDataBrowser +
              +
              @@ -1528,106 +1528,106 @@
              -
              - QDataTable - Refresh - addColumn - adjustColumn - autoDelete - autoEdit - autoEdit - beforeDelete - beforeInsert - beforeUpdate - beginInsert - beginUpdate - confirmCancel - confirmCancels - confirmCancels - confirmDelete - confirmDelete - confirmEdit - confirmEdits - confirmEdits - confirmInsert - confirmInsert - confirmUpdate - confirmUpdate - currentChanged - currentRecord - cursorChanged - dateFormat - dateFormat - deleteCurrent - falseText - falseText - fieldAlignment - filter - filter - find - handleError - indexOf - insertCurrent - installEditorFactory - installPropertyMap - nullText - nullText - numCols - numCols - numRows - numRows - paintField - primeDelete - primeInsert - primeUpdate - refresh - removeColumn - reset - setAutoDelete - setAutoEdit - setColumn - setColumnWidth - setConfirmCancels - setConfirmDelete - setConfirmEdits - setConfirmInsert - setConfirmUpdate - setDateFormat - setFalseText - setFilter - setNullText - setSize - setSort - setSqlCursor - setTrueText - sort - sort - sortAscending - sortColumn - sortDescending - sqlCursor - text - trueText - trueText - updateCurrent - value - ~QDataTable -
              -
              -
              -
              - QDataView - clearValues - form - readFields - record - refresh - setForm - setRecord - writeFields - ~QDataView -
              -
              +
              + TQDataTable + Refresh + addColumn + adjustColumn + autoDelete + autoEdit + autoEdit + beforeDelete + beforeInsert + beforeUpdate + beginInsert + beginUpdate + confirmCancel + confirmCancels + confirmCancels + confirmDelete + confirmDelete + confirmEdit + confirmEdits + confirmEdits + confirmInsert + confirmInsert + confirmUpdate + confirmUpdate + currentChanged + currentRecord + cursorChanged + dateFormat + dateFormat + deleteCurrent + falseText + falseText + fieldAlignment + filter + filter + find + handleError + indexOf + insertCurrent + installEditorFactory + installPropertyMap + nullText + nullText + numCols + numCols + numRows + numRows + paintField + primeDelete + primeInsert + primeUpdate + refresh + removeColumn + reset + setAutoDelete + setAutoEdit + setColumn + setColumnWidth + setConfirmCancels + setConfirmDelete + setConfirmEdits + setConfirmInsert + setConfirmUpdate + setDateFormat + setFalseText + setFilter + setNullText + setSize + setSort + setSqlCursor + setTrueText + sort + sort + sortAscending + sortColumn + sortDescending + sqlCursor + text + trueText + trueText + updateCurrent + value + ~TQDataTable +
              +
              +
              +
              + TQDataView + clearValues + form + readFields + record + refresh + setForm + setRecord + writeFields + ~TQDataView +
              +
              QDate @@ -2414,14 +2414,14 @@
              -
              - QEditorFactory - createEditor - defaultFactory - installDefaultFactory - ~QEditorFactory -
              -
              +
              + TQEditorFactory + createEditor + defaultFactory + installDefaultFactory + ~TQEditorFactory +
              +
              QErrorMessage @@ -6848,355 +6848,355 @@
              -
              - QSql - Confirm - Location - Op - ParameterType - TableType -
              -
              -
              -
              - QSqlCursor - Mode - append - calculateField - canDelete - canInsert - canUpdate - clear - del - editBuffer - filter - index - insert - isCalculated - isNull - isReadOnly - isTrimmed - mode - name - operator= - primaryIndex - primeDelete - primeInsert - primeUpdate - remove - select - setCalculated - setFilter - setGenerated - setMode - setName - setPrimaryIndex - setSort - setTrimmed - sort - toString - update - ~QSqlCursor -
              -
              -
              -
              - QSqlDatabase - addDatabase - close - commit - connectOptions - connectOptions - contains - database - databaseName - databaseName - driver - driverName - drivers - exec - hostName - hostName - isDriverAvailable - isOpen - isOpenError - lastError - open - password - password - port - port - primaryIndex - record - recordInfo - registerSqlDriver - removeDatabase - rollback - setConnectOptions - setDatabaseName - setHostName - setPassword - setPort - setUserName - tables - transaction - userName - userName - ~QSqlDatabase -
              -
              -
              -
              - QSqlDriver - DriverFeature - beginTransaction - close - commitTransaction - createQuery - formatValue - hasFeature - isOpen - isOpenError - lastError - nullText - open - primaryIndex - record - recordInfo - rollbackTransaction - setLastError - setOpen - setOpenError - tables - ~QSqlDriver -
              -
              -
              -
              - QSqlDriverPlugin - create - keys - ~QSqlDriverPlugin -
              -
              -
              -
              - QSqlEditorFactory - createEditor - defaultFactory - installDefaultFactory - ~QSqlEditorFactory -
              -
              -
              -
              - QSqlError - Type - databaseText - driverText - number - operator= - setDatabaseText - setDriverText - setNumber - setType - text - type - ~QSqlError -
              -
              -
              -
              - QSqlField - clear - isNull - isReadOnly - name - operator= - operator== - setName - setNull - setReadOnly - setValue - type - value - ~QSqlField -
              -
              -
              -
              - QSqlFieldInfo - defaultValue - isCalculated - isGenerated - isRequired - isTrim - length - name - operator= - operator== - precision - setCalculated - setGenerated - setTrim - toField - type - typeID - ~QSqlFieldInfo -
              -
              -
              -
              - QSqlForm - clear - clearValues - count - fieldToWidget - insert - installPropertyMap - readField - readFields - remove - setRecord - widget - widgetToField - writeField - writeFields - ~QSqlForm -
              -
              -
              -
              - QSqlIndex - append - cursorName - fromStringList - isDescending - name - operator= - setCursorName - setDescending - setName - ~QSqlIndex -
              -
              -
              -
              - QSqlPropertyMap - defaultMap - insert - installDefaultMap - property - remove - setProperty - ~QSqlPropertyMap -
              -
              -
              -
              - QSqlQuery - addBindValue - afterSeek - at - beforeSeek - bindValue - boundValue - boundValues - driver - exec - executedQuery - first - isActive - isForwardOnly - isNull - isSelect - isValid - last - lastError - lastQuery - next - numRowsAffected - operator= - prepare - prev - result - seek - setForwardOnly - size - value - ~QSqlQuery -
              -
              -
              -
              - QSqlRecord - append - clear - clearValues - contains - count - field - fieldName - insert - isEmpty - isGenerated - isNull - operator= - position - remove - setGenerated - setNull - setValue - toString - toStringList - value - ~QSqlRecord -
              -
              -
              -
              - QSqlRecordInfo - contains - find - toRecord -
              -
              -
              -
              - QSqlResult - at - data - driver - fetch - fetchFirst - fetchLast - fetchNext - fetchPrev - isActive - isForwardOnly - isNull - isSelect - isValid - lastError - lastQuery - numRowsAffected - reset - setActive - setAt - setForwardOnly - setLastError - setQuery - setSelect - size - ~QSqlResult -
              -
              -
              -
              - QSqlSelectCursor - ~QSqlSelectCursor -
              -
              +
              + TQSql + Confirm + Location + Op + ParameterType + TableType +
              +
              +
              +
              + TQSqlCursor + Mode + append + calculateField + canDelete + canInsert + canUpdate + clear + del + editBuffer + filter + index + insert + isCalculated + isNull + isReadOnly + isTrimmed + mode + name + operator= + primaryIndex + primeDelete + primeInsert + primeUpdate + remove + select + setCalculated + setFilter + setGenerated + setMode + setName + setPrimaryIndex + setSort + setTrimmed + sort + toString + update + ~TQSqlCursor +
              +
              +
              +
              + TQSqlDatabase + addDatabase + close + commit + connectOptions + connectOptions + contains + database + databaseName + databaseName + driver + driverName + drivers + exec + hostName + hostName + isDriverAvailable + isOpen + isOpenError + lastError + open + password + password + port + port + primaryIndex + record + recordInfo + registerSqlDriver + removeDatabase + rollback + setConnectOptions + setDatabaseName + setHostName + setPassword + setPort + setUserName + tables + transaction + userName + userName + ~TQSqlDatabase +
              +
              +
              +
              + TQSqlDriver + DriverFeature + beginTransaction + close + commitTransaction + createQuery + formatValue + hasFeature + isOpen + isOpenError + lastError + nullText + open + primaryIndex + record + recordInfo + rollbackTransaction + setLastError + setOpen + setOpenError + tables + ~TQSqlDriver +
              +
              +
              +
              + TQSqlDriverPlugin + create + keys + ~TQSqlDriverPlugin +
              +
              +
              +
              + TQSqlEditorFactory + createEditor + defaultFactory + installDefaultFactory + ~TQSqlEditorFactory +
              +
              +
              +
              + TQSqlError + Type + databaseText + driverText + number + operator= + setDatabaseText + setDriverText + setNumber + setType + text + type + ~TQSqlError +
              +
              +
              +
              + TQSqlField + clear + isNull + isReadOnly + name + operator= + operator== + setName + setNull + setReadOnly + setValue + type + value + ~TQSqlField +
              +
              +
              +
              + TQSqlFieldInfo + defaultValue + isCalculated + isGenerated + isRequired + isTrim + length + name + operator= + operator== + precision + setCalculated + setGenerated + setTrim + toField + type + typeID + ~TQSqlFieldInfo +
              +
              +
              +
              + TQSqlForm + clear + clearValues + count + fieldToWidget + insert + installPropertyMap + readField + readFields + remove + setRecord + widget + widgetToField + writeField + writeFields + ~TQSqlForm +
              +
              +
              +
              + TQSqlIndex + append + cursorName + fromStringList + isDescending + name + operator= + setCursorName + setDescending + setName + ~TQSqlIndex +
              +
              +
              +
              + TQSqlPropertyMap + defaultMap + insert + installDefaultMap + property + remove + setProperty + ~TQSqlPropertyMap +
              +
              +
              +
              + TQSqlQuery + addBindValue + afterSeek + at + beforeSeek + bindValue + boundValue + boundValues + driver + exec + executedQuery + first + isActive + isForwardOnly + isNull + isSelect + isValid + last + lastError + lastQuery + next + numRowsAffected + operator= + prepare + prev + result + seek + setForwardOnly + size + value + ~TQSqlQuery +
              +
              +
              +
              + TQSqlRecord + append + clear + clearValues + contains + count + field + fieldName + insert + isEmpty + isGenerated + isNull + operator= + position + remove + setGenerated + setNull + setValue + toString + toStringList + value + ~TQSqlRecord +
              +
              +
              +
              + TQSqlRecordInfo + contains + find + toRecord +
              +
              +
              +
              + TQSqlResult + at + data + driver + fetch + fetchFirst + fetchLast + fetchNext + fetchPrev + isActive + isForwardOnly + isNull + isSelect + isValid + lastError + lastQuery + numRowsAffected + reset + setActive + setAt + setForwardOnly + setLastError + setQuery + setSelect + size + ~TQSqlResult +
              +
              +
              +
              + TQSqlSelectCursor + ~TQSqlSelectCursor +
              +
              QStatusBar diff --git a/doc/html/sql-driver.html b/doc/html/sql-driver.html index 1145f5048..f678bc9ee 100644 --- a/doc/html/sql-driver.html +++ b/doc/html/sql-driver.html @@ -121,7 +121,7 @@ client libraries (>3.23.34) allow you to use transactions on those modified servers.

              If you have a recent client library and connect to a transaction-enabled MySQL server, a call to the -TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) function returns +TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) function returns TRUE and SQL transactions can be used.

              If the plugin is compiled against MySQL 4.x client libraries, transactions are enabled by default. @@ -172,15 +172,15 @@ encoding to communicate with the server. that this process may require a lot of memory.

              Note that Oracle 9 doesn't support scrollable result sets with LOB columns, you have to use a forward only query to select LOB fields -(see TQSqlQuery::setForwardOnly()). +(see TQSqlQuery::setForwardOnly()).

              Inserting BLOBs should be done using either a prepared query where the -BLOBs are bound to placeholders, or TQSqlCursor which uses a prepared +BLOBs are bound to placeholders, or TQSqlCursor which uses a prepared query to do this internally (see $TQTDIR/examples/sql/blob).

              Know problems

              -

              When a query is in forward only mode a call to TQSqlQuery::last() will +

              When a query is in forward only mode a call to TQSqlQuery::last() will position the query on the last record and return TRUE, but subsequent -calls to TQSqlQuery::value() will only return NULLs. +calls to TQSqlQuery::value() will only return NULLs.

              How to build the plugin on Unix/Linux

              All files required to build driver should ship with the standard Oracle @@ -260,14 +260,14 @@ be installed first. Note that every client that uses your application is required to have an ODBC driver manager installed, otherwise the TQODBC3 plugin will not work.

              Be aware that when connecting to an ODBC datasource you must pass in -the name of the ODBC datasource to the TQSqlDatabase::setDatabaseName() +the name of the ODBC datasource to the TQSqlDatabase::setDatabaseName() function: not the actual database name.

              The TQODBC3 Plugin needs an ODBC compliant driver manager version 2.0 or later to work. Some ODBC drivers claim to be version 2.0 compliant, but do not offer all the necessary functionality. The TQODBC3 plugin therefore checks whether the data source can be used after a connection has been established and refuses to work if the check -fails. If you don't like this behaviour, you can remove the #define ODBC_CHECK_DRIVER line from the file qsql_odbc.cpp. Do this at +fails. If you don't like this behaviour, you can remove the #define ODBC_CHECK_DRIVER line from the file tqsql_odbc.cpp. Do this at your own risk!

              If you experience very slow access of the ODBC datasource, make sure that ODBC call tracing is turned off in the ODBC datasource manager. @@ -408,7 +408,7 @@ nmake

              By default the Microsoft library is used on Windows, if you want to force the use of the Sybase Open Client, you must define -Q_USE_SYBASE in %TQTDIR%\src\sql\drivers\tds\qsql_tds.cpp. +Q_USE_SYBASE in %TQTDIR%\src\sql\drivers\tds\tqsql_tds.cpp.

              TQDB2 - IBM DB2 Driver (v7.1 or higher)

              @@ -422,7 +422,7 @@ files necessary for compiling the TQDB2 plugin.

              The TQDB2 driver supports prepared queries, reading/writing of Unicode strings and reading/writing of BLOBs.

              We suggest using a forward-only query when calling stored procedures -in DB2 (see TQSqlQuery::setForwardOnly()). +in DB2 (see TQSqlQuery::setForwardOnly()).

              How to build the plugin on Unix/Linux

              @@ -559,16 +559,16 @@ error message.
               

              How to write your own database driver

              -

              TQSqlDatabase is responsible for loading and managing database driver -plugins. When a database is added (see TQSqlDatabase::addDatabase()), -the appropriate driver plugin is loaded (using TQSqlDriverPlugin). +

              TQSqlDatabase is responsible for loading and managing database driver +plugins. When a database is added (see TQSqlDatabase::addDatabase()), +the appropriate driver plugin is loaded (using TQSqlDriverPlugin). TQSqlDatabase relies on the driver plugin to provide interfaces for -TQSqlDriver and TQSqlResult. +TQSqlDriver and TQSqlResult.

              TQSqlDriver is an abstract base class which defines the functionality of a SQL database driver. This includes functions such as -TQSqlDriver::open() and TQSqlDriver::close(). TQSqlDriver is responsible +TQSqlDriver::open() and TQSqlDriver::close(). TQSqlDriver is responsible for connecting to a database, establish the proper environment, etc. -In addition, TQSqlDriver can create TQSqlQuery objects appropriate for +In addition, TQSqlDriver can create TQSqlQuery objects appropriate for the particular database API. TQSqlDatabase forwards many of its function calls directly to TQSqlDriver which provides the concrete implementation. @@ -577,9 +577,9 @@ of a SQL database query. This includes statements such as SELECT, UPDATE, and ALTER TABLE. TQSqlResult contains functions such as TQSqlResult::next() and TQSqlResult::value(). TQSqlResult is responsible for sending queries to the database, returning result data, etc. -TQSqlQuery forwards many of its function calls directly to TQSqlResult +TQSqlQuery forwards many of its function calls directly to TQSqlResult which provides the concrete implementation. -

              TQSqlDriver and TQSqlResult are closely connected. When implementing a +

              TQSqlDriver and TQSqlResult are closely connected. When implementing a TQt SQL driver, both of these classes must to be subclassed and the abstract virtual methods in each class must be implemented.

              To implement a TQt SQL driver as a plugin (so that it is recognized and @@ -591,10 +591,10 @@ with TQt in TQTDIR/plugins/src/sqldrivers and TQTDIR/src/sql/drivers.

              The following code can be used as a skeleton for a SQL driver:

              -class TQNullResult : public TQSqlResult
              +class TQNullResult : public TQSqlResult
               {
               public:
              -    TQNullResult( const TQSqlDriver* d ): TQSqlResult( d ) {}
              +    TQNullResult( const TQSqlDriver* d ): TQSqlResult( d ) {}
                   ~TQNullResult() {}
               protected:
                   TQVariant    data( int ) { return TQVariant(); }
              @@ -603,15 +603,15 @@ protected:
                   bool        fetchFirst() { return FALSE; }
                   bool        fetchLast() { return FALSE; }
                   bool        isNull( int ) { return FALSE; }
              -    TQSqlRecord  record() { return TQSqlRecord(); }
              +    TQSqlRecord  record() { return TQSqlRecord(); }
                   int         size()  { return 0; }
                   int         numRowsAffected() { return 0; }
               };
               
              -class TQNullDriver : public TQSqlDriver
              +class TQNullDriver : public TQSqlDriver
               {
               public:
              -    TQNullDriver(): TQSqlDriver() {}
              +    TQNullDriver(): TQSqlDriver() {}
                   ~TQNullDriver() {}
                   bool    hasFeature( DriverFeature ) const { return FALSE; }
                   bool    open( const TQString&,
              @@ -620,7 +620,7 @@ public:
                                 const TQString&,
                                 int ) { return FALSE; }
                   void    close() {}
              -    TQSqlQuery createQuery() const { return TQSqlQuery( new TQNullResult( this ) ); }
              +    TQSqlQuery createQuery() const { return TQSqlQuery( new TQNullResult( this ) ); }
               };
               
              diff --git a/doc/html/sql-overview-basicbrowsing-main-cpp.html b/doc/html/sql-overview-basicbrowsing-main-cpp.html index 7ec94e8c1..35b8e488f 100644 --- a/doc/html/sql-overview-basicbrowsing-main-cpp.html +++ b/doc/html/sql-overview-basicbrowsing-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlquery.h> +#include <tqsqldatabase.h> +#include <tqsqlquery.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,16 +52,16 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv, FALSE ); if ( createConnections() ) { - TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" ); + TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" ); // Copy data from the oracle database to the ODBC (default) // database - TQSqlQuery target; - TQSqlQuery query( "SELECT id, name FROM people", oracledb ); - if ( query.isActive() ) { - while ( query.next() ) { - target.exec( "INSERT INTO people ( id, name ) VALUES ( " + - query.value(0).toString() + - ", '" + query.value(1).toString() + "' )" ); + TQSqlQuery target; + TQSqlQuery query( "SELECT id, name FROM people", oracledb ); + if ( query.isActive() ) { + while ( query.next() ) { + target.exec( "INSERT INTO people ( id, name ) VALUES ( " + + query.value(0).toString() + + ", '" + query.value(1).toString() + "' )" ); } } } diff --git a/doc/html/sql-overview-basicbrowsing2-main-cpp.html b/doc/html/sql-overview-basicbrowsing2-main-cpp.html index 62d8d5d2c..1c14d58aa 100644 --- a/doc/html/sql-overview-basicbrowsing2-main-cpp.html +++ b/doc/html/sql-overview-basicbrowsing2-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlquery.h> +#include <tqsqldatabase.h> +#include <tqsqlquery.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,19 +52,19 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv, FALSE ); if ( createConnections() ) { - TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" ); + TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" ); // Copy data from the oracle database to the ODBC (default) // database - TQSqlQuery target; - TQSqlQuery query( "SELECT id, name FROM people", oracledb ); + TQSqlQuery target; + TQSqlQuery query( "SELECT id, name FROM people", oracledb ); int count = 0; - if ( query.isActive() ) { - while ( query.next() ) { - target.exec( "INSERT INTO people ( id, name ) VALUES ( " + - query.value(0).toString() + - ", '" + query.value(1).toString() + "' )" ); - if ( target.isActive() ) - count += target.numRowsAffected(); + if ( query.isActive() ) { + while ( query.next() ) { + target.exec( "INSERT INTO people ( id, name ) VALUES ( " + + query.value(0).toString() + + ", '" + query.value(1).toString() + "' )" ); + if ( target.isActive() ) + count += target.numRowsAffected(); } } } diff --git a/doc/html/sql-overview-basicdatamanip-main-cpp.html b/doc/html/sql-overview-basicdatamanip-main-cpp.html index 48cb4574a..6cfd77bff 100644 --- a/doc/html/sql-overview-basicdatamanip-main-cpp.html +++ b/doc/html/sql-overview-basicdatamanip-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlquery.h> +#include <tqsqldatabase.h> +#include <tqsqlquery.h> #include "../connection.h" bool createConnections(); @@ -57,15 +57,15 @@ int main( int argc, char *argv[] ) int rows = 0; if ( createConnections() ) { - TQSqlQuery query( "INSERT INTO staff ( id, forename, surname, salary ) " + TQSqlQuery query( "INSERT INTO staff ( id, forename, surname, salary ) " "VALUES ( 1155, 'Ginger', 'Davis', 50000 )" ); - if ( query.isActive() ) rows += query.numRowsAffected() ; + if ( query.isActive() ) rows += query.numRowsAffected() ; - query.exec( "UPDATE staff SET salary=60000 WHERE id=1155" ); - if ( query.isActive() ) rows += query.numRowsAffected() ; + query.exec( "UPDATE staff SET salary=60000 WHERE id=1155" ); + if ( query.isActive() ) rows += query.numRowsAffected() ; - query.exec( "DELETE FROM staff WHERE id=1155" ); - if ( query.isActive() ) rows += query.numRowsAffected() ; + query.exec( "DELETE FROM staff WHERE id=1155" ); + if ( query.isActive() ) rows += query.numRowsAffected() ; } return ( rows == 3 ) ? 0 : 1; diff --git a/doc/html/sql-overview-connect1-main-cpp.html b/doc/html/sql-overview-connect1-main-cpp.html index 7eaf1ef0b..9428a4bcd 100644 --- a/doc/html/sql-overview-connect1-main-cpp.html +++ b/doc/html/sql-overview-connect1-main-cpp.html @@ -43,7 +43,7 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> +#include <tqsqldatabase.h> #include "../connection.h" @@ -51,13 +51,13 @@ int main( int argc, char *argv[] ) { TQApplication app( argc, argv, FALSE ); - TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER ); - defaultDB->setDatabaseName( DB_SALES_DBNAME ); - defaultDB->setUserName( DB_SALES_USER ); - defaultDB->setPassword( DB_SALES_PASSWD ); - defaultDB->setHostName( DB_SALES_HOST ); + TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER ); + defaultDB->setDatabaseName( DB_SALES_DBNAME ); + defaultDB->setUserName( DB_SALES_USER ); + defaultDB->setPassword( DB_SALES_PASSWD ); + defaultDB->setHostName( DB_SALES_HOST ); - if ( defaultDB->open() ) { + if ( defaultDB->open() ) { // Database successfully opened; we can now issue SQL commands. } diff --git a/doc/html/sql-overview-create_connections-main-cpp.html b/doc/html/sql-overview-create_connections-main-cpp.html index ed917270c..5f54c2084 100644 --- a/doc/html/sql-overview-create_connections-main-cpp.html +++ b/doc/html/sql-overview-create_connections-main-cpp.html @@ -43,7 +43,7 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> +#include <tqsqldatabase.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,7 +52,7 @@ int main( int argc, char *argv[] ) if ( createConnections() ) { // Databases successfully opened; get pointers to them: - TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" ); + TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" ); // Now we can now issue SQL commands to the oracle connection // or to the default connection } diff --git a/doc/html/sql-overview-custom1-main-cpp.html b/doc/html/sql-overview-custom1-main-cpp.html index 0912a8927..f09eb7acd 100644 --- a/doc/html/sql-overview-custom1-main-cpp.html +++ b/doc/html/sql-overview-custom1-main-cpp.html @@ -94,23 +94,23 @@ TQString CustomEdit::upperLine() const grid->addWidget( saveButton, 3, 0 ); grid->activate(); - staffCursor = new TQSqlCursor( "staff" ); - staffCursor->setTrimmed( "forename", TRUE ); - staffCursor->setTrimmed( "surname", TRUE ); - idIndex = staffCursor->index( "id" ); - staffCursor->select( idIndex ); - staffCursor->first(); - - propMap = new TQSqlPropertyMap; - propMap->insert( forenameEdit->className(), "upperLine" ); - - sqlForm = new TQSqlForm( this ); - sqlForm->setRecord( staffCursor->primeUpdate() ); - sqlForm->installPropertyMap( propMap ); - sqlForm->insert( forenameEdit, "forename" ); - sqlForm->insert( surnameEdit, "surname" ); - sqlForm->insert( salaryEdit, "salary" ); - sqlForm->readFields(); + staffCursor = new TQSqlCursor( "staff" ); + staffCursor->setTrimmed( "forename", TRUE ); + staffCursor->setTrimmed( "surname", TRUE ); + idIndex = staffCursor->index( "id" ); + staffCursor->select( idIndex ); + staffCursor->first(); + + propMap = new TQSqlPropertyMap; + propMap->insert( forenameEdit->className(), "upperLine" ); + + sqlForm = new TQSqlForm( this ); + sqlForm->setRecord( staffCursor->primeUpdate() ); + sqlForm->installPropertyMap( propMap ); + sqlForm->insert( forenameEdit, "forename" ); + sqlForm->insert( surnameEdit, "surname" ); + sqlForm->insert( salaryEdit, "salary" ); + sqlForm->readFields(); } @@ -122,10 +122,10 @@ FormDialog::~FormDialog() void FormDialog::save() { - sqlForm->writeFields(); - staffCursor->update(); - staffCursor->select( idIndex ); - staffCursor->first(); + sqlForm->writeFields(); + staffCursor->update(); + staffCursor->select( idIndex ); + staffCursor->first(); } diff --git a/doc/html/sql-overview-custom1-main-h.html b/doc/html/sql-overview-custom1-main-h.html index 7815c5fda..9f2531b06 100644 --- a/doc/html/sql-overview-custom1-main-h.html +++ b/doc/html/sql-overview-custom1-main-h.html @@ -48,10 +48,10 @@ body { background: #ffffff; color: black; } #include <ntqlayout.h> #include <ntqlineedit.h> #include <ntqpushbutton.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> -#include <ntqsqlform.h> -#include <ntqsqlpropertymap.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> +#include <tqsqlform.h> +#include <tqsqlpropertymap.h> #include "../connection.h" class CustomEdit : public TQLineEdit @@ -78,10 +78,10 @@ class FormDialog : public TQDialog public slots: void save(); private: - TQSqlCursor *staffCursor; - TQSqlForm *sqlForm; - TQSqlPropertyMap *propMap; - TQSqlIndex idIndex; + TQSqlCursor *staffCursor; + TQSqlForm *sqlForm; + TQSqlPropertyMap *propMap; + TQSqlIndex idIndex; }; diff --git a/doc/html/sql-overview-delete-main-cpp.html b/doc/html/sql-overview-delete-main-cpp.html index 82c184624..06ba124c5 100644 --- a/doc/html/sql-overview-delete-main-cpp.html +++ b/doc/html/sql-overview-delete-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,11 +52,11 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv, FALSE ); if ( createConnections() ) { - TQSqlCursor cur( "prices" ); - cur.select( "id=999" ); - if ( cur.next() ) { - cur.primeDelete(); - cur.del(); + TQSqlCursor cur( "prices" ); + cur.select( "id=999" ); + if ( cur.next() ) { + cur.primeDelete(); + cur.del(); } } diff --git a/doc/html/sql-overview-extract-main-cpp.html b/doc/html/sql-overview-extract-main-cpp.html index 142a427c1..bf555d29f 100644 --- a/doc/html/sql-overview-extract-main-cpp.html +++ b/doc/html/sql-overview-extract-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,22 +52,22 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv, FALSE ); if ( createConnections() ) { - TQSqlCursor cur( "creditors" ); + TQSqlCursor cur( "creditors" ); TQStringList orderFields = TQStringList() << "surname" << "forename"; - TQSqlIndex order = cur.index( orderFields ); + TQSqlIndex order = cur.index( orderFields ); TQStringList filterFields = TQStringList() << "surname" << "city"; - TQSqlIndex filter = cur.index( filterFields ); - cur.setValue( "surname", "Chirac" ); - cur.setValue( "city", "Paris" ); + TQSqlIndex filter = cur.index( filterFields ); + cur.setValue( "surname", "Chirac" ); + cur.setValue( "city", "Paris" ); - cur.select( filter, order ); + cur.select( filter, order ); - while ( cur.next() ) { - int id = cur.value( "id" ).toInt(); - TQString name = cur.value( "forename" ).toString() + " " + - cur.value( "surname" ).toString(); + while ( cur.next() ) { + int id = cur.value( "id" ).toInt(); + TQString name = cur.value( "forename" ).toString() + " " + + cur.value( "surname" ).toString(); tqDebug( TQString::number( id ) + ": " + name ); } } diff --git a/doc/html/sql-overview-form1-main-cpp.html b/doc/html/sql-overview-form1-main-cpp.html index 000dbd068..891f07b52 100644 --- a/doc/html/sql-overview-form1-main-cpp.html +++ b/doc/html/sql-overview-form1-main-cpp.html @@ -47,9 +47,9 @@ body { background: #ffffff; color: black; } #include <ntqlabel.h> #include <ntqlayout.h> #include <ntqlineedit.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> -#include <ntqsqlform.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> +#include <tqsqlform.h> #include "../connection.h" class FormDialog : public TQDialog @@ -77,16 +77,16 @@ class FormDialog : public TQDialog grid->addWidget( salaryEdit, 2, 1 ); grid->activate(); - TQSqlCursor staffCursor( "staff" ); - staffCursor.select(); - staffCursor.next(); + TQSqlCursor staffCursor( "staff" ); + staffCursor.select(); + staffCursor.next(); - TQSqlForm sqlForm( this ); - sqlForm.setRecord( staffCursor.primeUpdate() ); - sqlForm.insert( forenameDisplay, "forename" ); - sqlForm.insert( surnameDisplay, "surname" ); - sqlForm.insert( salaryEdit, "salary" ); - sqlForm.readFields(); + TQSqlForm sqlForm( this ); + sqlForm.setRecord( staffCursor.primeUpdate() ); + sqlForm.insert( forenameDisplay, "forename" ); + sqlForm.insert( surnameDisplay, "surname" ); + sqlForm.insert( salaryEdit, "salary" ); + sqlForm.readFields(); } diff --git a/doc/html/sql-overview-form2-main-h.html b/doc/html/sql-overview-form2-main-h.html index a1eead4a8..15dcdfb64 100644 --- a/doc/html/sql-overview-form2-main-h.html +++ b/doc/html/sql-overview-form2-main-h.html @@ -48,9 +48,9 @@ body { background: #ffffff; color: black; } #include <ntqlayout.h> #include <ntqlineedit.h> #include <ntqpushbutton.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> -#include <ntqsqlform.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> +#include <tqsqlform.h> #include "../connection.h" class FormDialog : public TQDialog @@ -62,9 +62,9 @@ class FormDialog : public TQDialog public slots: void save(); private: - TQSqlCursor staffCursor; - TQSqlForm *sqlForm; - TQSqlIndex idIndex; + TQSqlCursor staffCursor; + TQSqlForm *sqlForm; + TQSqlIndex idIndex; };


              diff --git a/doc/html/sql-overview-insert-main-cpp.html b/doc/html/sql-overview-insert-main-cpp.html index a56d669af..42ddf63a7 100644 --- a/doc/html/sql-overview-insert-main-cpp.html +++ b/doc/html/sql-overview-insert-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -53,17 +53,17 @@ int main( int argc, char *argv[] ) if ( createConnections() ) { int count = 0; - TQSqlCursor cur( "prices" ); + TQSqlCursor cur( "prices" ); TQStringList names = TQStringList() << "Screwdriver" << "Hammer" << "Wrench" << "Saw"; int id = 20; for ( TQStringList::Iterator name = names.begin(); name != names.end(); ++name ) { - TQSqlRecord *buffer = cur.primeInsert(); - buffer->setValue( "id", id ); - buffer->setValue( "name", *name ); - buffer->setValue( "price", 100.0 + (double)id ); - count += cur.insert(); + TQSqlRecord *buffer = cur.primeInsert(); + buffer->setValue( "id", id ); + buffer->setValue( "name", *name ); + buffer->setValue( "price", 100.0 + (double)id ); + count += cur.insert(); id++; } } diff --git a/doc/html/sql-overview-navigating-main-cpp.html b/doc/html/sql-overview-navigating-main-cpp.html index 51171b5e0..de1c8b1eb 100644 --- a/doc/html/sql-overview-navigating-main-cpp.html +++ b/doc/html/sql-overview-navigating-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlquery.h> +#include <tqsqldatabase.h> +#include <tqsqlquery.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,16 +52,16 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv, FALSE ); if ( createConnections() ) { - TQSqlQuery query( "SELECT id, name FROM people ORDER BY name" ); - if ( ! query.isActive() ) return 1; // Query failed + TQSqlQuery query( "SELECT id, name FROM people ORDER BY name" ); + if ( ! query.isActive() ) return 1; // Query failed int i; - i = query.size(); // In this example we have 9 records; i == 9. - query.first(); // Moves to the first record. - i = query.at(); // i == 0 - query.last(); // Moves to the last record. - i = query.at(); // i == 8 - query.seek( query.size() / 2 ); // Moves to the middle record. - i = query.at(); // i == 4 + i = query.size(); // In this example we have 9 records; i == 9. + query.first(); // Moves to the first record. + i = query.at(); // i == 0 + query.last(); // Moves to the last record. + i = query.at(); // i == 8 + query.seek( query.size() / 2 ); // Moves to the middle record. + i = query.at(); // i == 4 } return 0; diff --git a/doc/html/sql-overview-order1-main-cpp.html b/doc/html/sql-overview-order1-main-cpp.html index 2c6fcb2e2..16347340d 100644 --- a/doc/html/sql-overview-order1-main-cpp.html +++ b/doc/html/sql-overview-order1-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,14 +52,14 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv, FALSE ); if ( createConnections() ) { - TQSqlCursor cur( "staff" ); + TQSqlCursor cur( "staff" ); TQStringList fields = TQStringList() << "surname" << "forename"; - TQSqlIndex order = cur.index( fields ); - cur.select( order ); - while ( cur.next() ) { - tqDebug( cur.value( "id" ).toString() + ": " + - cur.value( "surname" ).toString() + " " + - cur.value( "forename" ).toString() ); + TQSqlIndex order = cur.index( fields ); + cur.select( order ); + while ( cur.next() ) { + tqDebug( cur.value( "id" ).toString() + ": " + + cur.value( "surname" ).toString() + " " + + cur.value( "forename" ).toString() ); } } diff --git a/doc/html/sql-overview-order2-main-cpp.html b/doc/html/sql-overview-order2-main-cpp.html index 374a3728d..44a153d49 100644 --- a/doc/html/sql-overview-order2-main-cpp.html +++ b/doc/html/sql-overview-order2-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,16 +52,16 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv, FALSE ); if ( createConnections() ) { - TQSqlCursor cur( "staff" ); + TQSqlCursor cur( "staff" ); TQStringList fields = TQStringList() << "id" << "forename"; - TQSqlIndex order = cur.index( fields ); - TQSqlIndex filter = cur.index( "surname" ); - cur.setValue( "surname", "Bloggs" ); - cur.select( filter, order ); - while ( cur.next() ) { - tqDebug( cur.value( "id" ).toString() + ": " + - cur.value( "surname" ).toString() + " " + - cur.value( "forename" ).toString() ); + TQSqlIndex order = cur.index( fields ); + TQSqlIndex filter = cur.index( "surname" ); + cur.setValue( "surname", "Bloggs" ); + cur.select( filter, order ); + while ( cur.next() ) { + tqDebug( cur.value( "id" ).toString() + ": " + + cur.value( "surname" ).toString() + " " + + cur.value( "forename" ).toString() ); } } diff --git a/doc/html/sql-overview-retrieve1-main-cpp.html b/doc/html/sql-overview-retrieve1-main-cpp.html index 98d7ca283..6b4ee40c0 100644 --- a/doc/html/sql-overview-retrieve1-main-cpp.html +++ b/doc/html/sql-overview-retrieve1-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlquery.h> +#include <tqsqldatabase.h> +#include <tqsqlquery.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,11 +52,11 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv, FALSE ); if ( createConnections() ) { - TQSqlQuery query( "SELECT id, surname FROM staff" ); - if ( query.isActive() ) { - while ( query.next() ) { - tqDebug( query.value(0).toString() + ": " + - query.value(1).toString() ); + TQSqlQuery query( "SELECT id, surname FROM staff" ); + if ( query.isActive() ) { + while ( query.next() ) { + tqDebug( query.value(0).toString() + ": " + + query.value(1).toString() ); } } } diff --git a/doc/html/sql-overview-retrieve2-main-cpp.html b/doc/html/sql-overview-retrieve2-main-cpp.html index b1a86764a..ce4389bac 100644 --- a/doc/html/sql-overview-retrieve2-main-cpp.html +++ b/doc/html/sql-overview-retrieve2-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,12 +52,12 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv ); if ( createConnections() ) { - TQSqlCursor cur( "staff" ); // Specify the table/view name - cur.select(); // We'll retrieve every record - while ( cur.next() ) { - tqDebug( cur.value( "id" ).toString() + ": " + - cur.value( "surname" ).toString() + " " + - cur.value( "salary" ).toString() ); + TQSqlCursor cur( "staff" ); // Specify the table/view name + cur.select(); // We'll retrieve every record + while ( cur.next() ) { + tqDebug( cur.value( "id" ).toString() + ": " + + cur.value( "surname" ).toString() + " " + + cur.value( "salary" ).toString() ); } } diff --git a/doc/html/sql-overview-subclass1-main-cpp.html b/doc/html/sql-overview-subclass1-main-cpp.html index d097dafde..9447e1d8f 100644 --- a/doc/html/sql-overview-subclass1-main-cpp.html +++ b/doc/html/sql-overview-subclass1-main-cpp.html @@ -43,9 +43,9 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> -#include <ntqdatatable.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> +#include <tqdatatable.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -53,17 +53,17 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv ); if ( createConnections() ) { - TQSqlCursor invoiceItemCursor( "invoiceitem" ); + TQSqlCursor invoiceItemCursor( "invoiceitem" ); - TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); + TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); app.setMainWidget( invoiceItemTable ); - invoiceItemTable->addColumn( "pricesid", "PriceID" ); - invoiceItemTable->addColumn( "quantity", "Quantity" ); - invoiceItemTable->addColumn( "paiddate", "Paid" ); + invoiceItemTable->addColumn( "pricesid", "PriceID" ); + invoiceItemTable->addColumn( "quantity", "Quantity" ); + invoiceItemTable->addColumn( "paiddate", "Paid" ); - invoiceItemTable->refresh(); + invoiceItemTable->refresh(); invoiceItemTable->show(); return app.exec(); diff --git a/doc/html/sql-overview-subclass2-main-cpp.html b/doc/html/sql-overview-subclass2-main-cpp.html index db5c6887b..30d19bc09 100644 --- a/doc/html/sql-overview-subclass2-main-cpp.html +++ b/doc/html/sql-overview-subclass2-main-cpp.html @@ -43,10 +43,10 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include "main.h" -#include <ntqdatatable.h> +#include <tqdatatable.h> InvoiceItemCursor::InvoiceItemCursor() : - TQSqlCursor( "invoiceitem" ) + TQSqlCursor( "invoiceitem" ) { // NOOP } @@ -59,15 +59,15 @@ int main( int argc, char *argv[] ) if ( createConnections() ) { InvoiceItemCursor invoiceItemCursor; - TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); + TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); app.setMainWidget( invoiceItemTable ); - invoiceItemTable->addColumn( "pricesid", "PriceID" ); - invoiceItemTable->addColumn( "quantity", "Quantity" ); - invoiceItemTable->addColumn( "paiddate", "Paid" ); + invoiceItemTable->addColumn( "pricesid", "PriceID" ); + invoiceItemTable->addColumn( "quantity", "Quantity" ); + invoiceItemTable->addColumn( "paiddate", "Paid" ); - invoiceItemTable->refresh(); + invoiceItemTable->refresh(); invoiceItemTable->show(); return app.exec(); diff --git a/doc/html/sql-overview-subclass2-main-h.html b/doc/html/sql-overview-subclass2-main-h.html index 3d0384d4c..4acff8c63 100644 --- a/doc/html/sql-overview-subclass2-main-h.html +++ b/doc/html/sql-overview-subclass2-main-h.html @@ -43,13 +43,13 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" class TQSqlRecord; -class InvoiceItemCursor : public TQSqlCursor +class InvoiceItemCursor : public TQSqlCursor { public: InvoiceItemCursor(); diff --git a/doc/html/sql-overview-subclass3-main-cpp.html b/doc/html/sql-overview-subclass3-main-cpp.html index b53d3a68a..f63ae8c20 100644 --- a/doc/html/sql-overview-subclass3-main-cpp.html +++ b/doc/html/sql-overview-subclass3-main-cpp.html @@ -43,24 +43,24 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include "main.h" -#include <ntqdatatable.h> +#include <tqdatatable.h> InvoiceItemCursor::InvoiceItemCursor() : - TQSqlCursor( "invoiceitem" ) + TQSqlCursor( "invoiceitem" ) { - TQSqlFieldInfo productName( "productname", TQVariant::String ); - append( productName ); - setCalculated( productName.name(), TRUE ); + TQSqlFieldInfo productName( "productname", TQVariant::String ); + append( productName ); + 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=" + - field( "pricesid" )->value().toString() ); - if ( query.next() ) - return query.value( 0 ); + TQSqlQuery query( "SELECT name FROM prices WHERE id=" + + field( "pricesid" )->value().toString() ); + if ( query.next() ) + return query.value( 0 ); } return TQVariant( TQString::null ); @@ -74,15 +74,15 @@ int main( int argc, char *argv[] ) if ( createConnections() ) { InvoiceItemCursor invoiceItemCursor; - TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); + TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); app.setMainWidget( invoiceItemTable ); - invoiceItemTable->addColumn( "productname", "Product" ); - invoiceItemTable->addColumn( "quantity", "Quantity" ); - invoiceItemTable->addColumn( "paiddate", "Paid" ); + invoiceItemTable->addColumn( "productname", "Product" ); + invoiceItemTable->addColumn( "quantity", "Quantity" ); + invoiceItemTable->addColumn( "paiddate", "Paid" ); - invoiceItemTable->refresh(); + invoiceItemTable->refresh(); invoiceItemTable->show(); return app.exec(); diff --git a/doc/html/sql-overview-subclass3-main-h.html b/doc/html/sql-overview-subclass3-main-h.html index c35b9b30f..bad4000f7 100644 --- a/doc/html/sql-overview-subclass3-main-h.html +++ b/doc/html/sql-overview-subclass3-main-h.html @@ -43,13 +43,13 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" class TQSqlRecord; -class InvoiceItemCursor : public TQSqlCursor +class InvoiceItemCursor : public TQSqlCursor { public: InvoiceItemCursor(); diff --git a/doc/html/sql-overview-subclass4-main-cpp.html b/doc/html/sql-overview-subclass4-main-cpp.html index b5140d53e..48c6ba49e 100644 --- a/doc/html/sql-overview-subclass4-main-cpp.html +++ b/doc/html/sql-overview-subclass4-main-cpp.html @@ -43,46 +43,46 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include "main.h" -#include <ntqdatatable.h> +#include <tqdatatable.h> InvoiceItemCursor::InvoiceItemCursor() : - TQSqlCursor( "invoiceitem" ) + TQSqlCursor( "invoiceitem" ) { - TQSqlFieldInfo productName( "productname", TQVariant::String ); - append( productName ); - setCalculated( productName.name(), TRUE ); + TQSqlFieldInfo productName( "productname", TQVariant::String ); + append( productName ); + setCalculated( productName.name(), TRUE ); - TQSqlFieldInfo productPrice( "price", TQVariant::Double ); - append( productPrice ); - setCalculated( productPrice.name(), TRUE ); + TQSqlFieldInfo productPrice( "price", TQVariant::Double ); + append( productPrice ); + setCalculated( productPrice.name(), TRUE ); - TQSqlFieldInfo productCost( "cost", TQVariant::Double ); - append( productCost ); - setCalculated( productCost.name(), TRUE ); + TQSqlFieldInfo productCost( "cost", TQVariant::Double ); + append( productCost ); + setCalculated( productCost.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=" + - field( "pricesid" )->value().toString() ); - if ( query.next() ) - return query.value( 0 ); + TQSqlQuery query( "SELECT name FROM prices WHERE id=" + + field( "pricesid" )->value().toString() ); + if ( query.next() ) + return query.value( 0 ); } else if ( name == "price" ) { - TQSqlQuery query( "SELECT price FROM prices WHERE id=" + - field( "pricesid" )->value().toString() ); - if ( query.next() ) - return query.value( 0 ); + TQSqlQuery query( "SELECT price FROM prices WHERE id=" + + field( "pricesid" )->value().toString() ); + if ( query.next() ) + return query.value( 0 ); } else if ( name == "cost" ) { - TQSqlQuery query( "SELECT price FROM prices WHERE id=" + - field( "pricesid" )->value().toString() ); - if ( query.next() ) - return TQVariant( query.value( 0 ).toDouble() * - value( "quantity").toDouble() ); + TQSqlQuery query( "SELECT price FROM prices WHERE id=" + + field( "pricesid" )->value().toString() ); + if ( query.next() ) + return TQVariant( query.value( 0 ).toDouble() * + value( "quantity").toDouble() ); } return TQVariant( TQString::null ); @@ -96,17 +96,17 @@ int main( int argc, char *argv[] ) if ( createConnections() ) { InvoiceItemCursor invoiceItemCursor; - TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); + TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); app.setMainWidget( invoiceItemTable ); - invoiceItemTable->addColumn( "productname", "Product" ); - invoiceItemTable->addColumn( "price", "Price" ); - invoiceItemTable->addColumn( "quantity", "Quantity" ); - invoiceItemTable->addColumn( "cost", "Cost" ); - invoiceItemTable->addColumn( "paiddate", "Paid" ); + invoiceItemTable->addColumn( "productname", "Product" ); + invoiceItemTable->addColumn( "price", "Price" ); + invoiceItemTable->addColumn( "quantity", "Quantity" ); + invoiceItemTable->addColumn( "cost", "Cost" ); + invoiceItemTable->addColumn( "paiddate", "Paid" ); - invoiceItemTable->refresh(); + invoiceItemTable->refresh(); invoiceItemTable->show(); return app.exec(); diff --git a/doc/html/sql-overview-subclass4-main-h.html b/doc/html/sql-overview-subclass4-main-h.html index dc34c0f9a..2d17c75f0 100644 --- a/doc/html/sql-overview-subclass4-main-h.html +++ b/doc/html/sql-overview-subclass4-main-h.html @@ -43,13 +43,13 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" class TQSqlRecord; -class InvoiceItemCursor : public TQSqlCursor +class InvoiceItemCursor : public TQSqlCursor { public: InvoiceItemCursor(); diff --git a/doc/html/sql-overview-subclass5-main-cpp.html b/doc/html/sql-overview-subclass5-main-cpp.html index 2740f677a..6a76f303f 100644 --- a/doc/html/sql-overview-subclass5-main-cpp.html +++ b/doc/html/sql-overview-subclass5-main-cpp.html @@ -43,60 +43,60 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include "main.h" -#include <ntqdatatable.h> +#include <tqdatatable.h> InvoiceItemCursor::InvoiceItemCursor() : - TQSqlCursor( "invoiceitem" ) + TQSqlCursor( "invoiceitem" ) { - TQSqlFieldInfo productName( "productname", TQVariant::String ); - append( productName ); - setCalculated( productName.name(), TRUE ); + TQSqlFieldInfo productName( "productname", TQVariant::String ); + append( productName ); + setCalculated( productName.name(), TRUE ); - TQSqlFieldInfo productPrice( "price", TQVariant::Double ); - append( productPrice ); - setCalculated( productPrice.name(), TRUE ); + TQSqlFieldInfo productPrice( "price", TQVariant::Double ); + append( productPrice ); + setCalculated( productPrice.name(), TRUE ); - TQSqlFieldInfo productCost( "cost", TQVariant::Double ); - append( productCost ); - setCalculated( productCost.name(), TRUE ); + TQSqlFieldInfo productCost( "cost", TQVariant::Double ); + append( productCost ); + setCalculated( productCost.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=" + - field( "pricesid" )->value().toString() ); - if ( query.next() ) - return query.value( 0 ); + TQSqlQuery query( "SELECT name FROM prices WHERE id=" + + field( "pricesid" )->value().toString() ); + if ( query.next() ) + return query.value( 0 ); } else if ( name == "price" ) { - TQSqlQuery query( "SELECT price FROM prices WHERE id=" + - field( "pricesid" )->value().toString() ); - if ( query.next() ) - return query.value( 0 ); + TQSqlQuery query( "SELECT price FROM prices WHERE id=" + + field( "pricesid" )->value().toString() ); + if ( query.next() ) + return query.value( 0 ); } else if ( name == "cost" ) { - TQSqlQuery query( "SELECT price FROM prices WHERE id=" + - field( "pricesid" )->value().toString() ); - if ( query.next() ) - return TQVariant( query.value( 0 ).toDouble() * - value( "quantity").toDouble() ); + TQSqlQuery query( "SELECT price FROM prices WHERE id=" + + field( "pricesid" )->value().toString() ); + if ( query.next() ) + return TQVariant( query.value( 0 ).toDouble() * + value( "quantity").toDouble() ); } return TQVariant( TQString::null ); } -TQSqlRecord *InvoiceItemCursor::primeInsert() +TQSqlRecord *InvoiceItemCursor::primeInsert() { - TQSqlRecord *buffer = editBuffer(); - TQSqlQuery query( "SELECT NEXTVAL( 'invoiceitem_seq' )" ); - if ( query.next() ) - buffer->setValue( "id", query.value( 0 ) ); - buffer->setValue( "paiddate", TQDate::currentDate() ); - buffer->setValue( "quantity", 1 ); + TQSqlRecord *buffer = editBuffer(); + TQSqlQuery query( "SELECT NEXTVAL( 'invoiceitem_seq' )" ); + if ( query.next() ) + buffer->setValue( "id", query.value( 0 ) ); + buffer->setValue( "paiddate", TQDate::currentDate() ); + buffer->setValue( "quantity", 1 ); return buffer; } @@ -109,17 +109,17 @@ int main( int argc, char *argv[] ) if ( createConnections() ) { InvoiceItemCursor invoiceItemCursor; - TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); + TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); app.setMainWidget( invoiceItemTable ); - invoiceItemTable->addColumn( "productname", "Product" ); - invoiceItemTable->addColumn( "price", "Price" ); - invoiceItemTable->addColumn( "quantity", "Quantity" ); - invoiceItemTable->addColumn( "cost", "Cost" ); - invoiceItemTable->addColumn( "paiddate", "Paid" ); + invoiceItemTable->addColumn( "productname", "Product" ); + invoiceItemTable->addColumn( "price", "Price" ); + invoiceItemTable->addColumn( "quantity", "Quantity" ); + invoiceItemTable->addColumn( "cost", "Cost" ); + invoiceItemTable->addColumn( "paiddate", "Paid" ); - invoiceItemTable->refresh(); + invoiceItemTable->refresh(); invoiceItemTable->show(); return app.exec(); diff --git a/doc/html/sql-overview-subclass5-main-h.html b/doc/html/sql-overview-subclass5-main-h.html index c703345fc..ffa4eba23 100644 --- a/doc/html/sql-overview-subclass5-main-h.html +++ b/doc/html/sql-overview-subclass5-main-h.html @@ -44,17 +44,17 @@ body { background: #ffffff; color: black; } #include <ntqapplication.h> #include <ntqdatetime.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" class TQSqlRecord; -class InvoiceItemCursor : public TQSqlCursor +class InvoiceItemCursor : public TQSqlCursor { public: InvoiceItemCursor(); - TQSqlRecord *primeInsert(); + TQSqlRecord *primeInsert(); protected: TQVariant calculateField( const TQString & name ); }; diff --git a/doc/html/sql-overview-table1-main-cpp.html b/doc/html/sql-overview-table1-main-cpp.html index f69f0ac53..ded5c0027 100644 --- a/doc/html/sql-overview-table1-main-cpp.html +++ b/doc/html/sql-overview-table1-main-cpp.html @@ -43,9 +43,9 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> -#include <ntqdatatable.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> +#include <tqdatatable.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -53,10 +53,10 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv ); if ( createConnections() ) { - TQSqlCursor staffCursor( "staff" ); - TQDataTable *staffTable = new TQDataTable( &staffCursor, TRUE ); + TQSqlCursor staffCursor( "staff" ); + TQDataTable *staffTable = new TQDataTable( &staffCursor, TRUE ); app.setMainWidget( staffTable ); - staffTable->refresh(); + staffTable->refresh(); staffTable->show(); return app.exec(); diff --git a/doc/html/sql-overview-table2-main-cpp.html b/doc/html/sql-overview-table2-main-cpp.html index cc6f8a1fa..0e9151e7b 100644 --- a/doc/html/sql-overview-table2-main-cpp.html +++ b/doc/html/sql-overview-table2-main-cpp.html @@ -43,9 +43,9 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> -#include <ntqdatatable.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> +#include <tqdatatable.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -53,20 +53,20 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv ); if ( createConnections() ) { - TQSqlCursor staffCursor( "staff" ); + TQSqlCursor staffCursor( "staff" ); - TQDataTable *staffTable = new TQDataTable( &staffCursor ); + TQDataTable *staffTable = new TQDataTable( &staffCursor ); app.setMainWidget( staffTable ); - staffTable->addColumn( "forename", "Forename" ); - staffTable->addColumn( "surname", "Surname" ); - staffTable->addColumn( "salary", "Annual Salary" ); + staffTable->addColumn( "forename", "Forename" ); + staffTable->addColumn( "surname", "Surname" ); + staffTable->addColumn( "salary", "Annual Salary" ); TQStringList order = TQStringList() << "surname" << "forename"; - staffTable->setSort( order ); + staffTable->setSort( order ); - staffTable->refresh(); + staffTable->refresh(); staffTable->show(); return app.exec(); diff --git a/doc/html/sql-overview-table3-main-cpp.html b/doc/html/sql-overview-table3-main-cpp.html index 7fe78b0e0..0938101ac 100644 --- a/doc/html/sql-overview-table3-main-cpp.html +++ b/doc/html/sql-overview-table3-main-cpp.html @@ -43,18 +43,18 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include "main.h" -#include <ntqdatatable.h> +#include <tqdatatable.h> StatusPicker::StatusPicker( TQWidget *parent, const char *name ) : TQComboBox( parent, name ) { - TQSqlCursor cur( "status" ); - cur.select( cur.index( "name" ) ); + TQSqlCursor cur( "status" ); + cur.select( cur.index( "name" ) ); int i = 0; - while ( cur.next() ) { - insertItem( cur.value( "name" ).toString(), i ); - index2id[i] = cur.value( "id" ).toInt(); + while ( cur.next() ) { + insertItem( cur.value( "name" ).toString(), i ); + index2id[i] = cur.value( "id" ).toInt(); i++; } } @@ -79,10 +79,10 @@ void StatusPicker::setStatusId( int statusid ) -TQWidget *CustomSqlEditorFactory::createEditor( - TQWidget *parent, const TQSqlField *field ) +TQWidget *CustomSqlEditorFactory::createEditor( + TQWidget *parent, const TQSqlField *field ) { - if ( field->name() == "statusid" ) { + if ( field->name() == "statusid" ) { TQWidget *editor = new StatusPicker( parent ); return editor; } @@ -96,26 +96,26 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv ); if ( createConnections() ) { - TQSqlCursor staffCursor( "staff" ); + TQSqlCursor staffCursor( "staff" ); - TQDataTable *staffTable = new TQDataTable( &staffCursor ); - TQSqlPropertyMap *propMap = new TQSqlPropertyMap(); + TQDataTable *staffTable = new TQDataTable( &staffCursor ); + TQSqlPropertyMap *propMap = new TQSqlPropertyMap(); CustomSqlEditorFactory *editorFactory = new CustomSqlEditorFactory(); - propMap->insert( "StatusPicker", "statusid" ); - staffTable->installPropertyMap( propMap ); - staffTable->installEditorFactory( editorFactory ); + propMap->insert( "StatusPicker", "statusid" ); + staffTable->installPropertyMap( propMap ); + staffTable->installEditorFactory( editorFactory ); app.setMainWidget( staffTable ); - staffTable->addColumn( "forename", "Forename" ); - staffTable->addColumn( "surname", "Surname" ); - staffTable->addColumn( "salary", "Annual Salary" ); - staffTable->addColumn( "statusid", "Status" ); + staffTable->addColumn( "forename", "Forename" ); + staffTable->addColumn( "surname", "Surname" ); + staffTable->addColumn( "salary", "Annual Salary" ); + staffTable->addColumn( "statusid", "Status" ); TQStringList order = TQStringList() << "surname" << "forename"; - staffTable->setSort( order ); + staffTable->setSort( order ); - staffTable->refresh(); + staffTable->refresh(); staffTable->show(); return app.exec(); diff --git a/doc/html/sql-overview-table3-main-h.html b/doc/html/sql-overview-table3-main-h.html index d77aad816..fcd75c362 100644 --- a/doc/html/sql-overview-table3-main-h.html +++ b/doc/html/sql-overview-table3-main-h.html @@ -45,10 +45,10 @@ body { background: #ffffff; color: black; } #include <ntqapplication.h> #include <ntqcombobox.h> #include <ntqmap.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> -#include <ntqsqleditorfactory.h> -#include <ntqsqlpropertymap.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> +#include <tqsqleditorfactory.h> +#include <tqsqlpropertymap.h> #include "../connection.h" class StatusPicker : public TQComboBox @@ -64,11 +64,11 @@ class StatusPicker : public TQComboBox }; -class CustomSqlEditorFactory : public TQSqlEditorFactory +class CustomSqlEditorFactory : public TQSqlEditorFactory { TQ_OBJECT public: - TQWidget *createEditor( TQWidget *parent, const TQSqlField *field ); + TQWidget *createEditor( TQWidget *parent, const TQSqlField *field ); }; diff --git a/doc/html/sql-overview-table4-main-cpp.html b/doc/html/sql-overview-table4-main-cpp.html index 2ceb1bd84..4337617d8 100644 --- a/doc/html/sql-overview-table4-main-cpp.html +++ b/doc/html/sql-overview-table4-main-cpp.html @@ -48,13 +48,13 @@ body { background: #ffffff; color: black; } StatusPicker::StatusPicker( TQWidget *parent, const char *name ) : TQComboBox( parent, name ) { - TQSqlCursor cur( "status" ); - cur.select( cur.index( "name" ) ); + TQSqlCursor cur( "status" ); + cur.select( cur.index( "name" ) ); int i = 0; - while ( cur.next() ) { - insertItem( cur.value( "name" ).toString(), i ); - index2id[i] = cur.value( "id" ).toInt(); + while ( cur.next() ) { + insertItem( cur.value( "name" ).toString(), i ); + index2id[i] = cur.value( "id" ).toInt(); i++; } } @@ -78,30 +78,30 @@ void StatusPicker::setStatusId( int statusid ) } -void CustomTable::paintField( TQPainter * p, const TQSqlField* field, +void CustomTable::paintField( TQPainter * p, const TQSqlField* field, const TQRect & cr, bool b) { if ( !field ) return; - if ( field->name() == "statusid" ) { - TQSqlQuery query( "SELECT name FROM status WHERE id=" + - field->value().toString() ); + if ( field->name() == "statusid" ) { + TQSqlQuery query( "SELECT name FROM status WHERE id=" + + field->value().toString() ); TQString text; - if ( query.next() ) { - text = query.value( 0 ).toString(); + if ( query.next() ) { + text = query.value( 0 ).toString(); } p->drawText( 2,2, cr.width()-4, cr.height()-4, fieldAlignment( field ), text ); } else { - TQDataTable::paintField( p, field, cr, b) ; + TQDataTable::paintField( p, field, cr, b) ; } } -TQWidget *CustomSqlEditorFactory::createEditor( - TQWidget *parent, const TQSqlField *field ) +TQWidget *CustomSqlEditorFactory::createEditor( + TQWidget *parent, const TQSqlField *field ) { - if ( field->name() == "statusid" ) { + if ( field->name() == "statusid" ) { TQWidget *editor = new StatusPicker( parent ); return editor; } @@ -115,26 +115,26 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv ); if ( createConnections() ) { - TQSqlCursor staffCursor( "staff" ); + TQSqlCursor staffCursor( "staff" ); CustomTable *staffTable = new CustomTable( &staffCursor ); - TQSqlPropertyMap *propMap = new TQSqlPropertyMap(); + TQSqlPropertyMap *propMap = new TQSqlPropertyMap(); CustomSqlEditorFactory *editorFactory = new CustomSqlEditorFactory(); - propMap->insert( "StatusPicker", "statusid" ); - staffTable->installPropertyMap( propMap ); - staffTable->installEditorFactory( editorFactory ); + propMap->insert( "StatusPicker", "statusid" ); + staffTable->installPropertyMap( propMap ); + staffTable->installEditorFactory( editorFactory ); app.setMainWidget( staffTable ); - staffTable->addColumn( "forename", "Forename" ); - staffTable->addColumn( "surname", "Surname" ); - staffTable->addColumn( "salary", "Annual Salary" ); - staffTable->addColumn( "statusid", "Status" ); + staffTable->addColumn( "forename", "Forename" ); + staffTable->addColumn( "surname", "Surname" ); + staffTable->addColumn( "salary", "Annual Salary" ); + staffTable->addColumn( "statusid", "Status" ); TQStringList order = TQStringList() << "surname" << "forename"; - staffTable->setSort( order ); + staffTable->setSort( order ); - staffTable->refresh(); + staffTable->refresh(); staffTable->show(); return app.exec(); diff --git a/doc/html/sql-overview-table4-main-h.html b/doc/html/sql-overview-table4-main-h.html index cc1825e70..407f40432 100644 --- a/doc/html/sql-overview-table4-main-h.html +++ b/doc/html/sql-overview-table4-main-h.html @@ -46,11 +46,11 @@ body { background: #ffffff; color: black; } #include <ntqcombobox.h> #include <ntqmap.h> #include <ntqpainter.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> -#include <ntqsqleditorfactory.h> -#include <ntqsqlpropertymap.h> -#include <ntqdatatable.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> +#include <tqsqleditorfactory.h> +#include <tqsqlpropertymap.h> +#include <tqdatatable.h> #include "../connection.h" class StatusPicker : public TQComboBox @@ -66,25 +66,25 @@ private: }; -class CustomTable : public TQDataTable +class CustomTable : public TQDataTable { TQ_OBJECT public: CustomTable( - TQSqlCursor *cursor, bool autoPopulate = FALSE, + TQSqlCursor *cursor, bool autoPopulate = FALSE, TQWidget * parent = 0, const char * name = 0 ) : - TQDataTable( cursor, autoPopulate, parent, name ) {} + TQDataTable( cursor, autoPopulate, parent, name ) {} void paintField( - TQPainter * p, const TQSqlField* field, const TQRect & cr, bool ); + TQPainter * p, const TQSqlField* field, const TQRect & cr, bool ); }; -class CustomSqlEditorFactory : public TQSqlEditorFactory +class CustomSqlEditorFactory : public TQSqlEditorFactory { TQ_OBJECT public: - TQWidget *createEditor( TQWidget *parent, const TQSqlField *field ); + TQWidget *createEditor( TQWidget *parent, const TQSqlField *field ); };

  • diff --git a/doc/html/sql-overview-update-main-cpp.html b/doc/html/sql-overview-update-main-cpp.html index c5bf67f0c..b213e4afc 100644 --- a/doc/html/sql-overview-update-main-cpp.html +++ b/doc/html/sql-overview-update-main-cpp.html @@ -43,8 +43,8 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include <ntqapplication.h> -#include <ntqsqldatabase.h> -#include <ntqsqlcursor.h> +#include <tqsqldatabase.h> +#include <tqsqlcursor.h> #include "../connection.h" int main( int argc, char *argv[] ) @@ -52,14 +52,14 @@ int main( int argc, char *argv[] ) TQApplication app( argc, argv, FALSE ); if ( createConnections() ) { - TQSqlCursor cur( "prices" ); - cur.select( "id=202" ); - if ( cur.next() ) { - TQSqlRecord *buffer = cur.primeUpdate(); - double price = buffer->value( "price" ).toDouble(); + TQSqlCursor cur( "prices" ); + cur.select( "id=202" ); + if ( cur.next() ) { + TQSqlRecord *buffer = cur.primeUpdate(); + double price = buffer->value( "price" ).toDouble(); double newprice = price * 1.05; - buffer->setValue( "price", newprice ); - cur.update(); + buffer->setValue( "price", newprice ); + cur.update(); } } diff --git a/doc/html/sql.html b/doc/html/sql.html index 5fda741ff..e0b81f3d4 100644 --- a/doc/html/sql.html +++ b/doc/html/sql.html @@ -35,26 +35,26 @@ body { background: #ffffff; color: black; }

    - - - -
    TQSql -TQSqlCursor -TQSqlDatabase -TQSqlDriver -TQSqlDriverPlugin +TQSql +TQSqlCursor +TQSqlDatabase +TQSqlDriver +TQSqlDriverPlugin
    TQSqlEditorFactory -TQSqlError -TQSqlField -TQSqlFieldInfo -TQSqlForm +TQSqlEditorFactory +TQSqlError +TQSqlField +TQSqlFieldInfo +TQSqlForm
    TQSqlIndex -TQSqlPropertyMap -TQSqlQuery -TQSqlRecord -TQSqlRecordInfo +TQSqlIndex +TQSqlPropertyMap +TQSqlQuery +TQSqlRecord +TQSqlRecordInfo
    TQSqlResult -TQSqlSelectCursor +TQSqlResult +TQSqlSelectCursor See also: Supported Drivers

    @@ -144,7 +144,7 @@ your TQt applications.

    This overview assumes that you have at least a basic knowledge of SQL. You should be able to understand simple SELECT, INSERT, UPDATE -and DELETE commands. Although the TQSqlCursor class provides an +and DELETE commands. Although the TQSqlCursor class provides an interface to database browsing and editing that does not require a knowledge of SQL, a basic understanding of SQL is highly recommended. A standard text covering SQL databases is An Introduction to Database Systems (7th ed.) by C. J. Date, ISBN 0201385902. @@ -159,22 +159,22 @@ handle foreign key lookups.

    SQL Module Architecture. This describes how the classes fit together.

    Connecting to Databases. -This section explains how to set up database connections using the TQSqlDatabase class. +This section explains how to set up database connections using the TQSqlDatabase class.

    Executing SQL Commands. This section demonstrates how to issue the standard data manipulation commands, SELECT, INSERT, UPDATE and DELETE on tables in the database (although any valid SQL statement can be sent to the -database). The focus is purely on database interaction using TQSqlQuery. +database). The focus is purely on database interaction using TQSqlQuery.

    Using Cursors. This section explains -how to use the TQSqlCursor class which provides a simpler API than the -raw SQL used with TQSqlQuery. +how to use the TQSqlCursor class which provides a simpler API than the +raw SQL used with TQSqlQuery.

    Data-Aware Widgets. This section shows how to programmatically link your database to the user interface. In -this section we introduce the TQDataTable, TQSqlForm, TQSqlPropertyMap and TQSqlEditorFactory classes and demonstrate how to +this section we introduce the TQDataTable, TQSqlForm, TQSqlPropertyMap and TQSqlEditorFactory classes and demonstrate how to use custom data-aware widgets. TQt Designer provides an easy visual way of achieving the same thing. See the TQt Designer manual, -TQDataBrowser and TQDataView for more information. +TQDataBrowser and TQDataView for more information.

    Subclassing TQSqlCursor. This section gives examples of subclassing TQSqlCursor. Subclassing can be used to provide default and calculated values for fields (such as @@ -188,20 +188,20 @@ e.g. showing names rather than ids of foreign keys.

    The SQL classes are divided into three layers:

    User Interface Layer. These classes provide data-aware widgets that can be connected to tables or views in the database (by using a -TQSqlCursor as a data source). End users can interact directly with +TQSqlCursor as a data source). End users can interact directly with these widgets to browse or edit data. TQt Designer is fully integrated with the SQL classes and can be used to create data-aware forms. The data-aware widgets can also be programmed directly with your own C++ code. The classes that support -this layer include TQSqlEditorFactory, TQSqlForm, TQSqlPropertyMap, TQDataTable, TQDataBrowser and TQDataView. +this layer include TQSqlEditorFactory, TQSqlForm, TQSqlPropertyMap, TQDataTable, TQDataBrowser and TQDataView.

    SQL API Layer. These classes provide access to databases. -Connections are made using the TQSqlDatabase class. Database -interaction is achieved either by using the TQSqlQuery class and -executing SQL commands directly or by using the higher level TQSqlCursor class which composes SQL commands automatically. In -addition to TQSqlDatabase, TQSqlCursor and TQSqlQuery, the SQL -API layer is supported by TQSqlError, TQSqlField, TQSqlFieldInfo, -TQSqlIndex, TQSqlRecord and TQSqlRecordInfo. -

    Driver Layer. This comprises three classes, TQSqlResult, TQSqlDriver and TQSqlDriverFactoryInterface. This layer provides the +Connections are made using the TQSqlDatabase class. Database +interaction is achieved either by using the TQSqlQuery class and +executing SQL commands directly or by using the higher level TQSqlCursor class which composes SQL commands automatically. In +addition to TQSqlDatabase, TQSqlCursor and TQSqlQuery, the SQL +API layer is supported by TQSqlError, TQSqlField, TQSqlFieldInfo, +TQSqlIndex, TQSqlRecord and TQSqlRecordInfo. +

    Driver Layer. This comprises three classes, TQSqlResult, TQSqlDriver and TQSqlDriverFactoryInterface. This layer provides the low level bridge between the database and the SQL classes. This layer is documented separately since it is only relevant to driver writers, and is rarely used in standard @@ -214,17 +214,17 @@ the Plugins.

    The SQL driver documentation describes how to build plugins for specific database management systems.

    Once a plugin is built, TQt will automatically load it, and the driver -will be available for use by TQSqlDatabase (see TQSqlDatabase::drivers() +will be available for use by TQSqlDatabase (see TQSqlDatabase::drivers() for more information).

    Connecting to Databases

    At least one database connection must be created and opened before the -TQSqlQuery or TQSqlCursor classes can be used. -

    If the application only needs a single database connection, the TQSqlDatabase class can create a connection which is used by default +TQSqlQuery or TQSqlCursor classes can be used. +

    If the application only needs a single database connection, the TQSqlDatabase class can create a connection which is used by default for all SQL operations. If multiple database connections are required these can easily be set up. -

    TQSqlDatabase requires the ntqsqldatabase.h header file. +

    TQSqlDatabase requires the tqsqldatabase.h header file.

    Connecting to a Single Database

    @@ -234,20 +234,20 @@ connection.

        #include <ntqapplication.h>
    -    #include <ntqsqldatabase.h>
    +    #include <tqsqldatabase.h>
         #include "../connection.h"
     
         int main( int argc, char *argv[] )
         {
             TQApplication app( argc, argv, FALSE );
     
    -        TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER );
    -        defaultDB->setDatabaseName( DB_SALES_DBNAME );
    -        defaultDB->setUserName( DB_SALES_USER );
    -        defaultDB->setPassword( DB_SALES_PASSWD );
    -        defaultDB->setHostName( DB_SALES_HOST );
    +        TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER );
    +        defaultDB->setDatabaseName( DB_SALES_DBNAME );
    +        defaultDB->setUserName( DB_SALES_USER );
    +        defaultDB->setPassword( DB_SALES_PASSWD );
    +        defaultDB->setHostName( DB_SALES_HOST );
     
    -        if ( defaultDB->open() ) {
    +        if ( defaultDB->open() ) {
                 // Database successfully opened; we can now issue SQL commands.
             }
     
    @@ -255,7 +255,7 @@ connection.
         }
     

    From sql/overview/connect1/main.cpp

    -

    First we activate the driver by calling TQSqlDatabase::addDatabase(), +

    First we activate the driver by calling TQSqlDatabase::addDatabase(), passing the name of the driver we wish to use for this connection. At the time of writing the available drivers are: TQODBC3 (Open Database Connectivity, includes Microsoft SQL Server support), TQOCI8 (Oracle 8 and 9), @@ -273,12 +273,12 @@ to setDatbaseName(). When connecting to ODBC data sources the Data Source Name (DSN) should be used in the setDatabaseName() call.

    Third we call open() to open the database and give us access to the data. If this call fails it will return FALSE; error information can -be obtained from TQSqlDatabase::lastError(). +be obtained from TQSqlDatabase::lastError().

    Connecting to Multiple Databases

    Connecting to multiple databases is achieved using the two argument form -of TQSqlDatabase::addDatabase() where the second argument is a unique +of TQSqlDatabase::addDatabase() where the second argument is a unique identifier distinguishing the connection.

    In the example below we have moved the connections into their own function, createConnections(), and added some basic error handling. @@ -302,45 +302,45 @@ bool createConnections(); function in connection.h.

    -

        #include <ntqsqldatabase.h>
    +
        #include <tqsqldatabase.h>
         #include "connection.h"
     
         bool createConnections()
         {
     
    -        TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER );
    -        defaultDB->setDatabaseName( DB_SALES_DBNAME );
    -        defaultDB->setUserName( DB_SALES_USER );
    -        defaultDB->setPassword( DB_SALES_PASSWD );
    -        defaultDB->setHostName( DB_SALES_HOST );
    -        if ( ! defaultDB->open() ) {
    -            tqWarning( "Failed to open sales database: " + defaultDB->lastError().text() );
    +        TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER );
    +        defaultDB->setDatabaseName( DB_SALES_DBNAME );
    +        defaultDB->setUserName( DB_SALES_USER );
    +        defaultDB->setPassword( DB_SALES_PASSWD );
    +        defaultDB->setHostName( DB_SALES_HOST );
    +        if ( ! defaultDB->open() ) {
    +            tqWarning( "Failed to open sales database: " + defaultDB->lastError().text() );
                 return FALSE;
             }
     
    -        TQSqlDatabase *oracle = TQSqlDatabase::addDatabase( DB_ORDERS_DRIVER, "ORACLE" );
    -        oracle->setDatabaseName( DB_ORDERS_DBNAME );
    -        oracle->setUserName( DB_ORDERS_USER );
    -        oracle->setPassword( DB_ORDERS_PASSWD );
    -        oracle->setHostName( DB_ORDERS_HOST );
    -        if ( ! oracle->open() ) {
    -            tqWarning( "Failed to open orders database: " + oracle->lastError().text() );
    +        TQSqlDatabase *oracle = TQSqlDatabase::addDatabase( DB_ORDERS_DRIVER, "ORACLE" );
    +        oracle->setDatabaseName( DB_ORDERS_DBNAME );
    +        oracle->setUserName( DB_ORDERS_USER );
    +        oracle->setPassword( DB_ORDERS_PASSWD );
    +        oracle->setHostName( DB_ORDERS_HOST );
    +        if ( ! oracle->open() ) {
    +            tqWarning( "Failed to open orders database: " + oracle->lastError().text() );
                 return FALSE;
             }
     
    -        TQSqlQuery q(TQString::null, defaultDB);
    -        q.exec("create table people (id integer primary key, name char(40))");
    -        q.exec("create table staff (id integer primary key, forename char(40), "
    +        TQSqlQuery q(TQString::null, defaultDB);
    +        q.exec("create table people (id integer primary key, name char(40))");
    +        q.exec("create table staff (id integer primary key, forename char(40), "
                    "surname char(40), salary float, statusid integer)");
    -        q.exec("create table status (id integer primary key, name char(30))");
    -        q.exec("create table creditors (id integer primary key, forename char(40), "
    +        q.exec("create table status (id integer primary key, name char(30))");
    +        q.exec("create table creditors (id integer primary key, forename char(40), "
                    "surname char(40), city char(30))");
    -        q.exec("create table prices (id integer primary key, name char(40), price float)");
    -        q.exec("create table invoiceitem (id integer primary key, "
    +        q.exec("create table prices (id integer primary key, name char(40), price float)");
    +        q.exec("create table invoiceitem (id integer primary key, "
                    "pricesid integer, quantity integer, paiddate date)");
     
    -        TQSqlQuery q2(TQString::null, oracle);
    -        q2.exec("create table people (id integer primary key, name char(40))");
    +        TQSqlQuery q2(TQString::null, oracle);
    +        q2.exec("create table people (id integer primary key, name char(40))");
     
             return TRUE;
         }
    @@ -351,7 +351,7 @@ function in connection.h.
     
     
     
        #include <ntqapplication.h>
    -    #include <ntqsqldatabase.h>
    +    #include <tqsqldatabase.h>
         #include "../connection.h"
     
         int main( int argc, char *argv[] )
    @@ -360,7 +360,7 @@ function in connection.h.
     
             if ( createConnections() ) {
                 // Databases successfully opened; get pointers to them:
    -            TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
    +            TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
                 // Now we can now issue SQL commands to the oracle connection
                 // or to the default connection
             }
    @@ -369,7 +369,7 @@ function in connection.h.
         }
     

    From sql/overview/create_connections/main.cpp

    -

    The static function TQSqlDatabase::database() can be called from +

    The static function TQSqlDatabase::database() can be called from anywhere to provide a pointer to a database connection. If we call it without a parameter it will return the default connection. If called with the identifier we've used for a connection, e.g. "ORACLE", in the @@ -381,40 +381,40 @@ preview correctly in TQt Designer will not run unless you implement your own database connections function.

    Note that in the code above the ODBC connection was not named and is -therefore used as the default connection. TQSqlDatabase maintains +therefore used as the default connection. TQSqlDatabase maintains ownership of the pointers returned by the addDatabase() static function. To remove a database from the list of maintained -connections, first close the database with TQSqlDatabase::close(), and +connections, first close the database with TQSqlDatabase::close(), and then remove it using the static function -TQSqlDatabase::removeDatabase(). +TQSqlDatabase::removeDatabase().

    -

    Executing SQL Commands Using TQSqlQuery +

    Executing SQL Commands Using TQSqlQuery

    -

    The TQSqlQuery class provides an interface for executing SQL commands. +

    The TQSqlQuery class provides an interface for executing SQL commands. It also has functions for navigating through the result sets of SELECT queries and for retrieving individual records and field values. -

    The TQSqlCursor class described in the next section inherits from TQSqlQuery and provides a higher level interface that composes SQL -commands for us. TQSqlCursor is particularly easy to integrate with +

    The TQSqlCursor class described in the next section inherits from TQSqlQuery and provides a higher level interface that composes SQL +commands for us. TQSqlCursor is particularly easy to integrate with on-screen widgets. Programmers unfamiliar with SQL can safely skip this -section and use the TQSqlCursor class covered in +section and use the TQSqlCursor class covered in "Using TQSqlCursor".

    Transactions

    If the underlying database engine supports transactions -TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) will return TRUE. -You can use TQSqlDatabase::transaction() to initiate a transaction, +TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) will return TRUE. +You can use TQSqlDatabase::transaction() to initiate a transaction, followed by the SQL commands you want to execute within the context of -the transaction, and then either TQSqlDatabase::commit() or -TQSqlDatabase::rollback(). +the transaction, and then either TQSqlDatabase::commit() or +TQSqlDatabase::rollback().

    Basic Browsing

        #include <ntqapplication.h>
    -    #include <ntqsqldatabase.h>
    -    #include <ntqsqlquery.h>
    +    #include <tqsqldatabase.h>
    +    #include <tqsqlquery.h>
         #include "../connection.h"
     
         int main( int argc, char *argv[] )
    @@ -422,16 +422,16 @@ the transaction, and then either TQSqlDatab
             TQApplication app( argc, argv, FALSE );
     
             if ( createConnections() ) {
    -            TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
    +            TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
                 // Copy data from the oracle database to the ODBC (default)
                 // database
    -            TQSqlQuery target;
    -            TQSqlQuery query( "SELECT id, name FROM people", oracledb );
    -            if ( query.isActive() ) {
    -                while ( query.next() ) {
    -                    target.exec( "INSERT INTO people ( id, name ) VALUES ( " +
    -                                  query.value(0).toString() +
    -                                  ", '" + query.value(1).toString() +  "' )" );
    +            TQSqlQuery target;
    +            TQSqlQuery query( "SELECT id, name FROM people", oracledb );
    +            if ( query.isActive() ) {
    +                while ( query.next() ) {
    +                    target.exec( "INSERT INTO people ( id, name ) VALUES ( " +
    +                                  query.value(0).toString() +
    +                                  ", '" + query.value(1).toString() +  "' )" );
                     }
                 }
             }
    @@ -441,7 +441,7 @@ the transaction, and then either TQSqlDatab
     

    From sql/overview/basicbrowsing/main.cpp

    In the example above we've added an additional header file, -ntqsqlquery.h. The first query we create, target, uses the default +tqsqlquery.h. The first query we create, target, uses the default database and is initially empty. For the second query, q, we specify the "ORACLE" database that we want to retrieve records from. Both the database connections were set up in the createConnections() function we @@ -451,20 +451,20 @@ to see if the query executed successfully. The next() function is used to iterate through the query results. The value() function returns the contents of fields as TQVariants. The insertions are achieved by creating and executing queries against the default -database using the target TQSqlQuery. +database using the target TQSqlQuery.

    Note that this example and all the other examples in this document use the tables defined in the Example Tables section.

                int count = 0;
    -            if ( query.isActive() ) {
    -                while ( query.next() ) {
    -                    target.exec( "INSERT INTO people ( id, name ) VALUES ( " +
    -                                  query.value(0).toString() +
    -                                  ", '" + query.value(1).toString() +  "' )" );
    -                    if ( target.isActive() )
    -                        count += target.numRowsAffected();
    +            if ( query.isActive() ) {
    +                while ( query.next() ) {
    +                    target.exec( "INSERT INTO people ( id, name ) VALUES ( " +
    +                                  query.value(0).toString() +
    +                                  ", '" + query.value(1).toString() +  "' )" );
    +                    if ( target.isActive() )
    +                        count += target.numRowsAffected();
                     }
                 }
     

    From sql/overview/basicbrowsing2/main.cpp @@ -488,8 +488,8 @@ cannot be determined, e.g. if the query fails. *****************************************************************************/ #include <ntqapplication.h> - #include <ntqsqldatabase.h> - #include <ntqsqlquery.h> + #include <tqsqldatabase.h> + #include <tqsqlquery.h> #include "../connection.h" bool createConnections(); @@ -501,15 +501,15 @@ cannot be determined, e.g. if the query fails. int rows = 0; if ( createConnections() ) { - TQSqlQuery query( "INSERT INTO staff ( id, forename, surname, salary ) " + TQSqlQuery query( "INSERT INTO staff ( id, forename, surname, salary ) " "VALUES ( 1155, 'Ginger', 'Davis', 50000 )" ); - if ( query.isActive() ) rows += query.numRowsAffected() ; + if ( query.isActive() ) rows += query.numRowsAffected() ; - query.exec( "UPDATE staff SET salary=60000 WHERE id=1155" ); - if ( query.isActive() ) rows += query.numRowsAffected() ; + query.exec( "UPDATE staff SET salary=60000 WHERE id=1155" ); + if ( query.isActive() ) rows += query.numRowsAffected() ; - query.exec( "DELETE FROM staff WHERE id=1155" ); - if ( query.isActive() ) rows += query.numRowsAffected() ; + query.exec( "DELETE FROM staff WHERE id=1155" ); + if ( query.isActive() ) rows += query.numRowsAffected() ; } return ( rows == 3 ) ? 0 : 1; @@ -517,7 +517,7 @@ cannot be determined, e.g. if the query fails.

    From sql/overview/basicdatamanip/main.cpp

    This example demonstrates straightforward SQL DML (data manipulation -language) commands. Since we did not specify a database in the TQSqlQuery constructor the default database is used. TQSqlQuery objects +language) commands. Since we did not specify a database in the TQSqlQuery constructor the default database is used. TQSqlQuery objects can also be used to execute SQL DDL (data definition language) commands such as CREATE TABLE and CREATE INDEX.

    @@ -526,7 +526,7 @@ such as CREATE TABLE and CREATE INDEX.

    Once a SELECT query has been executed successfully we have access to the result set of records that matched the query criteria. We have already used one of the navigation functions, next(), which can be -used alone to step sequentially through the records. TQSqlQuery also +used alone to step sequentially through the records. TQSqlQuery also provides first(), last() and prev(). After any of these commands we can check that we are on a valid record by calling isValid().

    We can also navigate to any arbitrary record using seek(). The @@ -536,16 +536,16 @@ size() - 1. Note that not all databases provide the size of a

            if ( createConnections() ) {
    -            TQSqlQuery query( "SELECT id, name FROM people ORDER BY name" );
    -            if ( ! query.isActive() ) return 1; // Query failed
    +            TQSqlQuery query( "SELECT id, name FROM people ORDER BY name" );
    +            if ( ! query.isActive() ) return 1; // Query failed
                 int i;
    -            i = query.size();               // In this example we have 9 records; i == 9.
    -            query.first();                  // Moves to the first record.
    -            i = query.at();                 // i == 0
    -            query.last();                   // Moves to the last record.
    -            i = query.at();                 // i == 8
    -            query.seek( query.size() / 2 ); // Moves to the middle record.
    -            i = query.at();                 // i == 4
    +            i = query.size();               // In this example we have 9 records; i == 9.
    +            query.first();                  // Moves to the first record.
    +            i = query.at();                 // i == 0
    +            query.last();                   // Moves to the last record.
    +            i = query.at();                 // i == 8
    +            query.seek( query.size() / 2 ); // Moves to the middle record.
    +            i = query.at();                 // i == 4
             }
     

    From sql/overview/navigating/main.cpp

    @@ -553,8 +553,8 @@ size() - 1. Note that not all databases provide the size of a

    Not all drivers support size(), but we can interrogate the driver to find out:

    -    TQSqlDatabase* defaultDB = TQSqlDatabase::database();
    -    if ( defaultDB->driver()->hasFeature( TQSqlDriver::QuerySize ) ) {
    +    TQSqlDatabase* defaultDB = TQSqlDatabase::database();
    +    if ( defaultDB->driver()->hasFeature( TQSqlDriver::QuerySize ) ) {
             // TQSqlQuery::size() supported
         }
         else {
    @@ -567,11 +567,11 @@ retrieve data from it.
     

            if ( createConnections() ) {
    -            TQSqlQuery query( "SELECT id, surname FROM staff" );
    -            if ( query.isActive() ) {
    -                while ( query.next() ) {
    -                    tqDebug( query.value(0).toString() + ": " +
    -                            query.value(1).toString() );
    +            TQSqlQuery query( "SELECT id, surname FROM staff" );
    +            if ( query.isActive() ) {
    +                while ( query.next() ) {
    +                    tqDebug( query.value(0).toString() + ": " +
    +                            query.value(1).toString() );
                     }
                 }
             }
    @@ -583,27 +583,27 @@ only navigation function you need is next().
     executed. This can be useful to check that the query you think is being
     executed is the one actually being executed.
     

    -

    Using TQSqlCursor +

    Using TQSqlCursor

    -

    The TQSqlCursor class provides a high level interface to browsing and +

    The TQSqlCursor class provides a high level interface to browsing and editing records in SQL database tables or views without the need to write your own SQL. -

    TQSqlCursor can do almost everything that TQSqlQuery can, with two +

    TQSqlCursor can do almost everything that TQSqlQuery can, with two exceptions. Since cursors represent tables or views within the -database, by default, TQSqlCursor objects retrieve all the fields of +database, by default, TQSqlCursor objects retrieve all the fields of each record in the table or view whenever navigating to a new record. If only some fields are relevant simply confine your processing to those and ignore the others. Or, manually disable the -generation of certain fields using TQSqlRecord::setGenerated(). Another +generation of certain fields using TQSqlRecord::setGenerated(). Another approach is to create a VIEW which only presents the fields you're interested in; but note that some databases do not support editable views. So if you really don't want to retrieve all the fields in the -cursor, then you should use a TQSqlQuery instead, and customize the -query to suit your needs. You can edit records using a TQSqlCursor +cursor, then you should use a TQSqlQuery instead, and customize the +query to suit your needs. You can edit records using a TQSqlCursor providing that the table or view has a primary index that uniquely distinguishes each record. If this condition is not met then you'll -need to use a TQSqlQuery for edits. -

    TQSqlCursor operates on a single record at a time. Whenever performing +need to use a TQSqlQuery for edits. +

    TQSqlCursor operates on a single record at a time. Whenever performing an insert, update or delete using TQSqlCursor, only a single record in the database is affected. When navigating through records in the cursor, only one record at a time is available in application code. @@ -612,7 +612,7 @@ used to make changes to a single record in the database. The edit buffer is maintained in a separate memory area, and is unnaffected by the 'navigation buffer' which changes as the cursor moves from record to record. -

    Before we can use TQSqlCursor objects we must first create and open +

    Before we can use TQSqlCursor objects we must first create and open a database connection. Connecting is described in the Connecting to Databases section above. For the examples that follow we will assume that the connections have been created using the createConnections() function @@ -622,15 +622,15 @@ presented earlier. follows this one we show how to link widgets to database cursors. Once we have a knowledge of both cursors and data-aware widgets we can discuss subclassing TQSqlCursor. -

    The TQSqlCursor class requires the ntqsqlcursor.h header file. +

    The TQSqlCursor class requires the tqsqlcursor.h header file.

    Retrieving Records

        #include <ntqapplication.h>
    -    #include <ntqsqldatabase.h>
    -    #include <ntqsqlcursor.h>
    +    #include <tqsqldatabase.h>
    +    #include <tqsqlcursor.h>
         #include "../connection.h"
     
         int main( int argc, char *argv[] )
    @@ -638,12 +638,12 @@ discuss subclassing TQSqlCursor.
             TQApplication app( argc, argv );
     
             if ( createConnections() ) {
    -            TQSqlCursor cur( "staff" ); // Specify the table/view name
    -            cur.select(); // We'll retrieve every record
    -            while ( cur.next() ) {
    -                tqDebug( cur.value( "id" ).toString() + ": " +
    -                        cur.value( "surname" ).toString() + " " +
    -                        cur.value( "salary" ).toString() );
    +            TQSqlCursor cur( "staff" ); // Specify the table/view name
    +            cur.select(); // We'll retrieve every record
    +            while ( cur.next() ) {
    +                tqDebug( cur.value( "id" ).toString() + ": " +
    +                        cur.value( "surname" ).toString() + " " +
    +                        cur.value( "salary" ).toString() );
                 }
             }
     
    @@ -651,9 +651,9 @@ discuss subclassing TQSqlCursor.
         }
     

    From sql/overview/retrieve2/main.cpp

    -

    We create the TQSqlCursor object, specifying the table or view to use. +

    We create the TQSqlCursor object, specifying the table or view to use. If we need to use a database other than the default we can specify it -in the TQSqlCursor constructor. +in the TQSqlCursor constructor.

    The SQL executed by the cur.select() call is

         SELECT staff.id, staff.forename, staff.surname, staff.salary, staff.statusid FROM staff
    @@ -661,7 +661,7 @@ in the TQSqlCursor constructor.
      
     

    Next, we iterate through the records returned by this select statement using cur.next(). Field values are retrieved in in a similar way to -TQSqlQuery, except that we pass field names rather than numeric indexes +TQSqlQuery, except that we pass field names rather than numeric indexes to value() and setValue().

    Sorting and Filtering Records @@ -682,15 +682,15 @@ statement's WHERE clause).

    This will retrieve only those staff whose id is greater than 100.

    In addition to retrieving selected records we often want to specify a -sort order for the returned records. This is achieved by creating a TQSqlIndex object which contains the names of the field(s) we wish to +sort order for the returned records. This is achieved by creating a TQSqlIndex object which contains the names of the field(s) we wish to sort by and pass this object to the select() call.

    -    TQSqlCursor cur( "staff" );
    -    TQSqlIndex nameIndex = cur.index( "surname" ); 
    -    cur.select( nameIndex );
    +    TQSqlCursor cur( "staff" );
    +    TQSqlIndex nameIndex = cur.index( "surname" ); 
    +    cur.select( nameIndex );
     
    -

    Here we create a TQSqlIndex object with one field, "surname". When +

    Here we create a TQSqlIndex object with one field, "surname". When we call the select() function we pass the index object, which specifies that the records should be returned sorted by staff.surname. Each field in the index object is used in the ORDER BY @@ -706,7 +706,7 @@ is straightforward. cur.select( "staff.surname LIKE 'A%'", nameIndex );

    -

    We pass in a filter string (the WHERE clause), and the TQSqlIndex +

    We pass in a filter string (the WHERE clause), and the TQSqlIndex object to sort by (the ORDER BY clause). This produces

         SELECT staff.id, staff.forename, staff.surname, staff.salary, staff.statusid
    @@ -715,18 +715,18 @@ object to sort by (the ORDER BY clause). This produces
      
     

    To sort by more than one field, an index can be created which contains multiple fields. Ascending and descending order can be set using -TQSqlIndex::setDescending(); the default is ascending. +TQSqlIndex::setDescending(); the default is ascending.

    -

                TQSqlCursor cur( "staff" );
    +
                TQSqlCursor cur( "staff" );
                 TQStringList fields = TQStringList() << "surname" << "forename";
    -            TQSqlIndex order = cur.index( fields );
    -            cur.select( order );
    -            while ( cur.next() ) {
    +            TQSqlIndex order = cur.index( fields );
    +            cur.select( order );
    +            while ( cur.next() ) {
     

    From sql/overview/order1/main.cpp

    Here we create a string list containing the fields we wish to sort by, -in the order they are to be used. Then we create a TQSqlIndex object +in the order they are to be used. Then we create a TQSqlIndex object based on these fields, finally executing the select() call using this index. This executes

    @@ -738,13 +738,13 @@ index. This executes
     can create a filter based on an index.
     

    -

                TQSqlCursor cur( "staff" );
    +
                TQSqlCursor cur( "staff" );
                 TQStringList fields = TQStringList() << "id" << "forename";
    -            TQSqlIndex order = cur.index( fields );
    -            TQSqlIndex filter = cur.index( "surname" );
    -            cur.setValue( "surname", "Bloggs" );
    -            cur.select( filter, order );
    -            while ( cur.next() ) {
    +            TQSqlIndex order = cur.index( fields );
    +            TQSqlIndex filter = cur.index( "surname" );
    +            cur.setValue( "surname", "Bloggs" );
    +            cur.select( filter, order );
    +            while ( cur.next() ) {
     

    From sql/overview/order2/main.cpp

    This executes @@ -753,8 +753,8 @@ can create a filter based on an index. FROM staff WHERE staff.surname='Bloggs' ORDER BY staff.id ASC, staff.forename ASC

    -

    The "order" TQSqlIndex contains two fields, "id" and "forename" -which are used to order the results. The "filter" TQSqlIndex +

    The "order" TQSqlIndex contains two fields, "id" and "forename" +which are used to order the results. The "filter" TQSqlIndex contains a single field, "surname". When an index is passed as a filter to the select() function, for each field in the filter, a fieldname=value subclause is created where the value @@ -765,27 +765,27 @@ setValue() to ensure that the value used is the one we want.

    -

                TQSqlCursor cur( "creditors" );
    +
                TQSqlCursor cur( "creditors" );
                 TQStringList orderFields = TQStringList() << "surname" << "forename";
    -            TQSqlIndex order = cur.index( orderFields );
    +            TQSqlIndex order = cur.index( orderFields );
     
                 TQStringList filterFields = TQStringList() << "surname" << "city";
    -            TQSqlIndex filter = cur.index( filterFields );
    -            cur.setValue( "surname", "Chirac" );
    -            cur.setValue( "city", "Paris" );
    +            TQSqlIndex filter = cur.index( filterFields );
    +            cur.setValue( "surname", "Chirac" );
    +            cur.setValue( "city", "Paris" );
     
    -            cur.select( filter, order );
    +            cur.select( filter, order );
     
    -            while ( cur.next() ) {
    -                int id = cur.value( "id" ).toInt();
    -                TQString name = cur.value( "forename" ).toString() + " " +
    -                               cur.value( "surname" ).toString();
    +            while ( cur.next() ) {
    +                int id = cur.value( "id" ).toInt();
    +                TQString name = cur.value( "forename" ).toString() + " " +
    +                               cur.value( "surname" ).toString();
                     tqDebug( TQString::number( id ) + ": " + name );
                 }
     

    From sql/overview/extract/main.cpp

    In this example we begin by creating a cursor on the creditors table. -We create two TQSqlIndex objects. The first, "order", is created +We create two TQSqlIndex objects. The first, "order", is created from the "orderFields" string list. The second, "filter", is created from the "filterFields" string list. We set the values of the two fields used in the filter, "surname" and "city", to the values we're @@ -809,8 +809,8 @@ some processing function, in this example a simple

    Records can be inserted, updated or deleted in a table or view using a -TQSqlCursor providing that the table or view has a primary index -that uniquely distinguishes each record. If this is not the case a TQSqlQuery must be used instead. (Note that not all databases support +TQSqlCursor providing that the table or view has a primary index +that uniquely distinguishes each record. If this is not the case a TQSqlQuery must be used instead. (Note that not all databases support editable views.)

    Each cursor has an internal 'edit buffer' which is used by all the edit operations (insert, update and delete). The editing process is @@ -831,8 +831,8 @@ quote is a special character in SQL.

    The primeInsert(), primeUpdate() and primeDelete() methods all return a pointer to the internal edit buffer. Each method can potentially perform different operations on the edit buffer before returning it. -By default, TQSqlCursor::primeInsert() clears all the field values in -the edit buffer (see TQSqlRecord::clearValues()). Both TQSqlCursor::primeUpdate() and TQSqlCursor::primeDelete() initialize the +By default, TQSqlCursor::primeInsert() clears all the field values in +the edit buffer (see TQSqlRecord::clearValues()). Both TQSqlCursor::primeUpdate() and TQSqlCursor::primeDelete() initialize the edit buffer with the current contents of the cursor before returning it. All three of these functions are virtual, so you can redefine the behavior (for example, reimplementing primeInsert() to auto-number @@ -853,17 +853,17 @@ changes to the database are accurately reflected in the cursor.

    -

                TQSqlCursor cur( "prices" );
    +
                TQSqlCursor cur( "prices" );
                 TQStringList names = TQStringList() <<
                     "Screwdriver" << "Hammer" << "Wrench" << "Saw";
                 int id = 20;
                 for ( TQStringList::Iterator name = names.begin();
                       name != names.end(); ++name ) {
    -                TQSqlRecord *buffer = cur.primeInsert();
    -                buffer->setValue( "id", id );
    -                buffer->setValue( "name", *name );
    -                buffer->setValue( "price", 100.0 + (double)id );
    -                count += cur.insert();
    +                TQSqlRecord *buffer = cur.primeInsert();
    +                buffer->setValue( "id", id );
    +                buffer->setValue( "name", *name );
    +                buffer->setValue( "price", 100.0 + (double)id );
    +                count += cur.insert();
                     id++;
                 }
     

    From sql/overview/insert/main.cpp @@ -871,14 +871,14 @@ changes to the database are accurately reflected in the cursor.

    In this example we create a cursor on the "prices" table. Next we create a list of product names which we iterate over. For each iteration we call the cursor's primeInsert() method. This method -returns a pointer to a TQSqlRecord buffer in which all the fields -are set to NULL. (Note that TQSqlCursor::primeInsert() is virtual, -and can be customized by derived classes. See TQSqlCursor). Next we +returns a pointer to a TQSqlRecord buffer in which all the fields +are set to NULL. (Note that TQSqlCursor::primeInsert() is virtual, +and can be customized by derived classes. See TQSqlCursor). Next we call setValue() for each field that requires a value. Finally we call insert() to insert the record. The insert() call returns the number of rows inserted. -

    We obtained a pointer to a TQSqlRecord object from the primeInsert() -call. TQSqlRecord objects can hold the data for a single record plus some +

    We obtained a pointer to a TQSqlRecord object from the primeInsert() +call. TQSqlRecord objects can hold the data for a single record plus some meta-data about the record. In practice most interaction with a TQSqlRecord consists of simple value() and setValue() calls as shown in this and the following example. @@ -887,29 +887,29 @@ this and the following example.

    -

                TQSqlCursor cur( "prices" );
    -            cur.select( "id=202" );
    -            if ( cur.next() ) {
    -                TQSqlRecord *buffer = cur.primeUpdate();
    -                double price = buffer->value( "price" ).toDouble();
    +
                TQSqlCursor cur( "prices" );
    +            cur.select( "id=202" );
    +            if ( cur.next() ) {
    +                TQSqlRecord *buffer = cur.primeUpdate();
    +                double price = buffer->value( "price" ).toDouble();
                     double newprice = price * 1.05;
    -                buffer->setValue( "price", newprice );
    -                cur.update();
    +                buffer->setValue( "price", newprice );
    +                cur.update();
                 }
     

    From sql/overview/update/main.cpp

    This example begins with the creation of a cursor over the prices table. We select the record we wish to update with the select() call and -move to it with the next() call. We call primeUpdate() to get a TQSqlRecord pointer to a buffer which is populated with the contents of +move to it with the next() call. We call primeUpdate() to get a TQSqlRecord pointer to a buffer which is populated with the contents of the current record. We retrieve the value of the price field, calculate a new price, and set the the price field to the newly calculated value. Finally we call update() to update the record. The update() call returns the number of rows updated.

    If many identical updates need to be performed, for example increasing the price of every item in the price list, using a single SQL statement -with TQSqlQuery is more efficient, e.g. +with TQSqlQuery is more efficient, e.g.

    -    TQSqlQuery query( "UPDATE prices SET price = price * 1.05"  );
    +    TQSqlQuery query( "UPDATE prices SET price = price * 1.05"  );
     

    @@ -917,22 +917,22 @@ with TQSqlQuery is more efficient, e.g.

    -

                TQSqlCursor cur( "prices" );
    -            cur.select( "id=999" );
    -            if ( cur.next() ) {
    -                cur.primeDelete();
    -                cur.del();
    +
                TQSqlCursor cur( "prices" );
    +            cur.select( "id=999" );
    +            if ( cur.next() ) {
    +                cur.primeDelete();
    +                cur.del();
     

    From sql/overview/delete/main.cpp

    To delete records, select the record to be deleted and navigate to it. Then call primeDelete() to populate the cursor with the primary key of the selected record, (in this example, the prices.id field), and -then call TQSqlCursor::del() to delete it. +then call TQSqlCursor::del() to delete it.

    As with update(), if multiple deletions need to be made with some common criteria it is more efficient to do so using a single SQL statement, e.g.

    -    TQSqlQuery query( "DELETE FROM prices WHERE id >= 2450 AND id <= 2500" );
    +    TQSqlQuery query( "DELETE FROM prices WHERE id >= 2450 AND id <= 2500" );
     

    @@ -951,9 +951,9 @@ examples provides additional information.

        #include <ntqapplication.h>
    -    #include <ntqsqldatabase.h>
    -    #include <ntqsqlcursor.h>
    -    #include <ntqdatatable.h>
    +    #include <tqsqldatabase.h>
    +    #include <tqsqlcursor.h>
    +    #include <tqdatatable.h>
         #include "../connection.h"
     
         int main( int argc, char *argv[] )
    @@ -961,10 +961,10 @@ examples provides additional information.
             TQApplication app( argc, argv );
     
             if ( createConnections() ) {
    -            TQSqlCursor staffCursor( "staff" );
    -            TQDataTable *staffTable = new TQDataTable( &staffCursor, TRUE );
    +            TQSqlCursor staffCursor( "staff" );
    +            TQDataTable *staffTable = new TQDataTable( &staffCursor, TRUE );
                 app.setMainWidget( staffTable );
    -            staffTable->refresh();
    +            staffTable->refresh();
                 staffTable->show();
     
                 return app.exec();
    @@ -974,34 +974,34 @@ examples provides additional information.
         }
     

    From sql/overview/table1/main.cpp

    -

    Data-Aware tables require the ntqdatatable.h and ntqsqlcursor.h header +

    Data-Aware tables require the tqdatatable.h and tqsqlcursor.h header files. We create our application object, call createConnections() and -create the cursor. We create the TQDataTable passing it a pointer to -the cursor, and set the autoPopulate flag to TRUE. Next we make our TQDataTable the main widget and call refresh() to populate it with data +create the cursor. We create the TQDataTable passing it a pointer to +the cursor, and set the autoPopulate flag to TRUE. Next we make our TQDataTable the main widget and call refresh() to populate it with data and call show() to make it visible. -

    The autoPopulate flag tells the TQDataTable whether or nor it should +

    The autoPopulate flag tells the TQDataTable whether or nor it should create columns based on the cursor. autoPopulate does not affect the loading of data into the table; that is achieved by the refresh() function.

    -

                TQSqlCursor staffCursor( "staff" );
    -            TQDataTable *staffTable = new TQDataTable( &staffCursor );
    +
                TQSqlCursor staffCursor( "staff" );
    +            TQDataTable *staffTable = new TQDataTable( &staffCursor );
     
                 app.setMainWidget( staffTable );
     
    -            staffTable->addColumn( "forename", "Forename" );
    -            staffTable->addColumn( "surname",  "Surname" );
    -            staffTable->addColumn( "salary",   "Annual Salary" );
    +            staffTable->addColumn( "forename", "Forename" );
    +            staffTable->addColumn( "surname",  "Surname" );
    +            staffTable->addColumn( "salary",   "Annual Salary" );
     
                 TQStringList order = TQStringList() << "surname" << "forename";
    -            staffTable->setSort( order );
    +            staffTable->setSort( order );
     
    -            staffTable->refresh();
    +            staffTable->refresh();
                 staffTable->show();
     

    From sql/overview/table2/main.cpp

    -

    We create an empty TQDataTable which we make into our main widget and +

    We create an empty TQDataTable which we make into our main widget and then we manually add the columns we want in the order we wish them to appear. For each column we specify the field name and optionally a display label. @@ -1028,9 +1028,9 @@ the code below can be automatically generated by #include <ntqlabel.h> #include <ntqlayout.h> #include <ntqlineedit.h> - #include <ntqsqldatabase.h> - #include <ntqsqlcursor.h> - #include <ntqsqlform.h> + #include <tqsqldatabase.h> + #include <tqsqlcursor.h> + #include <tqsqlform.h> #include "../connection.h" class FormDialog : public TQDialog @@ -1057,16 +1057,16 @@ the code below can be automatically generated by grid->addWidget( salaryEdit, 2, 1 ); grid->activate(); - TQSqlCursor staffCursor( "staff" ); - staffCursor.select(); - staffCursor.next(); + TQSqlCursor staffCursor( "staff" ); + staffCursor.select(); + staffCursor.next(); - TQSqlForm sqlForm( this ); - sqlForm.setRecord( staffCursor.primeUpdate() ); - sqlForm.insert( forenameDisplay, "forename" ); - sqlForm.insert( surnameDisplay, "surname" ); - sqlForm.insert( salaryEdit, "salary" ); - sqlForm.readFields(); + TQSqlForm sqlForm( this ); + sqlForm.setRecord( staffCursor.primeUpdate() ); + sqlForm.insert( forenameDisplay, "forename" ); + sqlForm.insert( surnameDisplay, "surname" ); + sqlForm.insert( salaryEdit, "salary" ); + sqlForm.readFields(); } int main( int argc, char *argv[] ) @@ -1084,28 +1084,28 @@ the code below can be automatically generated by

    From sql/overview/form1/main.cpp

    We include the header files for the widgets that we need. We also -include ntqsqldatabase.h and ntqsqlcursor.h as usual, but we now add -ntqsqlform.h. +include tqsqldatabase.h and tqsqlcursor.h as usual, but we now add +tqsqlform.h.

    The form will be presented as a dialog so we subclass TQDialog with our own FormDialog class. We use a TQLineEdit for the salary so that the user can change it. All the widgets are laid out using a grid.

    We create a cursor on the staff table, select all records and move to the first record. -

    Now we create a TQSqlForm object and set the TQSqlForm's record buffer +

    Now we create a TQSqlForm object and set the TQSqlForm's record buffer to the cursor's update buffer. For each widget that we wish to make data-aware we insert a pointer to the widget and the associated field -name into the TQSqlForm. Finally we call readFields() to populate the +name into the TQSqlForm. Finally we call readFields() to populate the widgets with data from the database via the cursor's buffer.

    Displaying a Record in a Data Form

    -

    TQDataView is a Widget that can hold a read-only TQSqlForm. In -addition to TQSqlForm it offers the slot refresh( TQSqlRecord * ) so it -can easily be linked together with a TQDataTable to display a detailed +

    TQDataView is a Widget that can hold a read-only TQSqlForm. In +addition to TQSqlForm it offers the slot refresh( TQSqlRecord * ) so it +can easily be linked together with a TQDataTable to display a detailed view of a record:

    -    connect( myDataTable, TQ_SIGNAL( currentChanged( TQSqlRecord* ) ), 
    -             myDataView, TQ_SLOT( refresh( TQSqlRecord* ) ) );
    +    connect( myDataTable, TQ_SIGNAL( currentChanged( TQSqlRecord* ) ), 
    +             myDataView, TQ_SLOT( refresh( TQSqlRecord* ) ) );
     

    @@ -1124,15 +1124,15 @@ differences. public slots: void save(); private: - TQSqlCursor staffCursor; - TQSqlForm *sqlForm; - TQSqlIndex idIndex; + TQSqlCursor staffCursor; + TQSqlForm *sqlForm; + TQSqlIndex idIndex; };

    From sql/overview/form2/main.h

    The save slot will be used for a button that the user can press to -confirm their update. We also hold pointers to the TQSqlCursor and the -TQSqlForm since they will need to be accessed outside the constructor. +confirm their update. We also hold pointers to the TQSqlCursor and the +TQSqlForm since they will need to be accessed outside the constructor.

            staffCursor.setTrimmed( "forename", TRUE );
    @@ -1159,17 +1159,17 @@ the user can click to save their updates.
             staffCursor.select( idIndex );
             staffCursor.first();
     
    -

    We create a TQSqlIndex object and then execute a select() using the +

    We create a TQSqlIndex object and then execute a select() using the index. We then move to the first record in the result set. -

            sqlForm = new TQSqlForm( this );
    -        sqlForm->setRecord( staffCursor.primeUpdate() );
    +

            sqlForm = new TQSqlForm( this );
    +        sqlForm->setRecord( staffCursor.primeUpdate() );
     
    -

    We create a new TQSqlForm object and set it's record buffer to the +

    We create a new TQSqlForm object and set it's record buffer to the cursor's update buffer. -

            sqlForm->insert( forenameEdit, "forename" );
    -        sqlForm->insert( surnameEdit, "surname" );
    -        sqlForm->insert( salaryEdit, "salary" );
    -        sqlForm->readFields();
    +

            sqlForm->insert( forenameEdit, "forename" );
    +        sqlForm->insert( surnameEdit, "surname" );
    +        sqlForm->insert( salaryEdit, "salary" );
    +        sqlForm->readFields();
     

    Now we link the buffer's fields to the TQLineEdit controls. (In the previous example we linked the cursor's fields.) The edit controls are @@ -1184,28 +1184,28 @@ since they are children of the form and will be deleted by TQt at the right time.

        void FormDialog::save()
         {
    -        sqlForm->writeFields();
    +        sqlForm->writeFields();
             staffCursor.update();
             staffCursor.select( idIndex );
             staffCursor.first();
         }
     

    Finally we add the save functionality for when the user presses the -save button. We write back the data from the widgets to the TQSqlRecord buffer with the writeFields() call. Then we update the +save button. We write back the data from the widgets to the TQSqlRecord buffer with the writeFields() call. Then we update the database with the updated version of the record with the cursor's update() function. At this point the cursor is no longer positioned at -a valid record so we reissue the select() call using our TQSqlIndex +a valid record so we reissue the select() call using our TQSqlIndex and move to the first record. -

    TQDataBrowser and TQDataView are widgets which provide a great deal of -the above functionality. TQDataBrowser provides a data form which -allows editing of and navigation through a cursor's records. TQDataView provides a read only form for data in a cursor or database +

    TQDataBrowser and TQDataView are widgets which provide a great deal of +the above functionality. TQDataBrowser provides a data form which +allows editing of and navigation through a cursor's records. TQDataView provides a read only form for data in a cursor or database record. See the class documentation or the TQt Designer manual for more information on using these widgets.

    Link to sql/overview/form2/main.cpp

    Custom Editor Widgets

    -

    TQSqlForm uses TQSqlPropertyMap to handle the transfer of data between +

    TQSqlForm uses TQSqlPropertyMap to handle the transfer of data between widgets and database fields. Custom widgets can also be used in a form by installing a property map that contains information about the properties of the custom widget which should be used to transfer the @@ -1231,7 +1231,7 @@ we will only cover the differences here. The full source is in TQLineEdit and added a property, upperLineText, which will hold an uppercase version of the text. We also created a slot, changed(). -

                TQSqlPropertyMap *propMap;
    +

                TQSqlPropertyMap *propMap;
     

    We will be using a property map so we add a pointer to a property map to our FormDialog's private data. @@ -1270,16 +1270,16 @@ CustomEdit instances directly to database fields.

    We use the same FormDialog as we did before, but this time replace two of the TQLineEdit widgets with our own CustomEdit widgets.

    Laying out the grid and setting up the cursor is the same as before. -

            propMap = new TQSqlPropertyMap;
    -        propMap->insert( forenameEdit->className(), "upperLine" );
    +

            propMap = new TQSqlPropertyMap;
    +        propMap->insert( forenameEdit->className(), "upperLine" );
     

    We create a new property map on the heap and register our CustomEdit class and its upperLine property with the property map. -

            sqlForm = new TQSqlForm( this );
    -        sqlForm->setRecord( staffCursor->primeUpdate() );
    -        sqlForm->installPropertyMap( propMap );
    +

            sqlForm = new TQSqlForm( this );
    +        sqlForm->setRecord( staffCursor->primeUpdate() );
    +        sqlForm->installPropertyMap( propMap );
     
    -

    The final change is to install the property map into the TQSqlForm once +

    The final change is to install the property map into the TQSqlForm once the TQSqlForm has been created. This passes responsibility for the property map's memory to TQSqlForm which itself is owned by the FormDialog, so TQt will delete them at the right time. @@ -1289,9 +1289,9 @@ our CustomEdit widget.

    Custom Editor Widgets for Tables

    -

    We must reimpliment TQSqlEditorFactory to use custom editor widgets in +

    We must reimpliment TQSqlEditorFactory to use custom editor widgets in tables. In the following example we will create a custom editor based -on TQComboBox and a TQSqlEditorFactory subclass to show how a TQDataTable +on TQComboBox and a TQSqlEditorFactory subclass to show how a TQDataTable can use a custom editor.

    @@ -1312,27 +1312,27 @@ can use a custom editor. 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 to/from the statusids that we will list in the combobox. -

        class CustomSqlEditorFactory : public TQSqlEditorFactory
    +

        class CustomSqlEditorFactory : public TQSqlEditorFactory
         {
             TQ_OBJECT
             public:
    -            TQWidget *createEditor( TQWidget *parent, const TQSqlField *field );
    +            TQWidget *createEditor( TQWidget *parent, const TQSqlField *field );
         };
     
    -

    We also need to subclass TQSqlEditorFactory declaring a createEditor() +

    We also need to subclass TQSqlEditorFactory declaring a createEditor() function since that is the only function we need to reimplement.

        StatusPicker::StatusPicker( TQWidget *parent, const char *name )
             : TQComboBox( parent, name )
         {
    -        TQSqlCursor cur( "status" );
    -        cur.select( cur.index( "name" ) );
    +        TQSqlCursor cur( "status" );
    +        cur.select( cur.index( "name" ) );
     
             int i = 0;
    -        while ( cur.next() ) {
    -            insertItem( cur.value( "name" ).toString(), i );
    -            index2id[i] = cur.value( "id" ).toInt();
    +        while ( cur.next() ) {
    +            insertItem( cur.value( "name" ).toString(), i );
    +            index2id[i] = cur.value( "id" ).toInt();
                 i++;
             }
     

    From sql/overview/table3/main.cpp @@ -1367,64 +1367,64 @@ index2id TQMap. We compare each index2id element's data (statusid) to the id parameter's value. If we have a match we set the combobox's current item to the index2id element's key (the combobox index), and leave the loop. -

    When the user edits the status field in the TQDataTable they will be +

    When the user edits the status field in the TQDataTable they will be presented with a combobox of valid status names taken from the status table. However the status displayed is still the raw statusid. To display the status name when the field isn't being edited requires us to subclass TQDataTable and reimplement the paintField() function.

    -

        class CustomTable : public TQDataTable
    +
        class CustomTable : public TQDataTable
         {
             TQ_OBJECT
         public:
             CustomTable(
    -                TQSqlCursor *cursor, bool autoPopulate = FALSE,
    +                TQSqlCursor *cursor, bool autoPopulate = FALSE,
                     TQWidget * parent = 0, const char * name = 0 ) :
    -            TQDataTable( cursor, autoPopulate, parent, name ) {}
    +            TQDataTable( cursor, autoPopulate, parent, name ) {}
             void paintField(
    -                TQPainter * p, const TQSqlField* field, const TQRect & cr, bool );
    +                TQPainter * p, const TQSqlField* field, const TQRect & cr, bool );
     
         };
     

    From sql/overview/table4/main.h

    -

    We simply call the original TQDataTable constructor without changing +

    We simply call the original TQDataTable constructor without changing anything. We also declare the paintField function.

    -

        void CustomTable::paintField( TQPainter * p, const TQSqlField* field,
    +
        void CustomTable::paintField( TQPainter * p, const TQSqlField* field,
                                       const TQRect & cr, bool b)
         {
             if ( !field )
                 return;
    -        if ( field->name() == "statusid" ) {
    -            TQSqlQuery query( "SELECT name FROM status WHERE id=" +
    -                         field->value().toString() );
    +        if ( field->name() == "statusid" ) {
    +            TQSqlQuery query( "SELECT name FROM status WHERE id=" +
    +                         field->value().toString() );
                 TQString text;
    -            if ( query.next() ) {
    -                text = query.value( 0 ).toString();
    +            if ( query.next() ) {
    +                text = query.value( 0 ).toString();
                 }
                 p->drawText( 2,2, cr.width()-4, cr.height()-4, fieldAlignment( field ), text );
             }
             else {
    -            TQDataTable::paintField( p, field, cr, b) ;
    +            TQDataTable::paintField( p, field, cr, b) ;
             }
     

    From sql/overview/table4/main.cpp

    -

    The paintField code is based on TQDataTable's source code. We need to +

    The paintField code is based on TQDataTable's source code. We need to make three changes. Firstly add an if clause field->name() == "statusid" and look up the textual value for the id with a -straighforward TQSqlQuery. Secondly call the superclass to handle other +straighforward TQSqlQuery. Secondly call the superclass to handle other fields. The last change is in our main function where we change staffTable from being a TQDataTable to being a CustomTable.

    -

    Subclassing TQSqlCursor +

    Subclassing TQSqlCursor

        #include <ntqapplication.h>
    -    #include <ntqsqldatabase.h>
    -    #include <ntqsqlcursor.h>
    -    #include <ntqdatatable.h>
    +    #include <tqsqldatabase.h>
    +    #include <tqsqlcursor.h>
    +    #include <tqdatatable.h>
         #include "../connection.h"
     
         int main( int argc, char *argv[] )
    @@ -1432,17 +1432,17 @@ staffTable from being a TQDataTable to being a CustomTable.
             TQApplication app( argc, argv );
     
             if ( createConnections() ) {
    -            TQSqlCursor invoiceItemCursor( "invoiceitem" );
    +            TQSqlCursor invoiceItemCursor( "invoiceitem" );
     
    -            TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor );
    +            TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor );
     
                 app.setMainWidget( invoiceItemTable );
     
    -            invoiceItemTable->addColumn( "pricesid", "PriceID" );
    -            invoiceItemTable->addColumn( "quantity", "Quantity" );
    -            invoiceItemTable->addColumn( "paiddate", "Paid" );
    +            invoiceItemTable->addColumn( "pricesid", "PriceID" );
    +            invoiceItemTable->addColumn( "quantity", "Quantity" );
    +            invoiceItemTable->addColumn( "paiddate", "Paid" );
     
    -            invoiceItemTable->refresh();
    +            invoiceItemTable->refresh();
                 invoiceItemTable->show();
     
                 return app.exec();
    @@ -1453,7 +1453,7 @@ staffTable from being a TQDataTable to being a CustomTable.
     

    From sql/overview/subclass1/main.cpp

    This example is very similar to the table1 example presented earlier. We -create a cursor, add the fields and their display labels to a TQDataTable, +create a cursor, add the fields and their display labels to a TQDataTable, call refresh() to load the data and call show() to show the widget.

    Unfortunately this example is unsatisfactory. It is tedious to set the table name and any custom characteristics for the fields every time we @@ -1465,18 +1465,18 @@ useful (or even essential for primary keys) if we could default some of the values when the user adds a new record.

    -

        class InvoiceItemCursor : public TQSqlCursor
    +
        class InvoiceItemCursor : public TQSqlCursor
         {
             public:
                 InvoiceItemCursor();
         };
     

    From sql/overview/subclass2/main.h

    -

    We have created a separate header file and subclassed TQSqlCursor. +

    We have created a separate header file and subclassed TQSqlCursor.

        InvoiceItemCursor::InvoiceItemCursor() :
    -        TQSqlCursor( "invoiceitem" )
    +        TQSqlCursor( "invoiceitem" )
         {
             // NOOP
         }
    @@ -1501,20 +1501,20 @@ of the calculateField() function since we will be reimplementing it.
     

        InvoiceItemCursor::InvoiceItemCursor() :
    -        TQSqlCursor( "invoiceitem" )
    +        TQSqlCursor( "invoiceitem" )
         {
    -        TQSqlFieldInfo productName( "productname", TQVariant::String );
    -        append( productName );
    -        setCalculated( productName.name(), TRUE );
    +        TQSqlFieldInfo productName( "productname", TQVariant::String );
    +        append( productName );
    +        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=" +
    -                         field( "pricesid" )->value().toString() );
    -            if ( query.next() )
    -                return query.value( 0 );
    +            TQSqlQuery query( "SELECT name FROM prices WHERE id=" +
    +                         field( "pricesid" )->value().toString() );
    +            if ( query.next() )
    +                return query.value( 0 );
             }
     
             return TQVariant( TQString::null );
    @@ -1522,13 +1522,13 @@ of the calculateField() function since we will be reimplementing it.
     

    From sql/overview/subclass3/main.cpp

    We have changed the InvoiceItemCursor constructor. We now create a new -TQSqlField called productname and append this to the +TQSqlField called productname and append this to the InvoiceItemCursor's set of fields. We call setCalculated() on productname to identify it as a calculated field. The first argument to setCalculated() is the field name, the second a bool which if TRUE signifies that calculateField() must be called to get the field's value. -

                invoiceItemTable->addColumn( "productname", "Product" );
    +

                invoiceItemTable->addColumn( "productname", "Product" );
     

    We add our new fields with addColumn() which adds them to the form and sets their display names. @@ -1545,46 +1545,46 @@ function require some simple expansion. We'll look at each in turn.

        InvoiceItemCursor::InvoiceItemCursor() :
    -        TQSqlCursor( "invoiceitem" )
    +        TQSqlCursor( "invoiceitem" )
         {
    -        TQSqlFieldInfo productName( "productname", TQVariant::String );
    -        append( productName );
    -        setCalculated( productName.name(), TRUE );
    +        TQSqlFieldInfo productName( "productname", TQVariant::String );
    +        append( productName );
    +        setCalculated( productName.name(), TRUE );
     
    -        TQSqlFieldInfo productPrice( "price", TQVariant::Double );
    -        append( productPrice );
    -        setCalculated( productPrice.name(), TRUE );
    +        TQSqlFieldInfo productPrice( "price", TQVariant::Double );
    +        append( productPrice );
    +        setCalculated( productPrice.name(), TRUE );
     
    -        TQSqlFieldInfo productCost( "cost", TQVariant::Double );
    -        append( productCost );
    -        setCalculated( productCost.name(), TRUE );
    +        TQSqlFieldInfo productCost( "cost", TQVariant::Double );
    +        append( productCost );
    +        setCalculated( productCost.name(), TRUE );
         }
     

    From sql/overview/subclass4/main.cpp

    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" ) {
    -            TQSqlQuery query( "SELECT name FROM prices WHERE id=" +
    -                         field( "pricesid" )->value().toString() );
    -            if ( query.next() )
    -                return query.value( 0 );
    +            TQSqlQuery query( "SELECT name FROM prices WHERE id=" +
    +                         field( "pricesid" )->value().toString() );
    +            if ( query.next() )
    +                return query.value( 0 );
             }
             else if ( name == "price" ) {
    -            TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
    -                         field( "pricesid" )->value().toString() );
    -            if ( query.next() )
    -                return query.value( 0 );
    +            TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
    +                         field( "pricesid" )->value().toString() );
    +            if ( query.next() )
    +                return query.value( 0 );
             }
             else if ( name == "cost" ) {
    -            TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
    -                         field( "pricesid" )->value().toString() );
    -            if ( query.next() )
    -                return TQVariant( query.value( 0 ).toDouble() *
    -                                 value( "quantity").toDouble() );
    +            TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
    +                         field( "pricesid" )->value().toString() );
    +            if ( query.next() )
    +                return TQVariant( query.value( 0 ).toDouble() *
    +                                 value( "quantity").toDouble() );
             }
     
             return TQVariant( TQString::null );
    @@ -1605,7 +1605,7 @@ calculated field would be a lookup against a different table or view.
     user attempts to insert a new record. 
     

    -

                TQSqlRecord *primeInsert();
    +
                TQSqlRecord *primeInsert();
     

    From sql/overview/subclass5/main.h

    We declare our own primeInsert() function since we will need to @@ -1613,14 +1613,14 @@ reimplement this.

    The constructor and the calculateField() function remain unchanged.

    -

        TQSqlRecord *InvoiceItemCursor::primeInsert()
    +
        TQSqlRecord *InvoiceItemCursor::primeInsert()
         {
    -        TQSqlRecord *buffer = editBuffer();
    -        TQSqlQuery query( "SELECT NEXTVAL( 'invoiceitem_seq' )" );
    -        if ( query.next() )
    -            buffer->setValue( "id", query.value( 0 ) );
    -        buffer->setValue( "paiddate", TQDate::currentDate() );
    -        buffer->setValue( "quantity", 1 );
    +        TQSqlRecord *buffer = editBuffer();
    +        TQSqlQuery query( "SELECT NEXTVAL( 'invoiceitem_seq' )" );
    +        if ( query.next() )
    +            buffer->setValue( "id", query.value( 0 ) );
    +        buffer->setValue( "paiddate", TQDate::currentDate() );
    +        buffer->setValue( "quantity", 1 );
     
             return buffer;
         }
    diff --git a/doc/html/sqltable-example.html b/doc/html/sqltable-example.html
    index d84b9fe30..f64e0b984 100644
    --- a/doc/html/sqltable-example.html
    +++ b/doc/html/sqltable-example.html
    @@ -33,7 +33,7 @@ body { background: #ffffff; color: black; }
     
      
     

    -This example shows how to use a TQDataTable to browse data in a SQL database. +This example shows how to use a TQDataTable to browse data in a SQL database.


    Implementation:

    /****************************************************************************
    @@ -46,9 +46,9 @@ This example shows how to use a TQDataTable to b
     *****************************************************************************/
     
     #include <ntqapplication.h>
    -#include <ntqsqldatabase.h>
    -#include <ntqdatatable.h>
    -#include <ntqsqlcursor.h>
    +#include <tqsqldatabase.h>
    +#include <tqdatatable.h>
    +#include <tqsqlcursor.h>
     #include <ntqmessagebox.h>
     
     /* Modify the following to match your environment */
    @@ -58,18 +58,18 @@ This example shows how to use a TQDataTable to b
     #define PASSWORD     ""   /* password for USER */
     #define HOST         "" /* host on which the database is running */
     
    -class SimpleCursor : public TQSqlCursor
    +class SimpleCursor : public TQSqlCursor
     {
     public:
    -    SimpleCursor () : TQSqlCursor( "simpletable" ) {}
    +    SimpleCursor () : TQSqlCursor( "simpletable" ) {}
     protected:
    -    TQSqlRecord* primeInsert()
    +    TQSqlRecord* primeInsert()
         {
             /* a real-world application would use sequences, or the like */
    -        TQSqlRecord* buf = TQSqlCursor::primeInsert();
    -        TQSqlQuery q( "select max(id)+1 from simpletable" );
    -        if ( q.next() )
    -               buf->setValue( "id", q.value(0) );
    +        TQSqlRecord* buf = TQSqlCursor::primeInsert();
    +        TQSqlQuery q( "select max(id)+1 from simpletable" );
    +        if ( q.next() )
    +               buf->setValue( "id", q.value(0) );
             return buf;
         }
     };
    @@ -78,31 +78,31 @@ int main( int argc, char ** argv )
     {
         TQApplication a( argc, argv );
     
    -    TQSqlDatabase * db = TQSqlDatabase::addDatabase( DRIVER );
    -    db->setDatabaseName( DATABASE );
    -    db->setUserName( USER );
    -    db->setPassword( PASSWORD );
    -    db->setHostName( HOST );
    +    TQSqlDatabase * db = TQSqlDatabase::addDatabase( DRIVER );
    +    db->setDatabaseName( DATABASE );
    +    db->setUserName( USER );
    +    db->setPassword( PASSWORD );
    +    db->setHostName( HOST );
     
    -    if( !db->open() ){
    -        db->lastError().showMessage( "An error occured. Please read the README file in the sqltable"
    +    if( !db->open() ){
    +        db->lastError().showMessage( "An error occured. Please read the README file in the sqltable"
                                          "dir for more information.\n\n" );
             return 1;
         }
     
    -    if (!db->tables().contains("simpletable")) {
    -        TQSqlQuery q("create table simpletable(id int, name varchar(20), address varchar(20))", db);
    +    if (!db->tables().contains("simpletable")) {
    +        TQSqlQuery q("create table simpletable(id int, name varchar(20), address varchar(20))", db);
         }
     
         SimpleCursor cursor;
     
    -    TQDataTable table( &cursor ); /* data table uses our cursor */
    -    table.addColumn( "name", "Name" );
    -    table.addColumn( "address", "Address" );
    +    TQDataTable table( &cursor ); /* data table uses our cursor */
    +    table.addColumn( "name", "Name" );
    +    table.addColumn( "address", "Address" );
         table.setSorting( TRUE );
     
         a.setMainWidget( &table );
    -    table.refresh(); /* load data */
    +    table.refresh(); /* load data */
         table.show();    /* show widget */
     
         return a.exec();
    diff --git a/doc/html/titleindex b/doc/html/titleindex
    index b9584fd86..addd6b50b 100644
    --- a/doc/html/titleindex
    +++ b/doc/html/titleindex
    @@ -297,8 +297,8 @@ QCustomEvent Class | qcustomevent.html
     QCustomEvent Member List | qcustomevent-members.html
     QCustomMenuItem Class | qcustommenuitem.html
     QCustomMenuItem Member List | qcustommenuitem-members.html
    -QDataBrowser Class | ntqdatabrowser.html
    -QDataBrowser Member List | qdatabrowser-members.html
    +TQDataBrowser Class | tqdatabrowser.html
    +TQDataBrowser Member List | tqdatabrowser-members.html
     QDataPump Class | qdatapump.html
     QDataPump Member List | qdatapump-members.html
     QDataSink Class | qdatasink.html
    @@ -307,10 +307,10 @@ QDataSource Class | qdatasource.html
     QDataSource Member List | qdatasource-members.html
     QDataStream Class | ntqdatastream.html
     QDataStream Member List | qdatastream-members.html
    -QDataTable Class | ntqdatatable.html
    -QDataTable Member List | qdatatable-members.html
    -QDataView Class | ntqdataview.html
    -QDataView Member List | qdataview-members.html
    +TQDataTable Class | tqdatatable.html
    +TQDataTable Member List | tqdatatable-members.html
    +TQDataView Class | tqdataview.html
    +TQDataView Member List | tqdataview-members.html
     QDate Class | qdate.html
     QDate Member List | qdate-members.html
     QDateEdit Class | qdateedit.html
    @@ -392,8 +392,8 @@ QDropEvent Class | qdropevent.html
     QDropEvent Member List | qdropevent-members.html
     QDropSite Class | ntqdropsite.html
     QDropSite Member List | qdropsite-members.html
    -QEditorFactory Class | ntqeditorfactory.html
    -QEditorFactory Member List | qeditorfactory-members.html
    +TQEditorFactory Class | tqeditorfactory.html
    +TQEditorFactory Member List | tqeditorfactory-members.html
     QEmbed - File and Image Embedder | qembed.html
     QErrorMessage Class | ntqerrormessage.html
     QErrorMessage Member List | qerrormessage-members.html
    @@ -779,40 +779,40 @@ QSplashScreen Class | ntqsplashscreen.html
     QSplashScreen Member List | qsplashscreen-members.html
     QSplitter Class | ntqsplitter.html
     QSplitter Member List | qsplitter-members.html
    -QSql Class | ntqsql.html
    -QSql Member List | qsql-members.html
    -QSqlCursor Class | ntqsqlcursor.html
    -QSqlCursor Member List | qsqlcursor-members.html
    -QSqlDatabase Class | ntqsqldatabase.html
    -QSqlDatabase Member List | qsqldatabase-members.html
    -QSqlDriver Class | ntqsqldriver.html
    -QSqlDriver Member List | qsqldriver-members.html
    -QSqlDriverPlugin Class | ntqsqldriverplugin.html
    -QSqlDriverPlugin Member List | qsqldriverplugin-members.html
    -QSqlEditorFactory Class | ntqsqleditorfactory.html
    -QSqlEditorFactory Member List | qsqleditorfactory-members.html
    -QSqlError Class | ntqsqlerror.html
    -QSqlError Member List | qsqlerror-members.html
    -QSqlField Class | ntqsqlfield.html
    -QSqlField Member List | qsqlfield-members.html
    -QSqlFieldInfo Class | qsqlfieldinfo.html
    -QSqlFieldInfo Member List | qsqlfieldinfo-members.html
    -QSqlForm Class | ntqsqlform.html
    -QSqlForm Member List | qsqlform-members.html
    -QSqlIndex Class | ntqsqlindex.html
    -QSqlIndex Member List | qsqlindex-members.html
    -QSqlPropertyMap Class | ntqsqlpropertymap.html
    -QSqlPropertyMap Member List | qsqlpropertymap-members.html
    -QSqlQuery Class | ntqsqlquery.html
    -QSqlQuery Member List | qsqlquery-members.html
    -QSqlRecord Class | ntqsqlrecord.html
    -QSqlRecord Member List | qsqlrecord-members.html
    -QSqlRecordInfo Class | qsqlrecordinfo.html
    -QSqlRecordInfo Member List | qsqlrecordinfo-members.html
    -QSqlResult Class | ntqsqlresult.html
    -QSqlResult Member List | qsqlresult-members.html
    -QSqlSelectCursor Class | ntqsqlselectcursor.html
    -QSqlSelectCursor Member List | qsqlselectcursor-members.html
    +TQSql Class | tqsql.html
    +TQSql Member List | tqsql-members.html
    +TQSqlCursor Class | tqsqlcursor.html
    +TQSqlCursor Member List | tqsqlcursor-members.html
    +TQSqlDatabase Class | tqsqldatabase.html
    +TQSqlDatabase Member List | tqsqldatabase-members.html
    +TQSqlDriver Class | tqsqldriver.html
    +TQSqlDriver Member List | tqsqldriver-members.html
    +TQSqlDriverPlugin Class | tqsqldriverplugin.html
    +TQSqlDriverPlugin Member List | tqsqldriverplugin-members.html
    +TQSqlEditorFactory Class | tqsqleditorfactory.html
    +TQSqlEditorFactory Member List | tqsqleditorfactory-members.html
    +TQSqlError Class | tqsqlerror.html
    +TQSqlError Member List | tqsqlerror-members.html
    +TQSqlField Class | tqsqlfield.html
    +TQSqlField Member List | tqsqlfield-members.html
    +TQSqlFieldInfo Class | tqsqlfieldinfo.html
    +TQSqlFieldInfo Member List | tqsqlfieldinfo-members.html
    +TQSqlForm Class | tqsqlform.html
    +TQSqlForm Member List | tqsqlform-members.html
    +TQSqlIndex Class | tqsqlindex.html
    +TQSqlIndex Member List | tqsqlindex-members.html
    +TQSqlPropertyMap Class | tqsqlpropertymap.html
    +TQSqlPropertyMap Member List | tqsqlpropertymap-members.html
    +TQSqlQuery Class | tqsqlquery.html
    +TQSqlQuery Member List | tqsqlquery-members.html
    +TQSqlRecord Class | tqsqlrecord.html
    +TQSqlRecord Member List | tqsqlrecord-members.html
    +TQSqlRecordInfo Class | tqsqlrecordinfo.html
    +TQSqlRecordInfo Member List | tqsqlrecordinfo-members.html
    +TQSqlResult Class | tqsqlresult.html
    +TQSqlResult Member List | tqsqlresult-members.html
    +TQSqlSelectCursor Class | tqsqlselectcursor.html
    +TQSqlSelectCursor Member List | tqsqlselectcursor-members.html
     QStatusBar Class | ntqstatusbar.html
     QStatusBar Member List | qstatusbar-members.html
     QStoredDrag Class | qstoreddrag.html
    @@ -1199,10 +1199,10 @@ ntqcommonstyle.h Include File | qcommonstyle-h.html
     qcopchannel_qws.h Include File | qcopchannel_qws-h.html
     ntqcstring.h Include File | qcstring-h.html
     ntqcursor.h Include File | qcursor-h.html
    -ntqdatabrowser.h Include File | qdatabrowser-h.html
    +tqdatabrowser.h Include File | tqdatabrowser-h.html
     ntqdatastream.h Include File | qdatastream-h.html
    -ntqdatatable.h Include File | qdatatable-h.html
    -ntqdataview.h Include File | qdataview-h.html
    +tqdatatable.h Include File | tqdatatable-h.html
    +tqdataview.h Include File | tqdataview-h.html
     ntqdatetime.h Include File | qdatetime-h.html
     ntqdatetimeedit.h Include File | qdatetimeedit-h.html
     ntqdeepcopy.h Include File | qdeepcopy-h.html
    @@ -1219,7 +1219,7 @@ ntqdom.h Include File | qdom-h.html
     ntqdragobject.h Include File | qdragobject-h.html
     ntqdrawutil.h Include File | qdrawutil-h.html
     ntqdropsite.h Include File | qdropsite-h.html
    -ntqeditorfactory.h Include File | qeditorfactory-h.html
    +tqeditorfactory.h Include File | tqeditorfactory-h.html
     ntqerrormessage.h Include File | qerrormessage-h.html
     ntqeucjpcodec.h Include File | qeucjpcodec-h.html
     ntqeuckrcodec.h Include File | qeuckrcodec-h.html
    @@ -1356,21 +1356,21 @@ ntqsound.h Include File | qsound-h.html
     ntqspinbox.h Include File | qspinbox-h.html
     ntqsplashscreen.h Include File | qsplashscreen-h.html
     ntqsplitter.h Include File | qsplitter-h.html
    -ntqsql.h Include File | qsql-h.html
    -ntqsqlcursor.h Include File | qsqlcursor-h.html
    -ntqsqldatabase.h Include File | qsqldatabase-h.html
    -ntqsqldriver.h Include File | qsqldriver-h.html
    -ntqsqldriverplugin.h Include File | qsqldriverplugin-h.html
    -ntqsqleditorfactory.h Include File | qsqleditorfactory-h.html
    -ntqsqlerror.h Include File | qsqlerror-h.html
    -ntqsqlfield.h Include File | qsqlfield-h.html
    -ntqsqlform.h Include File | qsqlform-h.html
    -ntqsqlindex.h Include File | qsqlindex-h.html
    -ntqsqlpropertymap.h Include File | qsqlpropertymap-h.html
    -ntqsqlquery.h Include File | qsqlquery-h.html
    -ntqsqlrecord.h Include File | qsqlrecord-h.html
    -ntqsqlresult.h Include File | qsqlresult-h.html
    -ntqsqlselectcursor.h Include File | qsqlselectcursor-h.html
    +tqsql.h Include File | tqsql-h.html
    +tqsqlcursor.h Include File | tqsqlcursor-h.html
    +tqsqldatabase.h Include File | tqsqldatabase-h.html
    +tqsqldriver.h Include File | tqsqldriver-h.html
    +tqsqldriverplugin.h Include File | tqsqldriverplugin-h.html
    +tqsqleditorfactory.h Include File | tqsqleditorfactory-h.html
    +tqsqlerror.h Include File | tqsqlerror-h.html
    +tqsqlfield.h Include File | tqsqlfield-h.html
    +tqsqlform.h Include File | tqsqlform-h.html
    +tqsqlindex.h Include File | tqsqlindex-h.html
    +tqsqlpropertymap.h Include File | tqsqlpropertymap-h.html
    +tqsqlquery.h Include File | tqsqlquery-h.html
    +tqsqlrecord.h Include File | tqsqlrecord-h.html
    +tqsqlresult.h Include File | tqsqlresult-h.html
    +tqsqlselectcursor.h Include File | tqsqlselectcursor-h.html
     ntqstatusbar.h Include File | qstatusbar-h.html
     ntqstring.h Include File | qstring-h.html
     ntqstringlist.h Include File | qstringlist-h.html
    diff --git a/doc/html/tqdatabrowser-h.html b/doc/html/tqdatabrowser-h.html
    new file mode 100644
    index 000000000..5d5da466c
    --- /dev/null
    +++ b/doc/html/tqdatabrowser-h.html
    @@ -0,0 +1,221 @@
    +
    +
    +
    +
    +
    +tqdatabrowser.h Include File
    +
    +
    +
    +
    +
    +
    +
    +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    tqdatabrowser.h

    + +

    This is the verbatim text of the tqdatabrowser.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


    +
    +/****************************************************************************
    +**
    +** Definition of TQDataBrowser class
    +**
    +** Created : 2000-11-03
    +**
    +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
    +**
    +** This file is part of the sql module of the TQt GUI Toolkit.
    +**
    +** This file may be used under the terms of the GNU General Public
    +** License versions 2.0 or 3.0 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.GPL included in the
    +** packaging of this file. Alternatively you may (at your option) use any
    +** later version of the GNU General Public License if such license has
    +** been publicly approved by Trolltech ASA (or its successors, if any)
    +** and the KDE Free TQt Foundation.
    +**
    +** Please review the following information to ensure GNU General
    +** Public Licensing requirements will be met:
    +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
    +** If you are unsure which license is appropriate for your use, please
    +** review the following information:
    +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
    +** or contact the sales department at sales@trolltech.com.
    +**
    +** This file may be used under the terms of the Q Public License as
    +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
    +** included in the packaging of this file.  Licensees holding valid TQt
    +** Commercial licenses may use this file in accordance with the TQt
    +** Commercial License Agreement provided with the Software.
    +**
    +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
    +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
    +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
    +** herein.
    +**
    +**********************************************************************/
    +
    +#ifndef TQDATABROWSER_H
    +#define TQDATABROWSER_H
    +
    +#ifndef QT_H
    +#include "ntqwidget.h"
    +#include "ntqstring.h"
    +#include "ntqstringlist.h"
    +#include "tqsql.h"
    +#include "tqsqlindex.h"
    +#include "tqsqlcursor.h"
    +#include "tqsqlerror.h"
    +#endif // QT_H
    +
    +#ifndef TQT_NO_SQL_VIEW_WIDGETS
    +
    +class TQSqlForm;
    +class TQDataBrowserPrivate;
    +
    +class TQ_EXPORT TQDataBrowser : public TQWidget
    +{
    +    TQ_OBJECT
    +    TQ_PROPERTY( bool boundaryChecking READ boundaryChecking WRITE setBoundaryChecking )
    +    TQ_PROPERTY( TQString filter READ filter WRITE setFilter )
    +    TQ_PROPERTY( TQStringList sort READ sort WRITE setSort )
    +    TQ_PROPERTY( bool confirmEdits READ confirmEdits WRITE setConfirmEdits )
    +    TQ_PROPERTY( bool confirmInsert READ confirmInsert WRITE setConfirmInsert )
    +    TQ_PROPERTY( bool confirmUpdate READ confirmUpdate WRITE setConfirmUpdate )
    +    TQ_PROPERTY( bool confirmDelete READ confirmDelete WRITE setConfirmDelete )
    +    TQ_PROPERTY( bool confirmCancels READ confirmCancels WRITE setConfirmCancels )
    +    TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
    +    TQ_PROPERTY( bool autoEdit READ autoEdit WRITE setAutoEdit )
    +
    +public:
    +    TQDataBrowser( TQWidget* parent=0, const char* name=0, WFlags fl = 0 );
    +    ~TQDataBrowser();
    +
    +    enum Boundary {
    +	Unknown,
    +	None,
    +	BeforeBeginning,
    +	Beginning,
    +	End,
    +	AfterEnd
    +    };
    +
    +    Boundary boundary();
    +    void setBoundaryChecking( bool active );
    +    bool boundaryChecking() const;
    +
    +    void setSort( const TQSqlIndex& sort );
    +    void setSort( const TQStringList& sort );
    +    TQStringList  sort() const;
    +    void setFilter( const TQString& filter );
    +    TQString filter() const;
    +    virtual void setSqlCursor( TQSqlCursor* cursor, bool autoDelete = FALSE );
    +    TQSqlCursor* sqlCursor() const;
    +    virtual void setForm( TQSqlForm* form );
    +    TQSqlForm* form();
    +
    +    virtual void setConfirmEdits( bool confirm );
    +    virtual void setConfirmInsert( bool confirm );
    +    virtual void setConfirmUpdate( bool confirm );
    +    virtual void setConfirmDelete( bool confirm );
    +    virtual void setConfirmCancels( bool confirm );
    +    bool confirmEdits() const;
    +    bool confirmInsert() const;
    +    bool confirmUpdate() const;
    +    bool confirmDelete() const;
    +    bool confirmCancels() const;
    +
    +    virtual void setReadOnly( bool active );
    +    bool isReadOnly() const;
    +    virtual void setAutoEdit( bool autoEdit );
    +    bool autoEdit() const;
    +
    +    virtual bool seek( int i, bool relative = FALSE );
    +
    +signals:
    +    void firstRecordAvailable( bool available );
    +    void lastRecordAvailable( bool available );
    +    void nextRecordAvailable( bool available );
    +    void prevRecordAvailable( bool available );
    +
    +    void currentChanged( const TQSqlRecord* record );
    +    void primeInsert( TQSqlRecord* buf );
    +    void primeUpdate( TQSqlRecord* buf );
    +    void primeDelete( TQSqlRecord* buf );
    +    void beforeInsert( TQSqlRecord* buf );
    +    void beforeUpdate( TQSqlRecord* buf );
    +    void beforeDelete( TQSqlRecord* buf );
    +    void cursorChanged( TQSqlCursor::Mode mode );
    +
    +public slots:
    +    virtual void refresh();
    +
    +    virtual void insert();
    +    virtual void update();
    +    virtual void del();
    +
    +    virtual void first();
    +    virtual void last();
    +    virtual void next();
    +    virtual void prev();
    +
    +    virtual void readFields();
    +    virtual void writeFields();
    +    virtual void clearValues();
    +
    +    void updateBoundary();
    +
    +protected:
    +    virtual bool insertCurrent();
    +    virtual bool updateCurrent();
    +    virtual bool deleteCurrent();
    +    virtual bool currentEdited();
    +
    +    virtual TQSql::Confirm confirmEdit( TQSql::Op m );
    +    virtual TQSql::Confirm confirmCancel( TQSql::Op m );
    +
    +    virtual void handleError( const TQSqlError& error );
    +
    +private:
    +    typedef bool (TQSqlCursor::*Nav)();
    +    bool preNav();
    +    void postNav( bool primeUpd );
    +    void nav( Nav nav );
    +    TQDataBrowserPrivate* d;
    +
    +#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
    +    TQDataBrowser( const TQDataBrowser & );
    +    TQDataBrowser &operator=( const TQDataBrowser & );
    +#endif
    +};
    +
    +
    +#endif
    +#endif
    +
    + +


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqdatabrowser-members.html b/doc/html/tqdatabrowser-members.html new file mode 100644 index 000000000..61c2ceaf0 --- /dev/null +++ b/doc/html/tqdatabrowser-members.html @@ -0,0 +1,394 @@ + + + + + +TQDataBrowser Member List + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    Complete Member List for TQDataBrowser

    + +

    This is the complete list of member functions for +TQDataBrowser, including inherited members. + +

    + +


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqdatabrowser.html b/doc/html/tqdatabrowser.html new file mode 100644 index 000000000..bddce5066 --- /dev/null +++ b/doc/html/tqdatabrowser.html @@ -0,0 +1,715 @@ + + + + + +TQDataBrowser Class + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    TQDataBrowser Class Reference
    [sql module]

    + +

    The TQDataBrowser class provides data manipulation and +navigation for data entry forms. +More... +

    #include <tqdatabrowser.h> +

    Inherits TQWidget. +

    List of all member functions. +

    Public Members

    + +

    Public Slots

    + +

    Signals

    + +

    Properties

    +
      +
    • bool autoEdit - whether the browser automatically applies edits
    • +
    • bool boundaryChecking - whether boundary checking is active
    • +
    • bool confirmCancels - whether the browser confirms cancel operations
    • +
    • bool confirmDelete - whether the browser confirms deletions
    • +
    • bool confirmEdits - whether the browser confirms edits
    • +
    • bool confirmInsert - whether the data browser confirms insertions
    • +
    • bool confirmUpdate - whether the browser confirms updates
    • +
    • TQString filter - the data browser's filter
    • +
    • bool readOnly - whether the browser is read-only
    • +
    • TQStringList sort - the data browser's sort
    • +
    +

    Protected Members

    + +

    Detailed Description

    + + +The TQDataBrowser class provides data manipulation and +navigation for data entry forms. +

    + + +

    A high-level API is provided for navigating through data records +in a cursor, for inserting, updating and deleting records, and for +refreshing data in the display. +

    If you want a read-only form to present database data use +TQDataView; if you want a table-based presentation of your data use +TQDataTable. +

    A TQDataBrowser is used to associate a dataset with a form in much +the same way as a TQDataTable associates a dataset with a table. +Once the data browser has been constructed it can be associated +with a dataset with setSqlCursor(), and with a form with +setForm(). Boundary checking, sorting and filtering can be set +with setBoundaryChecking(), setSort() and setFilter(), +respectively. +

    The insertCurrent() function reads the fields from the default +form into the default cursor and performs the insert. The +updateCurrent() and deleteCurrent() functions perform similarly to +update and delete the current record respectively. +

    The user can be asked to confirm all edits with setConfirmEdits(). +For more precise control use setConfirmInsert(), +setConfirmUpdate(), setConfirmDelete() and setConfirmCancels(). +Use setAutoEdit() to control the behaviour of the form when the +user edits a record and then navigates. +

    The record set is navigated using first(), next(), prev(), last() +and seek(). The form's display is updated with refresh(). When +navigation takes place the firstRecordAvailable(), +lastRecordAvailable(), nextRecordAvailable() and +prevRecordAvailable() signals are emitted. When the cursor record +is changed due to navigation the cursorChanged() signal is +emitted. +

    If you want finer control of the insert, update and delete +processes then you can use the lower level functions to perform +these operations as described below. +

    The form is populated with data from the database with +readFields(). If the user is allowed to edit, (see setReadOnly()), +write the form's data back to the cursor's edit buffer with +writeFields(). You can clear the values in the form with +clearValues(). Editing is performed as follows: +

      +
    • insert When the data browser enters insertion mode it emits the +primeInsert() signal which you can connect to, for example to +pre-populate fields. Call writeFields() to write the user's edits to +the cursor's edit buffer then call insert() to insert the record +into the database. The beforeInsert() signal is emitted just before +the cursor's edit buffer is inserted into the database; connect to +this for example, to populate fields such as an auto-generated +primary key. +
    • update For updates the primeUpdate() signal is emitted when +the data browser enters update mode. After calling writeFields() +call update() to update the record and connect to the beforeUpdate() +signal to manipulate the user's data before the update takes place. +
    • delete For deletion the primeDelete() signal is emitted when +the data browser enters deletion mode. After calling writeFields() +call del() to delete the record and connect to the beforeDelete() +signal, for example to record an audit of the deleted record. +
    +

    See also Database Classes. + +


    Member Type Documentation

    +

    TQDataBrowser::Boundary

    + +

    This enum describes where the data browser is positioned. +

      +
    • TQDataBrowser::Unknown - the boundary cannot be determined (usually because +there is no default cursor, or the default cursor is not active). +
    • TQDataBrowser::None - the browser is not positioned on a boundary, but it is +positioned on a record somewhere in the middle. +
    • TQDataBrowser::BeforeBeginning - the browser is positioned before the +first available record. +
    • TQDataBrowser::Beginning - the browser is positioned at the first record. +
    • TQDataBrowser::End - the browser is positioned at the last +record. +
    • TQDataBrowser::AfterEnd - the browser is positioned after the last +available record. +
    +

    Member Function Documentation

    +

    TQDataBrowser::TQDataBrowser ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 ) +

    +Constructs a data browser which is a child of parent, with the +name name and widget flags set to fl. + +

    TQDataBrowser::~TQDataBrowser () +

    +Destroys the object and frees any allocated resources. + +

    bool TQDataBrowser::autoEdit () const +

    Returns TRUE if the browser automatically applies edits; otherwise returns FALSE. +See the "autoEdit" property for details. +

    void TQDataBrowser::beforeDelete ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted just before the cursor's edit buffer is +deleted from the database. The buf parameter points to the edit +buffer being deleted. You might connect to this signal to capture +some auditing information about the deletion. + +

    void TQDataBrowser::beforeInsert ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted just before the cursor's edit buffer is +inserted into the database. The buf parameter points to the +edit buffer being inserted. You might connect to this signal to +populate a generated primary key for example. + +

    void TQDataBrowser::beforeUpdate ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted just before the cursor's edit buffer is +updated in the database. The buf parameter points to the edit +buffer being updated. You might connect to this signal to capture +some auditing information about the update. + +

    Boundary TQDataBrowser::boundary () +

    +Returns an enum indicating the boundary status of the browser. +

    This is achieved by moving the default cursor and checking the +position, however the current default form values will not be +altered. After checking for the boundary, the cursor is moved back +to its former position. See TQDataBrowser::Boundary. +

    See also Boundary. + +

    bool TQDataBrowser::boundaryChecking () const +

    Returns TRUE if boundary checking is active; otherwise returns FALSE. +See the "boundaryChecking" property for details. +

    void TQDataBrowser::clearValues () [virtual slot] +

    +Clears all the values in the form. +

    All the edit buffer field values are set to their 'zero state', +e.g. 0 for numeric fields and "" for string fields. Then the +widgets are updated using the property map. For example, a +combobox that is property-mapped to integers would scroll to the +first item. See the TQSqlPropertyMap constructor for the default +mappings of widgets to properties. + +

    TQSql::Confirm TQDataBrowser::confirmCancel ( TQSql::Op m ) [virtual protected] +

    +Protected virtual function which returns a confirmation for +cancelling an edit mode m. Derived classes can reimplement this +function and provide their own confirmation dialog. The default +implementation uses a message box which prompts the user to +confirm the edit action. + +

    bool TQDataBrowser::confirmCancels () const +

    Returns TRUE if the browser confirms cancel operations; otherwise returns FALSE. +See the "confirmCancels" property for details. +

    bool TQDataBrowser::confirmDelete () const +

    Returns TRUE if the browser confirms deletions; otherwise returns FALSE. +See the "confirmDelete" property for details. +

    TQSql::Confirm TQDataBrowser::confirmEdit ( TQSql::Op m ) [virtual protected] +

    +Protected virtual function which returns a confirmation for an +edit of mode m. Derived classes can reimplement this function +and provide their own confirmation dialog. The default +implementation uses a message box which prompts the user to +confirm the edit action. + +

    bool TQDataBrowser::confirmEdits () const +

    Returns TRUE if the browser confirms edits; otherwise returns FALSE. +See the "confirmEdits" property for details. +

    bool TQDataBrowser::confirmInsert () const +

    Returns TRUE if the data browser confirms insertions; otherwise returns FALSE. +See the "confirmInsert" property for details. +

    bool TQDataBrowser::confirmUpdate () const +

    Returns TRUE if the browser confirms updates; otherwise returns FALSE. +See the "confirmUpdate" property for details. +

    void TQDataBrowser::currentChanged ( const TQSqlRecord * record ) [signal] +

    + +

    This signal is emitted whenever the current cursor position +changes. The record parameter points to the contents of the +current cursor's record. + +

    bool TQDataBrowser::currentEdited () [virtual protected] +

    +Returns TRUE if the form's edit buffer differs from the current +cursor buffer; otherwise returns FALSE. + +

    void TQDataBrowser::cursorChanged ( TQSqlCursor::Mode mode ) [signal] +

    + +

    This signal is emitted whenever the cursor record was changed due +to navigation. The mode parameter is the edit that just took +place, e.g. Insert, Update or Delete. See TQSqlCursor::Mode. + +

    void TQDataBrowser::del () [virtual slot] +

    +Performs a delete operation on the data browser's cursor. If there +is no default cursor or no default form, nothing happens. +

    Otherwise, the following happens: +

    The current form's record is deleted from the database, providing +that the data browser is not in insert mode. If the data browser +is actively inserting a record (see insert()), the insert action +is canceled, and the browser navigates to the last valid record +that was current. If there is an error, handleError() is called. + +

    bool TQDataBrowser::deleteCurrent () [virtual protected] +

    +Performs a delete on the default cursor using the values from the +default form and updates the default form. If there is no default +form or no default cursor, nothing happens. If the deletion was +successful, the cursor is repositioned to the nearest record and +TRUE is returned. The nearest record is the next record if there +is one otherwise the previous record if there is one. If an error +occurred during the deletion from the database, handleError() is +called and FALSE is returned. +

    See also cursor, form(), and handleError(). + +

    TQString TQDataBrowser::filter () const +

    Returns the data browser's filter. +See the "filter" property for details. +

    void TQDataBrowser::first () [virtual slot] +

    +Moves the default cursor to the first record and refreshes the +default form to display this record. If there is no default form +or no default cursor, nothing happens. If the data browser +successfully navigated to the first record, the default cursor is +primed for update and the primeUpdate() signal is emitted. +

    If the browser is already positioned on the first record nothing +happens. +

    +

    void TQDataBrowser::firstRecordAvailable ( bool available ) [signal] +

    + +

    This signal is emitted whenever the position of the cursor +changes. The available parameter indicates whether or not the +first record in the default cursor is available. + +

    TQSqlForm * TQDataBrowser::form () +

    +Returns the data browser's default form or 0 if no form has been +set. + +

    void TQDataBrowser::handleError ( const TQSqlError & error ) [virtual protected] +

    +Virtual function which handles the error error. The default +implementation warns the user with a message box. + +

    void TQDataBrowser::insert () [virtual slot] +

    +Performs an insert operation on the data browser's cursor. If +there is no default cursor or no default form, nothing happens. +

    If auto-editing is on (see setAutoEdit()), the following happens: +

      +
    • If the browser is already actively inserting a record, +the current form's data is inserted into the database. +
    • If the browser is not inserting a record, but the current record +was changed by the user, the record is updated in the database with +the current form's data (i.e. with the changes). +
    +

    If there is an error handling any of the above auto-edit actions, +handleError() is called and no insert or update is performed. +

    If no error occurred, or auto-editing is not enabled, the data browser +begins actively inserting a record into the database by performing the +following actions: +

      +
    • The default cursor is primed for insert using TQSqlCursor::primeInsert(). +
    • The primeInsert() signal is emitted. +
    • The form is updated with the values in the default cursor's. +edit buffer so that the user can fill in the values to be inserted. +
    +

    +

    bool TQDataBrowser::insertCurrent () [virtual protected] +

    +Reads the fields from the default form into the default cursor and +performs an insert on the default cursor. If there is no default +form or no default cursor, nothing happens. If an error occurred +during the insert into the database, handleError() is called and +FALSE is returned. If the insert was successfull, the cursor is +refreshed and relocated to the newly inserted record, the +cursorChanged() signal is emitted, and TRUE is returned. +

    See also cursorChanged(), sqlCursor(), form(), and handleError(). + +

    bool TQDataBrowser::isReadOnly () const +

    Returns TRUE if the browser is read-only; otherwise returns FALSE. +See the "readOnly" property for details. +

    void TQDataBrowser::last () [virtual slot] +

    +Moves the default cursor to the last record and refreshes the +default form to display this record. If there is no default form +or no default cursor, nothing happens. If the data browser +successfully navigated to the last record, the default cursor is +primed for update and the primeUpdate() signal is emitted. +

    If the browser is already positioned on the last record nothing +happens. + +

    void TQDataBrowser::lastRecordAvailable ( bool available ) [signal] +

    + +

    This signal is emitted whenever the position of the cursor +changes. The available parameter indicates whether or not the +last record in the default cursor is available. + +

    void TQDataBrowser::next () [virtual slot] +

    +Moves the default cursor to the next record and refreshes the +default form to display this record. If there is no default form +or no default cursor, nothing happens. If the data browser +successfully navigated to the next record, the default cursor is +primed for update and the primeUpdate() signal is emitted. +

    If the browser is positioned on the last record nothing happens. + +

    void TQDataBrowser::nextRecordAvailable ( bool available ) [signal] +

    + +

    This signal is emitted whenever the position of the cursor +changes. The available parameter indicates whether or not the +next record in the default cursor is available. + +

    void TQDataBrowser::prev () [virtual slot] +

    +Moves the default cursor to the previous record and refreshes the +default form to display this record. If there is no default form +or no default cursor, nothing happens. If the data browser +successfully navigated to the previous record, the default cursor +is primed for update and the primeUpdate() signal is emitted. +

    If the browser is positioned on the first record nothing happens. + +

    void TQDataBrowser::prevRecordAvailable ( bool available ) [signal] +

    + +

    This signal is emitted whenever the position of the cursor +changes. The available parameter indicates whether or not the +previous record in the default cursor is available. + +

    void TQDataBrowser::primeDelete ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted when the data browser enters deletion mode. +The buf parameter points to the record buffer being deleted. +(Note that TQSqlCursor::primeDelete() is not called on the +default cursor, as this would corrupt values in the form.) +Connect to this signal in order to, for example, save a copy of +the deleted record for auditing purposes. +

    See also del(). + +

    void TQDataBrowser::primeInsert ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted when the data browser enters insertion +mode. The buf parameter points to the record buffer that is to +be inserted. Connect to this signal to, for example, prime the +record buffer with default data values, auto-numbered fields etc. +(Note that TQSqlCursor::primeInsert() is not called on the +default cursor, as this would corrupt values in the form.) +

    See also insert(). + +

    void TQDataBrowser::primeUpdate ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted when the data browser enters update mode. +Note that during navigation (first(), last(), next(), prev()), +each record that is shown in the default form is primed for +update. The buf parameter points to the record buffer being +updated. (Note that TQSqlCursor::primeUpdate() is not called on +the default cursor, as this would corrupt values in the form.) +Connect to this signal in order to, for example, keep track of +which records have been updated, perhaps for auditing purposes. +

    See also update(). + +

    void TQDataBrowser::readFields () [virtual slot] +

    +Reads the fields from the default cursor's edit buffer and +displays them in the form. If there is no default cursor or no +default form, nothing happens. + +

    void TQDataBrowser::refresh () [virtual slot] +

    +Refreshes the data browser's data using the default cursor. The +browser's current filter and sort are applied if they have been +set. +

    See also filter and sort. + +

    bool TQDataBrowser::seek ( int i, bool relative = FALSE ) [virtual] +

    +Moves the default cursor to the record specified by the index i +and refreshes the default form to display this record. If there is +no default form or no default cursor, nothing happens. If relative is TRUE (the default is FALSE), the cursor is moved +relative to its current position. If the data browser successfully +navigated to the desired record, the default cursor is primed for +update and the primeUpdate() signal is emitted. +

    If the browser is already positioned on the desired record nothing +happens. + +

    void TQDataBrowser::setAutoEdit ( bool autoEdit ) [virtual] +

    Sets whether the browser automatically applies edits to autoEdit. +See the "autoEdit" property for details. +

    void TQDataBrowser::setBoundaryChecking ( bool active ) +

    Sets whether boundary checking is active to active. +See the "boundaryChecking" property for details. +

    void TQDataBrowser::setConfirmCancels ( bool confirm ) [virtual] +

    Sets whether the browser confirms cancel operations to confirm. +See the "confirmCancels" property for details. +

    void TQDataBrowser::setConfirmDelete ( bool confirm ) [virtual] +

    Sets whether the browser confirms deletions to confirm. +See the "confirmDelete" property for details. +

    void TQDataBrowser::setConfirmEdits ( bool confirm ) [virtual] +

    Sets whether the browser confirms edits to confirm. +See the "confirmEdits" property for details. +

    void TQDataBrowser::setConfirmInsert ( bool confirm ) [virtual] +

    Sets whether the data browser confirms insertions to confirm. +See the "confirmInsert" property for details. +

    void TQDataBrowser::setConfirmUpdate ( bool confirm ) [virtual] +

    Sets whether the browser confirms updates to confirm. +See the "confirmUpdate" property for details. +

    void TQDataBrowser::setFilter ( const TQString & filter ) +

    Sets the data browser's filter to filter. +See the "filter" property for details. +

    void TQDataBrowser::setForm ( TQSqlForm * form ) [virtual] +

    +Sets the browser's default form to form. The cursor and all +navigation and data manipulation functions that the browser +provides become available to the form. + +

    void TQDataBrowser::setReadOnly ( bool active ) [virtual] +

    Sets whether the browser is read-only to active. +See the "readOnly" property for details. +

    void TQDataBrowser::setSort ( const TQStringList & sort ) +

    Sets the data browser's sort to sort. +See the "sort" property for details. +

    void TQDataBrowser::setSort ( const TQSqlIndex & sort ) +

    +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

    Sets the data browser's sort to the TQSqlIndex sort. To apply +the new sort, use refresh(). +

    +

    void TQDataBrowser::setSqlCursor ( TQSqlCursor * cursor, bool autoDelete = FALSE ) [virtual] +

    +Sets the default cursor used by the data browser to cursor. If +autoDelete is TRUE (the default is FALSE), the data browser +takes ownership of the cursor pointer, which will be deleted +when the browser is destroyed, or when setSqlCursor() is called +again. To activate the cursor use refresh(). The cursor's edit +buffer is used in the default form to browse and edit records. +

    See also sqlCursor(), form(), and setForm(). + +

    TQStringList TQDataBrowser::sort () const +

    Returns the data browser's sort. +See the "sort" property for details. +

    TQSqlCursor * TQDataBrowser::sqlCursor () const +

    +Returns the default cursor used for navigation, or 0 if there is +no default cursor. +

    See also setSqlCursor(). + +

    void TQDataBrowser::update () [virtual slot] +

    +Performs an update operation on the data browser's cursor. +

    If there is no default cursor or no default form, nothing happens. +Otherwise, the following happens: +

    If the data browser is actively inserting a record (see insert()), +that record is inserted into the database using insertCurrent(). +Otherwise, the database is updated with the current form's data +using updateCurrent(). If there is an error handling either +action, handleError() is called. + +

    void TQDataBrowser::updateBoundary () [slot] +

    +If boundaryChecking() is TRUE, checks the boundary of the current +default cursor and emits signals which indicate the position of +the cursor. + +

    bool TQDataBrowser::updateCurrent () [virtual protected] +

    +Reads the fields from the default form into the default cursor and +performs an update on the default cursor. If there is no default +form or no default cursor, nothing happens. If an error occurred +during the update on the database, handleError() is called and +FALSE is returned. If the update was successfull, the cursor is +refreshed and relocated to the updated record, the cursorChanged() +signal is emitted, and TRUE is returned. +

    See also cursor, form(), and handleError(). + +

    void TQDataBrowser::writeFields () [virtual slot] +

    +Writes the form's data to the default cursor's edit buffer. If +there is no default cursor or no default form, nothing happens. + +

    Property Documentation

    +

    bool autoEdit

    +

    This property holds whether the browser automatically applies edits. +

    The default value for this property is TRUE. When the user begins +an insertion or an update on a form there are two possible +outcomes when they navigate to another record: +

      +
    • the insert or update is is performed -- this occurs if autoEdit is TRUE +
    • the insert or update is discarded -- this occurs if autoEdit is FALSE +
    + +

    Set this property's value with setAutoEdit() and get this property's value with autoEdit(). +

    bool boundaryChecking

    +

    This property holds whether boundary checking is active. +

    When boundary checking is active (the default), signals are +emitted indicating the current position of the default cursor. +

    See also boundary(). + +

    Set this property's value with setBoundaryChecking() and get this property's value with boundaryChecking(). +

    bool confirmCancels

    +

    This property holds whether the browser confirms cancel operations. +

    If this property is TRUE, all cancels must be confirmed by the +user through a message box (this behavior can be changed by +overriding the confirmCancel() function), otherwise all cancels +occur immediately. The default is FALSE. +

    See also confirmEdits and confirmCancel(). + +

    Set this property's value with setConfirmCancels() and get this property's value with confirmCancels(). +

    bool confirmDelete

    +

    This property holds whether the browser confirms deletions. +

    If this property is TRUE, the browser confirms deletions, +otherwise deletions happen immediately. +

    See also confirmCancels, confirmEdits, confirmUpdate, confirmInsert, and confirmEdit(). + +

    Set this property's value with setConfirmDelete() and get this property's value with confirmDelete(). +

    bool confirmEdits

    +

    This property holds whether the browser confirms edits. +

    If this property is TRUE, the browser confirms all edit operations +(insertions, updates and deletions), otherwise all edit operations +happen immediately. Confirmation is achieved by presenting the +user with a message box -- this behavior can be changed by +reimplementing the confirmEdit() function, +

    See also confirmEdit(), confirmCancels, confirmInsert, confirmUpdate, and confirmDelete. + +

    Set this property's value with setConfirmEdits() and get this property's value with confirmEdits(). +

    bool confirmInsert

    +

    This property holds whether the data browser confirms insertions. +

    If this property is TRUE, the browser confirms insertions, +otherwise insertions happen immediately. +

    See also confirmCancels, confirmEdits, confirmUpdate, confirmDelete, and confirmEdit(). + +

    Set this property's value with setConfirmInsert() and get this property's value with confirmInsert(). +

    bool confirmUpdate

    +

    This property holds whether the browser confirms updates. +

    If this property is TRUE, the browser confirms updates, otherwise +updates happen immediately. +

    See also confirmCancels, confirmEdits, confirmInsert, confirmDelete, and confirmEdit(). + +

    Set this property's value with setConfirmUpdate() and get this property's value with confirmUpdate(). +

    TQString filter

    +

    This property holds the data browser's filter. +

    The filter applies to the data shown in the browser. Call +refresh() to apply the new filter. A filter is a string containing +a SQL WHERE clause without the WHERE keyword, e.g. "id>1000", +"name LIKE 'A%'", etc. +

    There is no default filter. +

    See also sort. + +

    Set this property's value with setFilter() and get this property's value with filter(). +

    bool readOnly

    +

    This property holds whether the browser is read-only. +

    The default is FALSE, i.e. data can be edited. If the data browser +is read-only, no database edits will be allowed. + +

    Set this property's value with setReadOnly() and get this property's value with isReadOnly(). +

    TQStringList sort

    +

    This property holds the data browser's sort. +

    The data browser's sort affects the order in which records are +viewed in the browser. Call refresh() to apply the new sort. +

    When retrieving the sort property, a string list is returned in +the form 'fieldname order', e.g. 'id ASC', 'surname DESC'. +

    There is no default sort. +

    Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

    +    TQStringList list = myDataBrowser.sort();
    +    TQStringList::Iterator it = list.begin();
    +    while( it != list.end() ) {
    +        myProcessing( *it );
    +        ++it;
    +    }
    +    
    + + +

    Set this property's value with setSort() and get this property's value with sort(). + +


    +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqdatatable-h.html b/doc/html/tqdatatable-h.html new file mode 100644 index 000000000..783eb241e --- /dev/null +++ b/doc/html/tqdatatable-h.html @@ -0,0 +1,288 @@ + + + + + +tqdatatable.h Include File + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    tqdatatable.h

    + +

    This is the verbatim text of the tqdatatable.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


    +
    +/****************************************************************************
    +**
    +** Definition of TQDataTable class
    +**
    +** Created : 2000-11-03
    +**
    +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
    +**
    +** This file is part of the sql module of the TQt GUI Toolkit.
    +**
    +** This file may be used under the terms of the GNU General Public
    +** License versions 2.0 or 3.0 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.GPL included in the
    +** packaging of this file. Alternatively you may (at your option) use any
    +** later version of the GNU General Public License if such license has
    +** been publicly approved by Trolltech ASA (or its successors, if any)
    +** and the KDE Free TQt Foundation.
    +**
    +** Please review the following information to ensure GNU General
    +** Public Licensing requirements will be met:
    +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
    +** If you are unsure which license is appropriate for your use, please
    +** review the following information:
    +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
    +** or contact the sales department at sales@trolltech.com.
    +**
    +** This file may be used under the terms of the Q Public License as
    +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
    +** included in the packaging of this file.  Licensees holding valid TQt
    +** Commercial licenses may use this file in accordance with the TQt
    +** Commercial License Agreement provided with the Software.
    +**
    +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
    +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
    +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
    +** herein.
    +**
    +**********************************************************************/
    +
    +#ifndef TQDATATABLE_H
    +#define TQDATATABLE_H
    +
    +#ifndef QT_H
    +#include "ntqstring.h"
    +#include "ntqvariant.h"
    +#include "ntqtable.h"
    +#include "tqsql.h"
    +#include "tqsqlcursor.h"
    +#include "tqsqlindex.h"
    +#include "tqsqleditorfactory.h"
    +#include "ntqiconset.h"
    +#endif // QT_H
    +
    +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
    +#define TQM_EXPORT_SQL
    +#else
    +#define TQM_EXPORT_SQL TQ_EXPORT
    +#endif
    +
    +#ifndef TQT_NO_SQL_VIEW_WIDGETS
    +
    +class TQPainter;
    +class TQSqlField;
    +class TQSqlPropertyMap;
    +class TQDataTablePrivate;
    +
    +class TQM_EXPORT_SQL TQDataTable : public TQTable
    +{
    +    TQ_OBJECT
    +
    +    TQ_PROPERTY( TQString nullText READ nullText WRITE setNullText )
    +    TQ_PROPERTY( TQString trueText READ trueText WRITE setTrueText )
    +    TQ_PROPERTY( TQString falseText READ falseText WRITE setFalseText )
    +    TQ_PROPERTY( DateFormat dateFormat READ dateFormat WRITE setDateFormat )
    +    TQ_PROPERTY( bool confirmEdits READ confirmEdits WRITE setConfirmEdits )
    +    TQ_PROPERTY( bool confirmInsert READ confirmInsert WRITE setConfirmInsert )
    +    TQ_PROPERTY( bool confirmUpdate READ confirmUpdate WRITE setConfirmUpdate )
    +    TQ_PROPERTY( bool confirmDelete READ confirmDelete WRITE setConfirmDelete )
    +    TQ_PROPERTY( bool confirmCancels READ confirmCancels WRITE setConfirmCancels )
    +    TQ_PROPERTY( bool autoEdit READ autoEdit WRITE setAutoEdit )
    +    TQ_PROPERTY( TQString filter READ filter WRITE setFilter )
    +    TQ_PROPERTY( TQStringList sort READ sort WRITE setSort )
    +    TQ_PROPERTY( int numCols READ numCols )
    +    TQ_PROPERTY( int numRows READ numRows )
    +
    +public:
    +    TQDataTable ( TQWidget* parent=0, const char* name=0 );
    +    TQDataTable ( TQSqlCursor* cursor, bool autoPopulate = FALSE, TQWidget* parent=0, const char* name=0 );
    +    ~TQDataTable();
    +
    +    virtual void addColumn( const TQString& fieldName,
    +			    const TQString& label = TQString::null,
    +			    int width = -1,
    +			    const TQIconSet& iconset = TQIconSet() );
    +    virtual void removeColumn( uint col );
    +    virtual void setColumn( uint col, const TQString& fieldName,
    +			    const TQString& label = TQString::null,
    +			    int width = -1,
    +			    const TQIconSet& iconset = TQIconSet() );
    +
    +    TQString      nullText() const;
    +    TQString      trueText() const;
    +    TQString      falseText() const;
    +    DateFormat   dateFormat() const;
    +    bool         confirmEdits() const;
    +    bool         confirmInsert() const;
    +    bool         confirmUpdate() const;
    +    bool         confirmDelete() const;
    +    bool         confirmCancels() const;
    +    bool         autoDelete() const;
    +    bool         autoEdit() const;
    +    TQString      filter() const;
    +    TQStringList  sort() const;
    +
    +    virtual void setSqlCursor( TQSqlCursor* cursor = 0,
    +			    bool autoPopulate = FALSE, bool autoDelete = FALSE );
    +    TQSqlCursor* sqlCursor() const;
    +
    +    virtual void setNullText( const TQString& nullText );
    +    virtual void setTrueText( const TQString& trueText );
    +    virtual void setFalseText( const TQString& falseText );
    +    virtual void setDateFormat( const DateFormat f );
    +    virtual void setConfirmEdits( bool confirm );
    +    virtual void setConfirmInsert( bool confirm );
    +    virtual void setConfirmUpdate( bool confirm );
    +    virtual void setConfirmDelete( bool confirm );
    +    virtual void setConfirmCancels( bool confirm );
    +    virtual void setAutoDelete( bool enable );
    +    virtual void setAutoEdit( bool autoEdit );
    +    virtual void setFilter( const TQString& filter );
    +    virtual void setSort( const TQStringList& sort );
    +    virtual void setSort( const TQSqlIndex& sort );
    +
    +    enum Refresh {
    +	RefreshData = 1,
    +	RefreshColumns = 2,
    +	RefreshAll = 3
    +    };
    +    void         refresh( Refresh mode );
    +    void         sortColumn ( int col, bool ascending = TRUE,
    +			      bool wholeRows = FALSE );
    +    TQString      text ( int row, int col ) const;
    +    TQVariant     value ( int row, int col ) const;
    +    TQSqlRecord*  currentRecord() const;
    +
    +    void         installEditorFactory( TQSqlEditorFactory * f );
    +    void         installPropertyMap( TQSqlPropertyMap* m );
    +
    +    int          numCols() const;
    +    int          numRows() const;
    +    void         setNumCols( int c );
    +    void         setNumRows ( int r );
    +    bool         findBuffer( const TQSqlIndex& idx, int atHint = 0 );
    +
    +    void 	 hideColumn( int col );
    +    void 	 showColumn( int col );
    +signals:
    +    void         currentChanged( TQSqlRecord* record );
    +    void         primeInsert( TQSqlRecord* buf );
    +    void         primeUpdate( TQSqlRecord* buf );
    +    void         primeDelete( TQSqlRecord* buf );
    +    void         beforeInsert( TQSqlRecord* buf );
    +    void         beforeUpdate( TQSqlRecord* buf );
    +    void         beforeDelete( TQSqlRecord* buf );
    +    void         cursorChanged( TQSql::Op mode );
    +
    +public slots:
    +    virtual void find( const TQString & str, bool caseSensitive,
    +			     bool backwards );
    +    virtual void sortAscending( int col );
    +    virtual void sortDescending( int col );
    +    virtual void refresh();
    +    void setColumnWidth( int col, int w );
    +    void adjustColumn( int col );
    +    void setColumnStretchable( int col, bool stretch );
    +    void swapColumns( int col1, int col2, bool swapHeaders = FALSE );
    +
    +protected:
    +    virtual bool insertCurrent();
    +    virtual bool updateCurrent();
    +    virtual bool deleteCurrent();
    +
    +    virtual TQSql::Confirm confirmEdit( TQSql::Op m );
    +    virtual TQSql::Confirm confirmCancel( TQSql::Op m );
    +
    +    virtual void handleError( const TQSqlError& e );
    +
    +    virtual bool beginInsert();
    +    virtual TQWidget* beginUpdate ( int row, int col, bool replace );
    +
    +    bool         eventFilter( TQObject *o, TQEvent *e );
    +    void         keyPressEvent( TQKeyEvent* );
    +    void         resizeEvent ( TQResizeEvent * );
    +    void         contentsMousePressEvent( TQMouseEvent* e );
    +    void         contentsContextMenuEvent( TQContextMenuEvent* e );
    +    void         endEdit( int row, int col, bool accept, bool replace );
    +    TQWidget *    createEditor( int row, int col, bool initFromCell ) const;
    +    void         activateNextCell();
    +    int          indexOf( uint i ) const; // ### make this public in 4.0
    +    void         reset();
    +    void         setSize( TQSqlCursor* sql );
    +    void         repaintCell( int row, int col );
    +    void         paintCell ( TQPainter * p, int row, int col, const TQRect & cr,
    +			     bool selected, const TQColorGroup &cg );
    +    virtual void paintField( TQPainter * p, const TQSqlField* field, const TQRect & cr,
    +			     bool selected );
    +    void	 drawContents( TQPainter * p, int cx, int cy, int cw, int ch );
    +    virtual int  fieldAlignment( const TQSqlField* field );
    +    void         columnClicked ( int col );
    +    void         resizeData ( int len );
    +
    +    TQTableItem * item ( int row, int col ) const;
    +    void         setItem ( int row, int col, TQTableItem * item );
    +    void         clearCell ( int row, int col ) ;
    +    void         setPixmap ( int row, int col, const TQPixmap & pix );
    +    void         takeItem ( TQTableItem * i );
    +
    +private slots:
    +    void         loadNextPage();
    +    void         setCurrentSelection( int row, int col );
    +    void         updateCurrentSelection();
    +    void 	 sliderPressed();
    +    void 	 sliderReleased();
    +    void	 doInsertCurrent();
    +    void	 doUpdateCurrent();
    +    
    +private:
    +    TQString 	 fieldToString( const TQSqlField * field );
    +    void         init();
    +    TQWidget*     beginEdit ( int row, int col, bool replace );
    +    void         updateRow( int row );
    +    void         endInsert();
    +    void         endUpdate();
    +    TQDataTablePrivate* d;
    +
    +#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
    +    TQDataTable( const TQDataTable & );
    +    TQDataTable &operator=( const TQDataTable & );
    +#endif
    +};
    +
    +#endif
    +#endif
    +
    + +


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqdatatable-members.html b/doc/html/tqdatatable-members.html new file mode 100644 index 000000000..4a03fef59 --- /dev/null +++ b/doc/html/tqdatatable-members.html @@ -0,0 +1,604 @@ + + + + + +TQDataTable Member List + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    Complete Member List for TQDataTable

    + +

    This is the complete list of member functions for +TQDataTable, including inherited members. + +

    + +


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqdatatable.html b/doc/html/tqdatatable.html new file mode 100644 index 000000000..c659f6f85 --- /dev/null +++ b/doc/html/tqdatatable.html @@ -0,0 +1,809 @@ + + + + + +TQDataTable Class + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    TQDataTable Class Reference
    [sql module]

    + +

    The TQDataTable class provides a flexible SQL table widget that supports browsing and editing. +More... +

    #include <tqdatatable.h> +

    Inherits TQTable. +

    List of all member functions. +

    Public Members

    + +

    Public Slots

    + +

    Signals

    + +

    Properties

    +
      +
    • bool autoEdit - whether the data table automatically applies edits
    • +
    • bool confirmCancels - whether the data table confirms cancel operations
    • +
    • bool confirmDelete - whether the data table confirms delete operations
    • +
    • bool confirmEdits - whether the data table confirms edit operations
    • +
    • bool confirmInsert - whether the data table confirms insert operations
    • +
    • bool confirmUpdate - whether the data table confirms update operations
    • +
    • DateFormat dateFormat - the format used for displaying date/time values
    • +
    • TQString falseText - the text used to represent false values
    • +
    • TQString filter - the data filter for the data table
    • +
    • TQString nullText - the text used to represent NULL values
    • +
    • int numCols - the number of columns in the table  (read only)
    • +
    • int numRows - the number of rows in the table  (read only)
    • +
    • TQStringList sort - the data table's sort
    • +
    • TQString trueText - the text used to represent true values
    • +
    +

    Protected Members

    + +

    Detailed Description

    + + +The TQDataTable class provides a flexible SQL table widget that supports browsing and editing. +

    + + +

    TQDataTable supports various functions for presenting and editing +SQL data from a TQSqlCursor in a table. +

    If you want a to present your data in a form use TQDataBrowser, or +for read-only forms, TQDataView. +

    When displaying data, TQDataTable only retrieves data for visible +rows. If the driver supports the 'query size' property the +TQDataTable will have the correct number of rows and the vertical +scrollbar will accurately reflect the number of rows displayed in +proportion to the number of rows in the dataset. If the driver +does not support the 'query size' property, rows are dynamically +fetched from the database on an as-needed basis with the scrollbar +becoming more accurate as the user scrolls down through the +records. This allows extremely large queries to be displayed as +quickly as possible, with minimum memory usage. +

    TQDataTable inherits TQTable's API and extends it with functions to +sort and filter the data and sort columns. See setSqlCursor(), +setFilter(), setSort(), setSorting(), sortColumn() and refresh(). +

    When displaying editable cursors, cell editing will be enabled. +(For more information on editable cursors, see TQSqlCursor). +TQDataTable can be used to modify existing data and to add new +records. When a user makes changes to a field in the table, the +cursor's edit buffer is used. The table will not send changes in +the edit buffer to the database until the user moves to a +different record in the grid or presses Enter. Cell editing is +initiated by pressing F2 (or right clicking and then clicking the +appropriate popup menu item) and canceled by pressing Esc. If +there is a problem updating or adding data, errors are handled +automatically (see handleError() to change this behavior). Note +that if autoEdit() is FALSE navigating to another record will +cancel the insert or update. +

    The user can be asked to confirm all edits with setConfirmEdits(). +For more precise control use setConfirmInsert(), +setConfirmUpdate(), setConfirmDelete() and setConfirmCancels(). +Use setAutoEdit() to control the behaviour of the table when the +user edits a record and then navigates. (Note that setAutoDelete() +is unrelated; it is used to set whether the TQSqlCursor is deleted +when the table is deleted.) +

    Since the data table can perform edits, it must be able to +uniquely identify every record so that edits are correctly +applied. Because of this the underlying cursor must have a valid +primary index to ensure that a unique record is inserted, updated +or deleted within the database otherwise the database may be +changed to an inconsistent state. +

    TQDataTable creates editors using the default TQSqlEditorFactory. +Different editor factories can be used by calling +installEditorFactory(). A property map is used to map between the +cell's value and the editor. You can use your own property map +with installPropertyMap(). +

    The contents of a cell is available as a TQString with text() or as +a TQVariant with value(). The current record is returned by +currentRecord(). Use the find() function to search for a string in +the table. +

    Editing actions can be applied programatically. For example, the +insertCurrent() function reads the fields from the current record +into the cursor and performs the insert. The updateCurrent() and +deleteCurrent() functions perform similarly to update and delete +the current record respectively. +

    Columns in the table can be created automatically based on the +cursor (see setSqlCursor()). Columns can be manipulated manually +using addColumn(), removeColumn() and setColumn(). +

    The table automatically copies many of the properties of the +cursor to format the display of data within cells (alignment, +visibility, etc.). The cursor can be changed with setSqlCursor(). +The filter (see setFilter()) and sort defined within the table are +used instead of the filter and sort set on the cursor. For sorting +options see setSort(), sortColumn(), sortAscending() and +sortDescending(). Note that sorting operations will not behave as +expected if you are using a TQSqlSelectCursor because it uses +user-defined SQL queries to obtain data. +

    The text used to represent NULL, TRUE and FALSE values can be +changed with setNullText(), setTrueText() and setFalseText() +respectively. You can change the appearance of cells by +reimplementing paintField(). +

    Whenever a new row is selected in the table the currentChanged() +signal is emitted. The primeInsert() signal is emitted when an +insert is initiated. The primeUpdate() and primeDelete() signals +are emitted when update and deletion are initiated respectively. +Just before the database is updated a signal is emitted; +beforeInsert(), beforeUpdate() or beforeDelete() as appropriate. +

    See also Database Classes. + +


    Member Type Documentation

    +

    TQDataTable::Refresh

    + +

    This enum describes the refresh options. +

      +
    • TQDataTable::RefreshData - refresh the data, i.e. read it from the database +
    • TQDataTable::RefreshColumns - refresh the list of fields, e.g. the column headings +
    • TQDataTable::RefreshAll - refresh both the data and the list of fields +
    +

    Member Function Documentation

    +

    TQDataTable::TQDataTable ( TQWidget * parent = 0, const char * name = 0 ) +

    +Constructs a data table which is a child of parent, called +name name. + +

    TQDataTable::TQDataTable ( TQSqlCursor * cursor, bool autoPopulate = FALSE, TQWidget * parent = 0, const char * name = 0 ) +

    +Constructs a data table which is a child of parent, called name +name using the cursor cursor. +

    If autoPopulate is TRUE (the default is FALSE), columns are +automatically created based upon the fields in the cursor +record. Note that autoPopulate only governs the creation of +columns; to load the cursor's data into the table use refresh(). +

    If the cursor is read-only, the table also becomes read-only. +In addition, the table adopts the cursor's driver's definition for +representing NULL values as strings. + +

    TQDataTable::~TQDataTable () +

    +Destroys the object and frees any allocated resources. + +

    void TQDataTable::addColumn ( const TQString & fieldName, const TQString & label = TQString::null, int width = -1, const TQIconSet & iconset = TQIconSet ( ) ) [virtual] +

    +Adds the next column to be displayed using the field fieldName, +column label label, width width and iconset iconset. +

    If label is specified, it is used as the column's header label, +otherwise the field's display label is used when setSqlCursor() is +called. The iconset is used to set the icon used by the column +header; by default there is no icon. +

    See also setSqlCursor() and refresh(). + +

    Examples: sql/overview/subclass1/main.cpp, sql/overview/subclass3/main.cpp, sql/overview/table2/main.cpp, and sql/sqltable/main.cpp. +

    void TQDataTable::adjustColumn ( int col ) [virtual slot] +

    +Resizes column col so that the column width is wide enough to +display the widest item the column contains (including the column +label). If the table's TQSqlCursor is not currently active, the +cursor will be refreshed before the column width is calculated. Be +aware that this function may be slow on tables that contain large +result sets. + +

    Reimplemented from TQTable. +

    bool TQDataTable::autoDelete () const +

    +Returns TRUE if the table will automatically delete the cursor +specified by setSqlCursor(); otherwise returns FALSE. + +

    bool TQDataTable::autoEdit () const +

    Returns TRUE if the data table automatically applies edits; otherwise returns FALSE. +See the "autoEdit" property for details. +

    void TQDataTable::beforeDelete ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted just before the currently selected record +is deleted from the database. The buf parameter points to the +edit buffer being deleted. Connect to this signal to, for example, +copy some of the fields for later use. + +

    void TQDataTable::beforeInsert ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted just before the cursor's edit buffer is +inserted into the database. The buf parameter points to the +edit buffer being inserted. Connect to this signal to, for +example, populate a key field with a unique sequence number. + +

    void TQDataTable::beforeUpdate ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted just before the cursor's edit buffer is +updated in the database. The buf parameter points to the edit +buffer being updated. Connect to this signal when you want to +transform the user's data behind-the-scenes. + +

    bool TQDataTable::beginInsert () [virtual protected] +

    +Protected virtual function called when editing is about to begin +on a new record. If the table is read-only, or if there's no +cursor or the cursor does not allow inserts, nothing happens. +

    Editing takes place using the cursor's edit buffer(see +TQSqlCursor::editBuffer()). +

    When editing begins, a new row is created in the table marked with +an asterisk '*' in the row's vertical header column, i.e. at the +left of the row. + +

    TQWidget * TQDataTable::beginUpdate ( int row, int col, bool replace ) [virtual protected] +

    +Protected virtual function called when editing is about to begin +on an existing row. If the table is read-only, or if there's no +cursor, nothing happens. +

    Editing takes place using the cursor's edit buffer (see +TQSqlCursor::editBuffer()). +

    row and col refer to the row and column in the TQDataTable. +

    (replace is provided for reimplementors and reflects the API of +TQTable::beginEdit().) + +

    TQSql::Confirm TQDataTable::confirmCancel ( TQSql::Op m ) [virtual protected] +

    +Protected virtual function which returns a confirmation for +cancelling an edit mode of m. Derived classes can reimplement +this function to provide their own cancel dialog. The default +implementation uses a message box which prompts the user to +confirm the cancel. + +

    bool TQDataTable::confirmCancels () const +

    Returns TRUE if the data table confirms cancel operations; otherwise returns FALSE. +See the "confirmCancels" property for details. +

    bool TQDataTable::confirmDelete () const +

    Returns TRUE if the data table confirms delete operations; otherwise returns FALSE. +See the "confirmDelete" property for details. +

    TQSql::Confirm TQDataTable::confirmEdit ( TQSql::Op m ) [virtual protected] +

    +Protected virtual function which returns a confirmation for an +edit of mode m. Derived classes can reimplement this function +to provide their own confirmation dialog. The default +implementation uses a message box which prompts the user to +confirm the edit action. + +

    bool TQDataTable::confirmEdits () const +

    Returns TRUE if the data table confirms edit operations; otherwise returns FALSE. +See the "confirmEdits" property for details. +

    bool TQDataTable::confirmInsert () const +

    Returns TRUE if the data table confirms insert operations; otherwise returns FALSE. +See the "confirmInsert" property for details. +

    bool TQDataTable::confirmUpdate () const +

    Returns TRUE if the data table confirms update operations; otherwise returns FALSE. +See the "confirmUpdate" property for details. +

    void TQDataTable::currentChanged ( TQSqlRecord * record ) [signal] +

    + +

    This signal is emitted whenever a new row is selected in the +table. The record parameter points to the contents of the newly +selected record. + +

    TQSqlRecord * TQDataTable::currentRecord () const +

    +Returns the currently selected record, or 0 if there is no current +selection. The table owns the pointer, so do not delete it or +otherwise modify it or the cursor it points to. + +

    void TQDataTable::cursorChanged ( TQSql::Op mode ) [signal] +

    + +

    This signal is emitted whenever the cursor record was changed due +to an edit. The mode parameter is the type of edit that just +took place. + +

    DateFormat TQDataTable::dateFormat () const +

    Returns the format used for displaying date/time values. +See the "dateFormat" property for details. +

    bool TQDataTable::deleteCurrent () [virtual protected] +

    +For an editable table, issues a delete on the current cursor's +primary index using the values of the currently selected row. If +there is no current cursor or there is no current selection, +nothing happens. If confirmEdits() or confirmDelete() is TRUE, +confirmEdit() is called to confirm the delete. Returns TRUE if the +delete succeeded; otherwise FALSE. +

    The underlying cursor must have a valid primary index to ensure +that a unique record is deleted within the database otherwise the +database may be changed to an inconsistent state. + +

    TQString TQDataTable::falseText () const +

    Returns the text used to represent false values. +See the "falseText" property for details. +

    int TQDataTable::fieldAlignment ( const TQSqlField * field ) [virtual protected] +

    +Returns the alignment for field. + +

    TQString TQDataTable::filter () const +

    Returns the data filter for the data table. +See the "filter" property for details. +

    void TQDataTable::find ( const TQString & str, bool caseSensitive, bool backwards ) [virtual slot] +

    +Searches the current cursor for a cell containing the string str starting at the current cell and working forwards (or +backwards if backwards is TRUE). If the string is found, the +cell containing the string is set as the current cell. If caseSensitive is FALSE the case of str will be ignored. +

    The search will wrap, i.e. if the first (or if backwards is TRUE, +last) cell is reached without finding str the search will +continue until it reaches the starting cell. If str is not +found the search will fail and the current cell will remain +unchanged. + +

    void TQDataTable::handleError ( const TQSqlError & e ) [virtual protected] +

    +Protected virtual function which is called when an error e has +occurred on the current cursor(). The default implementation +displays a warning message to the user with information about the +error. + +

    int TQDataTable::indexOf ( uint i ) const [protected] +

    +Returns the index of the field within the current SQL query that +is displayed in column i. + +

    bool TQDataTable::insertCurrent () [virtual protected] +

    +For an editable table, issues an insert on the current cursor +using the values in the cursor's edit buffer. If there is no +current cursor or there is no current "insert" row, nothing +happens. If confirmEdits() or confirmInsert() is TRUE, +confirmEdit() is called to confirm the insert. Returns TRUE if the +insert succeeded; otherwise returns FALSE. +

    The underlying cursor must have a valid primary index to ensure +that a unique record is inserted within the database otherwise the +database may be changed to an inconsistent state. + +

    void TQDataTable::installEditorFactory ( TQSqlEditorFactory * f ) +

    +Installs a new SQL editor factory f. This enables the user to +create and instantiate their own editors for use in cell editing. +Note that TQDataTable takes ownership of this pointer, and will +delete it when it is no longer needed or when +installEditorFactory() is called again. +

    See also TQSqlEditorFactory. + +

    void TQDataTable::installPropertyMap ( TQSqlPropertyMap * m ) +

    +Installs a new property map m. This enables the user to create +and instantiate their own property maps for use in cell editing. +Note that TQDataTable takes ownership of this pointer, and will +delete it when it is no longer needed or when installPropertMap() +is called again. +

    See also TQSqlPropertyMap. + +

    TQString TQDataTable::nullText () const +

    Returns the text used to represent NULL values. +See the "nullText" property for details. +

    int TQDataTable::numCols () const [virtual] +

    Returns the number of columns in the table. +See the "numCols" property for details. +

    Reimplemented from TQTable. +

    int TQDataTable::numRows () const [virtual] +

    Returns the number of rows in the table. +See the "numRows" property for details. +

    Reimplemented from TQTable. +

    void TQDataTable::paintField ( TQPainter * p, const TQSqlField * field, const TQRect & cr, bool selected ) [virtual protected] +

    +Paints the field on the painter p. The painter has already +been translated to the appropriate cell's origin where the field is to be rendered. cr describes the cell coordinates in +the content coordinate system. The selected parameter is +ignored. +

    If you want to draw custom field content you must reimplement +paintField() to do the custom drawing. The default implementation +renders the field value as text. If the field is NULL, +nullText() is displayed in the cell. If the field is Boolean, +trueText() or falseText() is displayed as appropriate. + +

    Example: sql/overview/table4/main.cpp. +

    void TQDataTable::primeDelete ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted after the cursor is primed for delete by +the table, when a delete action is beginning on the table. The buf parameter points to the edit buffer being deleted. Connect to +this signal in order to, for example, record auditing information +on deletions. + +

    void TQDataTable::primeInsert ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted after the cursor is primed for insert by +the table, when an insert action is beginning on the table. The buf parameter points to the edit buffer being inserted. Connect to +this signal in order to, for example, prime the record buffer with +default data values. + +

    void TQDataTable::primeUpdate ( TQSqlRecord * buf ) [signal] +

    + +

    This signal is emitted after the cursor is primed for update by +the table, when an update action is beginning on the table. The buf parameter points to the edit buffer being updated. Connect to +this signal in order to, for example, provide some visual feedback +that the user is in 'edit mode'. + +

    void TQDataTable::refresh () [virtual slot] +

    +Refreshes the table. The cursor is refreshed using the current +filter, the current sort, and the currently defined columns. +Equivalent to calling refresh( TQDataTable::RefreshData ). + +

    Examples: sql/overview/subclass1/main.cpp, sql/overview/table1/main.cpp, sql/overview/table2/main.cpp, and sql/sqltable/main.cpp. +

    void TQDataTable::refresh ( Refresh mode ) +

    +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

    Refreshes the table. If there is no currently defined cursor (see +setSqlCursor()), nothing happens. The mode parameter determines +which type of refresh will take place. +

    See also Refresh, setSqlCursor(), and addColumn(). + +

    void TQDataTable::removeColumn ( uint col ) [virtual] +

    +Removes column col from the list of columns to be displayed. If +col does not exist, nothing happens. +

    See also TQSqlField. + +

    void TQDataTable::reset () [protected] +

    +Resets the table so that it displays no data. +

    See also setSqlCursor(). + +

    void TQDataTable::setAutoDelete ( bool enable ) [virtual] +

    +Sets the cursor auto-delete flag to enable. If enable is +TRUE, the table will automatically delete the cursor specified by +setSqlCursor(). If enable is FALSE (the default), the cursor +will not be deleted. + +

    void TQDataTable::setAutoEdit ( bool autoEdit ) [virtual] +

    Sets whether the data table automatically applies edits to autoEdit. +See the "autoEdit" property for details. +

    void TQDataTable::setColumn ( uint col, const TQString & fieldName, const TQString & label = TQString::null, int width = -1, const TQIconSet & iconset = TQIconSet ( ) ) [virtual] +

    +Sets the col column to display using the field fieldName, +column label label, width width and iconset iconset. +

    If label is specified, it is used as the column's header label, +otherwise the field's display label is used when setSqlCursor() is +called. The iconset is used to set the icon used by the column +header; by default there is no icon. +

    See also setSqlCursor() and refresh(). + +

    void TQDataTable::setColumnWidth ( int col, int w ) [virtual slot] +

    +Sets the column col to the width w. Note that unlike TQTable +the TQDataTable is not immediately redrawn, you must call +refresh(TQDataTable::RefreshColumns) +yourself. +

    See also refresh(). + +

    Reimplemented from TQTable. +

    void TQDataTable::setConfirmCancels ( bool confirm ) [virtual] +

    Sets whether the data table confirms cancel operations to confirm. +See the "confirmCancels" property for details. +

    void TQDataTable::setConfirmDelete ( bool confirm ) [virtual] +

    Sets whether the data table confirms delete operations to confirm. +See the "confirmDelete" property for details. +

    void TQDataTable::setConfirmEdits ( bool confirm ) [virtual] +

    Sets whether the data table confirms edit operations to confirm. +See the "confirmEdits" property for details. +

    void TQDataTable::setConfirmInsert ( bool confirm ) [virtual] +

    Sets whether the data table confirms insert operations to confirm. +See the "confirmInsert" property for details. +

    void TQDataTable::setConfirmUpdate ( bool confirm ) [virtual] +

    Sets whether the data table confirms update operations to confirm. +See the "confirmUpdate" property for details. +

    void TQDataTable::setDateFormat ( const DateFormat f ) [virtual] +

    Sets the format used for displaying date/time values to f. +See the "dateFormat" property for details. +

    void TQDataTable::setFalseText ( const TQString & falseText ) [virtual] +

    Sets the text used to represent false values to falseText. +See the "falseText" property for details. +

    void TQDataTable::setFilter ( const TQString & filter ) [virtual] +

    Sets the data filter for the data table to filter. +See the "filter" property for details. +

    void TQDataTable::setNullText ( const TQString & nullText ) [virtual] +

    Sets the text used to represent NULL values to nullText. +See the "nullText" property for details. +

    void TQDataTable::setSize ( TQSqlCursor * sql ) [protected] +

    +If the cursor's sql driver supports query sizes, the number of +rows in the table is set to the size of the query. Otherwise, the +table dynamically resizes itself as it is scrolled. If sql is +not active, it is made active by issuing a select() on the cursor +using the sql cursor's current filter and current sort. + +

    void TQDataTable::setSort ( const TQStringList & sort ) [virtual] +

    Sets the data table's sort to sort. +See the "sort" property for details. +

    void TQDataTable::setSort ( const TQSqlIndex & sort ) [virtual] +

    +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

    Sets the sort to be applied to the displayed data to sort. If +there is no current cursor, nothing happens. A TQSqlIndex contains +field names and their ordering (ASC or DESC); these are used to +compose the ORDER BY clause. +

    See also sort. + +

    void TQDataTable::setSqlCursor ( TQSqlCursor * cursor = 0, bool autoPopulate = FALSE, bool autoDelete = FALSE ) [virtual] +

    +Sets cursor as the data source for the table. To force the +display of the data from cursor, use refresh(). If autoPopulate is TRUE, columns are automatically created based upon +the fields in the cursor record. If autoDelete is TRUE (the +default is FALSE), the table will take ownership of the cursor +and delete it when appropriate. If the cursor is read-only, the +table becomes read-only. The table adopts the cursor's driver's +definition for representing NULL values as strings. +

    See also refresh(), readOnly, setAutoDelete(), and TQSqlDriver::nullText(). + +

    void TQDataTable::setTrueText ( const TQString & trueText ) [virtual] +

    Sets the text used to represent true values to trueText. +See the "trueText" property for details. +

    TQStringList TQDataTable::sort () const +

    Returns the data table's sort. +See the "sort" property for details. +

    void TQDataTable::sortAscending ( int col ) [virtual slot] +

    +Sorts column col in ascending order. +

    See also sorting. + +

    void TQDataTable::sortColumn ( int col, bool ascending = TRUE, bool wholeRows = FALSE ) [virtual] +

    +Sorts column col in ascending order if ascending is TRUE +(the default); otherwise sorts in descending order. +

    The wholeRows parameter is ignored; TQDataTable always sorts +whole rows by the specified column. + +

    Reimplemented from TQTable. +

    void TQDataTable::sortDescending ( int col ) [virtual slot] +

    +Sorts column col in descending order. +

    See also sorting. + +

    TQSqlCursor * TQDataTable::sqlCursor () const +

    +Returns the cursor used by the data table. + +

    TQString TQDataTable::text ( int row, int col ) const [virtual] +

    +Returns the text in cell row, col, or an empty string if the +cell is empty. If the cell's value is NULL then nullText() will be +returned. If the cell does not exist then TQString::null is +returned. + +

    Reimplemented from TQTable. +

    TQString TQDataTable::trueText () const +

    Returns the text used to represent true values. +See the "trueText" property for details. +

    bool TQDataTable::updateCurrent () [virtual protected] +

    +For an editable table, issues an update using the cursor's edit +buffer. If there is no current cursor or there is no current +selection, nothing happens. If confirmEdits() or confirmUpdate() +is TRUE, confirmEdit() is called to confirm the update. Returns +TRUE if the update succeeded; otherwise returns FALSE. +

    The underlying cursor must have a valid primary index to ensure +that a unique record is updated within the database otherwise the +database may be changed to an inconsistent state. + +

    TQVariant TQDataTable::value ( int row, int col ) const +

    +Returns the value in cell row, col, or an invalid value if +the cell does not exist or has no value. + +

    Property Documentation

    +

    bool autoEdit

    +

    This property holds whether the data table automatically applies edits. +

    The default value for this property is TRUE. When the user begins +an insert or update in the table there are two possible outcomes +when they navigate to another record: +

      +
    1. the insert or update is is performed -- this occurs if autoEdit is TRUE +
    2. the insert or update is abandoned -- this occurs if autoEdit is FALSE +
    + +

    Set this property's value with setAutoEdit() and get this property's value with autoEdit(). +

    bool confirmCancels

    +

    This property holds whether the data table confirms cancel operations. +

    If the confirmCancel property is TRUE, all cancels must be +confirmed by the user through a message box (this behavior can be +changed by overriding the confirmCancel() function), otherwise all +cancels occur immediately. The default is FALSE. +

    See also confirmEdits and confirmCancel(). + +

    Set this property's value with setConfirmCancels() and get this property's value with confirmCancels(). +

    bool confirmDelete

    +

    This property holds whether the data table confirms delete operations. +

    If the confirmDelete property is TRUE, all deletions must be +confirmed by the user through a message box (this behaviour can be +changed by overriding the confirmEdit() function), otherwise all +delete operations occur immediately. +

    See also confirmCancels, confirmEdits, confirmUpdate, and confirmInsert. + +

    Set this property's value with setConfirmDelete() and get this property's value with confirmDelete(). +

    bool confirmEdits

    +

    This property holds whether the data table confirms edit operations. +

    If the confirmEdits property is TRUE, the data table confirms all +edit operations (inserts, updates and deletes). Finer control of +edit confirmation can be achieved using confirmCancels, confirmInsert, confirmUpdate and confirmDelete. +

    See also confirmCancels, confirmInsert, confirmUpdate, and confirmDelete. + +

    Set this property's value with setConfirmEdits() and get this property's value with confirmEdits(). +

    bool confirmInsert

    +

    This property holds whether the data table confirms insert operations. +

    If the confirmInsert property is TRUE, all insertions must be +confirmed by the user through a message box (this behaviour can be +changed by overriding the confirmEdit() function), otherwise all +insert operations occur immediately. +

    See also confirmCancels, confirmEdits, confirmUpdate, and confirmDelete. + +

    Set this property's value with setConfirmInsert() and get this property's value with confirmInsert(). +

    bool confirmUpdate

    +

    This property holds whether the data table confirms update operations. +

    If the confirmUpdate property is TRUE, all updates must be +confirmed by the user through a message box (this behaviour can be +changed by overriding the confirmEdit() function), otherwise all +update operations occur immediately. +

    See also confirmCancels, confirmEdits, confirmInsert, and confirmDelete. + +

    Set this property's value with setConfirmUpdate() and get this property's value with confirmUpdate(). +

    DateFormat dateFormat

    +

    This property holds the format used for displaying date/time values. +

    The dateFormat property is used for displaying date/time values in +the table. The default value is TQt::LocalDate. + +

    Set this property's value with setDateFormat() and get this property's value with dateFormat(). +

    TQString falseText

    +

    This property holds the text used to represent false values. +

    The falseText property will be used to represent NULL values in +the table. The default value is "False". + +

    Set this property's value with setFalseText() and get this property's value with falseText(). +

    TQString filter

    +

    This property holds the data filter for the data table. +

    The filter applies to the data shown in the table. To view data +with a new filter, use refresh(). A filter string is an SQL WHERE +clause without the WHERE keyword. +

    There is no default filter. +

    See also sort. + +

    +

    Set this property's value with setFilter() and get this property's value with filter(). +

    TQString nullText

    +

    This property holds the text used to represent NULL values. +

    The nullText property will be used to represent NULL values in the +table. The default value is provided by the cursor's driver. + +

    Set this property's value with setNullText() and get this property's value with nullText(). +

    int numCols

    +

    This property holds the number of columns in the table. +

    +

    Get this property's value with numCols(). +

    int numRows

    +

    This property holds the number of rows in the table. +

    +

    Get this property's value with numRows(). +

    TQStringList sort

    +

    This property holds the data table's sort. +

    The table's sort affects the order in which data records are +displayed in the table. To apply a sort, use refresh(). +

    When examining the sort property, a string list is returned with +each item having the form 'fieldname order' (e.g., 'id ASC', +'surname DESC'). +

    There is no default sort. +

    Note that if you want to iterate over the sort list, you should +iterate over a copy, e.g. +

    +    TQStringList list = myDataTable.sort();
    +    TQStringList::Iterator it = list.begin();
    +    while( it != list.end() ) {
    +        myProcessing( *it );
    +        ++it;
    +    }
    +    
    + +

    See also filter and refresh(). + +

    Set this property's value with setSort() and get this property's value with sort(). +

    TQString trueText

    +

    This property holds the text used to represent true values. +

    The trueText property will be used to represent NULL values in the +table. The default value is "True". + +

    Set this property's value with setTrueText() and get this property's value with trueText(). + +


    +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqdataview-h.html b/doc/html/tqdataview-h.html new file mode 100644 index 000000000..838166aa2 --- /dev/null +++ b/doc/html/tqdataview-h.html @@ -0,0 +1,134 @@ + + + + + +tqdataview.h Include File + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    tqdataview.h

    + +

    This is the verbatim text of the tqdataview.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


    +
    +/****************************************************************************
    +**
    +** Definition of TQDataView class
    +**
    +** Created : 2000-11-03
    +**
    +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
    +**
    +** This file is part of the sql module of the TQt GUI Toolkit.
    +**
    +** This file may be used under the terms of the GNU General Public
    +** License versions 2.0 or 3.0 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.GPL included in the
    +** packaging of this file. Alternatively you may (at your option) use any
    +** later version of the GNU General Public License if such license has
    +** been publicly approved by Trolltech ASA (or its successors, if any)
    +** and the KDE Free TQt Foundation.
    +**
    +** Please review the following information to ensure GNU General
    +** Public Licensing requirements will be met:
    +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
    +** If you are unsure which license is appropriate for your use, please
    +** review the following information:
    +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
    +** or contact the sales department at sales@trolltech.com.
    +**
    +** This file may be used under the terms of the Q Public License as
    +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
    +** included in the packaging of this file.  Licensees holding valid TQt
    +** Commercial licenses may use this file in accordance with the TQt
    +** Commercial License Agreement provided with the Software.
    +**
    +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
    +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
    +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
    +** herein.
    +**
    +**********************************************************************/
    +
    +#ifndef TQDATAVIEW_H
    +#define TQDATAVIEW_H
    +
    +#ifndef QT_H
    +#include "ntqwidget.h"
    +#endif // QT_H
    +
    +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
    +#define TQM_EXPORT_SQL
    +#else
    +#define TQM_EXPORT_SQL TQ_EXPORT
    +#endif
    +
    +#ifndef TQT_NO_SQL_VIEW_WIDGETS
    +
    +class TQSqlForm;
    +class TQSqlRecord;
    +class TQDataViewPrivate;
    +
    +class TQM_EXPORT_SQL TQDataView : public TQWidget
    +{
    +    TQ_OBJECT
    +
    +public:
    +    TQDataView( TQWidget* parent=0, const char* name=0, WFlags fl = 0 );
    +    ~TQDataView();
    +
    +    virtual void setForm( TQSqlForm* form );
    +    TQSqlForm* form();
    +    virtual void setRecord( TQSqlRecord* record );
    +    TQSqlRecord* record();
    +
    +public slots:
    +    virtual void refresh( TQSqlRecord* buf );
    +    virtual void readFields();
    +    virtual void writeFields();
    +    virtual void clearValues();
    +
    +private:
    +    TQDataViewPrivate* d;
    +
    +#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
    +    TQDataView( const TQDataView & );
    +    TQDataView &operator=( const TQDataView & );
    +#endif
    +};
    +
    +
    +#endif
    +#endif
    +
    + +


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqdataview-members.html b/doc/html/tqdataview-members.html new file mode 100644 index 000000000..51e4a5485 --- /dev/null +++ b/doc/html/tqdataview-members.html @@ -0,0 +1,346 @@ + + + + + +TQDataView Member List + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    Complete Member List for TQDataView

    + +

    This is the complete list of member functions for +TQDataView, including inherited members. + +

    + +


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqdataview.html b/doc/html/tqdataview.html new file mode 100644 index 000000000..8ba9d86d7 --- /dev/null +++ b/doc/html/tqdataview.html @@ -0,0 +1,151 @@ + + + + + +TQDataView Class + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    TQDataView Class Reference
    [sql module]

    + +

    The TQDataView class provides read-only SQL forms. +More... +

    #include <tqdataview.h> +

    Inherits TQWidget. +

    List of all member functions. +

    Public Members

    +
      +
    • TQDataView ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 )
    • +
    • ~TQDataView ()
    • +
    • virtual void setForm ( TQSqlForm * form )
    • +
    • TQSqlForm * form ()
    • +
    • virtual void setRecord ( TQSqlRecord * record )
    • +
    • TQSqlRecord * record ()
    • +
    +

    Public Slots

    + +

    Detailed Description

    + + +The TQDataView class provides read-only SQL forms. +

    + + +

    This class provides a form which displays SQL field data from a +record buffer. Because TQDataView does not support editing it uses +less resources than a TQDataBrowser. This class is well suited for +displaying read-only data from a SQL database. +

    If you want a to present your data in an editable form use +TQDataBrowser; if you want a table-based presentation of your data +use TQDataTable. +

    The form is associated with the data view with setForm() and the +record is associated with setRecord(). You can also pass a +TQSqlRecord to the refresh() function which will set the record to +the given record and read the record's fields into the form. +

    See also Database Classes. + +


    Member Function Documentation

    +

    TQDataView::TQDataView ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 ) +

    +Constructs a data view which is a child of parent, called name, and with widget flags fl. + +

    TQDataView::~TQDataView () +

    +Destroys the object and frees any allocated resources. + +

    void TQDataView::clearValues () [virtual slot] +

    +Clears the default form's values. If there is no default form, +nothing happens. All the values are set to their 'zero state', +e.g. 0 for numeric fields, "" for string fields. + +

    TQSqlForm * TQDataView::form () +

    +Returns the default form used by the data view, or 0 if there is +none. +

    See also setForm(). + +

    void TQDataView::readFields () [virtual slot] +

    +Causes the default form to read its fields from the record buffer. +If there is no default form, or no record, nothing happens. +

    See also setForm(). + +

    TQSqlRecord * TQDataView::record () +

    +Returns the default record used by the data view, or 0 if there is +none. +

    See also setRecord(). + +

    void TQDataView::refresh ( TQSqlRecord * buf ) [virtual slot] +

    +Causes the default form to display the contents of buf. If +there is no default form, nothing happens.The buf also becomes +the default record for all subsequent calls to readFields() and +writefields(). This slot is equivalant to calling: +

    +    myView.setRecord( record );
    +    myView.readFields();
    +    
    + +

    See also setRecord() and readFields(). + +

    void TQDataView::setForm ( TQSqlForm * form ) [virtual] +

    +Sets the form used by the data view to form. If a record has +already been assigned to the data view, the form will display that +record's data. +

    See also form(). + +

    void TQDataView::setRecord ( TQSqlRecord * record ) [virtual] +

    +Sets the record used by the data view to record. If a form has +already been assigned to the data view, the form will display the +data from record in that form. +

    See also record(). + +

    void TQDataView::writeFields () [virtual slot] +

    +Causes the default form to write its fields to the record buffer. +If there is no default form, or no record, nothing happens. +

    See also setForm(). + + +


    +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqeditorfactory-h.html b/doc/html/tqeditorfactory-h.html new file mode 100644 index 000000000..9576794a8 --- /dev/null +++ b/doc/html/tqeditorfactory-h.html @@ -0,0 +1,120 @@ + + + + + +tqeditorfactory.h Include File + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    tqeditorfactory.h

    + +

    This is the verbatim text of the tqeditorfactory.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


    +
    +/****************************************************************************
    +**
    +** Definition of TQEditorFactory class
    +**
    +** Created : 2000-11-03
    +**
    +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
    +**
    +** This file is part of the sql module of the TQt GUI Toolkit.
    +**
    +** This file may be used under the terms of the GNU General Public
    +** License versions 2.0 or 3.0 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.GPL included in the
    +** packaging of this file. Alternatively you may (at your option) use any
    +** later version of the GNU General Public License if such license has
    +** been publicly approved by Trolltech ASA (or its successors, if any)
    +** and the KDE Free TQt Foundation.
    +**
    +** Please review the following information to ensure GNU General
    +** Public Licensing requirements will be met:
    +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
    +** If you are unsure which license is appropriate for your use, please
    +** review the following information:
    +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
    +** or contact the sales department at sales@trolltech.com.
    +**
    +** This file may be used under the terms of the Q Public License as
    +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
    +** included in the packaging of this file.  Licensees holding valid TQt
    +** Commercial licenses may use this file in accordance with the TQt
    +** Commercial License Agreement provided with the Software.
    +**
    +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
    +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
    +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
    +** herein.
    +**
    +**********************************************************************/
    +
    +#ifndef TQEDITORFACTORY_H
    +#define TQEDITORFACTORY_H
    +
    +#ifndef QT_H
    +#include "tqobject.h"
    +#include "ntqvariant.h"
    +#endif // QT_H
    +
    +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
    +#define TQM_EXPORT_SQL
    +#else
    +#define TQM_EXPORT_SQL TQ_EXPORT
    +#endif
    +
    +#ifndef TQT_NO_SQL_EDIT_WIDGETS
    +
    +class TQM_EXPORT_SQL TQEditorFactory : public TQObject
    +{
    +public:
    +    TQEditorFactory ( TQObject * parent = 0, const char * name = 0 );
    +    ~TQEditorFactory();
    +    
    +    virtual TQWidget * createEditor( TQWidget * parent, const TQVariant & v );
    +    
    +    static TQEditorFactory * defaultFactory();
    +    static void installDefaultFactory( TQEditorFactory * factory);
    +
    +private:
    +#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
    +    TQEditorFactory( const TQEditorFactory & );
    +    TQEditorFactory &operator=( const TQEditorFactory & );
    +#endif
    +}; 
    +
    +#endif // TQT_NO_SQL
    +#endif // TQEDITORFACTORY_H
    +
    + +


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqeditorfactory-members.html b/doc/html/tqeditorfactory-members.html new file mode 100644 index 000000000..9abeac1d7 --- /dev/null +++ b/doc/html/tqeditorfactory-members.html @@ -0,0 +1,93 @@ + + + + + +TQEditorFactory Member List + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    Complete Member List for TQEditorFactory

    + +

    This is the complete list of member functions for +TQEditorFactory, including inherited members. + +

    + +


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqeditorfactory.html b/doc/html/tqeditorfactory.html new file mode 100644 index 000000000..4e0732c35 --- /dev/null +++ b/doc/html/tqeditorfactory.html @@ -0,0 +1,104 @@ + + + + + +TQEditorFactory Class + + + + + + + +
    + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

    TQEditorFactory Class Reference
    [sql module]

    + +

    The TQEditorFactory class is used to create editor widgets +for TQVariant data types. +More... +

    #include <tqeditorfactory.h> +

    Inherits TQObject. +

    Inherited by TQSqlEditorFactory. +

    List of all member functions. +

    Public Members

    + +

    Static Public Members

    + +

    Detailed Description

    + + +The TQEditorFactory class is used to create editor widgets +for TQVariant data types. +

    + +

    Each editor factory provides the createEditor() function which +given a TQVariant will create and return a TQWidget that can edit +that TQVariant. For example if you have a TQVariant::String type, a +TQLineEdit would be the default editor returned, whereas a +TQVariant::Int's default editor would be a TQSpinBox. +

    If you want to create different editors for fields with the same +data type, subclass TQEditorFactory and reimplement the +createEditor() function. +

    See also Database Classes. + +


    Member Function Documentation

    +

    TQEditorFactory::TQEditorFactory ( TQObject * parent = 0, const char * name = 0 ) +

    +Constructs an editor factory with parent parent, called name. + +

    TQEditorFactory::~TQEditorFactory () +

    +Destroys the object and frees any allocated resources. + +

    TQWidget * TQEditorFactory::createEditor ( TQWidget * parent, const TQVariant & v ) [virtual] +

    +Creates and returns the appropriate editor for the TQVariant v. +If the TQVariant is invalid, 0 is returned. The parent is passed +to the appropriate editor's constructor. + +

    Reimplemented in TQSqlEditorFactory. +

    TQEditorFactory * TQEditorFactory::defaultFactory () [static] +

    +Returns an instance of a default editor factory. + +

    void TQEditorFactory::installDefaultFactory ( TQEditorFactory * factory ) [static] +

    +Replaces the default editor factory with factory. +TQEditorFactory takes ownership of factory, and destroys it when it is no longer needed. + + +

    +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


    + +
    Copyright © 2007 +TrolltechTrademarks +
    TQt 3.3.8
    +
    + diff --git a/doc/html/tqobject.html b/doc/html/tqobject.html index 200d07a55..27d5699b2 100644 --- a/doc/html/tqobject.html +++ b/doc/html/tqobject.html @@ -36,7 +36,7 @@ body { background: #ffffff; color: black; }

    All the functions in this class are reentrant when TQt is built with thread support.

    #include <tqobject.h>

    Inherits TQt. -

    Inherited by TQAccel, TQAccessibleObject, TQAction, TQApplication, TQAssistantClient, TQDataPump, TQAxObject, TQAxScript, TQAxScriptManager, TQWidget, TQCanvas, TQStyle, TQClipboard, TQCopChannel, TQDns, TQLayout, TQDragObject, TQEditorFactory, TQEventLoop, TQFileIconProvider, TQNetworkProtocol, TQWSKeyboardHandler, TQNetworkOperation, TQNPInstance, TQObjectCleanupHandler, TQProcess, TQServerSocket, TQSessionManager, TQSignal, TQSignalMapper, TQSocket, TQSocketNotifier, TQSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, TQStyleSheet, TQTimer, TQToolTipGroup, TQTranslator, TQUrlOperator, and TQValidator. +

    Inherited by TQAccel, TQAccessibleObject, TQAction, TQApplication, TQAssistantClient, TQDataPump, TQAxObject, TQAxScript, TQAxScriptManager, TQWidget, TQCanvas, TQStyle, TQClipboard, TQCopChannel, TQDns, TQLayout, TQDragObject, TQEditorFactory, TQEventLoop, TQFileIconProvider, TQNetworkProtocol, TQWSKeyboardHandler, TQNetworkOperation, TQNPInstance, TQObjectCleanupHandler, TQProcess, TQServerSocket, TQSessionManager, TQSignal, TQSignalMapper, TQSocket, TQSocketNotifier, TQSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, TQStyleSheet, TQTimer, TQToolTipGroup, TQTranslator, TQUrlOperator, and TQValidator.

    List of all member functions.

    Public Members

      diff --git a/doc/html/tqsql-h.html b/doc/html/tqsql-h.html new file mode 100644 index 000000000..6588f2d0e --- /dev/null +++ b/doc/html/tqsql-h.html @@ -0,0 +1,144 @@ + + + + + +tqsql.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsql.h

      + +

      This is the verbatim text of the tqsql.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSql class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQL_H
      +#define TQSQL_H
      +
      +#ifndef QT_H
      +#include "ntqglobal.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQM_EXPORT_SQL TQSql
      +{
      +public:
      +    TQSql() {}
      +    enum Op {
      +	None = -1,
      +	Insert = 0,
      +	Update = 1,
      +	Delete = 2
      +    };
      +
      +    enum Location {
      +	BeforeFirst = -1,
      +	AfterLast = -2
      +    };
      +
      +    enum Confirm {
      +	Cancel = -1,
      +	No = 0,
      +	Yes = 1
      +    };
      +
      +    enum ParameterType {
      +	In = 1,
      +	Out = 2,
      +	InOut = 3  //InOut = In | Out
      +    };
      +
      +    enum TableType { 
      +	Tables = 0x01,
      +	SystemTables = 0x02,
      +	Views = 0x04,
      +	AllTables = 0xff
      +    };
      +
      +private:	// Disabled copy constructor and operator=
      +#if defined(TQ_DISABLE_COPY)
      +    TQSql( const TQSql & );
      +    TQSql &operator=( const TQSql & );
      +#endif
      +
      +};
      +
      +#endif
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsql-members.html b/doc/html/tqsql-members.html new file mode 100644 index 000000000..9d8cdaca7 --- /dev/null +++ b/doc/html/tqsql-members.html @@ -0,0 +1,47 @@ + + + + + +TQSql Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSql

      + +

      This is the complete list of member functions for +TQSql, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsql.html b/doc/html/tqsql.html new file mode 100644 index 000000000..c76a3654c --- /dev/null +++ b/doc/html/tqsql.html @@ -0,0 +1,121 @@ + + + + + +TQSql Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSql Class Reference
      [sql module]

      + +

      The TQSql class is a namespace for TQt SQL identifiers that +need to be global-like. +More... +

      #include <tqsql.h> +

      List of all member functions. +

      Public Members

      +
        +
      • TQSql ()
      • +
      • enum Op { None = -1, Insert = 0, Update = 1, Delete = 2 }
      • +
      • enum Location { BeforeFirst = -1, AfterLast = -2 }
      • +
      • enum Confirm { Cancel = -1, No = 0, Yes = 1 }
      • +
      • enum ParameterType { In = 1, Out = 2, InOut = 3 }
      • +
      • enum TableType { Tables = 0x01, SystemTables = 0x02, Views = 0x04, AllTables = 0xff }
      • +
      +

      Detailed Description

      + + +The TQSql class is a namespace for TQt SQL identifiers that +need to be global-like. +

      + + +

      Normally, you can ignore this class. Several TQt SQL classes +inherit it, so all the identifiers in the TQt SQL namespace are +visible without qualification. +

      See also Database Classes. + +


      Member Type Documentation

      +

      TQSql::Confirm

      + +

      This enum type describes edit confirmations. +

        +
      • TQSql::Yes +
      • TQSql::No +
      • TQSql::Cancel +
      +

      TQSql::Location

      + +

      This enum type describes SQL navigation locations. +

        +
      • TQSql::BeforeFirst +
      • TQSql::AfterLast +
      +

      TQSql::Op

      + +

      This enum type describes edit operations. +

        +
      • TQSql::None +
      • TQSql::Insert +
      • TQSql::Update +
      • TQSql::Delete +
      +

      TQSql::ParameterType

      + +

      This enum is used to set the type of a bind parameter +

        +
      • TQSql::In - the bind parameter is used to put data into the database +
      • TQSql::Out - the bind parameter is used to receive data from the database +
      • TQSql::InOut - the bind parameter is used to put data into the +database; it will be overwritten with output data on executing +a query. +
      +

      TQSql::TableType

      + +

      This enum type describes types of tables +

        +
      • TQSql::Tables - All the tables visible to the user +
      • TQSql::SystemTables - Internal tables used by the DBMS +
      • TQSql::Views - All the views visible to the user +
      • TQSql::AllTables - All of the above +
      +

      Member Function Documentation

      +

      TQSql::TQSql () +

      + +

      Constructs a TQt SQL namespace class + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlcursor-h.html b/doc/html/tqsqlcursor-h.html new file mode 100644 index 000000000..a789c9f2d --- /dev/null +++ b/doc/html/tqsqlcursor-h.html @@ -0,0 +1,204 @@ + + + + + +tqsqlcursor.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlcursor.h

      + +

      This is the verbatim text of the tqsqlcursor.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlCursor class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLCURSOR_H
      +#define TQSQLCURSOR_H
      +
      +#ifndef QT_H
      +#include "tqsqlrecord.h"
      +#include "ntqstringlist.h"
      +#include "tqsqlquery.h"
      +#include "tqsqlindex.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQSqlDatabase;
      +class TQSqlCursorPrivate;
      +
      +class TQM_EXPORT_SQL TQSqlCursor : public TQSqlRecord, public TQSqlQuery
      +{
      +public:
      +    TQSqlCursor( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase* db = 0 );
      +    TQSqlCursor( const TQSqlCursor & other );
      +    TQSqlCursor& operator=( const TQSqlCursor& other );
      +    ~TQSqlCursor();
      +
      +    enum Mode {
      +	ReadOnly = 0,
      +	Insert = 1,
      +	Update = 2,
      +	Delete = 4,
      +	Writable = 7
      +    };
      +
      +    TQVariant		value( int i ) const;
      +    TQVariant		value( const TQString& name ) const;
      +    void         	setValue( int i, const TQVariant& val );
      +    void         	setValue( const TQString& name, const TQVariant& val );
      +    virtual TQSqlIndex	primaryIndex( bool prime = TRUE ) const;
      +    virtual TQSqlIndex	index( const TQStringList& fieldNames ) const;
      +    TQSqlIndex		index( const TQString& fieldName ) const;
      +    TQSqlIndex		index( const char* fieldName ) const;
      +    virtual void	setPrimaryIndex( const TQSqlIndex& idx );
      +
      +    virtual void	append( const TQSqlFieldInfo& fieldInfo );
      +    virtual void	insert( int pos, const TQSqlFieldInfo& fieldInfo );
      +    void		remove( int pos );
      +    void		clear();
      +    void		setGenerated( const TQString& name, bool generated );
      +    void		setGenerated( int i, bool generated );
      +
      +    virtual TQSqlRecord*	editBuffer( bool copy = FALSE );
      +    virtual TQSqlRecord*	primeInsert();
      +    virtual TQSqlRecord*	primeUpdate();
      +    virtual TQSqlRecord*	primeDelete();
      +    virtual int		insert( bool invalidate = TRUE );
      +    virtual int		update( bool invalidate = TRUE );
      +    virtual int		del( bool invalidate = TRUE );
      +
      +    virtual void	setMode( int flags );
      +    int			mode() const;
      +    virtual void	setCalculated( const TQString& name, bool calculated );
      +    bool		isCalculated( const TQString& name ) const;
      +    virtual void	setTrimmed( const TQString& name, bool trim );
      +    bool		isTrimmed( const TQString& name ) const;
      +
      +    bool		isReadOnly() const;
      +    bool		canInsert() const;
      +    bool		canUpdate() const;
      +    bool		canDelete() const;
      +
      +    bool		select();
      +    bool		select( const TQSqlIndex& sort );
      +    bool		select( const TQSqlIndex & filter, const TQSqlIndex & sort );
      +    virtual bool	select( const TQString & filter, const TQSqlIndex & sort = TQSqlIndex() );
      +
      +    virtual void	setSort( const TQSqlIndex& sort );
      +    TQSqlIndex		sort() const;
      +    virtual void	setFilter( const TQString& filter );
      +    TQString		filter() const;
      +    virtual void	setName( const TQString& name, bool autopopulate = TRUE );
      +    TQString		name() const;
      +    TQString		toString( const TQString& prefix = TQString::null,
      +				const TQString& sep = "," ) const;
      +    bool 		isNull( int i ) const;
      +    bool 		isNull( const TQString& name ) const;
      +    
      +protected:
      +    void		afterSeek();
      +    bool		exec( const TQString & sql );
      +
      +    virtual TQVariant	calculateField( const TQString& name );
      +    virtual int		update( const TQString & filter, bool invalidate = TRUE );
      +    virtual int		del( const TQString & filter, bool invalidate = TRUE );
      +
      +    virtual TQString	toString( const TQString& prefix, TQSqlField* field, const TQString& fieldSep ) const;
      +    virtual TQString	toString( TQSqlRecord* rec, const TQString& prefix, const TQString& fieldSep,
      +				const TQString& sep ) const;
      +    virtual TQString	toString( const TQSqlIndex& i, TQSqlRecord* rec, const TQString& prefix,
      +				const TQString& fieldSep, const TQString& sep ) const;
      +
      +private:
      +    void		sync();
      +    int			apply( const TQString& q, bool invalidate );
      +    int			applyPrepared( const TQString& q, bool invalidate );
      +    TQSqlRecord&		operator=( const TQSqlRecord & list );
      +    void 		append( const TQSqlField& field );
      +    void 		insert( int pos, const TQSqlField& field );
      +
      +    TQSqlCursorPrivate*	d;
      +};
      +
      +
      +
      +
      +#endif	// TQT_NO_SQL
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlcursor-members.html b/doc/html/tqsqlcursor-members.html new file mode 100644 index 000000000..3fe24b2dc --- /dev/null +++ b/doc/html/tqsqlcursor-members.html @@ -0,0 +1,121 @@ + + + + + +TQSqlCursor Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlCursor

      + +

      This is the complete list of member functions for +TQSqlCursor, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlcursor.html b/doc/html/tqsqlcursor.html new file mode 100644 index 000000000..30a9ca993 --- /dev/null +++ b/doc/html/tqsqlcursor.html @@ -0,0 +1,761 @@ + + + + + +TQSqlCursor Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlCursor Class Reference
      [sql module]

      + +

      The TQSqlCursor class provides browsing and editing of SQL +tables and views. +More... +

      #include <tqsqlcursor.h> +

      Inherits TQSqlRecord and TQSqlQuery. +

      Inherited by TQSqlSelectCursor. +

      List of all member functions. +

      Public Members

      +
        +
      • TQSqlCursor ( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase * db = 0 )
      • +
      • TQSqlCursor ( const TQSqlCursor & other )
      • +
      • TQSqlCursor & operator= ( const TQSqlCursor & other )
      • +
      • ~TQSqlCursor ()
      • +
      • enum Mode { ReadOnly = 0, Insert = 1, Update = 2, Delete = 4, Writable = 7 }
      • +
      • virtual TQSqlIndex primaryIndex ( bool setFromCursor = TRUE ) const
      • +
      • virtual TQSqlIndex index ( const TQStringList & fieldNames ) const
      • +
      • TQSqlIndex index ( const TQString & fieldName ) const
      • +
      • TQSqlIndex index ( const char * fieldName ) const
      • +
      • virtual void setPrimaryIndex ( const TQSqlIndex & idx )
      • +
      • virtual void append ( const TQSqlFieldInfo & fieldInfo )
      • +
      • virtual void insert ( int pos, const TQSqlFieldInfo & fieldInfo )
      • +
      • virtual void remove ( int pos )
      • +
      • virtual void clear ()
      • +
      • virtual void setGenerated ( const TQString & name, bool generated )
      • +
      • virtual void setGenerated ( int i, bool generated )
      • +
      • virtual TQSqlRecord * editBuffer ( bool copy = FALSE )
      • +
      • virtual TQSqlRecord * primeInsert ()
      • +
      • virtual TQSqlRecord * primeUpdate ()
      • +
      • virtual TQSqlRecord * primeDelete ()
      • +
      • virtual int insert ( bool invalidate = TRUE )
      • +
      • virtual int update ( bool invalidate = TRUE )
      • +
      • virtual int del ( bool invalidate = TRUE )
      • +
      • virtual void setMode ( int mode )
      • +
      • int mode () const
      • +
      • virtual void setCalculated ( const TQString & name, bool calculated )
      • +
      • bool isCalculated ( const TQString & name ) const
      • +
      • virtual void setTrimmed ( const TQString & name, bool trim )
      • +
      • bool isTrimmed ( const TQString & name ) const
      • +
      • bool isReadOnly () const
      • +
      • bool canInsert () const
      • +
      • bool canUpdate () const
      • +
      • bool canDelete () const
      • +
      • bool select ()
      • +
      • bool select ( const TQSqlIndex & sort )
      • +
      • bool select ( const TQSqlIndex & filter, const TQSqlIndex & sort )
      • +
      • virtual bool select ( const TQString & filter, const TQSqlIndex & sort = TQSqlIndex ( ) )
      • +
      • virtual void setSort ( const TQSqlIndex & sort )
      • +
      • TQSqlIndex sort () const
      • +
      • virtual void setFilter ( const TQString & filter )
      • +
      • TQString filter () const
      • +
      • virtual void setName ( const TQString & name, bool autopopulate = TRUE )
      • +
      • TQString name () const
      • +
      • bool isNull ( int i ) const
      • +
      • bool isNull ( const TQString & name ) const
      • +
      +

      Protected Members

      +
        +
      • virtual TQVariant calculateField ( const TQString & name )
      • +
      • virtual int update ( const TQString & filter, bool invalidate = TRUE )
      • +
      • virtual int del ( const TQString & filter, bool invalidate = TRUE )
      • +
      • virtual TQString toString ( const TQString & prefix, TQSqlField * field, const TQString & fieldSep ) const
      • +
      • virtual TQString toString ( TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const
      • +
      • virtual TQString toString ( const TQSqlIndex & i, TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const
      • +
      +

      Detailed Description

      + + +The TQSqlCursor class provides browsing and editing of SQL +tables and views. +

      + +

      A TQSqlCursor is a database record (see TQSqlRecord) that +corresponds to a table or view within an SQL database (see TQSqlDatabase). There are two buffers in a cursor, one used for +browsing and one used for editing records. Each buffer contains a +list of fields which correspond to the fields in the table or +view. +

      When positioned on a valid record, the browse buffer contains the +values of the current record's fields from the database. The edit +buffer is separate, and is used for editing existing records and +inserting new records. +

      For browsing data, a cursor must first select() data from the +database. After a successful select() the cursor is active +(isActive() returns TRUE), but is initially not positioned on a +valid record (isValid() returns FALSE). To position the cursor on +a valid record, use one of the navigation functions, next(), +prev(), first(), last(), or seek(). Once positioned on a valid +record, data can be retrieved from the browse buffer using +value(). If a navigation function is not successful, it returns +FALSE, the cursor will no longer be positioned on a valid record +and the values returned by value() are undefined. +

      For example: +

      + +

                  TQSqlCursor cur( "staff" ); // Specify the table/view name
      +            cur.select(); // We'll retrieve every record
      +            while ( cur.next() ) {
      +                tqDebug( cur.value( "id" ).toString() + ": " +
      +                        cur.value( "surname" ).toString() + " " +
      +                        cur.value( "salary" ).toString() );
      +            }
      +
      +

      In the above example, a cursor is created specifying a table or +view name in the database. Then, select() is called, which can be +optionally parameterised to filter and order the records +retrieved. Each record in the cursor is retrieved using next(). +When next() returns FALSE, there are no more records to process, +and the loop terminates. +

      For editing records (rows of data), a cursor contains a separate +edit buffer which is independent of the fields used when browsing. +The functions insert(), update() and del() operate on the edit +buffer. This allows the cursor to be repositioned to other +records while simultaneously maintaining a separate buffer for +edits. You can get a pointer to the edit buffer using +editBuffer(). The primeInsert(), primeUpdate() and primeDelete() +functions also return a pointer to the edit buffer and prepare it +for insert, update and delete respectively. Edit operations only +affect a single row at a time. Note that update() and del() +require that the table or view contain a primaryIndex() to ensure +that edit operations affect a unique record within the database. +

      For example: +

      + +

                  TQSqlCursor cur( "prices" );
      +            cur.select( "id=202" );
      +            if ( cur.next() ) {
      +                TQSqlRecord *buffer = cur.primeUpdate();
      +                double price = buffer->value( "price" ).toDouble();
      +                double newprice = price * 1.05;
      +                buffer->setValue( "price", newprice );
      +                cur.update();
      +            }
      +
      +

      To edit an existing database record, first move to the record you +wish to update. Call primeUpdate() to get the pointer to the +cursor's edit buffer. Then use this pointer to modify the values +in the edit buffer. Finally, call update() to save the changes to +the database. The values in the edit buffer will be used to +locate the appropriate record when updating the database (see +primaryIndex()). +

      Similarly, when deleting an existing database record, first move +to the record you wish to delete. Then, call primeDelete() to get +the pointer to the edit buffer. Finally, call del() to delete the +record from the database. Again, the values in the edit buffer +will be used to locate and delete the appropriate record. +

      To insert a new record, call primeInsert() to get the pointer to +the edit buffer. Use this pointer to populate the edit buffer +with new values and then insert() the record into the database. +

      After calling insert(), update() or del(), the cursor is no longer +positioned on a valid record and can no longer be navigated +(isValid() return FALSE). The reason for this is that any changes +made to the database will not be visible until select() is called +to refresh the cursor. You can change this behavior by passing +FALSE to insert(), update() or del() which will prevent the cursor +from becoming invalid. The edits will still not be visible when +navigating the cursor until select() is called. +

      TQSqlCursor contains virtual methods which allow editing behavior +to be customized by subclasses. This allows custom cursors to be +created that encapsulate the editing behavior of a database table +for an entire application. For example, a cursor can be customized +to always auto-number primary index fields, or provide fields with +suitable default values, when inserting new records. TQSqlCursor +generates SQL statements which are sent to the database engine; +you can control which fields are included in these statements +using setGenerated(). +

      Note that TQSqlCursor does not inherit from TQObject. This means +that you are responsible for destroying instances of this class +yourself. However if you create a TQSqlCursor and use it in a +TQDataTable, TQDataBrowser or a TQDataView these classes will +usually take ownership of the cursor and destroy it when they +don't need it anymore. The documentation for TQDataTable, +TQDataBrowser and TQDataView explicitly states which calls take +ownership of the cursor. +

      See also Database Classes. + +


      Member Type Documentation

      +

      TQSqlCursor::Mode

      + +

      This enum type describes how TQSqlCursor operates on records in the +database. +

        +
      • TQSqlCursor::ReadOnly - the cursor can only SELECT records from the +database. +
      • TQSqlCursor::Insert - the cursor can INSERT records into the database. +
      • TQSqlCursor::Update - the cursor can UPDATE records in the database. +
      • TQSqlCursor::Delete - the cursor can DELETE records from the database. +
      • TQSqlCursor::Writable - the cursor can INSERT, UPDATE and DELETE records +in the database. +
      +

      Member Function Documentation

      +

      TQSqlCursor::TQSqlCursor ( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase * db = 0 ) +

      +Constructs a cursor on database db using table or view name. +

      If autopopulate is TRUE (the default), the name of the +cursor must correspond to an existing table or view name in the +database so that field information can be automatically created. +If the table or view does not exist, the cursor will not be +functional. +

      The cursor is created with an initial mode of TQSqlCursor::Writable +(meaning that records can be inserted, updated or deleted using +the cursor). If the cursor does not have a unique primary index, +update and deletes cannot be performed. +

      Note that autopopulate refers to populating the cursor with +meta-data, e.g. the names of the table's fields, not with +retrieving data. The select() function is used to populate the +cursor with data. +

      See also setName() and setMode(). + +

      TQSqlCursor::TQSqlCursor ( const TQSqlCursor & other ) +

      +Constructs a copy of other. + +

      TQSqlCursor::~TQSqlCursor () +

      +Destroys the object and frees any allocated resources. + +

      void TQSqlCursor::append ( const TQSqlFieldInfo & fieldInfo ) [virtual] +

      +Append a copy of field fieldInfo to the end of the cursor. Note +that all references to the cursor edit buffer become invalidated. + +

      TQVariant TQSqlCursor::calculateField ( const TQString & name ) [virtual protected] +

      +Protected virtual function which is called whenever a field needs +to be calculated. If calculated fields are being used, derived +classes must reimplement this function and return the appropriate +value for field name. The default implementation returns an +invalid TQVariant. +

      See also setCalculated(). + +

      Examples: sql/overview/subclass3/main.cpp and sql/overview/subclass4/main.cpp. +

      bool TQSqlCursor::canDelete () const +

      +Returns TRUE if the cursor will perform deletes; otherwise returns +FALSE. +

      See also setMode(). + +

      bool TQSqlCursor::canInsert () const +

      +Returns TRUE if the cursor will perform inserts; otherwise returns +FALSE. +

      See also setMode(). + +

      bool TQSqlCursor::canUpdate () const +

      +Returns TRUE if the cursor will perform updates; otherwise returns +FALSE. +

      See also setMode(). + +

      void TQSqlCursor::clear () [virtual] +

      +Removes all fields from the cursor. Note that all references to +the cursor edit buffer become invalidated. + +

      Reimplemented from TQSqlRecord. +

      int TQSqlCursor::del ( bool invalidate = TRUE ) [virtual] +

      +Deletes a record from the database using the cursor's primary +index and the contents of the cursor edit buffer. Returns the +number of records which were deleted. +For error information, use lastError(). +

      Only records which meet the filter criteria specified by the +cursor's primary index are deleted. If the cursor does not contain +a primary index, no delete is performed and 0 is returned. If invalidate is TRUE (the default), the current cursor can no longer +be navigated. A new select() call must be made before you can move +to a valid record. For example: +

      + +

                  TQSqlCursor cur( "prices" );
      +            cur.select( "id=999" );
      +            if ( cur.next() ) {
      +                cur.primeDelete();
      +                cur.del();
      +            }
      +
      +

      In the above example, a cursor is created on the 'prices' table +and positioned to the record to be deleted. First primeDelete() is +called to populate the edit buffer with the current cursor values, +e.g. with an id of 999, and then del() is called to actually +delete the record from the database. Remember: all edit operations +(insert(), update() and delete()) operate on the contents of the +cursor edit buffer and not on the contents of the cursor itself. +

      See also primeDelete(), setMode(), and lastError(). + +

      Example: sql/overview/delete/main.cpp. +

      int TQSqlCursor::del ( const TQString & filter, bool invalidate = TRUE ) [virtual protected] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Deletes the current cursor record from the database using the +filter filter. Only records which meet the filter criteria are +deleted. Returns the number of records which were deleted. If invalidate is TRUE (the default), the current cursor can no longer +be navigated. A new select() call must be made before you can move +to a valid record. For error information, use lastError(). +

      The filter is an SQL WHERE clause, e.g. id=500. +

      See also setMode() and lastError(). + +

      TQSqlRecord * TQSqlCursor::editBuffer ( bool copy = FALSE ) [virtual] +

      +Returns the current internal edit buffer. If copy is TRUE (the +default is FALSE), the current cursor field values are first +copied into the edit buffer. The edit buffer is valid as long as +the cursor remains valid. The cursor retains ownership of the +returned pointer, so it must not be deleted or modified. +

      See also primeInsert(), primeUpdate(), and primeDelete(). + +

      TQString TQSqlCursor::filter () const +

      +Returns the current filter, or an empty string if there is no +current filter. + +

      TQSqlIndex TQSqlCursor::index ( const TQStringList & fieldNames ) const [virtual] +

      +Returns an index composed of fieldNames, all in ASCending +order. Note that all field names must exist in the cursor, +otherwise an empty index is returned. +

      See also TQSqlIndex. + +

      Examples: sql/overview/extract/main.cpp, sql/overview/order1/main.cpp, sql/overview/order2/main.cpp, and sql/overview/table3/main.cpp. +

      TQSqlIndex TQSqlCursor::index ( const TQString & fieldName ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns an index based on fieldName. + +

      TQSqlIndex TQSqlCursor::index ( const char * fieldName ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns an index based on fieldName. + +

      void TQSqlCursor::insert ( int pos, const TQSqlFieldInfo & fieldInfo ) [virtual] +

      +Insert a copy of fieldInfo at position pos. If a field +already exists at pos, it is removed. Note that all references +to the cursor edit buffer become invalidated. + +

      Examples: sql/overview/insert/main.cpp and sql/overview/insert2/main.cpp. +

      int TQSqlCursor::insert ( bool invalidate = TRUE ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Inserts the current contents of the cursor's edit record buffer +into the database, if the cursor allows inserts. Returns the +number of rows affected by the insert. For error information, use +lastError(). +

      If invalidate is TRUE (the default), the cursor will no longer +be positioned on a valid record and can no longer be navigated. A +new select() call must be made before navigating to a valid +record. +

      + +

                  TQSqlCursor cur( "prices" );
      +            TQSqlRecord *buffer = cur.primeInsert();
      +            buffer->setValue( "id",    53981 );
      +            buffer->setValue( "name",  "Thingy" );
      +            buffer->setValue( "price", 105.75 );
      +            cur.insert();
      +
      +

      In the above example, a cursor is created on the 'prices' table +and a pointer to the insert buffer is acquired using primeInsert(). +Each field's value is set to the desired value and then insert() +is called to insert the data into the database. Remember: all edit +operations (insert(), update() and delete()) operate on the +contents of the cursor edit buffer and not on the contents of the +cursor itself. +

      See also setMode() and lastError(). + +

      bool TQSqlCursor::isCalculated ( const TQString & name ) const +

      +Returns TRUE if the field name exists and is calculated; +otherwise returns FALSE. +

      See also setCalculated(). + +

      bool TQSqlCursor::isNull ( int i ) const +

      +Returns TRUE if the field i is NULL or if there is no field at +position i; otherwise returns FALSE. +

      This is the same as calling TQSqlRecord::isNull( i ) + +

      bool TQSqlCursor::isNull ( const TQString & name ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns TRUE if the field called name is NULL or if there is no +field called name; otherwise returns FALSE. +

      This is the same as calling TQSqlRecord::isNull( name ) + +

      bool TQSqlCursor::isReadOnly () const +

      +Returns TRUE if the cursor is read-only; otherwise returns FALSE. +The default is FALSE. Read-only cursors cannot be edited using +insert(), update() or del(). +

      See also setMode(). + +

      bool TQSqlCursor::isTrimmed ( const TQString & name ) const +

      +Returns TRUE if the field name exists and is trimmed; otherwise +returns FALSE. +

      When a trimmed field of type string or cstring is read from the +database any trailing (right-most) spaces are removed. +

      See also setTrimmed(). + +

      int TQSqlCursor::mode () const +

      +Returns the current cursor mode. +

      See also setMode(). + +

      TQString TQSqlCursor::name () const +

      +Returns the name of the cursor. + +

      TQSqlCursor & TQSqlCursor::operator= ( const TQSqlCursor & other ) +

      +Sets the cursor equal to other. + +

      TQSqlIndex TQSqlCursor::primaryIndex ( bool setFromCursor = TRUE ) const [virtual] +

      +Returns the primary index associated with the cursor as defined in +the database, or an empty index if there is no primary index. If +setFromCursor is TRUE (the default), the index fields are +populated with the corresponding values in the cursor's current +record. + +

      TQSqlRecord * TQSqlCursor::primeDelete () [virtual] +

      +This function primes the edit buffer's field values for delete and +returns the edit buffer. The default implementation copies the +field values from the current cursor record into the edit buffer +(therefore, this function is equivalent to calling editBuffer( +TRUE ) ). The cursor retains ownership of the returned pointer, so +it must not be deleted or modified. +

      See also editBuffer() and del(). + +

      Example: sql/overview/delete/main.cpp. +

      TQSqlRecord * TQSqlCursor::primeInsert () [virtual] +

      +This function primes the edit buffer's field values for insert and +returns the edit buffer. The default implementation clears all +field values in the edit buffer. The cursor retains ownership of +the returned pointer, so it must not be deleted or modified. +

      See also editBuffer() and insert(). + +

      Examples: sql/overview/insert/main.cpp, sql/overview/insert2/main.cpp, sql/overview/subclass5/main.cpp, and sql/sqltable/main.cpp. +

      TQSqlRecord * TQSqlCursor::primeUpdate () [virtual] +

      +This function primes the edit buffer's field values for update and +returns the edit buffer. The default implementation copies the +field values from the current cursor record into the edit buffer +(therefore, this function is equivalent to calling editBuffer( +TRUE ) ). The cursor retains ownership of the returned pointer, so +it must not be deleted or modified. +

      See also editBuffer() and update(). + +

      Examples: sql/overview/custom1/main.cpp, sql/overview/form1/main.cpp, and sql/overview/update/main.cpp. +

      void TQSqlCursor::remove ( int pos ) [virtual] +

      +Removes the field at pos. If pos does not exist, nothing +happens. Note that all references to the cursor edit buffer become +invalidated. + +

      Reimplemented from TQSqlRecord. +

      bool TQSqlCursor::select ( const TQString & filter, const TQSqlIndex & sort = TQSqlIndex ( ) ) [virtual] +

      +Selects all fields in the cursor from the database matching the +filter criteria filter. The data is returned in the order +specified by the index sort. Returns TRUE if the data was +successfully selected; otherwise returns FALSE. +

      The filter is a string containing a SQL WHERE clause but +without the 'WHERE' keyword. The cursor is initially positioned at +an invalid row after this function is called. To move to a valid +row, use seek(), first(), last(), prev() or next(). +

      Example: +

      +    TQSqlCursor cur( "Employee" ); // Use the Employee table or view
      +    cur.select( "deptno=10" ); // select all records in department 10
      +    while( cur.next() ) {
      +        ... // process data
      +    }
      +    ...
      +    // select records in other departments, ordered by department number
      +    cur.select( "deptno>10", cur.index( "deptno" ) );
      +    ...
      +    
      + +

      The filter will apply to any subsequent select() calls that do not +explicitly specify another filter. Similarly the sort will apply +to any subsequent select() calls that do not explicitly specify +another sort. +

      +    TQSqlCursor cur( "Employee" );
      +    cur.select( "deptno=10" ); // select all records in department 10
      +    while( cur.next() ) {
      +        ... // process data
      +    }
      +    ...
      +    cur.select(); // re-selects all records in department 10
      +    ...
      +    
      + +

      +

      Examples: sql/overview/delete/main.cpp, sql/overview/extract/main.cpp, sql/overview/order1/main.cpp, sql/overview/order2/main.cpp, sql/overview/retrieve2/main.cpp, sql/overview/table3/main.cpp, and sql/overview/update/main.cpp. +

      bool TQSqlCursor::select () +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Selects all fields in the cursor from the database. The rows are +returned in the order specified by the last call to setSort() or +the last call to select() that specified a sort, whichever is the +most recent. If there is no current sort, the order in which the +rows are returned is undefined. The records are filtered according +to the filter specified by the last call to setFilter() or the +last call to select() that specified a filter, whichever is the +most recent. If there is no current filter, all records are +returned. The cursor is initially positioned at an invalid row. To +move to a valid row, use seek(), first(), last(), prev() or +next(). +

      See also setSort() and setFilter(). + +

      bool TQSqlCursor::select ( const TQSqlIndex & sort ) +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Selects all fields in the cursor from the database. The data is +returned in the order specified by the index sort. The records +are filtered according to the filter specified by the last call to +setFilter() or the last call to select() that specified a filter, +whichever is the most recent. The cursor is initially positioned +at an invalid row. To move to a valid row, use seek(), first(), +last(), prev() or next(). + +

      bool TQSqlCursor::select ( const TQSqlIndex & filter, const TQSqlIndex & sort ) +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Selects all fields in the cursor matching the filter index filter. The data is returned in the order specified by the index +sort. The filter index works by constructing a WHERE clause +using the names of the fields from the filter and their values +from the current cursor record. The cursor is initially positioned +at an invalid row. To move to a valid row, use seek(), first(), +last(), prev() or next(). This function is useful, for example, +for retrieving data based upon a table's primary index: +

      +    TQSqlCursor cur( "Employee" );
      +    TQSqlIndex pk = cur.primaryIndex();
      +    cur.setValue( "id", 10 );
      +    cur.select( pk, pk ); // generates "SELECT ... FROM Employee WHERE id=10 ORDER BY id"
      +    ...
      +    
      + +

      In this example the TQSqlIndex, pk, is used for two different +purposes. When used as the filter (first) argument, the field +names it contains are used to construct the WHERE clause, each set +to the current cursor value, WHERE id=10, in this case. When +used as the sort (second) argument the field names it contains are +used for the ORDER BY clause, ORDER BY id in this example. + +

      void TQSqlCursor::setCalculated ( const TQString & name, bool calculated ) [virtual] +

      +Sets field name to calculated. If the field name does not +exist, nothing happens. The value of a calculated field is set by +the calculateField() virtual function which you must reimplement +(or the field value will be an invalid TQVariant). Calculated +fields do not appear in generated SQL statements sent to the +database. +

      See also calculateField() and TQSqlRecord::setGenerated(). + +

      void TQSqlCursor::setFilter ( const TQString & filter ) [virtual] +

      +Sets the current filter to filter. Note that no new records are +selected. To select new records, use select(). The filter will +apply to any subsequent select() calls that do not explicitly +specify a filter. +

      The filter is a SQL WHERE clause without the keyword 'WHERE', +e.g. name='Dave' which will be processed by the DBMS. + +

      void TQSqlCursor::setGenerated ( const TQString & name, bool generated ) [virtual] +

      +Sets the generated flag for the field name to generated. If +the field does not exist, nothing happens. Only fields that have +generated set to TRUE are included in the SQL that is +generated by insert(), update() or del(). +

      See also isGenerated(). + +

      Reimplemented from TQSqlRecord. +

      void TQSqlCursor::setGenerated ( int i, bool generated ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Sets the generated flag for the field i to generated. +

      See also isGenerated(). + +

      Reimplemented from TQSqlRecord. +

      void TQSqlCursor::setMode ( int mode ) [virtual] +

      +Sets the cursor mode to mode. This value can be an OR'ed +combination of TQSqlCursor::Mode values. The default mode for a +cursor is TQSqlCursor::Writable. +

      +    TQSqlCursor cur( "Employee" );
      +    cur.setMode( TQSqlCursor::Writable ); // allow insert/update/delete
      +    ...
      +    cur.setMode( TQSqlCursor::Insert | TQSqlCursor::Update ); // allow inserts and updates only
      +    ...
      +    cur.setMode( TQSqlCursor::ReadOnly ); // no inserts/updates/deletes allowed
      +
      +    
      + + +

      void TQSqlCursor::setName ( const TQString & name, bool autopopulate = TRUE ) [virtual] +

      +Sets the name of the cursor to name. If autopopulate is TRUE +(the default), the name must correspond to a valid table or +view name in the database. Also, note that all references to the +cursor edit buffer become invalidated when fields are +auto-populated. See the TQSqlCursor constructor documentation for +more information. + +

      void TQSqlCursor::setPrimaryIndex ( const TQSqlIndex & idx ) [virtual] +

      +Sets the primary index associated with the cursor to the index idx. Note that this index must contain a field or set of fields +which identify a unique record within the underlying database +table or view so that update() and del() will execute as expected. +

      See also update() and del(). + +

      void TQSqlCursor::setSort ( const TQSqlIndex & sort ) [virtual] +

      +Sets the current sort to sort. Note that no new records are +selected. To select new records, use select(). The sort will +apply to any subsequent select() calls that do not explicitly +specify a sort. + +

      void TQSqlCursor::setTrimmed ( const TQString & name, bool trim ) [virtual] +

      +Sets field name's trimmed status to trim. If the field name does not exist, nothing happens. +

      When a trimmed field of type string or cstring is read from the +database any trailing (right-most) spaces are removed. +

      See also isTrimmed() and TQVariant. + +

      TQSqlIndex TQSqlCursor::sort () const +

      +Returns the current sort, or an empty index if there is no current +sort. + +

      TQString TQSqlCursor::toString ( TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const [virtual protected] +

      +Returns a formatted string composed of all the fields in rec. +Each field is composed of the prefix (e.g. table or view name), +".", the field name, the fieldSep and the field value. If the +prefix is empty then each field will begin with the field name. +The fields are then joined together separated by sep. Fields +where isGenerated() returns FALSE are not included. This function +is useful for generating SQL statements. + +

      TQString TQSqlCursor::toString ( const TQString & prefix, TQSqlField * field, const TQString & fieldSep ) const [virtual protected] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns a formatted string composed of the prefix (e.g. table +or view name), ".", the field name, the fieldSep and the +field value. If the prefix is empty then the string will begin +with the field name. This function is useful for generating SQL +statements. + +

      TQString TQSqlCursor::toString ( const TQSqlIndex & i, TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const [virtual protected] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns a formatted string composed of all the fields in the index +i. Each field is composed of the prefix (e.g. table or view +name), ".", the field name, the fieldSep and the field value. +If the prefix is empty then each field will begin with the field +name. The field values are taken from rec. The fields are then +joined together separated by sep. Fields where isGenerated() +returns FALSE are ignored. This function is useful for generating +SQL statements. + +

      int TQSqlCursor::update ( bool invalidate = TRUE ) [virtual] +

      +Updates the database with the current contents of the edit buffer. +Returns the number of records which were updated. +For error information, use lastError(). +

      Only records which meet the filter criteria specified by the +cursor's primary index are updated. If the cursor does not contain +a primary index, no update is performed and 0 is returned. +

      If invalidate is TRUE (the default), the current cursor can no +longer be navigated. A new select() call must be made before you +can move to a valid record. For example: +

      + +

                  TQSqlCursor cur( "prices" );
      +            cur.select( "id=202" );
      +            if ( cur.next() ) {
      +                TQSqlRecord *buffer = cur.primeUpdate();
      +                double price = buffer->value( "price" ).toDouble();
      +                double newprice = price * 1.05;
      +                buffer->setValue( "price", newprice );
      +                cur.update();
      +            }
      +
      +

      In the above example, a cursor is created on the 'prices' table +and is positioned on the record to be updated. Then a pointer to +the cursor's edit buffer is acquired using primeUpdate(). A new +value is calculated and placed into the edit buffer with the +setValue() call. Finally, an update() call is made on the cursor +which uses the tables's primary index to update the record in the +database with the contents of the cursor's edit buffer. Remember: +all edit operations (insert(), update() and delete()) operate on +the contents of the cursor edit buffer and not on the contents of +the cursor itself. +

      Note that if the primary index does not uniquely distinguish +records the database may be changed into an inconsistent state. +

      See also setMode() and lastError(). + +

      Example: sql/overview/update/main.cpp. +

      int TQSqlCursor::update ( const TQString & filter, bool invalidate = TRUE ) [virtual protected] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Updates the database with the current contents of the cursor edit +buffer using the specified filter. Returns the number of +records which were updated. +For error information, use lastError(). +

      Only records which meet the filter criteria are updated, otherwise +all records in the table are updated. +

      If invalidate is TRUE (the default), the cursor can no longer +be navigated. A new select() call must be made before you can move +to a valid record. +

      See also primeUpdate(), setMode(), and lastError(). + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqldatabase-h.html b/doc/html/tqsqldatabase-h.html new file mode 100644 index 000000000..10df393f4 --- /dev/null +++ b/doc/html/tqsqldatabase-h.html @@ -0,0 +1,199 @@ + + + + + +tqsqldatabase.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqldatabase.h

      + +

      This is the verbatim text of the tqsqldatabase.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlDatabase class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLDATABASE_H
      +#define TQSQLDATABASE_H
      +
      +#ifndef QT_H
      +#include "tqobject.h"
      +#include "ntqstring.h"
      +#include "tqsqlquery.h"
      +#include "ntqstringlist.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQSqlError;
      +class TQSqlDriver;
      +class TQSqlIndex;
      +class TQSqlRecord;
      +class TQSqlRecordInfo;
      +class TQSqlDatabasePrivate;
      +
      +class TQM_EXPORT_SQL TQSqlDriverCreatorBase
      +{
      +public:
      +    virtual TQSqlDriver* createObject() = 0;
      +};
      +
      +template <class type>
      +class TQM_EXPORT_SQL TQSqlDriverCreator: public TQSqlDriverCreatorBase
      +{
      +public:
      +    TQSqlDriver* createObject() { return new type; }
      +};
      +
      +class TQM_EXPORT_SQL TQSqlDatabase : public TQObject
      +{
      +    TQ_OBJECT
      +    TQ_PROPERTY( TQString databaseName  READ databaseName WRITE setDatabaseName )
      +    TQ_PROPERTY( TQString userName  READ userName WRITE setUserName )
      +    TQ_PROPERTY( TQString password  READ password WRITE setPassword )
      +    TQ_PROPERTY( TQString hostName  READ hostName WRITE setHostName )
      +    TQ_PROPERTY( int port READ port WRITE setPort )
      +    TQ_PROPERTY( TQString connectOptions READ connectOptions WRITE setConnectOptions )
      +
      +public:
      +    ~TQSqlDatabase();
      +
      +    bool		open();
      +    bool		open( const TQString& user, const TQString& password );
      +    void		close();
      +    bool		isOpen() const;
      +    bool		isOpenError() const;
      +    TQStringList		tables() const;
      +    TQStringList		tables( TQSql::TableType type ) const;
      +    TQSqlIndex		primaryIndex( const TQString& tablename ) const;
      +    TQSqlRecord		record( const TQString& tablename ) const;
      +    TQSqlRecord		record( const TQSqlQuery& query ) const;
      +    TQSqlRecordInfo	recordInfo( const TQString& tablename ) const;
      +    TQSqlRecordInfo	recordInfo( const TQSqlQuery& query ) const;
      +    TQSqlQuery		exec( const TQString& query = TQString::null ) const;
      +    TQSqlError		lastError() const;
      +
      +    bool		transaction();
      +    bool		commit();
      +    bool		rollback();
      +
      +    virtual void	setDatabaseName( const TQString& name );
      +    virtual void	setUserName( const TQString& name );
      +    virtual void	setPassword( const TQString& password );
      +    virtual void	setHostName( const TQString& host );
      +    virtual void	setPort( int p );
      +    void 		setConnectOptions( const TQString& options = TQString::null );
      +    TQString		databaseName() const;
      +    TQString		userName() const;
      +    TQString		password() const;
      +    TQString		hostName() const;
      +    TQString		driverName() const;
      +    int         	port() const;
      +    TQString 		connectOptions() const;
      +
      +    TQSqlDriver*		driver() const;
      +    
      +    // MOC_SKIP_BEGIN
      +    static const char * const defaultConnection;
      +    // MOC_SKIP_END
      +
      +    static TQSqlDatabase* addDatabase( const TQString& type, const TQString& connectionName = defaultConnection );
      +    static TQSqlDatabase* addDatabase( TQSqlDriver* driver, const TQString& connectionName = defaultConnection );
      +    static TQSqlDatabase* database( const TQString& connectionName = defaultConnection, bool open = TRUE );
      +    static void          removeDatabase( const TQString& connectionName );
      +    static void          removeDatabase( TQSqlDatabase* db );
      +    static bool          contains( const TQString& connectionName = defaultConnection );
      +    static TQStringList   drivers();
      +    static void          registerSqlDriver( const TQString& name, const TQSqlDriverCreatorBase* creator ); // ### 4.0: creator should not be const
      +    static bool 	 isDriverAvailable( const TQString& name );
      +    
      +protected:
      +    TQSqlDatabase( const TQString& type, const TQString& name, TQObject * parent=0, const char * objname=0 );
      +    TQSqlDatabase( TQSqlDriver* driver, TQObject * parent=0, const char * objname=0 );
      +private:
      +    void 	init( const TQString& type, const TQString& name );
      +    TQSqlDatabasePrivate* d;
      +#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
      +    TQSqlDatabase( const TQSqlDatabase & );
      +    TQSqlDatabase &operator=( const TQSqlDatabase & );
      +#endif
      +
      +};
      +
      +#endif // TQT_NO_SQL
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqldatabase-members.html b/doc/html/tqsqldatabase-members.html new file mode 100644 index 000000000..705dc5a61 --- /dev/null +++ b/doc/html/tqsqldatabase-members.html @@ -0,0 +1,124 @@ + + + + + +TQSqlDatabase Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlDatabase

      + +

      This is the complete list of member functions for +TQSqlDatabase, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqldatabase.html b/doc/html/tqsqldatabase.html new file mode 100644 index 000000000..b7f6315ed --- /dev/null +++ b/doc/html/tqsqldatabase.html @@ -0,0 +1,668 @@ + + + + + +TQSqlDatabase Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlDatabase Class Reference
      [sql module]

      + +

      The TQSqlDatabase class is used to create SQL database +connections and to provide transaction handling. +More... +

      #include <tqsqldatabase.h> +

      Inherits TQObject. +

      List of all member functions. +

      Public Members

      + +

      Static Public Members

      +
        +
      • TQSqlDatabase * addDatabase ( const TQString & type, const TQString & connectionName = defaultConnection )
      • +
      • TQSqlDatabase * addDatabase ( TQSqlDriver * driver, const TQString & connectionName = defaultConnection )
      • +
      • TQSqlDatabase * database ( const TQString & connectionName = defaultConnection, bool open = TRUE )
      • +
      • void removeDatabase ( const TQString & connectionName )
      • +
      • void removeDatabase ( TQSqlDatabase * db )
      • +
      • bool contains ( const TQString & connectionName = defaultConnection )
      • +
      • TQStringList drivers ()
      • +
      • void registerSqlDriver ( const TQString & name, const TQSqlDriverCreatorBase * creator )
      • +
      • bool isDriverAvailable ( const TQString & name )
      • +
      +

      Properties

      +
        +
      • TQString connectOptions - the database connect options
      • +
      • TQString databaseName - the name of the database
      • +
      • TQString hostName - the host name where the database resides
      • +
      • TQString password - the password used to connect to the database
      • +
      • int port - the port used to connect to the database
      • +
      • TQString userName - the user name connected to the database
      • +
      +

      Protected Members

      +
        +
      • TQSqlDatabase ( const TQString & type, const TQString & name, TQObject * parent = 0, const char * objname = 0 )
      • +
      • TQSqlDatabase ( TQSqlDriver * driver, TQObject * parent = 0, const char * objname = 0 )
      • +
      +

      Detailed Description

      + + +The TQSqlDatabase class is used to create SQL database +connections and to provide transaction handling. +

      + + +

      Note that transaction handling is not supported by every SQL +database. You can find out whether transactions are supported +using TQSqlDriver::hasFeature(). +

      The TQSqlDatabase class provides an abstract interface for +accessing many types of database backends. Database-specific +drivers are used internally to actually access and manipulate +data, (see TQSqlDriver). Result set objects provide the interface +for executing and manipulating SQL queries (see TQSqlQuery). +

      See also Database Classes. + +


      Member Function Documentation

      +

      TQSqlDatabase::TQSqlDatabase ( const TQString & type, const TQString & name, TQObject * parent = 0, const char * objname = 0 ) [protected] +

      +Creates a TQSqlDatabase connection called name that uses the +driver referred to by type, with the parent parent and the +object name objname. If the type is not recognized, the +database connection will have no functionality. +

      The currently available drivers are: +

      +
      Driver Type Description +
      TQODBC3 ODBC Driver (includes Microsoft SQL Server) +
      TQOCI8 Oracle Call Interface Driver +
      TQPSQL7 PostgreSQL v6.x and v7.x Driver +
      TQTDS7 Sybase Adaptive Server +
      TQMYSQL3 MySQL Driver +
      TQDB2 IBM DB2, v7.1 and higher +
      TQSQLITE SQLite Driver +
      TQIBASE Borland Interbase Driver +
      +

      Additional third party drivers, including your own custom drivers, +can be loaded dynamically. +

      See also registerSqlDriver(). + +

      TQSqlDatabase::TQSqlDatabase ( TQSqlDriver * driver, TQObject * parent = 0, const char * objname = 0 ) [protected] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Creates a database connection using the driver driver, with +the parent parent and the object name objname. +

      Warning: The framework takes ownership of the driver pointer, +so it should not be deleted. + +

      TQSqlDatabase::~TQSqlDatabase () +

      +Destroys the object and frees any allocated resources. + +

      TQSqlDatabase * TQSqlDatabase::addDatabase ( const TQString & type, const TQString & connectionName = defaultConnection ) [static] +

      +Adds a database to the list of database connections using the +driver type and the connection name connectionName. +

      The database connection is referred to by connectionName. The +newly added database connection is returned. This pointer is owned +by TQSqlDatabase and will be deleted on program exit or when +removeDatabase() is called. +

      If connectionName is not specified, the newly added database +connection becomes the default database connection for the +application, and subsequent calls to database() (without a +database name parameter) will return a pointer to it. If connectionName is given, use database(connectionName) to retrieve a pointer to the +database connection. +

      Warning: If you add a database with the same name as an +existing database, the new database will replace the old one. +This will happen automatically if you call this function more +than once without specifying connectionName. +

      See also database() and removeDatabase(). + +

      Examples: sql/overview/connect1/main.cpp, sql/overview/connection.cpp, and sql/sqltable/main.cpp. +

      TQSqlDatabase * TQSqlDatabase::addDatabase ( TQSqlDriver * driver, const TQString & connectionName = defaultConnection ) [static] +

      This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      This function is useful if you need to set up the database +connection and instantiate the driver yourself. If you do this, it +is recommended that you include the driver code in your own +application. For example, setting up a custom PostgreSQL +connection and instantiating the TQPSQL7 driver can be done the +following way: +

      +    #include "qtdir/src/sql/drivers/psql/tqsql_psql.cpp"
      +    
      + +(We assume that qtdir is the directory where TQt is installed.) +This will pull in the code that is needed to use the PostgreSQL +client library and to instantiate a TQPSQLDriver object, assuming +that you have the PostgreSQL headers somewhere in your include +search path. +

      +    PGconn* con = PQconnectdb( "host=server user=bart password=simpson dbname=springfield" );
      +    TQPSQLDriver* drv =  new TQPSQLDriver( con );
      +    TQSqlDatabase* db = TQSqlDatabase::addDatabase( drv ); // becomes the new default connection
      +    TQSqlQuery q;
      +    q.exec( "SELECT * FROM people" );
      +    ...
      +    
      + +

      The above code sets up a PostgreSQL connection and instantiates a +TQPSQLDriver object. Next, addDatabase() is called to add the +connection to the known connections so that it can be used by the +TQt SQL classes. When a driver is instantiated with a connection +handle (or set of handles), TQt assumes that you have already +opened the database connection. +

      Remember that you must link your application against the database +client library as well. The simplest way to do this is to add +lines like those below to your .pro file: +

      +    unix:LIBS += -lpq
      +    win32:LIBS += libpqdll.lib
      +    
      + +

      You will need to have the client library in your linker's search +path. +

      The method described above will work for all the drivers, the only +difference is the arguments the driver constructors take. Below is +an overview of the drivers and their constructor arguments. +

      + + + + + + + + +
      Driver Class name Constructor arguments File to include +
      TQPSQL7 +TQPSQLDriver +PGconn* connection +tqsql_psql.cpp +
      TQMYSQL3 +TQMYSQLDriver +MYSQL* connection +tqsql_mysql.cpp +
      TQOCI8 +TQOCIDriver +OCIEnv* environment, OCIError* error, OCISvcCtx* serviceContext +tqsql_oci.cpp +
      TQODBC3 +TQODBCDriver +SQLHANDLE environment, SQLHANDLE connection +tqsql_odbc.cpp +
      TQDB2 +TQDB2 +SQLHANDLE environment, SQLHANDLE connection +tqsql_db2.cpp +
      TQTDS7 +TQTDSDriver +LOGINREC* loginRecord, DBPROCESS* dbProcess, const TQString& hostName +tqsql_tds.cpp +
      TQSQLITE +TQSQLiteDriver +sqlite* connection +tqsql_sqlite.cpp +
      TQIBASE +TQIBaseDriver +isc_db_handle connection +tqsql_ibase.cpp +
      +

      Note: The host name (or service name) is needed when constructing +the TQTDSDriver for creating new connections for internal +queries. This is to prevent the simultaneous usage of several +TQSqlQuery/TQSqlCursor objects from blocking each other. +

      Warning: The SQL framework takes ownership of the driver pointer, +and it should not be deleted. The returned TQSqlDatabase object is +owned by the framework and must not be deleted. If you want to +explicitly remove the connection, use removeDatabase() +

      See also drivers(). + +

      void TQSqlDatabase::close () +

      +Closes the database connection, freeing any resources acquired. +

      See also removeDatabase(). + +

      bool TQSqlDatabase::commit () +

      +Commits a transaction to the database if the driver supports +transactions. Returns TRUE if the operation succeeded; otherwise +returns FALSE. +

      See also TQSqlDriver::hasFeature() and rollback(). + +

      TQString TQSqlDatabase::connectOptions () const +

      Returns the database connect options. +See the "connectOptions" property for details. +

      bool TQSqlDatabase::contains ( const TQString & connectionName = defaultConnection ) [static] +

      +Returns TRUE if the list of database connections contains connectionName; otherwise returns FALSE. + +

      TQSqlDatabase * TQSqlDatabase::database ( const TQString & connectionName = defaultConnection, bool open = TRUE ) [static] +

      +Returns the database connection called connectionName. The +database connection must have been previously added with +addDatabase(). If open is TRUE (the default) and the database +connection is not already open it is opened now. If no connectionName is specified the default connection is used. If connectionName does not exist in the list of databases, 0 is +returned. The pointer returned is owned by TQSqlDatabase and should +not be deleted. +

      Warning: There are restrictions on the use of database connections +in threaded applications. Please see the Thread Support in TQt document for more information about +threading and SQL databases. + +

      Examples: sql/overview/basicbrowsing/main.cpp and sql/overview/create_connections/main.cpp. +

      TQString TQSqlDatabase::databaseName () const +

      Returns the name of the database. +See the "databaseName" property for details. +

      TQSqlDriver * TQSqlDatabase::driver () const +

      +Returns the database driver used to access the database +connection. + +

      TQString TQSqlDatabase::driverName () const +

      +Returns the name of the driver used by the database connection. + +

      TQStringList TQSqlDatabase::drivers () [static] +

      +Returns a list of all the available database drivers. +

      Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

      +    TQStringList list = TQSqlDatabase::drivers();
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
      +        myProcessing( *it );
      +        ++it;
      +    }
      +    
      + + +

      TQSqlQuery TQSqlDatabase::exec ( const TQString & query = TQString::null ) const +

      +Executes a SQL statement (e.g. an INSERT, UPDATE or DELETE statement) on the database, and returns a TQSqlQuery object. +Use lastError() to retrieve error information. If query is +TQString::null, an empty, invalid query is returned and lastError() +is not affected. +

      See also TQSqlQuery and lastError(). + +

      TQString TQSqlDatabase::hostName () const +

      Returns the host name where the database resides. +See the "hostName" property for details. +

      bool TQSqlDatabase::isDriverAvailable ( const TQString & name ) [static] +

      +Returns TRUE if a driver called name is available; otherwise +returns FALSE. +

      See also drivers(). + +

      bool TQSqlDatabase::isOpen () const +

      +Returns TRUE if the database connection is currently open; +otherwise returns FALSE. + +

      bool TQSqlDatabase::isOpenError () const +

      +Returns TRUE if there was an error opening the database +connection; otherwise returns FALSE. Error information can be +retrieved using the lastError() function. + +

      TQSqlError TQSqlDatabase::lastError () const +

      +Returns information about the last error that occurred on the +database. See TQSqlError for more information. + +

      Examples: sql/overview/connection.cpp and sql/sqltable/main.cpp. +

      bool TQSqlDatabase::open () +

      +Opens the database connection using the current connection values. +Returns TRUE on success; otherwise returns FALSE. Error +information can be retrieved using the lastError() function. +

      See also lastError(). + +

      Examples: sql/overview/connect1/main.cpp, sql/overview/connection.cpp, and sql/sqltable/main.cpp. +

      bool TQSqlDatabase::open ( const TQString & user, const TQString & password ) +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Opens the database connection using the given user name and password. Returns TRUE on success; otherwise returns FALSE. Error +information can be retrieved using the lastError() function. +

      This function does not store the password it is given. Instead, +the password is passed directly to the driver for opening a +connection and is then discarded. +

      See also lastError(). + +

      TQString TQSqlDatabase::password () const +

      Returns the password used to connect to the database. +See the "password" property for details. +

      int TQSqlDatabase::port () const +

      Returns the port used to connect to the database. +See the "port" property for details. +

      TQSqlIndex TQSqlDatabase::primaryIndex ( const TQString & tablename ) const +

      +Returns the primary index for table tablename. If no primary +index exists an empty TQSqlIndex will be returned. + +

      TQSqlRecord TQSqlDatabase::record ( const TQString & tablename ) const +

      +Returns a TQSqlRecord populated with the names of all the fields in +the table (or view) called tablename. The order in which the +fields appear in the record is undefined. If no such table (or +view) exists, an empty record is returned. +

      See also recordInfo(). + +

      TQSqlRecord TQSqlDatabase::record ( const TQSqlQuery & query ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns a TQSqlRecord populated with the names of all the fields +used in the SQL query. If the query is a "SELECT *" the order +in which fields appear in the record is undefined. +

      See also recordInfo(). + +

      TQSqlRecordInfo TQSqlDatabase::recordInfo ( const TQString & tablename ) const +

      +Returns a TQSqlRecordInfo populated with meta data about the table +or view tablename. If no such table (or view) exists, an empty +record is returned. +

      See also TQSqlRecordInfo, TQSqlFieldInfo, and record(). + +

      TQSqlRecordInfo TQSqlDatabase::recordInfo ( const TQSqlQuery & query ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns a TQSqlRecordInfo object with meta data for the TQSqlQuery +query. Note that this overloaded function may return less +information than the recordInfo() function which takes the name of +a table as parameter. +

      See also TQSqlRecordInfo, TQSqlFieldInfo, and record(). + +

      void TQSqlDatabase::registerSqlDriver ( const TQString & name, const TQSqlDriverCreatorBase * creator ) [static] +

      +This function registers a new SQL driver called name, within +the SQL framework. This is useful if you have a custom SQL driver +and don't want to compile it as a plugin. +

      Example usage: +

      +    TQSqlDatabase::registerSqlDriver( "MYDRIVER", new TQSqlDriverCreator<MyDatabaseDriver> );
      +    TQSqlDatabase* db = TQSqlDatabase::addDatabase( "MYDRIVER" );
      +    ...
      +    
      + +

      Warning: The framework takes ownership of the creator pointer, +so it should not be deleted. + +

      void TQSqlDatabase::removeDatabase ( const TQString & connectionName ) [static] +

      +Removes the database connection connectionName from the list of +database connections. +

      Warning: There should be no open queries on the database +connection when this function is called, otherwise a resource leak +will occur. + +

      void TQSqlDatabase::removeDatabase ( TQSqlDatabase * db ) [static] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Removes the database connection db from the list of database +connections. The TQSqlDatabase object is destroyed when it is removed +from the list. +

      Warning: The db pointer is not valid after this function has +been called. There should be no open queries on the database +connection when this function is called, otherwise a resource leak +will occur. + +

      bool TQSqlDatabase::rollback () +

      +Rolls a transaction back on the database if the driver supports +transactions. Returns TRUE if the operation succeeded; otherwise +returns FALSE. +

      See also TQSqlDriver::hasFeature(), commit(), and transaction(). + +

      void TQSqlDatabase::setConnectOptions ( const TQString & options = TQString::null ) +

      Sets the database connect options to options. +See the "connectOptions" property for details. +

      void TQSqlDatabase::setDatabaseName ( const TQString & name ) [virtual] +

      Sets the name of the database to name. +See the "databaseName" property for details. +

      void TQSqlDatabase::setHostName ( const TQString & host ) [virtual] +

      Sets the host name where the database resides to host. +See the "hostName" property for details. +

      void TQSqlDatabase::setPassword ( const TQString & password ) [virtual] +

      Sets the password used to connect to the database to password. +See the "password" property for details. +

      void TQSqlDatabase::setPort ( int p ) [virtual] +

      Sets the port used to connect to the database to p. +See the "port" property for details. +

      void TQSqlDatabase::setUserName ( const TQString & name ) [virtual] +

      Sets the user name connected to the database to name. +See the "userName" property for details. +

      TQStringList TQSqlDatabase::tables ( TQSql::TableType type ) const +

      +Returns a list of the database's tables, system tables and views, +as specified by the parameter type. +

      Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

      +    TQStringList list = myDatabase.tables( TQSql::Tables | TQSql::Views );
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
      +        myProcessing( *it );
      +        ++it;
      +    }
      +    
      + + +

      Example: sql/sqltable/main.cpp. +

      TQStringList TQSqlDatabase::tables () const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns a list of the database's tables that are visible to the +user. To include views or system tables, use the version of this +function that takes a table type parameter. +

      Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

      +    TQStringList list = myDatabase.tables();
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
      +        myProcessing( *it );
      +        ++it;
      +    }
      +    
      + + +

      bool TQSqlDatabase::transaction () +

      +Begins a transaction on the database if the driver supports +transactions. Returns TRUE if the operation succeeded; otherwise +returns FALSE. +

      See also TQSqlDriver::hasFeature(), commit(), and rollback(). + +

      TQString TQSqlDatabase::userName () const +

      Returns the user name connected to the database. +See the "userName" property for details. +


      Property Documentation

      +

      TQString connectOptions

      +

      This property holds the database connect options. +

      The format of the options string is a semi-colon separated list of +option names or option = value pairs. The options depend on the +database client used: +

      + +

      +

      ODBC MySQL PostgreSQL +
      +
        +
      • SQL_ATTR_ACCESS_MODE +
      • SQL_ATTR_LOGIN_TIMEOUT +
      • SQL_ATTR_CONNECTION_TIMEOUT +
      • SQL_ATTR_CURRENT_CATALOG +
      • SQL_ATTR_METADATA_ID +
      • SQL_ATTR_PACKET_SIZE +
      • SQL_ATTR_TRACEFILE +
      • SQL_ATTR_TRACE +
      +

      +
        +
      • CLIENT_COMPRESS +
      • CLIENT_FOUND_ROWS +
      • CLIENT_IGNORE_SPACE +
      • CLIENT_SSL +
      • CLIENT_ODBC +
      • CLIENT_NO_SCHEMA +
      • CLIENT_INTERACTIVE +
      +

      +
        +
      • connect_timeout +
      • options +
      • tty +
      • requiressl +
      • service +
      +
      DB2 OCI TDS +
      +
        +
      • SQL_ATTR_ACCESS_MODE +
      • SQL_ATTR_LOGIN_TIMEOUT +
      +

      +none +

      +none +

      +

      Example of usage: +

      +    ...
      +    // MySQL connection
      +    db->setConnectOptions( "CLIENT_SSL;CLIENT_IGNORE_SPACE" ); // use an SSL connection to the server
      +    if ( !db->open() ) {
      +        db->setConnectOptions(); // clears the connect option string
      +        ...
      +    }
      +    ...
      +    // PostgreSQL connection
      +    db->setConnectOptions( "requiressl=1" ); // enable PostgreSQL SSL connections
      +    if ( !db->open() ) {
      +        db->setConnectOptions(); // clear options
      +        ...
      +    }
      +    ...
      +    // ODBC connection
      +    db->setConnectOptions( "SQL_ATTR_ACCESS_MODE=SQL_MODE_READ_ONLY;SQL_ATTR_TRACE=SQL_OPT_TRACE_ON" ); // set ODBC options
      +    if ( !db->open() ) {
      +        db->setConnectOptions(); // don't try to set this option
      +        ...
      +    }
      +    
      + +

      Please refer to the client library documentation for more +information about the different options. The options will be set +prior to opening the database connection. Setting new options +without re-opening the connection does nothing. +

      See also +

      Set this property's value with setConnectOptions() and get this property's value with connectOptions(). +

      TQString databaseName

      +

      This property holds the name of the database. +

      Note that the database name is the TNS Service Name for the TQOCI8 +(Oracle) driver. +

      For the TQODBC3 driver it can either be a DSN, a DSN filename (the +file must have a .dsn extension), or a connection string. MS +Access users can for example use the following connection string +to open a .mdb file directly, instead of having to create a DSN +entry in the ODBC manager: +

      +    ...
      +    db = TQSqlDatabase::addDatabase( "TQODBC3" );
      +    db->setDatabaseName( "DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=myaccessfile.mdb" );
      +    if ( db->open() ) {
      +        // success!
      +    }
      +    ...
      +    
      + +("FIL" is the required spelling in Microsoft's API.) +

      There is no default value. + +

      Set this property's value with setDatabaseName() and get this property's value with databaseName(). +

      TQString hostName

      +

      This property holds the host name where the database resides. +

      There is no default value. + +

      Set this property's value with setHostName() and get this property's value with hostName(). +

      TQString password

      +

      This property holds the password used to connect to the database. +

      There is no default value. +

      Warning: This function stores the password in plain text within +TQt. Use the open() call that takes a password as parameter to +avoid this behaviour. +

      See also open(). + +

      Set this property's value with setPassword() and get this property's value with password(). +

      int port

      +

      This property holds the port used to connect to the database. +

      There is no default value. + +

      Set this property's value with setPort() and get this property's value with port(). +

      TQString userName

      +

      This property holds the user name connected to the database. +

      There is no default value. + +

      Set this property's value with setUserName() and get this property's value with userName(). + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqldriver-h.html b/doc/html/tqsqldriver-h.html new file mode 100644 index 000000000..0854508ac --- /dev/null +++ b/doc/html/tqsqldriver-h.html @@ -0,0 +1,169 @@ + + + + + +tqsqldriver.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqldriver.h

      + +

      This is the verbatim text of the tqsqldriver.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlDriver class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLDRIVER_H
      +#define TQSQLDRIVER_H
      +
      +#ifndef QT_H
      +#include "tqobject.h"
      +#include "ntqptrdict.h"
      +#include "ntqstring.h"
      +#include "tqsqlerror.h"
      +#include "tqsqlquery.h"
      +#include "tqsqlfield.h"
      +#include "tqsqlindex.h"
      +#include "ntqstringlist.h"
      +#include "ntqmap.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQSqlDriverExtension;
      +
      +class TQSqlDatabase;
      +
      +class TQM_EXPORT_SQL TQSqlDriver : public TQObject
      +{
      +    friend class TQSqlDatabase;
      +    TQ_OBJECT
      +public:
      +    enum DriverFeature { Transactions, QuerySize, BLOB, Unicode, PreparedQueries,
      +			 NamedPlaceholders, PositionalPlaceholders };
      +
      +    TQSqlDriver( TQObject * parent=0, const char * name=0 );
      +    ~TQSqlDriver();
      +    bool			isOpen() const;
      +    bool			isOpenError() const;
      +
      +    virtual bool		beginTransaction();
      +    virtual bool		commitTransaction();
      +    virtual bool		rollbackTransaction();
      +    virtual TQStringList		tables( const TQString& tableType ) const;
      +    virtual TQSqlIndex		primaryIndex( const TQString& tableName ) const;
      +    virtual TQSqlRecord		record( const TQString& tableName ) const;
      +    virtual TQSqlRecord		record( const TQSqlQuery& query ) const;
      +    virtual TQSqlRecordInfo	recordInfo( const TQString& tablename ) const;
      +    virtual TQSqlRecordInfo	recordInfo( const TQSqlQuery& query ) const;
      +    virtual TQString		nullText() const;
      +    virtual TQString		formatValue( const TQSqlField* field, bool trimStrings = FALSE ) const;
      +    TQSqlError			lastError() const;
      +
      +    virtual bool		hasFeature( DriverFeature f ) const = 0;
      +    virtual bool		open( const TQString & db,
      +				      const TQString & user = TQString::null,
      +				      const TQString & password = TQString::null,
      +				      const TQString & host = TQString::null,
      +				      int port = -1 ) = 0;
      +    virtual void		close() = 0;
      +    virtual TQSqlQuery		createQuery() const = 0;
      +
      +    // ### remove for 4.0
      +    bool			open( const TQString& db,
      +				      const TQString& user,
      +				      const TQString& password,
      +				      const TQString& host,
      +				      int port,
      +				      const TQString& connOpts );
      +protected:
      +    virtual void		setOpen( bool o );
      +    virtual void		setOpenError( bool e );
      +    virtual void		setLastError( const TQSqlError& e );
      +private:
      +    // ### This class needs a d-pointer in 4.0.
      +    int		          dbState;
      +    TQSqlError	          error;
      +#if defined(TQ_DISABLE_COPY)
      +    TQSqlDriver( const TQSqlDriver & );
      +    TQSqlDriver &operator=( const TQSqlDriver & );
      +#endif
      +};
      +
      +#endif	// TQT_NO_SQL
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqldriver-members.html b/doc/html/tqsqldriver-members.html new file mode 100644 index 000000000..1a71bc534 --- /dev/null +++ b/doc/html/tqsqldriver-members.html @@ -0,0 +1,109 @@ + + + + + +TQSqlDriver Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlDriver

      + +

      This is the complete list of member functions for +TQSqlDriver, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqldriver.html b/doc/html/tqsqldriver.html new file mode 100644 index 000000000..2a4d05b4c --- /dev/null +++ b/doc/html/tqsqldriver.html @@ -0,0 +1,295 @@ + + + + + +TQSqlDriver Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlDriver Class Reference
      [sql module]

      + +

      The TQSqlDriver class is an abstract base class for accessing +SQL databases. +More... +

      #include <tqsqldriver.h> +

      Inherits TQObject. +

      List of all member functions. +

      Public Members

      +
        +
      • enum DriverFeature { Transactions, QuerySize, BLOB, Unicode, PreparedQueries, NamedPlaceholders, PositionalPlaceholders }
      • +
      • TQSqlDriver ( TQObject * parent = 0, const char * name = 0 )
      • +
      • ~TQSqlDriver ()
      • +
      • bool isOpen () const
      • +
      • bool isOpenError () const
      • +
      • virtual bool beginTransaction ()
      • +
      • virtual bool commitTransaction ()
      • +
      • virtual bool rollbackTransaction ()
      • +
      • virtual TQStringList tables ( const TQString & tableType ) const
      • +
      • virtual TQSqlIndex primaryIndex ( const TQString & tableName ) const
      • +
      • virtual TQSqlRecord record ( const TQString & tableName ) const
      • +
      • virtual TQSqlRecord record ( const TQSqlQuery & query ) const
      • +
      • virtual TQSqlRecordInfo recordInfo ( const TQString & tablename ) const
      • +
      • virtual TQSqlRecordInfo recordInfo ( const TQSqlQuery & query ) const
      • +
      • virtual TQString nullText () const
      • +
      • virtual TQString formatValue ( const TQSqlField * field, bool trimStrings = FALSE ) const
      • +
      • TQSqlError lastError () const
      • +
      • virtual bool hasFeature ( DriverFeature f ) const = 0
      • +
      • virtual bool open ( const TQString & db, const TQString & user = TQString::null, const TQString & password = TQString::null, const TQString & host = TQString::null, int port = -1 ) = 0
      • +
      • virtual void close () = 0
      • +
      • virtual TQSqlQuery createQuery () const = 0
      • +
      • bool open ( const TQString & db, const TQString & user, const TQString & password, const TQString & host, int port, const TQString & connOpts )
      • +
      +

      Protected Members

      + +

      Detailed Description

      + + +The TQSqlDriver class is an abstract base class for accessing +SQL databases. +

      + +

      This class should not be used directly. Use TQSqlDatabase instead. +

      See also Database Classes. + +


      Member Type Documentation

      +

      TQSqlDriver::DriverFeature

      + +

      This enum contains a list of features a driver may support. Use +hasFeature() to query whether a feature is supported or not. +

        +
      • TQSqlDriver::Transactions - whether the driver supports SQL transactions +
      • TQSqlDriver::QuerySize - whether the database is capable of reporting the size +of a query. Note that some databases do not support returning the size +(i.e. number of rows returned) of a query, in which case +TQSqlQuery::size() will return -1 +
      • TQSqlDriver::BLOB - whether the driver supports Binary Large Object fields +
      • TQSqlDriver::Unicode - whether the driver supports Unicode strings if the +database server does +
      • TQSqlDriver::PreparedQueries - whether the driver supports prepared query execution +
      • TQSqlDriver::NamedPlaceholders - whether the driver supports usage of named placeholders +
      • TQSqlDriver::PositionalPlaceholders - whether the driver supports usage of positional placeholders +

      More information about supported features can be found in the +TQt SQL driver documentation. +

      See also hasFeature(). + +


      Member Function Documentation

      +

      TQSqlDriver::TQSqlDriver ( TQObject * parent = 0, const char * name = 0 ) +

      +Default constructor. Creates a new driver with parent parent, +called name. +

      +

      TQSqlDriver::~TQSqlDriver () +

      +Destroys the object and frees any allocated resources. + +

      bool TQSqlDriver::beginTransaction () [virtual] +

      +Protected function which derived classes can reimplement to begin +a transaction. If successful, return TRUE, otherwise return FALSE. +The default implementation returns FALSE. +

      See also commitTransaction() and rollbackTransaction(). + +

      void TQSqlDriver::close () [pure virtual] +

      + +

      Derived classes must reimplement this abstract virtual function in +order to close the database connection. Return TRUE on success, +FALSE on failure. +

      See also setOpen(). + +

      +

      bool TQSqlDriver::commitTransaction () [virtual] +

      +Protected function which derived classes can reimplement to commit +a transaction. If successful, return TRUE, otherwise return FALSE. +The default implementation returns FALSE. +

      See also beginTransaction() and rollbackTransaction(). + +

      TQSqlQuery TQSqlDriver::createQuery () const [pure virtual] +

      + +

      Creates an empty SQL result on the database. Derived classes must +reimplement this function and return a TQSqlQuery object +appropriate for their database to the caller. +

      +

      TQString TQSqlDriver::formatValue ( const TQSqlField * field, bool trimStrings = FALSE ) const [virtual] +

      +Returns a string representation of the field value for the +database. This is used, for example, when constructing INSERT and +UPDATE statements. +

      The default implementation returns the value formatted as a string +according to the following rules: +

        +

      • If field is NULL, nullText() is returned. +

      • If field is character data, the value is returned enclosed +in single quotation marks, which is appropriate for many SQL +databases. Any embedded single-quote characters are escaped +(replaced with two single-quote characters). If trimStrings is +TRUE (the default is FALSE), all trailing whitespace is trimmed +from the field. +

      • If field is date/time data, the value is formatted in ISO +format and enclosed in single quotation marks. If the date/time +data is invalid, nullText() is returned. +

      • If field is bytearray data, and the driver can edit binary +fields, the value is formatted as a hexadecimal string. +

      • For any other field type toString() will be called on its value +and the result returned. +

      +

      See also TQVariant::toString(). + +

      +

      bool TQSqlDriver::hasFeature ( DriverFeature f ) const [pure virtual] +

      + +

      Returns TRUE if the driver supports feature f; otherwise +returns FALSE. +

      Note that some databases need to be open() before this can be +determined. +

      See also DriverFeature. + +

      bool TQSqlDriver::isOpen () const +

      +Returns TRUE if the database connection is open; otherwise returns +FALSE. + +

      bool TQSqlDriver::isOpenError () const +

      +Returns TRUE if the there was an error opening the database +connection; otherwise returns FALSE. + +

      TQSqlError TQSqlDriver::lastError () const +

      +Returns a TQSqlError object which contains information about the +last error that occurred on the database. + +

      TQString TQSqlDriver::nullText () const [virtual] +

      +Returns a string representation of the NULL value for the +database. This is used, for example, when constructing INSERT and +UPDATE statements. The default implementation returns the string +"NULL". + +

      bool TQSqlDriver::open ( const TQString & db, const TQString & user = TQString::null, const TQString & password = TQString::null, const TQString & host = TQString::null, int port = -1 ) [pure virtual] +

      + +

      Derived classes must reimplement this abstract virtual function in +order to open a database connection on database db, using user +name user, password password, host host and port port. +

      The function must return TRUE on success and FALSE on failure. +

      See also setOpen(). + +

      +

      bool TQSqlDriver::open ( const TQString & db, const TQString & user, const TQString & password, const TQString & host, int port, const TQString & connOpts ) +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Open a database connection on database db, using user name user, password password, host host, port port and +connection options connOpts. +

      Returns TRUE on success and FALSE on failure. +

      See also setOpen(). + +

      TQSqlIndex TQSqlDriver::primaryIndex ( const TQString & tableName ) const [virtual] +

      +Returns the primary index for table tableName. Returns an empty +TQSqlIndex if the table doesn't have a primary index. The default +implementation returns an empty index. + +

      TQSqlRecord TQSqlDriver::record ( const TQString & tableName ) const [virtual] +

      +Returns a TQSqlRecord populated with the names of the fields in +table tableName. If no such table exists, an empty record is +returned. The default implementation returns an empty record. + +

      TQSqlRecord TQSqlDriver::record ( const TQSqlQuery & query ) const [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns a TQSqlRecord populated with the names of the fields in the +SQL query. The default implementation returns an empty record. + +

      TQSqlRecordInfo TQSqlDriver::recordInfo ( const TQString & tablename ) const [virtual] +

      +Returns a TQSqlRecordInfo object with meta data about the table tablename. + +

      TQSqlRecordInfo TQSqlDriver::recordInfo ( const TQSqlQuery & query ) const [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns a TQSqlRecordInfo object with meta data for the TQSqlQuery +query. Note that this overloaded function may return less +information than the recordInfo() function which takes the name of +a table as parameter. + +

      bool TQSqlDriver::rollbackTransaction () [virtual] +

      +Protected function which derived classes can reimplement to +rollback a transaction. If successful, return TRUE, otherwise +return FALSE. The default implementation returns FALSE. +

      See also beginTransaction() and commitTransaction(). + +

      void TQSqlDriver::setLastError ( const TQSqlError & e ) [virtual protected] +

      +Protected function which allows derived classes to set the value +of the last error, e, that occurred on the database. +

      See also lastError(). + +

      void TQSqlDriver::setOpen ( bool o ) [virtual protected] +

      +Protected function which sets the open state of the database to o. Derived classes can use this function to report the status of +open(). +

      See also open() and setOpenError(). + +

      void TQSqlDriver::setOpenError ( bool e ) [virtual protected] +

      +Protected function which sets the open error state of the database +to e. Derived classes can use this function to report the +status of open(). Note that if e is TRUE the open state of the +database is set to closed (i.e. isOpen() returns FALSE). +

      See also open(). + +

      TQStringList TQSqlDriver::tables ( const TQString & tableType ) const [virtual] +

      +Returns a list of tables in the database. The default +implementation returns an empty list. +

      The tableType argument describes what types of tables +should be returned. Due to binary compatibility, the string +contains the value of the enum TQSql::TableTypes as text. +An empty string should be treated as TQSql::Tables for +downward compatibility. +

      See also TQSql::TableType. + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqldriverplugin-h.html b/doc/html/tqsqldriverplugin-h.html new file mode 100644 index 000000000..c5070e11e --- /dev/null +++ b/doc/html/tqsqldriverplugin-h.html @@ -0,0 +1,117 @@ + + + + + +tqsqldriverplugin.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqldriverplugin.h

      + +

      This is the verbatim text of the tqsqldriverplugin.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +** $Id: qt/tqsqldriverplugin.h   3.3.8   edited Jan 11 14:46 $
      +**
      +** Definition of TQSqlDriverPlugin class
      +**
      +** Created : 2001-09-20
      +**
      +** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLDRIVERPLUGIN_H
      +#define TQSQLDRIVERPLUGIN_H
      +
      +#ifndef QT_H
      +#include "ntqgplugin.h"
      +#include "ntqstringlist.h"
      +#endif // QT_H
      +
      +#ifndef TQT_NO_SQL
      +#ifndef TQT_NO_COMPONENT
      +
      +class TQSqlDriver;
      +class TQSqlDriverPluginPrivate;
      +
      +class TQ_EXPORT TQSqlDriverPlugin : public TQGPlugin
      +{
      +    TQ_OBJECT
      +public:
      +    TQSqlDriverPlugin();
      +    ~TQSqlDriverPlugin();
      +
      +    virtual TQStringList keys() const = 0;
      +    virtual TQSqlDriver *create( const TQString &key ) = 0;
      +
      +private:
      +    TQSqlDriverPluginPrivate *d;
      +};
      +
      +#endif // TQT_NO_COMPONENT
      +#endif // TQT_NO_SQL
      +
      +#endif // TQSQLDRIVERPLUGIN_H
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqldriverplugin-members.html b/doc/html/tqsqldriverplugin-members.html new file mode 100644 index 000000000..ee6946bf6 --- /dev/null +++ b/doc/html/tqsqldriverplugin-members.html @@ -0,0 +1,50 @@ + + + + + +TQSqlDriverPlugin Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlDriverPlugin

      + +

      This is the complete list of member functions for +TQSqlDriverPlugin, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqldriverplugin.html b/doc/html/tqsqldriverplugin.html new file mode 100644 index 000000000..e46a63da8 --- /dev/null +++ b/doc/html/tqsqldriverplugin.html @@ -0,0 +1,100 @@ + + + + + +TQSqlDriverPlugin Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlDriverPlugin Class Reference

      + +

      The TQSqlDriverPlugin class provides an abstract base for custom TQSqlDriver plugins. +More... +

      #include <tqsqldriverplugin.h> +

      List of all member functions. +

      Public Members

      + +

      Detailed Description

      + + +The TQSqlDriverPlugin class provides an abstract base for custom TQSqlDriver plugins. +

      + +

      The SQL driver plugin is a simple plugin interface that makes it +easy to create your own SQL driver plugins that can be loaded +dynamically by TQt. +

      Writing a SQL plugin is achieved by subclassing this base class, +reimplementing the pure virtual functions keys() and create(), and +exporting the class with the TQ_EXPORT_PLUGIN macro. See the SQL +plugins that come with TQt for example implementations (in the +plugins/src/sqldrivers subdirectory of the source +distribution). Read the plugins + documentation for more information on plugins. +

      See also Plugins. + +


      Member Function Documentation

      +

      TQSqlDriverPlugin::TQSqlDriverPlugin () +

      +Constructs a SQL driver plugin. This is invoked automatically by +the TQ_EXPORT_PLUGIN macro. + +

      TQSqlDriverPlugin::~TQSqlDriverPlugin () +

      +Destroys the SQL driver plugin. +

      You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

      TQSqlDriver * TQSqlDriverPlugin::create ( const TQString & key ) [pure virtual] +

      + +

      Creates and returns a TQSqlDriver object for the driver key key. +The driver key is usually the class name of the required driver. +

      See also keys(). + +

      TQStringList TQSqlDriverPlugin::keys () const [pure virtual] +

      + +

      Returns the list of drivers (keys) this plugin supports. +

      These keys are usually the class names of the custom drivers that +are implemented in the plugin. +

      See also create(). + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqleditorfactory-h.html b/doc/html/tqsqleditorfactory-h.html new file mode 100644 index 000000000..91e9b4bb0 --- /dev/null +++ b/doc/html/tqsqleditorfactory-h.html @@ -0,0 +1,121 @@ + + + + + +tqsqleditorfactory.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqleditorfactory.h

      + +

      This is the verbatim text of the tqsqleditorfactory.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlEditorFactory class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLEDITORFACTORY_H
      +#define TQSQLEDITORFACTORY_H
      +
      +#ifndef QT_H
      +#include "tqeditorfactory.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL_EDIT_WIDGETS
      +
      +class TQSqlField;
      +
      +class TQM_EXPORT_SQL TQSqlEditorFactory : public TQEditorFactory
      +{
      +public:
      +    TQSqlEditorFactory ( TQObject * parent = 0, const char * name = 0 );
      +    ~TQSqlEditorFactory();
      +    virtual TQWidget * createEditor( TQWidget * parent, const TQVariant & variant );
      +    virtual TQWidget * createEditor( TQWidget * parent, const TQSqlField * field );
      +
      +    static TQSqlEditorFactory * defaultFactory();
      +    static void installDefaultFactory( TQSqlEditorFactory * factory );
      +
      +private:
      +#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
      +    TQSqlEditorFactory( const TQSqlEditorFactory & );
      +    TQSqlEditorFactory &operator=( const TQSqlEditorFactory & );
      +#endif
      +};
      +
      +#endif // TQT_NO_SQL
      +#endif // TQSQLEDITORFACTORY_H
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqleditorfactory-members.html b/doc/html/tqsqleditorfactory-members.html new file mode 100644 index 000000000..3a7c555a6 --- /dev/null +++ b/doc/html/tqsqleditorfactory-members.html @@ -0,0 +1,93 @@ + + + + + +TQSqlEditorFactory Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlEditorFactory

      + +

      This is the complete list of member functions for +TQSqlEditorFactory, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqleditorfactory.html b/doc/html/tqsqleditorfactory.html new file mode 100644 index 000000000..875681207 --- /dev/null +++ b/doc/html/tqsqleditorfactory.html @@ -0,0 +1,111 @@ + + + + + +TQSqlEditorFactory Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlEditorFactory Class Reference
      [sql module]

      + +

      The TQSqlEditorFactory class is used to create the editors +used by TQDataTable and TQSqlForm. +More... +

      #include <tqsqleditorfactory.h> +

      Inherits TQEditorFactory. +

      List of all member functions. +

      Public Members

      + +

      Static Public Members

      + +

      Detailed Description

      + + +The TQSqlEditorFactory class is used to create the editors +used by TQDataTable and TQSqlForm. +

      + +

      TQSqlEditorFactory is used by TQDataTable and TQSqlForm to +automatically create appropriate editors for a given TQSqlField. +For example if the field is a TQVariant::String a TQLineEdit would +be the default editor, whereas a TQVariant::Int's default editor +would be a TQSpinBox. +

      If you want to create different editors for fields with the same +data type, subclass TQSqlEditorFactory and reimplement the +createEditor() function. +

      See also TQDataTable, TQSqlForm, and Database Classes. + +


      Member Function Documentation

      +

      TQSqlEditorFactory::TQSqlEditorFactory ( TQObject * parent = 0, const char * name = 0 ) +

      +Constructs a SQL editor factory with parent parent, called name. + +

      TQSqlEditorFactory::~TQSqlEditorFactory () +

      +Destroys the object and frees any allocated resources. + +

      TQWidget * TQSqlEditorFactory::createEditor ( TQWidget * parent, const TQVariant & variant ) [virtual] +

      +Creates and returns the appropriate editor widget for the TQVariant +variant. +

      The widget that is returned has the parent parent (which may be +zero). If variant is invalid, 0 is returned. + +

      Reimplemented from TQEditorFactory. +

      TQWidget * TQSqlEditorFactory::createEditor ( TQWidget * parent, const TQSqlField * field ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Creates and returns the appropriate editor for the TQSqlField field. + +

      TQSqlEditorFactory * TQSqlEditorFactory::defaultFactory () [static] +

      +Returns an instance of a default editor factory. + +

      void TQSqlEditorFactory::installDefaultFactory ( TQSqlEditorFactory * factory ) [static] +

      +Replaces the default editor factory with factory. All +TQDataTable and TQSqlForm instantiations will use this new factory +for creating field editors. TQSqlEditorFactory takes ownership of \a factory, and destroys it when it is no longer needed. + + +

      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlerror-h.html b/doc/html/tqsqlerror-h.html new file mode 100644 index 000000000..025cd9c20 --- /dev/null +++ b/doc/html/tqsqlerror-h.html @@ -0,0 +1,137 @@ + + + + + +tqsqlerror.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlerror.h

      + +

      This is the verbatim text of the tqsqlerror.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlError class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLERROR_H
      +#define TQSQLERROR_H
      +
      +#ifndef QT_H
      +#include "ntqstring.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQM_EXPORT_SQL TQSqlError
      +{
      +public:
      +    enum Type {
      +	None,
      +	Connection,
      +	Statement,
      +	Transaction,
      +	Unknown
      +    };
      +    TQSqlError(  const TQString& driverText = TQString::null,
      +		const TQString& databaseText = TQString::null,
      +		int type = TQSqlError::None,
      +		int number = -1 );
      +    TQSqlError( const TQSqlError& other );
      +    TQSqlError& operator=( const TQSqlError& other );
      +    virtual ~TQSqlError();
      +
      +    TQString	driverText() const;
      +    virtual void setDriverText( const TQString& driverText );
      +    TQString	databaseText() const;
      +    virtual void setDatabaseText( const TQString& databaseText );
      +    int		type() const;
      +    virtual void setType( int type );
      +    int		number() const;
      +    virtual void setNumber( int number );
      +    TQString 	text() const;
      +    void 	showMessage( const TQString& msg = TQString::null ) const;
      +    
      +private:
      +    TQString	driverError;
      +    TQString	databaseError;
      +    int		errorType;
      +    int	errorNumber;
      +};
      +
      +#endif // TQT_NO_SQL
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlerror-members.html b/doc/html/tqsqlerror-members.html new file mode 100644 index 000000000..bb2045291 --- /dev/null +++ b/doc/html/tqsqlerror-members.html @@ -0,0 +1,59 @@ + + + + + +TQSqlError Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlError

      + +

      This is the complete list of member functions for +TQSqlError, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlerror.html b/doc/html/tqsqlerror.html new file mode 100644 index 000000000..d1b84a21a --- /dev/null +++ b/doc/html/tqsqlerror.html @@ -0,0 +1,157 @@ + + + + + +TQSqlError Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlError Class Reference
      [sql module]

      + +

      The TQSqlError class provides SQL database error information. +More... +

      #include <tqsqlerror.h> +

      List of all member functions. +

      Public Members

      +
        +
      • enum Type { None, Connection, Statement, Transaction, Unknown }
      • +
      • TQSqlError ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 )
      • +
      • TQSqlError ( const TQSqlError & other )
      • +
      • TQSqlError & operator= ( const TQSqlError & other )
      • +
      • virtual ~TQSqlError ()
      • +
      • TQString driverText () const
      • +
      • virtual void setDriverText ( const TQString & driverText )
      • +
      • TQString databaseText () const
      • +
      • virtual void setDatabaseText ( const TQString & databaseText )
      • +
      • int type () const
      • +
      • virtual void setType ( int type )
      • +
      • int number () const
      • +
      • virtual void setNumber ( int number )
      • +
      • TQString text () const
      • +
      • void showMessage ( const TQString & msg = TQString::null ) const  (obsolete)
      • +
      +

      Detailed Description

      + + +The TQSqlError class provides SQL database error information. +

      + +

      This class is used to report database-specific errors. An error +description and (if appropriate) a database-specific error number +can be obtained using this class. +

      See also Database Classes. + +


      Member Type Documentation

      +

      TQSqlError::Type

      + +

      This enum type describes the type of SQL error that occurred. +

        +
      • TQSqlError::None - no error occurred +
      • TQSqlError::Connection - connection error +
      • TQSqlError::Statement - SQL statement syntax error +
      • TQSqlError::Transaction - transaction failed error +
      • TQSqlError::Unknown - unknown error +
      +

      Member Function Documentation

      +

      TQSqlError::TQSqlError ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 ) +

      +Constructs an error containing the driver error text driverText, the database-specific error text databaseText, the +type type and the optional error number number. + +

      TQSqlError::TQSqlError ( const TQSqlError & other ) +

      +Creates a copy of other. + +

      TQSqlError::~TQSqlError () [virtual] +

      +Destroys the object and frees any allocated resources. + +

      TQString TQSqlError::databaseText () const +

      +Returns the text of the error as reported by the database. This +may contain database-specific descriptions. + +

      TQString TQSqlError::driverText () const +

      +Returns the text of the error as reported by the driver. This may +contain database-specific descriptions. + +

      int TQSqlError::number () const +

      +Returns the database-specific error number, or -1 if it cannot be +determined. + +

      TQSqlError & TQSqlError::operator= ( const TQSqlError & other ) +

      +Sets the error equal to other. + +

      void TQSqlError::setDatabaseText ( const TQString & databaseText ) [virtual] +

      +Sets the database error text to the value of databaseText. + +

      void TQSqlError::setDriverText ( const TQString & driverText ) [virtual] +

      +Sets the driver error text to the value of driverText. + +

      void TQSqlError::setNumber ( int number ) [virtual] +

      +Sets the database-specific error number to number. + +

      void TQSqlError::setType ( int type ) [virtual] +

      +Sets the error type to the value of type. + +

      void TQSqlError::showMessage ( const TQString & msg = TQString::null ) const +

      +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

      This is a convenience function that pops up a TQMessageBox +containing the message returned by text(). An additional string +can be passed in via the msg parameter, which will be +concatenated with the text() message. +

      See also text(), driverText(), and databaseText(). + +

      TQString TQSqlError::text () const +

      +This is a convenience function that returns databaseText() and +driverText() concatenated into a single string. +

      See also showMessage(), driverText(), and databaseText(). + +

      int TQSqlError::type () const +

      +Returns the error type, or -1 if the type cannot be determined. +

      See also TQSqlError::Type. + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlfield-h.html b/doc/html/tqsqlfield-h.html new file mode 100644 index 000000000..a7b3f1403 --- /dev/null +++ b/doc/html/tqsqlfield-h.html @@ -0,0 +1,198 @@ + + + + + +tqsqlfield.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlfield.h

      + +

      This is the verbatim text of the tqsqlfield.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlField class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLFIELD_H
      +#define TQSQLFIELD_H
      +
      +#ifndef QT_H
      +#include "ntqstring.h"
      +#include "ntqvariant.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQSqlFieldPrivate
      +{
      +public:
      +    TQVariant::Type type;
      +};
      +
      +class TQM_EXPORT_SQL TQSqlField
      +{
      +public:
      +    TQSqlField( const TQString& fieldName = TQString::null, TQVariant::Type type = TQVariant::Invalid );
      +    TQSqlField( const TQSqlField& other );
      +    TQSqlField& operator=( const TQSqlField& other );
      +    bool operator==(const TQSqlField& other) const;
      +    virtual ~TQSqlField();
      +
      +    virtual void	setValue( const TQVariant& value );
      +    virtual TQVariant	value() const;
      +    virtual void	setName( const TQString& name );
      +    TQString		name() const;
      +    virtual void	setNull();
      +    bool		isNull() const;
      +    virtual void	setReadOnly( bool readOnly );
      +    bool		isReadOnly() const;
      +    void		clear( bool nullify = TRUE );
      +    TQVariant::Type	type() const;
      +
      +private:
      +    TQString       nm;
      +    TQVariant      val;
      +    uint          ro: 1;
      +    uint          nul: 1;
      +    TQSqlFieldPrivate* d;
      +};
      +
      +inline TQVariant TQSqlField::value() const
      +{ return val; }
      +
      +inline TQString TQSqlField::name() const
      +{ return nm; }
      +
      +inline bool TQSqlField::isNull() const
      +{ return nul; }
      +
      +inline bool TQSqlField::isReadOnly() const
      +{ return ro; }
      +
      +inline TQVariant::Type TQSqlField::type() const
      +{ return d->type; }
      +
      +
      +/******************************************/
      +/*******     TQSqlFieldInfo Class     ******/
      +/******************************************/
      +
      +struct TQSqlFieldInfoPrivate;
      +
      +class TQM_EXPORT_SQL TQSqlFieldInfo
      +{
      +public:
      +    TQSqlFieldInfo( const TQString& name = TQString::null,
      +		   TQVariant::Type typ = TQVariant::Invalid,
      +		   int required = -1,
      +		   int len = -1,
      +		   int prec = -1,
      +		   const TQVariant& defValue = TQVariant(),
      +		   int sqlType = 0,
      +		   bool generated = TRUE,
      +		   bool trim = FALSE,
      +		   bool calculated = FALSE );
      +    TQSqlFieldInfo( const TQSqlFieldInfo & other );
      +    TQSqlFieldInfo( const TQSqlField & other, bool generated = TRUE );
      +    virtual ~TQSqlFieldInfo();
      +    TQSqlFieldInfo& operator=( const TQSqlFieldInfo& other );
      +    bool operator==( const TQSqlFieldInfo& f ) const;
      +
      +    TQSqlField		toField() const;
      +    int			isRequired() const;
      +    TQVariant::Type	type() const;
      +    int			length() const;
      +    int			precision() const;
      +    TQVariant		defaultValue() const;
      +    TQString		name() const;
      +    int			typeID() const;
      +    bool		isGenerated() const;
      +    bool		isTrim() const;
      +    bool		isCalculated() const;
      +
      +    virtual void	setTrim( bool trim );
      +    virtual void	setGenerated( bool gen );
      +    virtual void	setCalculated( bool calc );
      +
      +private:
      +    TQSqlFieldInfoPrivate* d;
      +};
      +
      +
      +#endif	// TQT_NO_SQL
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlfield-members.html b/doc/html/tqsqlfield-members.html new file mode 100644 index 000000000..5cc1a70ff --- /dev/null +++ b/doc/html/tqsqlfield-members.html @@ -0,0 +1,60 @@ + + + + + +TQSqlField Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlField

      + +

      This is the complete list of member functions for +TQSqlField, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlfield.html b/doc/html/tqsqlfield.html new file mode 100644 index 000000000..e89721e25 --- /dev/null +++ b/doc/html/tqsqlfield.html @@ -0,0 +1,216 @@ + + + + + +TQSqlField Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlField Class Reference
      [sql module]

      + +

      The TQSqlField class manipulates the fields in SQL database tables +and views. +More... +

      #include <tqsqlfield.h> +

      List of all member functions. +

      Public Members

      +
        +
      • TQSqlField ( const TQString & fieldName = TQString::null, TQVariant::Type type = TQVariant::Invalid )
      • +
      • TQSqlField ( const TQSqlField & other )
      • +
      • TQSqlField & operator= ( const TQSqlField & other )
      • +
      • bool operator== ( const TQSqlField & other ) const
      • +
      • virtual ~TQSqlField ()
      • +
      • virtual void setValue ( const TQVariant & value )
      • +
      • virtual TQVariant value () const
      • +
      • virtual void setName ( const TQString & name )
      • +
      • TQString name () const
      • +
      • virtual void setNull ()
      • +
      • bool isNull () const
      • +
      • virtual void setReadOnly ( bool readOnly )
      • +
      • bool isReadOnly () const
      • +
      • void clear ( bool nullify = TRUE )
      • +
      • TQVariant::Type type () const
      • +
      +

      Detailed Description

      + + +The TQSqlField class manipulates the fields in SQL database tables +and views. +

      + +

      TQSqlField represents the characteristics of a single column in a +database table or view, such as the data type and column name. A +field also contains the value of the database column, which can be +viewed or changed. +

      Field data values are stored as TQVariants. Using an incompatible +type is not permitted. For example: +

      +    TQSqlField f( "myfield", TQVariant::Int );
      +    f.setValue( TQPixmap() );  // will not work
      +    
      + +

      However, the field will attempt to cast certain data types to the +field data type where possible: +

      +    TQSqlField f( "myfield", TQVariant::Int );
      +    f.setValue( TQString("123") ); // casts TQString to int
      +    
      + +

      TQSqlField objects are rarely created explicitly in application +code. They are usually accessed indirectly through TQSqlRecord +or TQSqlCursor which already contain a list of fields. For +example: +

      +    TQSqlCursor cur( "Employee" );        // create cursor using the 'Employee' table
      +    TQSqlField* f = cur.field( "name" );  // use the 'name' field
      +    f->setValue( "Dave" );               // set field value
      +    ...
      +    
      + +

      In practice we rarely need to extract a pointer to a field at all. +The previous example would normally be written: +

      +    TQSqlCursor cur( "Employee" );
      +    cur.setValue( "name", "Dave" );
      +    ...
      +    
      + +

      See also Database Classes. + +


      Member Function Documentation

      +

      TQSqlField::TQSqlField ( const TQString & fieldName = TQString::null, TQVariant::Type type = TQVariant::Invalid ) +

      +Constructs an empty field called fieldName of type type. + +

      TQSqlField::TQSqlField ( const TQSqlField & other ) +

      +Constructs a copy of other. + +

      TQSqlField::~TQSqlField () [virtual] +

      +Destroys the object and frees any allocated resources. + +

      void TQSqlField::clear ( bool nullify = TRUE ) +

      +Clears the value of the field. If the field is read-only, nothing +happens. If nullify is TRUE (the default), the field is set to +NULL. + +

      bool TQSqlField::isNull () const +

      + +

      Returns TRUE if the field is currently NULL; otherwise returns +FALSE. + +

      bool TQSqlField::isReadOnly () const +

      + +

      Returns TRUE if the field's value is read only; otherwise returns +FALSE. + +

      TQString TQSqlField::name () const +

      + +

      Returns the name of the field. + +

      Example: sql/overview/table4/main.cpp. +

      TQSqlField & TQSqlField::operator= ( const TQSqlField & other ) +

      +Sets the field equal to other. + +

      bool TQSqlField::operator== ( const TQSqlField & other ) const +

      +Returns TRUE if the field is equal to other; otherwise returns +FALSE. Fields are considered equal when the following field +properties are the same: +

      +

      +

      void TQSqlField::setName ( const TQString & name ) [virtual] +

      + +

      Sets the name of the field to name. + +

      void TQSqlField::setNull () [virtual] +

      + +

      Sets the field to NULL and clears the value using clear(). If the +field is read-only, nothing happens. +

      See also isReadOnly() and clear(). + +

      void TQSqlField::setReadOnly ( bool readOnly ) [virtual] +

      + +

      Sets the read only flag of the field's value to readOnly. +

      See also setValue(). + +

      void TQSqlField::setValue ( const TQVariant & value ) [virtual] +

      +Sets the value of the field to value. If the field is read-only +(isReadOnly() returns TRUE), nothing happens. If the data type of +value differs from the field's current data type, an attempt is +made to cast it to the proper type. This preserves the data type +of the field in the case of assignment, e.g. a TQString to an +integer data type. For example: +

      +    TQSqlCursor cur( "Employee" );                 // 'Employee' table
      +    TQSqlField* f = cur.field( "student_count" );  // an integer field
      +    ...
      +    f->setValue( myLineEdit->text() );            // cast the line edit text to an integer
      +    
      + +

      See also isReadOnly(). + +

      TQVariant::Type TQSqlField::type () const +

      + +

      Returns the field's type as stored in the database. +Note that the actual value might have a different type, +Numerical values that are too large to store in a long +int or double are usually stored as strings to prevent +precision loss. + +

      TQVariant TQSqlField::value () const [virtual] +

      + +

      Returns the value of the field as a TQVariant. + +

      Example: sql/overview/table4/main.cpp. + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlfieldinfo-members.html b/doc/html/tqsqlfieldinfo-members.html new file mode 100644 index 000000000..648ce03b0 --- /dev/null +++ b/doc/html/tqsqlfieldinfo-members.html @@ -0,0 +1,64 @@ + + + + + +TQSqlFieldInfo Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlFieldInfo

      + +

      This is the complete list of member functions for +TQSqlFieldInfo, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlfieldinfo.html b/doc/html/tqsqlfieldinfo.html new file mode 100644 index 000000000..64909fb3b --- /dev/null +++ b/doc/html/tqsqlfieldinfo.html @@ -0,0 +1,227 @@ + + + + + +TQSqlFieldInfo Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlFieldInfo Class Reference
      [sql module]

      + +

      The TQSqlFieldInfo class stores meta data associated with a SQL field. +More... +

      #include <tqsqlfield.h> +

      List of all member functions. +

      Public Members

      + +

      Detailed Description

      + + +The TQSqlFieldInfo class stores meta data associated with a SQL field. +

      + +

      TQSqlFieldInfo objects only store meta data; field values are +stored in TQSqlField objects. +

      All values must be set in the constructor, and may be retrieved +using isRequired(), type(), length(), precision(), defaultValue(), +name(), isGenerated() and typeID(). +

      See also Database Classes. + +


      Member Function Documentation

      +

      TQSqlFieldInfo::TQSqlFieldInfo ( const TQString & name = TQString::null, TQVariant::Type typ = TQVariant::Invalid, int required = -1, int len = -1, int prec = -1, const TQVariant & defValue = TQVariant ( ), int typeID = 0, bool generated = TRUE, bool trim = FALSE, bool calculated = FALSE ) +

      +Constructs a TQSqlFieldInfo with the following parameters: +
      +
      name the name of the field. +
      typ the field's type in a TQVariant. +
      required greater than 0 if the field is required, 0 +if its value can be NULL and less than 0 if it cannot be +determined whether the field is required or not. +
      len the length of the field. Note that for +non-character types some databases return either the length in +bytes or the number of digits. -1 signifies that the length cannot +be determined. +
      prec the precision of the field, or -1 if the field +has no precision or it cannot be determined. +
      defValue the default value that is inserted into +the table if none is specified by the user. TQVariant() if there is +no default value or it cannot be determined. +
      typeID the internal typeID of the database system +(only useful for low-level programming). 0 if unknown. +
      generated TRUE indicates that this field should be +included in auto-generated SQL statments, e.g. in TQSqlCursor. +
      trim TRUE indicates that widgets should remove +trailing whitespace from character fields. This does not affect +the field value but only its representation inside widgets. +
      calculated TRUE indicates that the value of this +field is calculated. The value of calculated fields can by +modified by subclassing TQSqlCursor and overriding +TQSqlCursor::calculateField(). +
      + +

      TQSqlFieldInfo::TQSqlFieldInfo ( const TQSqlFieldInfo & other ) +

      +Constructs a copy of other. + +

      TQSqlFieldInfo::TQSqlFieldInfo ( const TQSqlField & other, bool generated = TRUE ) +

      +Creates a TQSqlFieldInfo object with the type and the name of the +TQSqlField other. If generated is TRUE this field will be +included in auto-generated SQL statments, e.g. in TQSqlCursor. + +

      TQSqlFieldInfo::~TQSqlFieldInfo () [virtual] +

      +Destroys the object and frees any allocated resources. + +

      TQVariant TQSqlFieldInfo::defaultValue () const +

      +Returns the field's default value or an empty TQVariant if the +field has no default value or the value couldn't be determined. +The default value is the value inserted in the database when it +is not explicitly specified by the user. + +

      bool TQSqlFieldInfo::isCalculated () const +

      +Returns TRUE if the field is calculated; otherwise returns FALSE. +

      See also setCalculated(). + +

      bool TQSqlFieldInfo::isGenerated () const +

      +Returns TRUE if the field should be included in auto-generated +SQL statments, e.g. in TQSqlCursor; otherwise returns FALSE. +

      See also setGenerated(). + +

      int TQSqlFieldInfo::isRequired () const +

      +Returns a value greater than 0 if the field is required (NULL +values are not allowed), 0 if it isn't required (NULL values are +allowed) or less than 0 if it cannot be determined whether the +field is required or not. + +

      bool TQSqlFieldInfo::isTrim () const +

      +Returns TRUE if trailing whitespace should be removed from +character fields; otherwise returns FALSE. +

      See also setTrim(). + +

      int TQSqlFieldInfo::length () const +

      +Returns the field's length. For fields storing text the return +value is the maximum number of characters the field can hold. For +non-character fields some database systems return the number of +bytes needed or the number of digits allowed. If the length cannot +be determined -1 is returned. + +

      TQString TQSqlFieldInfo::name () const +

      +Returns the name of the field in the SQL table. + +

      Examples: sql/overview/subclass3/main.cpp and sql/overview/subclass4/main.cpp. +

      TQSqlFieldInfo & TQSqlFieldInfo::operator= ( const TQSqlFieldInfo & other ) +

      +Assigns other to this field info and returns a reference to it. + +

      bool TQSqlFieldInfo::operator== ( const TQSqlFieldInfo & f ) const +

      +Returns TRUE if this fieldinfo is equal to f; otherwise returns +FALSE. +

      Two field infos are considered equal if all their attributes +match. + +

      int TQSqlFieldInfo::precision () const +

      +Returns the field's precision or -1 if the field has no precision +or it cannot be determined. + +

      void TQSqlFieldInfo::setCalculated ( bool calc ) [virtual] +

      +calc set to TRUE indicates that this field is a calculated +field. The value of calculated fields can by modified by subclassing +TQSqlCursor and overriding TQSqlCursor::calculateField(). +

      See also isCalculated(). + +

      void TQSqlFieldInfo::setGenerated ( bool gen ) [virtual] +

      +gen set to FALSE indicates that this field should not appear +in auto-generated SQL statements (for example in TQSqlCursor). +

      See also isGenerated(). + +

      void TQSqlFieldInfo::setTrim ( bool trim ) [virtual] +

      +If trim is TRUE widgets should remove trailing whitespace from +character fields. This does not affect the field value but only +its representation inside widgets. +

      See also isTrim(). + +

      TQSqlField TQSqlFieldInfo::toField () const +

      +Returns an empty TQSqlField based on the information in this +TQSqlFieldInfo. + +

      TQVariant::Type TQSqlFieldInfo::type () const +

      +Returns the field's type or TQVariant::Invalid if the type is +unknown. + +

      int TQSqlFieldInfo::typeID () const +

      +Returns the internal type identifier as returned from the database +system. The return value is 0 if the type is unknown. +

      Warning: This information is only useful for low-level database +programming and is not database independent. + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlform-h.html b/doc/html/tqsqlform-h.html new file mode 100644 index 000000000..984cd209c --- /dev/null +++ b/doc/html/tqsqlform-h.html @@ -0,0 +1,152 @@ + + + + + +tqsqlform.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlform.h

      + +

      This is the verbatim text of the tqsqlform.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlForm class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLFORM_H
      +#define TQSQLFORM_H
      +
      +#ifndef QT_H
      +#include "tqobject.h"
      +#include "ntqmap.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL_FORM
      +
      +class TQSqlField;
      +class TQSqlRecord;
      +class TQSqlEditorFactory;
      +class TQSqlPropertyMap;
      +class TQWidget;
      +class TQSqlFormPrivate;
      +
      +class TQM_EXPORT_SQL TQSqlForm : public TQObject
      +{
      +    TQ_OBJECT
      +public:
      +    TQSqlForm( TQObject * parent = 0, const char * name = 0 );
      +    ~TQSqlForm();
      +
      +    virtual void insert( TQWidget * widget, const TQString& field );
      +    virtual void remove( const TQString& field );
      +    uint         count() const;
      +
      +    TQWidget *   widget( uint i ) const;
      +    TQSqlField * widgetToField( TQWidget * widget ) const;
      +    TQWidget *   fieldToWidget( TQSqlField * field ) const;
      +
      +    void        installPropertyMap( TQSqlPropertyMap * map );
      +
      +    virtual void setRecord( TQSqlRecord* buf );
      +
      +public slots:
      +    virtual void readField( TQWidget * widget );
      +    virtual void writeField( TQWidget * widget );
      +    virtual void readFields();
      +    virtual void writeFields();
      +
      +    virtual void clear();
      +    virtual void clearValues( bool nullify = FALSE );
      +
      +protected:
      +    virtual void insert( TQWidget * widget, TQSqlField * field );
      +    virtual void remove( TQWidget * widget );
      +    void clearMap();
      +
      +private:
      +    virtual void sync();
      +    TQSqlFormPrivate* d;
      +
      +#if defined(TQ_DISABLE_COPY) // Disabled copy constructor and operator=
      +    TQSqlForm( const TQSqlForm & );
      +    TQSqlForm &operator=( const TQSqlForm & );
      +#endif
      +};
      +
      +#endif // TQT_NO_SQL
      +#endif // TQSQLFORM_H
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlform-members.html b/doc/html/tqsqlform-members.html new file mode 100644 index 000000000..ed0d58495 --- /dev/null +++ b/doc/html/tqsqlform-members.html @@ -0,0 +1,104 @@ + + + + + +TQSqlForm Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlForm

      + +

      This is the complete list of member functions for +TQSqlForm, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlform.html b/doc/html/tqsqlform.html new file mode 100644 index 000000000..00cb1b2a2 --- /dev/null +++ b/doc/html/tqsqlform.html @@ -0,0 +1,237 @@ + + + + + +TQSqlForm Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlForm Class Reference
      [sql module]

      + +

      The TQSqlForm class creates and manages data entry forms +tied to SQL databases. +More... +

      #include <tqsqlform.h> +

      Inherits TQObject. +

      List of all member functions. +

      Public Members

      +
        +
      • TQSqlForm ( TQObject * parent = 0, const char * name = 0 )
      • +
      • ~TQSqlForm ()
      • +
      • virtual void insert ( TQWidget * widget, const TQString & field )
      • +
      • virtual void remove ( const TQString & field )
      • +
      • uint count () const
      • +
      • TQWidget * widget ( uint i ) const
      • +
      • TQSqlField * widgetToField ( TQWidget * widget ) const
      • +
      • TQWidget * fieldToWidget ( TQSqlField * field ) const
      • +
      • void installPropertyMap ( TQSqlPropertyMap * pmap )
      • +
      • virtual void setRecord ( TQSqlRecord * buf )
      • +
      +

      Public Slots

      + +

      Protected Members

      +
        +
      • virtual void insert ( TQWidget * widget, TQSqlField * field )
      • +
      • virtual void remove ( TQWidget * widget )
      • +
      +

      Detailed Description

      + + +The TQSqlForm class creates and manages data entry forms +tied to SQL databases. +

      + + +

      Typical use of a TQSqlForm consists of the following steps: +

        +
      • Create the widgets you want to appear in the form. +
      • Create a cursor and navigate to the record to be edited. +
      • Create the TQSqlForm. +
      • Set the form's record buffer to the cursor's update buffer. +
      • Insert each widget and the field it is to edit into the form. +
      • Use readFields() to update the editor widgets with values from +the database's fields. +
      • Display the form and let the user edit values etc. +
      • Use writeFields() to update the database's field values with +the values in the editor widgets. +
      +

      Note that a TQSqlForm does not access the database directly, but +most often via TQSqlFields which are part of a TQSqlCursor. A +TQSqlCursor::insert(), TQSqlCursor::update() or TQSqlCursor::del() +call is needed to actually write values to the database. +

      Some sample code to initialize a form successfully: +

      +    TQLineEdit  myEditor( this );
      +    TQSqlForm   myForm( this );
      +    TQSqlCursor myCursor( "mytable" );
      +
      +    // Execute a query to make the cursor valid
      +    myCursor.select();
      +    // Move the cursor to a valid record (the first record)
      +    myCursor.next();
      +    // Set the form's record pointer to the cursor's edit buffer (which
      +    // contains the current record's values)
      +    myForm.setRecord( myCursor.primeUpdate() );
      +
      +    // Insert a field into the form that uses myEditor to edit the
      +    // field 'somefield' in 'mytable'
      +    myForm.insert( &myEditor, "somefield" );
      +
      +    // Update myEditor with the value from the mapped database field
      +    myForm.readFields();
      +    ...
      +    // Let the user edit the form
      +    ...
      +    // Update the database
      +    myForm.writeFields();  // Update the cursor's edit buffer from the form
      +    myCursor.update();  // Update the database from the cursor's buffer
      +    
      + +

      If you want to use custom editors for displaying and editing data +fields, you must install a custom TQSqlPropertyMap. The form +uses this object to get or set the value of a widget. +

      Note that TQt Designer provides +a visual means of creating data-aware forms. +

      See also installPropertyMap(), TQSqlPropertyMap, and Database Classes. + +


      Member Function Documentation

      +

      TQSqlForm::TQSqlForm ( TQObject * parent = 0, const char * name = 0 ) +

      +Constructs a TQSqlForm with parent parent and called name. + +

      TQSqlForm::~TQSqlForm () +

      +Destroys the object and frees any allocated resources. + +

      void TQSqlForm::clear () [virtual slot] +

      +Removes every widget, and the fields they're mapped to, from the form. + +

      void TQSqlForm::clearValues ( bool nullify = FALSE ) [virtual slot] +

      +Clears the values in all the widgets, and the fields they are +mapped to, in the form. If nullify is TRUE (the default is +FALSE), each field is also set to NULL. + +

      uint TQSqlForm::count () const +

      +Returns the number of widgets in the form. + +

      TQWidget * TQSqlForm::fieldToWidget ( TQSqlField * field ) const +

      +Returns the widget that field field is mapped to. + +

      void TQSqlForm::insert ( TQWidget * widget, const TQString & field ) [virtual] +

      +Inserts a widget, and the name of the field it is to be +mapped to, into the form. To actually associate inserted widgets +with an edit buffer, use setRecord(). +

      See also setRecord(). + +

      Examples: sql/overview/form1/main.cpp and sql/overview/form2/main.cpp. +

      void TQSqlForm::insert ( TQWidget * widget, TQSqlField * field ) [virtual protected] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Inserts a widget, and the field it is to be mapped to, into +the form. + +

      void TQSqlForm::installPropertyMap ( TQSqlPropertyMap * pmap ) +

      +Installs a custom TQSqlPropertyMap. This is useful if you plan to +create your own custom editor widgets. +

      TQSqlForm takes ownership of pmap, so pmap is deleted when +TQSqlForm goes out of scope. +

      See also TQDataTable::installEditorFactory(). + +

      Example: sql/overview/custom1/main.cpp. +

      void TQSqlForm::readField ( TQWidget * widget ) [virtual slot] +

      +Updates the widget widget with the value from the SQL field it +is mapped to. Nothing happens if no SQL field is mapped to the widget. + +

      void TQSqlForm::readFields () [virtual slot] +

      +Updates the widgets in the form with current values from the SQL +fields they are mapped to. + +

      Examples: sql/overview/form1/main.cpp and sql/overview/form2/main.cpp. +

      void TQSqlForm::remove ( TQWidget * widget ) [virtual protected] +

      +Removes a widget, and hence the field it's mapped to, from the +form. + +

      void TQSqlForm::remove ( const TQString & field ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Removes field from the form. + +

      void TQSqlForm::setRecord ( TQSqlRecord * buf ) [virtual] +

      +Sets buf as the record buffer for the form. To force the +display of the data from buf, use readFields(). +

      See also readFields() and writeFields(). + +

      Examples: sql/overview/custom1/main.cpp, sql/overview/form1/main.cpp, and sql/overview/form2/main.cpp. +

      TQWidget * TQSqlForm::widget ( uint i ) const +

      +Returns the i-th widget in the form. Useful for traversing +the widgets in the form. + +

      TQSqlField * TQSqlForm::widgetToField ( TQWidget * widget ) const +

      +Returns the SQL field that widget widget is mapped to. + +

      void TQSqlForm::writeField ( TQWidget * widget ) [virtual slot] +

      +Updates the SQL field with the value from the widget it is +mapped to. Nothing happens if no SQL field is mapped to the widget. + +

      void TQSqlForm::writeFields () [virtual slot] +

      +Updates the SQL fields with values from the widgets they are +mapped to. To actually update the database with the contents of +the record buffer, use TQSqlCursor::insert(), TQSqlCursor::update() +or TQSqlCursor::del() as appropriate. + +

      Example: sql/overview/form2/main.cpp. + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlindex-h.html b/doc/html/tqsqlindex-h.html new file mode 100644 index 000000000..fc30e1a31 --- /dev/null +++ b/doc/html/tqsqlindex-h.html @@ -0,0 +1,143 @@ + + + + + +tqsqlindex.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlindex.h

      + +

      This is the verbatim text of the tqsqlindex.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlIndex class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLINDEX_H
      +#define TQSQLINDEX_H
      +
      +#ifndef QT_H
      +#include "ntqstring.h"
      +#include "ntqstringlist.h"
      +#include "tqsqlfield.h"
      +#include "tqsqlrecord.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#define TQM_TEMPLATE_EXTERN_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#define TQM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN
      +#endif
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQSqlCursor;
      +
      +class TQM_EXPORT_SQL TQSqlIndex : public TQSqlRecord
      +{
      +public:
      +    TQSqlIndex( const TQString& cursorName = TQString::null, const TQString& name = TQString::null );
      +    TQSqlIndex( const TQSqlIndex& other );
      +    ~TQSqlIndex();
      +    TQSqlIndex&       operator=( const TQSqlIndex& other );
      +    virtual void     setCursorName( const TQString& cursorName );
      +    TQString          cursorName() const { return cursor; }
      +    virtual void     setName( const TQString& name );
      +    TQString          name() const { return nm; }
      +
      +    void             append( const TQSqlField& field );
      +    virtual void     append( const TQSqlField& field, bool desc );
      +
      +    bool             isDescending( int i ) const;
      +    virtual void     setDescending( int i, bool desc );
      +
      +    TQString          toString( const TQString& prefix = TQString::null,
      +			       const TQString& sep = ",",
      +			       bool verbose = TRUE ) const;
      +    TQStringList      toStringList( const TQString& prefix = TQString::null,
      +				   bool verbose = TRUE ) const;
      +
      +    static TQSqlIndex fromStringList( const TQStringList& l, const TQSqlCursor* cursor );
      +
      +private:
      +    TQString          createField( int i, const TQString& prefix, bool verbose ) const;
      +    TQString          cursor;
      +    TQString          nm;
      +    TQValueList<bool> sorts;
      +};
      +
      +#define Q_DEFINED_QSQLINDEX
      +#include "ntqwinexport.h"
      +#endif	// TQT_NO_SQL
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlindex-members.html b/doc/html/tqsqlindex-members.html new file mode 100644 index 000000000..276e05e9f --- /dev/null +++ b/doc/html/tqsqlindex-members.html @@ -0,0 +1,75 @@ + + + + + +TQSqlIndex Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlIndex

      + +

      This is the complete list of member functions for +TQSqlIndex, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlindex.html b/doc/html/tqsqlindex.html new file mode 100644 index 000000000..334fdb838 --- /dev/null +++ b/doc/html/tqsqlindex.html @@ -0,0 +1,155 @@ + + + + + +TQSqlIndex Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlIndex Class Reference
      [sql module]

      + +

      The TQSqlIndex class provides functions to manipulate and +describe TQSqlCursor and TQSqlDatabase indexes. +More... +

      #include <tqsqlindex.h> +

      Inherits TQSqlRecord. +

      List of all member functions. +

      Public Members

      +
        +
      • TQSqlIndex ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null )
      • +
      • TQSqlIndex ( const TQSqlIndex & other )
      • +
      • ~TQSqlIndex ()
      • +
      • TQSqlIndex & operator= ( const TQSqlIndex & other )
      • +
      • virtual void setCursorName ( const TQString & cursorName )
      • +
      • TQString cursorName () const
      • +
      • virtual void setName ( const TQString & name )
      • +
      • TQString name () const
      • +
      • virtual void append ( const TQSqlField & field )
      • +
      • virtual void append ( const TQSqlField & field, bool desc )
      • +
      • bool isDescending ( int i ) const
      • +
      • virtual void setDescending ( int i, bool desc )
      • +
      +

      Static Public Members

      +
        +
      • TQSqlIndex fromStringList ( const TQStringList & l, const TQSqlCursor * cursor )
      • +
      +

      Detailed Description

      + + +The TQSqlIndex class provides functions to manipulate and +describe TQSqlCursor and TQSqlDatabase indexes. +

      + +

      This class is used to describe and manipulate TQSqlCursor and +TQSqlDatabase indexes. An index refers to a single table or view +in a database. Information about the fields that comprise the +index can be used to generate SQL statements, or to affect the +behavior of a TQSqlCursor object. +

      Normally, TQSqlIndex objects are created by TQSqlDatabase or +TQSqlCursor. +

      See also Database Classes. + +


      Member Function Documentation

      +

      TQSqlIndex::TQSqlIndex ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null ) +

      +Constructs an empty index using the cursor name cursorname and +index name name. + +

      TQSqlIndex::TQSqlIndex ( const TQSqlIndex & other ) +

      +Constructs a copy of other. + +

      TQSqlIndex::~TQSqlIndex () +

      +Destroys the object and frees any allocated resources. + +

      void TQSqlIndex::append ( const TQSqlField & field ) [virtual] +

      +Appends the field field to the list of indexed fields. The +field is appended with an ascending sort order. + +

      Reimplemented from TQSqlRecord. +

      void TQSqlIndex::append ( const TQSqlField & field, bool desc ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Appends the field field to the list of indexed fields. The +field is appended with an ascending sort order, unless desc is +TRUE. + +

      TQString TQSqlIndex::cursorName () const +

      + +

      Returns the name of the cursor which the index is associated with. + +

      TQSqlIndex TQSqlIndex::fromStringList ( const TQStringList & l, const TQSqlCursor * cursor ) [static] +

      +Returns an index based on the field descriptions in l and the +cursor cursor. The field descriptions should be in the same +format that toStringList() produces, for example, a surname field +in the people table might be in one of these forms: "surname", +"surname DESC" or "people.surname ASC". +

      See also toStringList(). + +

      bool TQSqlIndex::isDescending ( int i ) const +

      +Returns TRUE if field i in the index is sorted in descending +order; otherwise returns FALSE. + +

      TQString TQSqlIndex::name () const +

      + +

      Returns the name of the index. + +

      TQSqlIndex & TQSqlIndex::operator= ( const TQSqlIndex & other ) +

      +Sets the index equal to other. + +

      void TQSqlIndex::setCursorName ( const TQString & cursorName ) [virtual] +

      +Sets the name of the cursor that the index is associated with to +cursorName. + +

      void TQSqlIndex::setDescending ( int i, bool desc ) [virtual] +

      +If desc is TRUE, field i is sorted in descending order. +Otherwise, field i is sorted in ascending order (the default). +If the field does not exist, nothing happens. + +

      void TQSqlIndex::setName ( const TQString & name ) [virtual] +

      +Sets the name of the index to name. + + +

      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlpropertymap-h.html b/doc/html/tqsqlpropertymap-h.html new file mode 100644 index 000000000..22ec16c5d --- /dev/null +++ b/doc/html/tqsqlpropertymap-h.html @@ -0,0 +1,122 @@ + + + + + +tqsqlpropertymap.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlpropertymap.h

      + +

      This is the verbatim text of the tqsqlpropertymap.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlPropertyMap class
      +**
      +** Created : 2000-11-20
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLPROPERTYMAP_H
      +#define TQSQLPROPERTYMAP_H
      +
      +#ifndef QT_H
      +#include "ntqvariant.h"
      +#include "ntqstring.h"
      +#endif // QT_H
      +
      +#ifndef TQT_NO_SQL_FORM
      +
      +class TQWidget;
      +class TQSqlPropertyMapPrivate;
      +
      +class TQ_EXPORT TQSqlPropertyMap {
      +public:
      +    TQSqlPropertyMap();
      +    virtual ~TQSqlPropertyMap();
      +
      +    TQVariant      property( TQWidget * widget );
      +    virtual void  setProperty( TQWidget * widget, const TQVariant & value );
      +
      +    void insert( const TQString & classname, const TQString & property );
      +    void remove( const TQString & classname );
      +
      +    static TQSqlPropertyMap * defaultMap();
      +    static void installDefaultMap( TQSqlPropertyMap * map );
      +
      +private:	// Disabled copy constructor and operator=
      +#if defined(TQ_DISABLE_COPY)
      +    TQSqlPropertyMap( const TQSqlPropertyMap & );
      +    TQSqlPropertyMap &operator=( const TQSqlPropertyMap & );
      +#endif
      +    TQSqlPropertyMapPrivate* d;
      +
      +};
      +
      +#endif // TQT_NO_SQL_FORM
      +#endif // TQSQLPROPERTYMAP_H
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlpropertymap-members.html b/doc/html/tqsqlpropertymap-members.html new file mode 100644 index 000000000..b0bc357ab --- /dev/null +++ b/doc/html/tqsqlpropertymap-members.html @@ -0,0 +1,54 @@ + + + + + +TQSqlPropertyMap Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlPropertyMap

      + +

      This is the complete list of member functions for +TQSqlPropertyMap, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlpropertymap.html b/doc/html/tqsqlpropertymap.html new file mode 100644 index 000000000..bd2c0771e --- /dev/null +++ b/doc/html/tqsqlpropertymap.html @@ -0,0 +1,199 @@ + + + + + +TQSqlPropertyMap Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlPropertyMap Class Reference
      [sql module]

      + +

      The TQSqlPropertyMap class is used to map widgets to SQL fields. +More... +

      #include <tqsqlpropertymap.h> +

      List of all member functions. +

      Public Members

      + +

      Static Public Members

      + +

      Detailed Description

      + + +The TQSqlPropertyMap class is used to map widgets to SQL fields. +

      + +

      The SQL module uses TQt object + properties to insert and extract values from editor +widgets. +

      This class is used to map editors to SQL fields. This works by +associating SQL editor class names to the properties used to +insert and extract values to/from the editor. +

      For example, a TQLineEdit can be used to edit text strings and +other data types in TQDataTables or TQSqlForms. Several properties +are defined in TQLineEdit, but only the text property is used to +insert and extract text from a TQLineEdit. Both TQDataTable and +TQSqlForm use the global TQSqlPropertyMap for inserting and +extracting values to and from an editor widget. The global +property map defines several common widgets and properties that +are suitable for many applications. You can add and remove widget +properties to suit your specific needs. +

      If you want to use custom editors with your TQDataTable or +TQSqlForm, you must install your own TQSqlPropertyMap for that table +or form. Example: +

      +    TQSqlPropertyMap *myMap  = new TQSqlPropertyMap();
      +    TQSqlForm        *myForm = new TQSqlForm( this );
      +    MyEditor myEditor( this );
      +
      +    // Set the TQSqlForm's record buffer to the update buffer of
      +    // a pre-existing TQSqlCursor called 'cur'.
      +    myForm->setRecord( cur->primeUpdate() );
      +
      +    // Install the customized map
      +    myMap->insert( "MyEditor", "content" );
      +    myForm->installPropertyMap( myMap ); // myForm now owns myMap
      +    ...
      +    // Insert a field into the form that uses a myEditor to edit the
      +    // field 'somefield'
      +    myForm->insert( &myEditor, "somefield" );
      +
      +    // Update myEditor with the value from the mapped database field
      +    myForm->readFields();
      +    ...
      +    // Let the user edit the form
      +    ...
      +    // Update the database fields with the values in the form
      +    myForm->writeFields();
      +    ...
      +    
      + +

      You can also replace the global TQSqlPropertyMap that is used by +default. (Bear in mind that TQSqlPropertyMap takes ownership of the +new default map.) +

      +    TQSqlPropertyMap *myMap = new TQSqlPropertyMap;
      +
      +    myMap->insert( "MyEditor", "content" );
      +    TQSqlPropertyMap::installDefaultMap( myMap );
      +    ...
      +    
      + +

      See also TQDataTable, TQSqlForm, TQSqlEditorFactory, and Database Classes. + +


      Member Function Documentation

      +

      TQSqlPropertyMap::TQSqlPropertyMap () +

      +

      Constructs a TQSqlPropertyMap. +

      The default property mappings used by TQt widgets are: +

      +
      Widgets Property +
      TQCheckBox, +TQRadioButton +checked +
      TQComboBox, +TQListBox +currentItem +
      TQDateEdit +date +
      TQDateTimeEdit +dateTime +
      TQTextBrowser +source +
      TQButton, +TQDial, +TQLabel, +TQLineEdit, +TQMultiLineEdit, +TQPushButton, +TQTextEdit, +text +
      TQTimeEdit +time +
      TQLCDNumber, +TQScrollBar +TQSlider, +TQSpinBox +value +
      + +

      TQSqlPropertyMap::~TQSqlPropertyMap () [virtual] +

      +Destroys the TQSqlPropertyMap. +

      Note that if the TQSqlPropertyMap is installed with +installPropertyMap() the object it was installed into, e.g. the +TQSqlForm, takes ownership and will delete the TQSqlPropertyMap when +necessary. + +

      TQSqlPropertyMap * TQSqlPropertyMap::defaultMap () [static] +

      +Returns the application global TQSqlPropertyMap. + +

      void TQSqlPropertyMap::insert ( const TQString & classname, const TQString & property ) +

      +Insert a new classname/property pair, which is used for custom SQL +field editors. There must be a TQ_PROPERTY clause in the classname class declaration for the property. + +

      Example: sql/overview/custom1/main.cpp. +

      void TQSqlPropertyMap::installDefaultMap ( TQSqlPropertyMap * map ) [static] +

      +Replaces the global default property map with map. All +TQDataTable and TQSqlForm instantiations will use this new map for +inserting and extracting values to and from editors. +TQSqlPropertyMap takes ownership of \a map, and destroys it when it is no longer needed. + +

      TQVariant TQSqlPropertyMap::property ( TQWidget * widget ) +

      +Returns the mapped property of widget as a TQVariant. + +

      void TQSqlPropertyMap::remove ( const TQString & classname ) +

      +Removes classname from the map. + +

      void TQSqlPropertyMap::setProperty ( TQWidget * widget, const TQVariant & value ) [virtual] +

      +Sets the property of widget to value. + + +

      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlquery-h.html b/doc/html/tqsqlquery-h.html new file mode 100644 index 000000000..f012751b8 --- /dev/null +++ b/doc/html/tqsqlquery-h.html @@ -0,0 +1,177 @@ + + + + + +tqsqlquery.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlquery.h

      + +

      This is the verbatim text of the tqsqlquery.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlQuery class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLQUERY_H
      +#define TQSQLQUERY_H
      +
      +#ifndef QT_H
      +#include "tqobject.h"
      +#include "ntqstring.h"
      +#include "ntqvariant.h"
      +#include "ntqvaluelist.h"
      +#include "tqsqlerror.h"
      +#include "tqsqlfield.h"
      +#include "tqsql.h"
      +#endif // QT_H
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQSqlDriver;
      +class TQSqlResult;
      +class TQSqlDatabase;
      +
      +class TQ_EXPORT TQSqlResultShared : public TQObject, public TQShared
      +{
      +    TQ_OBJECT
      +public:
      +    TQSqlResultShared( TQSqlResult* result );
      +    virtual ~TQSqlResultShared();
      +    TQSqlResult* sqlResult;
      +    TQString executedQuery;
      +private slots:
      +    void slotResultDestroyed();
      +};
      +
      +class TQ_EXPORT TQSqlQuery
      +{
      +public:
      +    TQSqlQuery( TQSqlResult * r );
      +    TQSqlQuery( const TQString& query = TQString::null, TQSqlDatabase* db = 0 );
      +    Q_EXPLICIT TQSqlQuery( TQSqlDatabase* db );
      +    TQSqlQuery( const TQSqlQuery& other );
      +    TQSqlQuery& operator=( const TQSqlQuery& other );
      +    virtual ~TQSqlQuery();
      +
      +    bool                isValid() const;
      +    bool                isActive() const;
      +    bool	        isNull( int field ) const;
      +    int                 at() const;
      +    TQString             lastQuery() const;
      +    int                 numRowsAffected() const;
      +    TQSqlError	        lastError() const;
      +    bool                isSelect() const;
      +    int                 size() const;
      +    const TQSqlDriver*   driver() const;
      +    const TQSqlResult*   result() const;
      +    bool		isForwardOnly() const;
      +    void		setForwardOnly( bool forward );
      +
      +    virtual bool	exec ( const TQString& query );
      +    virtual TQVariant    value( int i ) const;
      +
      +    virtual bool	seek( int i, bool relative = FALSE );
      +    virtual bool        next();
      +    virtual bool        prev();
      +    virtual bool        first();
      +    virtual bool        last();
      +
      +    // prepared query support
      +    bool		exec();
      +    bool		prepare( const TQString& query );
      +    void		bindValue( const TQString& placeholder, const TQVariant& val );
      +    void		bindValue( int pos, const TQVariant& val );
      +    void		addBindValue( const TQVariant& val );
      +    // remove these overloads in 4.0
      +    void		bindValue( const TQString& placeholder, const TQVariant& val, TQSql::ParameterType type );
      +    void		bindValue( int pos, const TQVariant& val, TQSql::ParameterType type );
      +    void		addBindValue( const TQVariant& val, TQSql::ParameterType type );
      +    TQVariant		boundValue( const TQString& placeholder ) const;
      +    TQVariant		boundValue( int pos ) const;
      +    TQMap<TQString, TQVariant> boundValues() const;
      +    TQString             executedQuery() const;
      +    
      +protected:
      +    virtual void        beforeSeek();
      +    virtual void        afterSeek();
      +
      +private:
      +    void 		init( const TQString& query, TQSqlDatabase* db );
      +    void                deref();
      +    bool                checkDetach();
      +    TQSqlResultShared*   d;
      +};
      +
      +
      +#endif // TQT_NO_SQL
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlquery-members.html b/doc/html/tqsqlquery-members.html new file mode 100644 index 000000000..c96007d75 --- /dev/null +++ b/doc/html/tqsqlquery-members.html @@ -0,0 +1,77 @@ + + + + + +TQSqlQuery Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlQuery

      + +

      This is the complete list of member functions for +TQSqlQuery, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlquery.html b/doc/html/tqsqlquery.html new file mode 100644 index 000000000..56e8929f5 --- /dev/null +++ b/doc/html/tqsqlquery.html @@ -0,0 +1,595 @@ + + + + + +TQSqlQuery Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlQuery Class Reference
      [sql module]

      + +

      The TQSqlQuery class provides a means of executing and +manipulating SQL statements. +More... +

      #include <tqsqlquery.h> +

      Inherited by TQSqlCursor. +

      List of all member functions. +

      Public Members

      +
        +
      • TQSqlQuery ( TQSqlResult * r )
      • +
      • TQSqlQuery ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 )
      • +
      • explicit TQSqlQuery ( TQSqlDatabase * db )
      • +
      • TQSqlQuery ( const TQSqlQuery & other )
      • +
      • TQSqlQuery & operator= ( const TQSqlQuery & other )
      • +
      • virtual ~TQSqlQuery ()
      • +
      • bool isValid () const
      • +
      • bool isActive () const
      • +
      • bool isNull ( int field ) const
      • +
      • int at () const
      • +
      • TQString lastQuery () const
      • +
      • int numRowsAffected () const
      • +
      • TQSqlError lastError () const
      • +
      • bool isSelect () const
      • +
      • int size () const
      • +
      • const TQSqlDriver * driver () const
      • +
      • const TQSqlResult * result () const
      • +
      • bool isForwardOnly () const
      • +
      • void setForwardOnly ( bool forward )
      • +
      • virtual bool exec ( const TQString & query )
      • +
      • virtual TQVariant value ( int i ) const
      • +
      • virtual bool seek ( int i, bool relative = FALSE )
      • +
      • virtual bool next ()
      • +
      • virtual bool prev ()
      • +
      • virtual bool first ()
      • +
      • virtual bool last ()
      • +
      • bool exec ()
      • +
      • bool prepare ( const TQString & query )
      • +
      • void bindValue ( const TQString & placeholder, const TQVariant & val )
      • +
      • void bindValue ( int pos, const TQVariant & val )
      • +
      • void addBindValue ( const TQVariant & val )
      • +
      • void bindValue ( const TQString & placeholder, const TQVariant & val, TQSql::ParameterType type )
      • +
      • void bindValue ( int pos, const TQVariant & val, TQSql::ParameterType type )
      • +
      • void addBindValue ( const TQVariant & val, TQSql::ParameterType type )
      • +
      • TQVariant boundValue ( const TQString & placeholder ) const
      • +
      • TQVariant boundValue ( int pos ) const
      • +
      • TQMap<TQString, TQVariant> boundValues () const
      • +
      • TQString executedQuery () const
      • +
      +

      Protected Members

      + +

      Detailed Description

      + + +The TQSqlQuery class provides a means of executing and +manipulating SQL statements. +

      + + +

      TQSqlQuery encapsulates the functionality involved in creating, +navigating and retrieving data from SQL queries which are executed +on a TQSqlDatabase. It can be used to execute DML (data +manipulation language) statements, e.g. SELECT, INSERT, UPDATE and DELETE, and also DDL (data definition language) +statements, e.g. CREATE TABLE. It can also be used to +execute database-specific commands which are not standard SQL +(e.g. SET DATESTYLE=ISO for PostgreSQL). +

      Successfully executed SQL statements set the query's state to +active (isActive() returns TRUE); otherwise the query's state is +set to inactive. In either case, when executing a new SQL +statement, the query is positioned on an invalid record; an active +query must be navigated to a valid record (so that isValid() +returns TRUE) before values can be retrieved. +

      Navigating records is performed with the following functions: +

      +

      These functions allow the programmer to move forward, backward or +arbitrarily through the records returned by the query. If you only +need to move forward through the results, e.g. using next() or +using seek() with a positive offset, you can use setForwardOnly() +and save a significant amount of memory overhead. Once an active +query is positioned on a valid record, data can be retrieved using +value(). All data is transferred from the SQL backend using +TQVariants. +

      For example: +

      +    TQSqlQuery query( "SELECT name FROM customer" );
      +    while ( query.next() ) {
      +        TQString name = query.value(0).toString();
      +        doSomething( name );
      +    }
      +    
      + +

      To access the data returned by a query, use the value() method. +Each field in the data returned by a SELECT statement is accessed +by passing the field's position in the statement, starting from 0. +Information about the fields can be obtained via TQSqlDatabase::record(). +For the sake of efficiency there are no functions to access a field +by name. (The TQSqlCursor class provides a higher-level interface +with field access by name and automatic SQL generation.) +

      TQSqlQuery supports prepared query execution and the binding of +parameter values to placeholders. Some databases don't support +these features, so for them TQt emulates the required +functionality. For example, the Oracle and ODBC drivers have +proper prepared query support, and TQt makes use of it; but for +databases that don't have this support, TQt implements the feature +itself, e.g. by replacing placeholders with actual values when a +query is executed. The exception is positional binding using named +placeholders, which requires that the database supports prepared +queries. +

      Oracle databases identify placeholders by using a colon-name +syntax, e.g :name. ODBC simply uses ? characters. TQt +supports both syntaxes (although you can't mix them in the same +query). +

      Below we present the same example using each of the four different +binding approaches. +

      Named binding using named placeholders +

      +    TQSqlQuery query;
      +    query.prepare( "INSERT INTO atable (id, forename, surname) "
      +                   "VALUES (:id, :forename, :surname)" );
      +    query.bindValue( ":id", 1001 );
      +    query.bindValue( ":forename", "Bart" );
      +    query.bindValue( ":surname", "Simpson" );
      +    query.exec();
      +    
      + +

      Positional binding using named placeholders +

      +    TQSqlQuery query;
      +    query.prepare( "INSERT INTO atable (id, forename, surname) "
      +                   "VALUES (:id, :forename, :surname)" );
      +    query.bindValue( 0, 1001 );
      +    query.bindValue( 1, "Bart" );
      +    query.bindValue( 2, "Simpson" );
      +    query.exec();
      +    
      + +Note: Using positional binding with named placeholders will +only work if the database supports prepared queries. This can be +checked with TQSqlDriver::hasFeature() using TQSqlDriver::PreparedQueries +as argument for driver feature. +

      Binding values using positional placeholders #1 +

      +    TQSqlQuery query;
      +    query.prepare( "INSERT INTO atable (id, forename, surname) "
      +                   "VALUES (?, ?, ?)" );
      +    query.bindValue( 0, 1001 );
      +    query.bindValue( 1, "Bart" );
      +    query.bindValue( 2, "Simpson" );
      +    query.exec();
      +    
      + +

      Binding values using positional placeholders #2 +

      +    query.prepare( "INSERT INTO atable (id, forename, surname) "
      +                   "VALUES (?, ?, ?)" );
      +    query.addBindValue( 1001 );
      +    query.addBindValue( "Bart" );
      +    query.addBindValue( "Simpson" );
      +    query.exec();
      +    
      + +

      Binding values to a stored procedure +This code calls a stored procedure called AsciiToInt(), passing +it a character through its in parameter, and taking its result in +the out parameter. +

      +    TQSqlQuery query;
      +    query.prepare( "call AsciiToInt(?, ?)" );
      +    query.bindValue( 0, "A" );
      +    query.bindValue( 1, 0, TQSql::Out );
      +    query.exec();
      +    int i = query.boundValue( 1 ).toInt(); // i is 65.
      +    
      + +

      See also TQSqlDatabase, TQSqlCursor, TQVariant, and Database Classes. + +


      Member Function Documentation

      +

      TQSqlQuery::TQSqlQuery ( TQSqlResult * r ) +

      +Creates a TQSqlQuery object which uses the TQSqlResult r to +communicate with a database. + +

      TQSqlQuery::TQSqlQuery ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 ) +

      +Creates a TQSqlQuery object using the SQL query and the database +db. If db is 0, (the default), the application's default +database is used. If query is not a null string, it will be +executed. +

      See also TQSqlDatabase. + +

      explicit TQSqlQuery::TQSqlQuery ( TQSqlDatabase * db ) +

      +Creates a TQSqlQuery object using the database db. If db is +0, the application's default database is used. +

      See also TQSqlDatabase. + +

      TQSqlQuery::TQSqlQuery ( const TQSqlQuery & other ) +

      +Constructs a copy of other. + +

      TQSqlQuery::~TQSqlQuery () [virtual] +

      +Destroys the object and frees any allocated resources. + +

      void TQSqlQuery::addBindValue ( const TQVariant & val, TQSql::ParameterType type ) +

      +Adds the value val to the list of values when using positional +value binding. The order of the addBindValue() calls determines +which placeholder a value will be bound to in the prepared query. +If type is TQSql::Out or TQSql::InOut, the placeholder will +be overwritten with data from the database after the exec() call. +

      See also bindValue(), prepare(), and exec(). + +

      void TQSqlQuery::addBindValue ( const TQVariant & val ) +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Binds the placeholder with type TQSql::In. + +

      void TQSqlQuery::afterSeek () [virtual protected] +

      +Protected virtual function called after the internal record +pointer is moved to a new record. The default implementation does +nothing. + +

      int TQSqlQuery::at () const +

      +Returns the current internal position of the query. The first +record is at position zero. If the position is invalid, a +TQSql::Location will be returned indicating the invalid position. +

      See also prev(), next(), first(), last(), seek(), isActive(), and isValid(). + +

      Example: sql/overview/navigating/main.cpp. +

      void TQSqlQuery::beforeSeek () [virtual protected] +

      +Protected virtual function called before the internal record +pointer is moved to a new record. The default implementation does +nothing. + +

      void TQSqlQuery::bindValue ( const TQString & placeholder, const TQVariant & val, TQSql::ParameterType type ) +

      +Set the placeholder placeholder to be bound to value val in +the prepared statement. Note that the placeholder mark (e.g :) +must be included when specifying the placeholder name. If type +is TQSql::Out or TQSql::InOut, the placeholder will be +overwritten with data from the database after the exec() call. +

      See also addBindValue(), prepare(), and exec(). + +

      void TQSqlQuery::bindValue ( const TQString & placeholder, const TQVariant & val ) +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Binds the placeholder with type TQSql::In. + +

      void TQSqlQuery::bindValue ( int pos, const TQVariant & val ) +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Binds the placeholder at position pos with type TQSql::In. + +

      void TQSqlQuery::bindValue ( int pos, const TQVariant & val, TQSql::ParameterType type ) +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Set the placeholder in position pos to be bound to value val +in the prepared statement. Field numbering starts at 0. If type +is TQSql::Out or TQSql::InOut, the placeholder will be +overwritten with data from the database after the exec() call. +

      See also addBindValue(), prepare(), and exec(). + +

      TQVariant TQSqlQuery::boundValue ( const TQString & placeholder ) const +

      +Returns the value for the placeholder. + +

      TQVariant TQSqlQuery::boundValue ( int pos ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns the value for the placeholder at position pos. + +

      TQMap<TQString, TQVariant> TQSqlQuery::boundValues () const +

      +Returns a map of the bound values. +

      The bound values can be examined in the following way: +

      +    TQSqlQuery query;
      +    ...
      +    // Examine the bound values - bound using named binding
      +    TQMap<TQString, TQVariant>::ConstIterator it;
      +    TQMap<TQString, TQVariant> vals = query.boundValues();
      +    for ( it = vals.begin(); it != vals.end(); ++it )
      +        tqWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
      +    ...
      +
      +    // Examine the bound values - bound using positional binding
      +    TQValueList<TQVariant>::ConstIterator it;
      +    TQValueList<TQVariant> list = query.boundValues().values();
      +    int i = 0;
      +    for ( it = list.begin(); it != list.end(); ++it )
      +        tqWarning( "Placeholder pos: %d, Value: " + (*it).toString(), i++ );
      +    ...
      +
      +    
      + + +

      const TQSqlDriver * TQSqlQuery::driver () const +

      +Returns the database driver associated with the query. + +

      bool TQSqlQuery::exec ( const TQString & query ) [virtual] +

      +Executes the SQL in query. Returns TRUE and sets the query +state to active if the query was successful; otherwise returns +FALSE and sets the query state to inactive. The query string +must use syntax appropriate for the SQL database being queried, +for example, standard SQL. +

      After the query is executed, the query is positioned on an invalid record, and must be navigated to a valid record before +data values can be retrieved, e.g. using next(). +

      Note that the last error for this query is reset when exec() is +called. +

      See also isActive(), isValid(), next(), prev(), first(), last(), and seek(). + +

      Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/basicdatamanip/main.cpp, and sql/overview/connection.cpp. +

      bool TQSqlQuery::exec () +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Executes a previously prepared SQL query. Returns TRUE if the +query executed successfully; otherwise returns FALSE. +

      See also prepare(), bindValue(), and addBindValue(). + +

      TQString TQSqlQuery::executedQuery () const +

      +Returns the last query that was executed. +

      In most cases this function returns the same as lastQuery(). If a +prepared query with placeholders is executed on a DBMS that does +not support it, the preparation of this query is emulated. The +placeholders in the original query are replaced with their bound +values to form a new query. This function returns the modified +query. Useful for debugging purposes. +

      See also lastQuery(). + +

      bool TQSqlQuery::first () [virtual] +

      +Retrieves the first record in the result, if available, and +positions the query on the retrieved record. Note that the result +must be in an active state and isSelect() must return TRUE before +calling this function or it will do nothing and return FALSE. +Returns TRUE if successful. If unsuccessful the query position is +set to an invalid position and FALSE is returned. +

      See also next(), prev(), last(), seek(), at(), isActive(), and isValid(). + +

      Example: sql/overview/navigating/main.cpp. +

      bool TQSqlQuery::isActive () const +

      +Returns TRUE if the query is currently active; otherwise returns +FALSE. + +

      Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/basicdatamanip/main.cpp, sql/overview/navigating/main.cpp, and sql/overview/retrieve1/main.cpp. +

      bool TQSqlQuery::isForwardOnly () const +

      +Returns TRUE if you can only scroll forward through a result +set; otherwise returns FALSE. +

      See also setForwardOnly(). + +

      bool TQSqlQuery::isNull ( int field ) const +

      +Returns TRUE if the query is active and positioned on a valid +record and the field is NULL; otherwise returns FALSE. Note +that for some drivers isNull() will not return accurate +information until after an attempt is made to retrieve data. +

      See also isActive(), isValid(), and value(). + +

      bool TQSqlQuery::isSelect () const +

      +Returns TRUE if the current query is a SELECT statement; +otherwise returns FALSE. + +

      bool TQSqlQuery::isValid () const +

      +Returns TRUE if the query is currently positioned on a valid +record; otherwise returns FALSE. + +

      bool TQSqlQuery::last () [virtual] +

      +Retrieves the last record in the result, if available, and +positions the query on the retrieved record. Note that the result +must be in an active state and isSelect() must return TRUE before +calling this function or it will do nothing and return FALSE. +Returns TRUE if successful. If unsuccessful the query position is +set to an invalid position and FALSE is returned. +

      See also next(), prev(), first(), seek(), at(), isActive(), and isValid(). + +

      Example: sql/overview/navigating/main.cpp. +

      TQSqlError TQSqlQuery::lastError () const +

      +Returns error information about the last error (if any) that +occurred. +

      See also TQSqlError. + +

      TQString TQSqlQuery::lastQuery () const +

      +Returns the text of the current query being used, or TQString::null +if there is no current query text. +

      See also executedQuery(). + +

      bool TQSqlQuery::next () [virtual] +

      +Retrieves the next record in the result, if available, and +positions the query on the retrieved record. Note that the result +must be in an active state and isSelect() must return TRUE before +calling this function or it will do nothing and return FALSE. +

      The following rules apply: +

        +
      • If the result is currently located before the first +record, e.g. immediately after a query is executed, an attempt is +made to retrieve the first record. +

      • If the result is currently located after the last record, +there is no change and FALSE is returned. +

      • If the result is located somewhere in the middle, an attempt +is made to retrieve the next record. +
      +

      If the record could not be retrieved, the result is positioned after +the last record and FALSE is returned. If the record is successfully +retrieved, TRUE is returned. +

      See also prev(), first(), last(), seek(), at(), isActive(), and isValid(). + +

      Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/delete/main.cpp, sql/overview/order1/main.cpp, sql/overview/retrieve1/main.cpp, sql/overview/subclass4/main.cpp, and sql/overview/subclass5/main.cpp. +

      int TQSqlQuery::numRowsAffected () const +

      +Returns the number of rows affected by the result's SQL statement, +or -1 if it cannot be determined. Note that for SELECT +statements, the value is undefined; see size() instead. If the +query is not active (isActive() returns FALSE), -1 is returned. +

      See also size() and TQSqlDriver::hasFeature(). + +

      Examples: sql/overview/basicbrowsing2/main.cpp and sql/overview/basicdatamanip/main.cpp. +

      TQSqlQuery & TQSqlQuery::operator= ( const TQSqlQuery & other ) +

      +Assigns other to the query. + +

      bool TQSqlQuery::prepare ( const TQString & query ) +

      +Prepares the SQL query query for execution. The query may +contain placeholders for binding values. Both Oracle style +colon-name (e.g. :surname), and ODBC style (e.g. ?) +placeholders are supported; but they cannot be mixed in the same +query. See the Description for examples. +

      See also exec(), bindValue(), and addBindValue(). + +

      bool TQSqlQuery::prev () [virtual] +

      +Retrieves the previous record in the result, if available, and +positions the query on the retrieved record. Note that the result +must be in an active state and isSelect() must return TRUE before +calling this function or it will do nothing and return FALSE. +

      The following rules apply: +

        +
      • If the result is currently located before the first record, +there is no change and FALSE is returned. +

      • If the result is currently located after the last record, an +attempt is made to retrieve the last record. +

      • If the result is somewhere in the middle, an attempt is made +to retrieve the previous record. +
      +

      If the record could not be retrieved, the result is positioned +before the first record and FALSE is returned. If the record is +successfully retrieved, TRUE is returned. +

      See also next(), first(), last(), seek(), at(), isActive(), and isValid(). + +

      const TQSqlResult * TQSqlQuery::result () const +

      +Returns the result associated with the query. + +

      bool TQSqlQuery::seek ( int i, bool relative = FALSE ) [virtual] +

      +Retrieves the record at position (offset) i, if available, and +positions the query on the retrieved record. The first record is +at position 0. Note that the query must be in an active state and +isSelect() must return TRUE before calling this function. +

      If relative is FALSE (the default), the following rules apply: +

        +
      • If i is negative, the result is positioned before the +first record and FALSE is returned. +
      • Otherwise, an attempt is made to move to the record at position +i. If the record at position i could not be retrieved, the +result is positioned after the last record and FALSE is returned. If +the record is successfully retrieved, TRUE is returned. +
      +

      If relative is TRUE, the following rules apply: +

        +
      • If the result is currently positioned before the first +record or on the first record, and i is negative, there is no +change, and FALSE is returned. +
      • If the result is currently located after the last record, and +i is positive, there is no change, and FALSE is returned. +
      • If the result is currently located somewhere in the middle, +and the relative offset i moves the result below zero, the +result is positioned before the first record and FALSE is +returned. +
      • Otherwise, an attempt is made to move to the record i +records ahead of the current record (or i records behind the +current record if i is negative). If the record at offset i +could not be retrieved, the result is positioned after the last +record if i >= 0, (or before the first record if i is +negative), and FALSE is returned. If the record is successfully +retrieved, TRUE is returned. +
      +

      See also next(), prev(), first(), last(), at(), isActive(), and isValid(). + +

      Example: sql/overview/navigating/main.cpp. +

      void TQSqlQuery::setForwardOnly ( bool forward ) +

      +Sets forward only mode to forward. If forward is TRUE only +next(), and seek() with positive values, are allowed for +navigating the results. Forward only mode needs far less memory +since results do not need to be cached. +

      Forward only mode is off by default. +

      Forward only mode cannot be used with data aware widgets like +TQDataTable, since they must to be able to scroll backward as well +as forward. +

      See also isForwardOnly(), next(), and seek(). + +

      int TQSqlQuery::size () const +

      +Returns the size of the result, (number of rows returned), or -1 +if the size cannot be determined or if the database does not +support reporting information about query sizes. Note that for +non-SELECT statements (isSelect() returns FALSE), size() will +return -1. If the query is not active (isActive() returns FALSE), +-1 is returned. +

      To determine the number of rows affected by a non-SELECT +statement, use numRowsAffected(). +

      See also isActive(), numRowsAffected(), and TQSqlDriver::hasFeature(). + +

      Example: sql/overview/navigating/main.cpp. +

      TQVariant TQSqlQuery::value ( int i ) const [virtual] +

      +Returns the value of the i-th field in the query (zero based). +

      The fields are numbered from left to right using the text of the +SELECT statement, e.g. in SELECT forename, surname FROM people, +field 0 is forename and field 1 is surname. Using SELECT * +is not recommended because the order of the fields in the query is +undefined. +

      An invalid TQVariant is returned if field i does not exist, if +the query is inactive, or if the query is positioned on an invalid +record. +

      See also prev(), next(), first(), last(), seek(), isActive(), and isValid(). + +

      Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/retrieve1/main.cpp, sql/overview/subclass3/main.cpp, sql/overview/subclass4/main.cpp, sql/overview/subclass5/main.cpp, and sql/overview/table4/main.cpp. + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlrecord-h.html b/doc/html/tqsqlrecord-h.html new file mode 100644 index 000000000..262cc4e4e --- /dev/null +++ b/doc/html/tqsqlrecord-h.html @@ -0,0 +1,185 @@ + + + + + +tqsqlrecord.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlrecord.h

      + +

      This is the verbatim text of the tqsqlrecord.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlRecord class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLRECORD_H
      +#define TQSQLRECORD_H
      +
      +#ifndef QT_H
      +#include "ntqstring.h"
      +#include "ntqstringlist.h"
      +#include "ntqvariant.h"
      +#include "tqsqlfield.h"
      +#endif // QT_H
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQSqlRecordPrivate;
      +
      +class TQSqlRecordShared : public TQShared
      +{
      +public:
      +    TQSqlRecordShared( TQSqlRecordPrivate* sqlRecordPrivate )
      +    : d( sqlRecordPrivate )
      +    {}
      +    virtual ~TQSqlRecordShared();
      +    TQSqlRecordPrivate* d;
      +};
      +
      +class TQ_EXPORT TQSqlRecord
      +{
      +public:
      +    TQSqlRecord();
      +    TQSqlRecord( const TQSqlRecord& other );
      +    TQSqlRecord& operator=( const TQSqlRecord& other );
      +    virtual ~TQSqlRecord();
      +    virtual TQVariant     value( int i ) const;
      +    virtual TQVariant     value( const TQString& name ) const;
      +    virtual void         setValue( int i, const TQVariant& val );
      +    virtual void         setValue( const TQString& name, const TQVariant& val );
      +    bool                 isGenerated( int i ) const;
      +    bool                 isGenerated( const TQString& name ) const;
      +    virtual void         setGenerated( const TQString& name, bool generated );
      +    virtual void         setGenerated( int i, bool generated );
      +    virtual void         setNull( int i );
      +    virtual void         setNull( const TQString& name );
      +    bool                 isNull( int i ); // remove in 4.0
      +    bool                 isNull( const TQString& name ); // remove in 4.0
      +    bool                 isNull( int i ) const;
      +    bool                 isNull( const TQString& name ) const;
      +
      +    int                  position( const TQString& name ) const;
      +    TQString              fieldName( int i ) const;
      +    TQSqlField*           field( int i );
      +    TQSqlField*           field( const TQString& name );
      +    const TQSqlField*     field( int i ) const;
      +    const TQSqlField*     field( const TQString& name ) const;
      +
      +    virtual void         append( const TQSqlField& field );
      +    virtual void         insert( int pos, const TQSqlField& field );
      +    virtual void         remove( int pos );
      +
      +    bool                 isEmpty() const;
      +    bool                 contains( const TQString& name ) const;
      +    virtual void         clear();
      +    virtual void         clearValues( bool nullify = FALSE );
      +    uint                 count() const;
      +    virtual TQString      toString( const TQString& prefix = TQString::null,
      +				   const TQString& sep = "," ) const;
      +    virtual TQStringList  toStringList( const TQString& prefix = TQString::null ) const;
      +
      +private:
      +    TQString              createField( int i, const TQString& prefix ) const;
      +    void                 deref();
      +    bool                 checkDetach();
      +    TQSqlRecordShared*    sh;
      +};
      +
      +/******************************************/
      +/*******     TQSqlRecordInfo Class    ******/
      +/******************************************/
      +
      +#if defined(Q_TEMPLATEDLL)
      +// MOC_SKIP_BEGIN
      +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList<TQSqlFieldInfo>;
      +// MOC_SKIP_END
      +#endif
      +
      +typedef TQValueList<TQSqlFieldInfo> TQSqlFieldInfoList;
      +
      +class TQ_EXPORT TQSqlRecordInfo: public TQSqlFieldInfoList
      +{
      +public:
      +    TQSqlRecordInfo(): TQSqlFieldInfoList() {}
      +    TQSqlRecordInfo( const TQSqlFieldInfoList& other ): TQSqlFieldInfoList( other ) {}
      +    TQSqlRecordInfo( const TQSqlRecord& other );
      +
      +    size_type contains( const TQString& fieldName ) const;
      +    TQSqlFieldInfo find( const TQString& fieldName ) const;
      +    TQSqlRecord toRecord() const;
      +
      +};
      +
      +
      +#endif	// TQT_NO_SQL
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlrecord-members.html b/doc/html/tqsqlrecord-members.html new file mode 100644 index 000000000..14bda38d0 --- /dev/null +++ b/doc/html/tqsqlrecord-members.html @@ -0,0 +1,68 @@ + + + + + +TQSqlRecord Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlRecord

      + +

      This is the complete list of member functions for +TQSqlRecord, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlrecord.html b/doc/html/tqsqlrecord.html new file mode 100644 index 000000000..78ac9a199 --- /dev/null +++ b/doc/html/tqsqlrecord.html @@ -0,0 +1,294 @@ + + + + + +TQSqlRecord Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlRecord Class Reference
      [sql module]

      + +

      The TQSqlRecord class encapsulates a database record, i.e. a +set of database fields. +More... +

      #include <tqsqlrecord.h> +

      Inherited by TQSqlCursor and TQSqlIndex. +

      List of all member functions. +

      Public Members

      +
        +
      • TQSqlRecord ()
      • +
      • TQSqlRecord ( const TQSqlRecord & other )
      • +
      • TQSqlRecord & operator= ( const TQSqlRecord & other )
      • +
      • virtual ~TQSqlRecord ()
      • +
      • virtual TQVariant value ( int i ) const
      • +
      • virtual TQVariant value ( const TQString & name ) const
      • +
      • virtual void setValue ( int i, const TQVariant & val )
      • +
      • virtual void setValue ( const TQString & name, const TQVariant & val )
      • +
      • bool isGenerated ( int i ) const
      • +
      • bool isGenerated ( const TQString & name ) const
      • +
      • virtual void setGenerated ( const TQString & name, bool generated )
      • +
      • virtual void setGenerated ( int i, bool generated )
      • +
      • virtual void setNull ( int i )
      • +
      • virtual void setNull ( const TQString & name )
      • +
      • bool isNull ( int i ) const
      • +
      • bool isNull ( const TQString & name ) const
      • +
      • int position ( const TQString & name ) const
      • +
      • TQString fieldName ( int i ) const
      • +
      • TQSqlField * field ( int i )
      • +
      • TQSqlField * field ( const TQString & name )
      • +
      • const TQSqlField * field ( int i ) const
      • +
      • const TQSqlField * field ( const TQString & name ) const
      • +
      • virtual void append ( const TQSqlField & field )
      • +
      • virtual void insert ( int pos, const TQSqlField & field )
      • +
      • virtual void remove ( int pos )
      • +
      • bool isEmpty () const
      • +
      • bool contains ( const TQString & name ) const
      • +
      • virtual void clear ()
      • +
      • virtual void clearValues ( bool nullify = FALSE )
      • +
      • uint count () const
      • +
      • virtual TQString toString ( const TQString & prefix = TQString::null, const TQString & sep = "," ) const
      • +
      • virtual TQStringList toStringList ( const TQString & prefix = TQString::null ) const
      • +
      +

      Detailed Description

      + + +The TQSqlRecord class encapsulates a database record, i.e. a +set of database fields. +

      + +

      The TQSqlRecord class encapsulates the functionality and +characteristics of a database record (usually a table or view within +the database). TQSqlRecords support adding and removing fields as +well as setting and retrieving field values. +

      TQSqlRecord is implicitly shared. This means you can make copies of +the record in time O(1). If multiple TQSqlRecord instances share +the same data and one is modifying the record's data then this +modifying instance makes a copy and modifies its private copy - +thus it does not affect other instances. +

      See also TQSqlRecordInfo and Database Classes. + +


      Member Function Documentation

      +

      TQSqlRecord::TQSqlRecord () +

      +Constructs an empty record. + +

      TQSqlRecord::TQSqlRecord ( const TQSqlRecord & other ) +

      +Constructs a copy of other. + +

      TQSqlRecord::~TQSqlRecord () [virtual] +

      +Destroys the object and frees any allocated resources. + +

      void TQSqlRecord::append ( const TQSqlField & field ) [virtual] +

      +Append a copy of field field to the end of the record. + +

      Reimplemented in TQSqlIndex. +

      void TQSqlRecord::clear () [virtual] +

      +Removes all the record's fields. +

      See also clearValues(). + +

      Reimplemented in TQSqlCursor. +

      void TQSqlRecord::clearValues ( bool nullify = FALSE ) [virtual] +

      +Clears the value of all fields in the record. If nullify is +TRUE, (the default is FALSE), each field is set to NULL. + +

      bool TQSqlRecord::contains ( const TQString & name ) const +

      +Returns TRUE if there is a field in the record called name; +otherwise returns FALSE. + +

      uint TQSqlRecord::count () const +

      +Returns the number of fields in the record. + +

      TQSqlField * TQSqlRecord::field ( int i ) +

      +Returns the field at position i within the record, or 0 if it +cannot be found. + +

      TQSqlField * TQSqlRecord::field ( const TQString & name ) +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns the field called name within the record, or 0 if it +cannot be found. Field names are not case-sensitive. + +

      const TQSqlField * TQSqlRecord::field ( int i ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      +

      const TQSqlField * TQSqlRecord::field ( const TQString & name ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns the field called name within the record, or 0 if it +cannot be found. Field names are not case-sensitive. + +

      TQString TQSqlRecord::fieldName ( int i ) const +

      +Returns the name of the field at position i. If the field does +not exist, TQString::null is returned. + +

      void TQSqlRecord::insert ( int pos, const TQSqlField & field ) [virtual] +

      +Insert a copy of field at position pos. If a field already +exists at pos, it is removed. + +

      bool TQSqlRecord::isEmpty () const +

      +Returns TRUE if there are no fields in the record; otherwise +returns FALSE. + +

      bool TQSqlRecord::isGenerated ( const TQString & name ) const +

      +Returns TRUE if the record has a field called name and this +field is to be generated (the default); otherwise returns FALSE. +

      See also setGenerated(). + +

      bool TQSqlRecord::isGenerated ( int i ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns TRUE if the record has a field at position i and this +field is to be generated (the default); otherwise returns FALSE. +

      See also setGenerated(). + +

      bool TQSqlRecord::isNull ( const TQString & name ) const +

      +Returns TRUE if the field called name is NULL or if there is no +field called name; otherwise returns FALSE. +

      See also position(). + +

      bool TQSqlRecord::isNull ( int i ) const +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns TRUE if the field i is NULL or if there is no field at +position i; otherwise returns FALSE. +

      See also fieldName(). + +

      TQSqlRecord & TQSqlRecord::operator= ( const TQSqlRecord & other ) +

      +Sets the record equal to other. + +

      int TQSqlRecord::position ( const TQString & name ) const +

      +Returns the position of the field called name within the +record, or -1 if it cannot be found. Field names are not +case-sensitive. If more than one field matches, the first one is +returned. + +

      void TQSqlRecord::remove ( int pos ) [virtual] +

      +Removes the field at pos. If pos does not exist, nothing +happens. + +

      Reimplemented in TQSqlCursor. +

      void TQSqlRecord::setGenerated ( const TQString & name, bool generated ) [virtual] +

      +Sets the generated flag for the field called name to generated. If the field does not exist, nothing happens. Only +fields that have generated set to TRUE are included in the SQL +that is generated, e.g. by TQSqlCursor. +

      See also isGenerated(). + +

      Reimplemented in TQSqlCursor. +

      void TQSqlRecord::setGenerated ( int i, bool generated ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Sets the generated flag for the field i to generated. +

      See also isGenerated(). + +

      Reimplemented in TQSqlCursor. +

      void TQSqlRecord::setNull ( int i ) [virtual] +

      +Sets the value of field i to NULL. If the field does not exist, +nothing happens. + +

      void TQSqlRecord::setNull ( const TQString & name ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Sets the value of the field called name to NULL. If the field +does not exist, nothing happens. + +

      void TQSqlRecord::setValue ( int i, const TQVariant & val ) [virtual] +

      +Sets the value of the field at position i to val. If the +field does not exist, nothing happens. + +

      Examples: sql/overview/insert/main.cpp, sql/overview/insert2/main.cpp, sql/overview/subclass5/main.cpp, sql/overview/update/main.cpp, and sql/sqltable/main.cpp. +

      void TQSqlRecord::setValue ( const TQString & name, const TQVariant & val ) [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Sets the value of the field called name to val. If the field +does not exist, nothing happens. + +

      TQString TQSqlRecord::toString ( const TQString & prefix = TQString::null, const TQString & sep = "," ) const [virtual] +

      +Returns a list of all the record's field names as a string +separated by sep. +

      Note that fields which are not generated are not included (see +isGenerated()). The returned string is suitable, for example, for +generating SQL SELECT statements. If a prefix is specified, +e.g. a table name, all fields are prefixed in the form: +

      "prefix.<fieldname>" + +

      TQStringList TQSqlRecord::toStringList ( const TQString & prefix = TQString::null ) const [virtual] +

      +Returns a list of all the record's field names, each having the +prefix prefix. +

      Note that fields which have generated set to FALSE are not +included. (See isGenerated()). If prefix is supplied, e.g. +a table name, all fields are prefixed in the form: +

      "prefix.<fieldname>" + +

      TQVariant TQSqlRecord::value ( int i ) const [virtual] +

      +Returns the value of the field located at position i in the +record. If field i does not exist the resultant behaviour is +undefined. +

      This function should be used with TQSqlQuerys. When working +with a TQSqlCursor the value(const + TQString&) overload which uses field names is more +appropriate. + +

      Example: sql/overview/update/main.cpp. +

      TQVariant TQSqlRecord::value ( const TQString & name ) const [virtual] +

      +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

      Returns the value of the field called name in the record. If +field name does not exist the resultant behaviour is undefined. + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlrecordinfo-members.html b/doc/html/tqsqlrecordinfo-members.html new file mode 100644 index 000000000..f92e6f1fe --- /dev/null +++ b/doc/html/tqsqlrecordinfo-members.html @@ -0,0 +1,50 @@ + + + + + +TQSqlRecordInfo Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlRecordInfo

      + +

      This is the complete list of member functions for +TQSqlRecordInfo, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlrecordinfo.html b/doc/html/tqsqlrecordinfo.html new file mode 100644 index 000000000..4c4dac0c7 --- /dev/null +++ b/doc/html/tqsqlrecordinfo.html @@ -0,0 +1,101 @@ + + + + + +TQSqlRecordInfo Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlRecordInfo Class Reference
      [sql module]

      + +

      The TQSqlRecordInfo class encapsulates a set of database field meta data. +More... +

      #include <tqsqlrecord.h> +

      List of all member functions. +

      Public Members

      + +

      Detailed Description

      + + +The TQSqlRecordInfo class encapsulates a set of database field meta data. +

      + +

      This class is a TQValueList that holds a set of database field meta +data. Use contains() to see if a given field name exists in the +record, and use find() to get a TQSqlFieldInfo record for a named +field. +

      See also TQValueList, TQSqlFieldInfo, and Database Classes. + +


      Member Function Documentation

      +

      TQSqlRecordInfo::TQSqlRecordInfo () +

      + +

      Constructs an empty record info object + +

      TQSqlRecordInfo::TQSqlRecordInfo ( const TQSqlFieldInfoList & other ) +

      + +

      Constructs a copy of other. + +

      TQSqlRecordInfo::TQSqlRecordInfo ( const TQSqlRecord & other ) +

      +Constructs a TQSqlRecordInfo object based on the fields in the +TQSqlRecord other. + +

      size_type TQSqlRecordInfo::contains ( const TQString & fieldName ) const +

      +Returns the number of times a field called fieldName occurs in +the record. Returns 0 if no field by that name could be found. + +

      TQSqlFieldInfo TQSqlRecordInfo::find ( const TQString & fieldName ) const +

      +Returns a TQSqlFieldInfo object for the first field in the record +which has the field name fieldName. If no matching field is +found then an empty TQSqlFieldInfo object is returned. + +

      TQSqlRecord TQSqlRecordInfo::toRecord () const +

      +Returns an empty TQSqlRecord based on the field information +in this TQSqlRecordInfo. + + +

      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlresult-h.html b/doc/html/tqsqlresult-h.html new file mode 100644 index 000000000..1c9a00c5a --- /dev/null +++ b/doc/html/tqsqlresult-h.html @@ -0,0 +1,159 @@ + + + + + +tqsqlresult.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlresult.h

      + +

      This is the verbatim text of the tqsqlresult.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlResult class
      +**
      +** Created : 2000-11-03
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLRESULT_H
      +#define TQSQLRESULT_H
      +
      +#ifndef QT_H
      +#include "ntqstring.h"
      +#include "ntqvariant.h"
      +#include "tqsqlerror.h"
      +#include "tqsqlfield.h"
      +#include "tqsql.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQSqlDriver;
      +class TQSql;
      +class TQSqlResultPrivate;
      +class TQSqlExtension;
      +
      +class TQM_EXPORT_SQL TQSqlResult
      +{
      +friend class TQSqlQuery;
      +friend class TQSqlResultShared;
      +public:
      +    virtual ~TQSqlResult();
      +    
      +    // BCI HACK - remove in 4.0
      +    void 	    setExtension( TQSqlExtension * ext );
      +    TQSqlExtension * extension();
      +
      +protected:
      +    TQSqlResult(const TQSqlDriver * db );
      +    int		    at() const;
      +    TQString         lastQuery() const;
      +    TQSqlError       lastError() const;
      +    bool            isValid() const;
      +    bool            isActive() const;
      +    bool            isSelect() const;
      +    bool            isForwardOnly() const;
      +    const TQSqlDriver* driver() const;
      +    virtual void    setAt( int at );
      +    virtual void    setActive( bool a );
      +    virtual void    setLastError( const TQSqlError& e );
      +    virtual void    setQuery( const TQString& query );
      +    virtual void    setSelect( bool s );
      +    virtual void    setForwardOnly( bool forward );
      +
      +    virtual TQVariant data( int i ) = 0;
      +    virtual bool    isNull( int i ) = 0;
      +    virtual bool    reset ( const TQString& sqlquery ) = 0;
      +    virtual bool    fetch( int i ) = 0;
      +    virtual bool    fetchNext();
      +    virtual bool    fetchPrev();
      +    virtual bool    fetchFirst() = 0;
      +    virtual bool    fetchLast() = 0;
      +    virtual int     size() = 0;
      +    virtual int     numRowsAffected() = 0;
      +private:
      +    TQSqlResultPrivate* d;
      +    bool forwardOnly;
      +
      +private:	// Disabled copy constructor and operator=
      +#if defined(TQ_DISABLE_COPY)
      +    TQSqlResult( const TQSqlResult & );
      +    TQSqlResult &operator=( const TQSqlResult & );
      +#endif
      +};
      +
      +#endif	// TQT_NO_SQL
      +#endif
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlresult-members.html b/doc/html/tqsqlresult-members.html new file mode 100644 index 000000000..3f31ea3fe --- /dev/null +++ b/doc/html/tqsqlresult-members.html @@ -0,0 +1,72 @@ + + + + + +TQSqlResult Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlResult

      + +

      This is the complete list of member functions for +TQSqlResult, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlresult.html b/doc/html/tqsqlresult.html new file mode 100644 index 000000000..46fe310d9 --- /dev/null +++ b/doc/html/tqsqlresult.html @@ -0,0 +1,260 @@ + + + + + +TQSqlResult Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlResult Class Reference
      [sql module]

      + +

      The TQSqlResult class provides an abstract interface for +accessing data from SQL databases. +More... +

      #include <tqsqlresult.h> +

      List of all member functions. +

      Public Members

      + +

      Protected Members

      + +

      Detailed Description

      + + +The TQSqlResult class provides an abstract interface for +accessing data from SQL databases. +

      + +

      Normally you would use TQSqlQuery instead of TQSqlResult since TQSqlQuery +provides a generic wrapper for database-specific implementations of +TQSqlResult. +

      See also TQSql and Database Classes. + +


      Member Function Documentation

      +

      TQSqlResult::TQSqlResult ( const TQSqlDriver * db ) [protected] +

      +Protected constructor which creates a TQSqlResult using database db. The object is initialized to an inactive state. + +

      TQSqlResult::~TQSqlResult () [virtual] +

      +Destroys the object and frees any allocated resources. + +

      int TQSqlResult::at () const [protected] +

      +Returns the current (zero-based) position of the result. + +

      TQVariant TQSqlResult::data ( int i ) [pure virtual protected] +

      + +

      Returns the data for field i (zero-based) as a TQVariant. This +function is only called if the result is in an active state and is +positioned on a valid record and i is non-negative. +Derived classes must reimplement this function and return the value +of field i, or TQVariant() if it cannot be determined. + +

      const TQSqlDriver * TQSqlResult::driver () const [protected] +

      +Returns the driver associated with the result. + +

      bool TQSqlResult::fetch ( int i ) [pure virtual protected] +

      + +

      Positions the result to an arbitrary (zero-based) index i. This +function is only called if the result is in an active state. Derived +classes must reimplement this function and position the result to the +index i, and call setAt() with an appropriate value. Return TRUE +to indicate success, or FALSE to signify failure. + +

      bool TQSqlResult::fetchFirst () [pure virtual protected] +

      + +

      Positions the result to the first record in the result. This +function is only called if the result is in an active state. +Derived classes must reimplement this function and position the result +to the first record, and call setAt() with an appropriate value. +Return TRUE to indicate success, or FALSE to signify failure. + +

      bool TQSqlResult::fetchLast () [pure virtual protected] +

      + +

      Positions the result to the last record in the result. This +function is only called if the result is in an active state. +Derived classes must reimplement this function and position the result +to the last record, and call setAt() with an appropriate value. +Return TRUE to indicate success, or FALSE to signify failure. + +

      bool TQSqlResult::fetchNext () [virtual protected] +

      +Positions the result to the next available record in the result. +This function is only called if the result is in an active state. +The default implementation calls fetch() with the next index. +Derived classes can reimplement this function and position the result +to the next record in some other way, and call setAt() with an +appropriate value. Return TRUE to indicate success, or FALSE to +signify failure. + +

      bool TQSqlResult::fetchPrev () [virtual protected] +

      +Positions the result to the previous available record in the +result. This function is only called if the result is in an active +state. The default implementation calls fetch() with the previous +index. Derived classes can reimplement this function and position the +result to the next record in some other way, and call setAt() with +an appropriate value. Return TRUE to indicate success, or FALSE to +signify failure. + +

      bool TQSqlResult::isActive () const [protected] +

      +Returns TRUE if the result has records to be retrieved; otherwise +returns FALSE. + +

      bool TQSqlResult::isForwardOnly () const [protected] +

      +Returns TRUE if you can only scroll forward through a result set; +otherwise returns FALSE. + +

      bool TQSqlResult::isNull ( int i ) [pure virtual protected] +

      + +

      Returns TRUE if the field at position i is NULL; otherwise +returns FALSE. + +

      bool TQSqlResult::isSelect () const [protected] +

      +Returns TRUE if the current result is from a SELECT statement; +otherwise returns FALSE. + +

      bool TQSqlResult::isValid () const [protected] +

      +Returns TRUE if the result is positioned on a valid record (that +is, the result is not positioned before the first or after the +last record); otherwise returns FALSE. + +

      TQSqlError TQSqlResult::lastError () const [protected] +

      +Returns the last error associated with the result. + +

      TQString TQSqlResult::lastQuery () const [protected] +

      +Returns the current SQL query text, or TQString::null if there is none. + +

      int TQSqlResult::numRowsAffected () [pure virtual protected] +

      + +

      Returns the number of rows affected by the last query executed. + +

      bool TQSqlResult::reset ( const TQString & query ) [pure virtual protected] +

      + +

      Sets the result to use the SQL statement query for subsequent +data retrieval. Derived classes must reimplement this function and +apply the query to the database. This function is called only +after the result is set to an inactive state and is positioned +before the first record of the new result. Derived classes should +return TRUE if the query was successful and ready to be used, +or FALSE otherwise. + +

      void TQSqlResult::setActive ( bool a ) [virtual protected] +

      +Protected function provided for derived classes to set the +internal active state to the value of a. +

      See also isActive(). + +

      void TQSqlResult::setAt ( int at ) [virtual protected] +

      +Protected function provided for derived classes to set the +internal (zero-based) result index to at. +

      See also at(). + +

      void TQSqlResult::setForwardOnly ( bool forward ) [virtual protected] +

      +Sets forward only mode to forward. If forward is TRUE only +fetchNext() is allowed for navigating the results. Forward only +mode needs far less memory since results do not have to be cached. +forward only mode is off by default. +

      See also fetchNext(). + +

      void TQSqlResult::setLastError ( const TQSqlError & e ) [virtual protected] +

      +Protected function provided for derived classes to set the last +error to the value of e. +

      See also lastError(). + +

      void TQSqlResult::setQuery ( const TQString & query ) [virtual protected] +

      +Sets the current query for the result to query. The result must +be reset() in order to execute the query on the database. + +

      void TQSqlResult::setSelect ( bool s ) [virtual protected] +

      +Protected function provided for derived classes to indicate +whether or not the current statement is a SQL SELECT statement. +The s parameter should be TRUE if the statement is a SELECT +statement, or FALSE otherwise. + +

      int TQSqlResult::size () [pure virtual protected] +

      + +

      Returns the size of the result or -1 if it cannot be determined. + + +


      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlselectcursor-h.html b/doc/html/tqsqlselectcursor-h.html new file mode 100644 index 000000000..c1aadf86d --- /dev/null +++ b/doc/html/tqsqlselectcursor-h.html @@ -0,0 +1,148 @@ + + + + + +tqsqlselectcursor.h Include File + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      tqsqlselectcursor.h

      + +

      This is the verbatim text of the tqsqlselectcursor.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


      +
      +/****************************************************************************
      +**
      +** Definition of TQSqlSelectCursor class
      +**
      +** Created : 2002-11-13
      +**
      +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
      +**
      +** This file is part of the sql module of the TQt GUI Toolkit.
      +**
      +** This file may be used under the terms of the GNU General Public
      +** License versions 2.0 or 3.0 as published by the Free Software
      +** Foundation and appearing in the file LICENSE.GPL included in the
      +** packaging of this file. Alternatively you may (at your option) use any
      +** later version of the GNU General Public License if such license has
      +** been publicly approved by Trolltech ASA (or its successors, if any)
      +** and the KDE Free TQt Foundation.
      +**
      +** Please review the following information to ensure GNU General
      +** Public Licensing requirements will be met:
      +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      +** If you are unsure which license is appropriate for your use, please
      +** review the following information:
      +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      +** or contact the sales department at sales@trolltech.com.
      +**
      +** This file may be used under the terms of the Q Public License as
      +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      +** included in the packaging of this file.  Licensees holding valid TQt
      +** Commercial licenses may use this file in accordance with the TQt
      +** Commercial License Agreement provided with the Software.
      +**
      +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      +** herein.
      +**
      +**********************************************************************/
      +
      +#ifndef TQSQLSELECTCURSOR_H
      +#define TQSQLSELECTCURSOR_H
      +
      +#ifndef QT_H
      +#include "tqsqlcursor.h"
      +#endif // QT_H
      +
      +#if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
      +#define TQM_EXPORT_SQL
      +#else
      +#define TQM_EXPORT_SQL TQ_EXPORT
      +#endif
      +
      +#ifndef TQT_NO_SQL
      +
      +class TQSqlSelectCursorPrivate;
      +
      +class TQM_EXPORT_SQL TQSqlSelectCursor : public TQSqlCursor
      +{
      +public:
      +    TQSqlSelectCursor( const TQString& query = TQString::null, TQSqlDatabase* db = 0 );
      +    TQSqlSelectCursor( const TQSqlSelectCursor& other );
      +    ~TQSqlSelectCursor();
      +    bool exec( const TQString& query );
      +    bool select() { return TQSqlCursor::select(); }
      +    
      +protected:
      +    TQSqlIndex primaryIndex( bool = TRUE ) const { return TQSqlIndex(); }
      +    TQSqlIndex index( const TQStringList& ) const { return TQSqlIndex(); }
      +    TQSqlIndex index( const TQString& ) const { return TQSqlIndex(); }
      +    TQSqlIndex index( const char* ) const { return TQSqlIndex(); }
      +    void setPrimaryIndex( const TQSqlIndex& ) {}
      +    void append( const TQSqlFieldInfo& ) {}
      +    void insert( int, const TQSqlFieldInfo& ) {}
      +    void remove( int ) {}
      +    void clear() {}
      +    void setGenerated( const TQString&, bool ) {}
      +    void setGenerated( int, bool ) {}
      +    TQSqlRecord*	editBuffer( bool = FALSE ) { return 0; }
      +    TQSqlRecord*	primeInsert() { return 0; }
      +    TQSqlRecord*	primeUpdate() { return 0; }
      +    TQSqlRecord*	primeDelete() { return 0; }
      +    int	insert( bool = TRUE ) { return 0; }
      +    int	update( bool = TRUE ) { return 0; }
      +    int	del( bool = TRUE ) { return 0; }
      +    void setMode( int ) {}
      +
      +    void setSort( const TQSqlIndex& ) {}
      +    TQSqlIndex sort() const { return TQSqlIndex(); }
      +    void setFilter( const TQString& ) {}
      +    TQString filter() const { return TQString::null; }
      +    void setName( const TQString&, bool = TRUE ) {}
      +    TQString name() const { return TQString::null; }
      +    TQString toString( const TQString& = TQString::null, const TQString& = "," ) const { return TQString::null; }
      +    bool select( const TQString &, const TQSqlIndex& = TQSqlIndex() );
      +
      +private:
      +    void populateCursor();
      +    
      +    TQSqlSelectCursorPrivate * d;
      +};
      +
      +#endif // TQT_NO_SQL
      +#endif // TQSQLSELECTCURSOR_H
      +
      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlselectcursor-members.html b/doc/html/tqsqlselectcursor-members.html new file mode 100644 index 000000000..cf1b17721 --- /dev/null +++ b/doc/html/tqsqlselectcursor-members.html @@ -0,0 +1,121 @@ + + + + + +TQSqlSelectCursor Member List + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      Complete Member List for TQSqlSelectCursor

      + +

      This is the complete list of member functions for +TQSqlSelectCursor, including inherited members. + +

      + +


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/tqsqlselectcursor.html b/doc/html/tqsqlselectcursor.html new file mode 100644 index 000000000..97a56fcc2 --- /dev/null +++ b/doc/html/tqsqlselectcursor.html @@ -0,0 +1,93 @@ + + + + + +TQSqlSelectCursor Class + + + + + + + +
      + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

      TQSqlSelectCursor Class Reference
      [sql module]

      + +

      The TQSqlSelectCursor class provides browsing of general SQL +SELECT statements. +More... +

      #include <tqsqlselectcursor.h> +

      Inherits TQSqlCursor. +

      List of all member functions. +

      Public Members

      + +

      Detailed Description

      + + +The TQSqlSelectCursor class provides browsing of general SQL +SELECT statements. +

      + +

      TQSqlSelectCursor is a convenience class that makes it possible to +display result sets from general SQL SELECT statements in +data-aware TQt widgets. TQSqlSelectCursor is read-only and does not +support INSERT, UPDATE or DELETE operations. +

      Pass the query in at construction time, or use the +TQSqlSelectCursor::exec() function. +

      Example: +

      +    ...
      +    TQSqlSelectCursor* cur = new TQSqlSelectCursor( "SELECT id, firstname, lastname FROM author" );
      +    TQDataTable* table = new TQDataTable( this );
      +    table->setSqlCursor( cur, TRUE, TRUE );
      +    table->refresh();
      +    ...
      +    cur->exec( "SELECT * FROM books" );
      +    table->refresh();
      +    ...
      +    
      + +

      See also Database Classes. + +


      Member Function Documentation

      +

      TQSqlSelectCursor::TQSqlSelectCursor ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 ) +

      +Constructs a read only cursor on database db using the query query. + +

      TQSqlSelectCursor::TQSqlSelectCursor ( const TQSqlSelectCursor & other ) +

      Constructs a copy of other +

      TQSqlSelectCursor::~TQSqlSelectCursor () +

      Destroys the object and frees any allocated resources + +

      +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


      + +
      Copyright © 2007 +TrolltechTrademarks +
      TQt 3.3.8
      +
      + diff --git a/doc/html/whatsthis b/doc/html/whatsthis index 4c9f85663..2e40a05ea 100644 --- a/doc/html/whatsthis +++ b/doc/html/whatsthis @@ -1,13 +1,13 @@ 2D area that can contain QCanvasItem objects. | QCanvas 2D transformations of a coordinate system. | QWMatrix -Abstract base class for accessing SQL databases. | QSqlDriver +Abstract base class for accessing SQL databases. | TQSqlDriver Abstract base class for custom menu items in popup menus. | QCustomMenuItem Abstract base class for implementations of additional COM interfaces. | QAxAggregated Abstract base class of internal layout iterators. | QGLayoutIterator Abstract base for Qt/Embedded graphics driver plugins. | QGfxDriverPlugin Abstract base for Qt/Embedded keyboard driver plugins. | QKbdDriverPlugin Abstract base for Qt/Embedded mouse driver plugins. | QMouseDriverPlugin -Abstract base for custom QSqlDriver plugins. | QSqlDriverPlugin +Abstract base for custom TQSqlDriver plugins. | TQSqlDriverPlugin Abstract base for custom QStyle plugins. | QStylePlugin Abstract base for custom QTextCodec plugins. | QTextCodecPlugin Abstract base for custom TQWidget plugins. | QWidgetPlugin @@ -15,7 +15,7 @@ Abstract base for custom image format plugins. | QImageFormatPlugin Abstract base for fixed-size grids. | QGridView Abstract class that provides an API to initalize and access a COM object. | QAxBase Abstract graphic object on a QCanvas. | QCanvasItem -Abstract interface for accessing data from SQL databases. | QSqlResult +Abstract interface for accessing data from SQL databases. | TQSqlResult Abstract item that a QLayout manipulates. | QLayoutItem Abstract user interface action that can appear both in menus and tool bars. | QAction Abstraction for date and edit editors. | QDateTimeEditBase @@ -47,8 +47,8 @@ Base class for implementing QTextEdit syntax highlighters. | QSyntaxHighlighter Basic functions for reading and writing text using a TQIODevice. | QTextStream Blank space in a layout. | QSpacerItem Bridge between application objects and script code. | QAxScriptManager -Browsing and editing of SQL tables and views. | QSqlCursor -Browsing of general SQL SELECT statements. | QSqlSelectCursor +Browsing and editing of SQL tables and views. | TQSqlCursor +Browsing of general SQL SELECT statements. | TQSqlSelectCursor Buffered TCP connection. | QSocket Bundles signals from identifiable senders. | QSignalMapper CDE look and feel. | QCDEStyle @@ -92,9 +92,9 @@ Creates QScreen objects for Qt/Embedded. | QGfxDriverFactory Creates QStyle objects. | QStyleFactory Creates QWSKeyboardHandler objects for Qt/Embedded. | QKbdDriverFactory Creates QWSMouseHandler objects for Qt/Embedded. | QMouseDriverFactory -Creates and manages data entry forms tied to SQL databases. | QSqlForm +Creates and manages data entry forms tied to SQL databases. | TQSqlForm Creates well-compressed PNG animations. | QPNGImagePacker -Data manipulation and navigation for data entry forms. | QDataBrowser +Data manipulation and navigation for data entry forms. | TQDataBrowser Date and time functions. | QDateTime Date editor. | QDateEdit Date functions. | QDate @@ -122,10 +122,10 @@ Drag and drop object for transferring plain and Unicode text. | QTextDrag Drag object for a list of URI references. | QUriDrag Ellipse or ellipse segment on a QCanvas. | QCanvasEllipse Encapsulates MIME-based data transfer. | QDragObject -Encapsulates a database record, i.e. a set of database fields. | QSqlRecord +Encapsulates a database record, i.e. a set of database fields. | TQSqlRecord Encapsulates a drag item. | QIconDragItem Encapsulates a key sequence as used by accelerators. | QKeySequence -Encapsulates a set of database field meta data. | QSqlRecordInfo +Encapsulates a set of database field meta data. | TQSqlRecordInfo Encapsulates an OpenGL rendering context. | QGLContext Encapsulates the common Look and Feel of a GUI. | QCommonStyle Encapsulation of a set of text styles. | QStyleSheetItem @@ -146,13 +146,13 @@ Extensible provider of mime-typed data. | QMimeSourceFactory Factory that makes QImageFormat objects. | QImageFormatType Feedback on the progress of a slow operation. | QProgressDialog File previewing in QFileDialog. | QFilePreview -Flexible SQL table widget that supports browsing and editing. | QDataTable +Flexible SQL table widget that supports browsing and editing. | TQDataTable Flexible editable table widget. | QTable Font metrics information. | QFontMetrics Font used for drawing text. | QFont For the dynamic creation of widgets from TQt Designer .ui files. | QWidgetFactory Framework for wizard dialogs. | QWizard -Functions to manipulate and describe QSqlCursor and QSqlDatabase indexes. | QSqlIndex +Functions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes. | TQSqlIndex General information about fonts. | QFontInfo Group box frame with a title. | QGroupBox Group of widget colors. | QColorGroup @@ -235,10 +235,10 @@ Maintains the list of widgets in the focus chain. | QFocusData Manages and lays out QDockWindows. | QDockArea Manages the GUI application's control flow and main settings. | QApplication Manages the event queue. | QEventLoop -Manipulates the fields in SQL database tables and views. | QSqlField +Manipulates the fields in SQL database tables and views. | TQSqlField Maps open-standard MIME to Mac flavors. | QMacMime Maps open-standard MIME to Window Clipboard formats. | QWindowsMime -Means of executing and manipulating SQL statements. | QSqlQuery +Means of executing and manipulating SQL statements. | TQSqlQuery Means of using TQt Assistant as an application's help tool. | QAssistantClient Means of using comboboxes in QTables. | QComboTableItem Meta information about TQt objects. | QMetaObject @@ -251,7 +251,7 @@ Mouse cursor with an arbitrary shape. | QCursor Mouse driver for Qt/Embedded. | QWSMouseHandler Movable panel containing widgets such as tool buttons. | QToolBar Multi-bezier splines on a QCanvas. | QCanvasSpline -Namespace for TQt SQL identifiers that need to be global-like. | QSql +Namespace for TQt SQL identifiers that need to be global-like. | TQSql Namespace for miscellaneous identifiers in the TQt OpenGL module. | QGL Namespace for miscellaneous identifiers that need to be global-like. | Qt Off-screen, pixel-based paint device. | QPixmap @@ -291,7 +291,7 @@ TQWidget that wraps an ActiveX control. | QAxWidget Quick-access button to commands or options, usually used inside a QToolBar. | QToolButton Radio button with a text or pixmap label. | QRadioButton Range checking of floating-point numbers. | QDoubleValidator -Read-only SQL forms. | QDataView +Read-only SQL forms. | TQDataView Rectangle on a QCanvas. | QCanvasRectangle Represents a generic string in the DOM. | QDomCharacterData Represents an XML CDATA section. | QDomCDATASection @@ -310,7 +310,7 @@ Rich text browser with hypertext navigation. | QTextBrowser Robust integer semaphore. | QSemaphore Rounded range control (like a speedometer or potentiometer). | QDial SGI/Irix look and feel. | QSGIStyle -SQL database error information. | QSqlError +SQL database error information. | TQSqlError Scrolling area with on-demand scroll bars. | QScrollView Serialization of binary data to a TQIODevice. | QDataStream Server-specific functionality in Qt/Embedded. | QWSServer @@ -333,7 +333,7 @@ State-based decoder. | QTextDecoder State-based encoder. | QTextEncoder Stores information about URLs. | QUrlInfo Stores meta data about a property. | QMetaProperty -Stores meta data associated with a SQL field. | QSqlFieldInfo +Stores meta data associated with a SQL field. | TQSqlFieldInfo Stream of data provided to a QNPInstance by the browser. | QNPStream String objects using constant Unicode data. | QConstString Support for custom events. | QCustomEvent @@ -389,11 +389,11 @@ Tree of QDomNodes which is not usually a complete QDomDocument. | QDomDocumentFr URL parser and simplifies working with URLs. | QUrl Used for installing custom colormaps into QGLWidgets. | QGLColormap Used to check a string against a regular expression. | QRegExpValidator -Used to create SQL database connections and to provide transaction handling. | QSqlDatabase -Used to create editor widgets for QVariant data types. | QEditorFactory +Used to create SQL database connections and to provide transaction handling. | TQSqlDatabase +Used to create editor widgets for QVariant data types. | TQEditorFactory Used to create pixmaps for a QIconSet. | QIconFactory -Used to create the editors used by QDataTable and QSqlForm. | QSqlEditorFactory -Used to map widgets to SQL fields. | QSqlPropertyMap +Used to create the editors used by TQDataTable and TQSqlForm. | TQSqlEditorFactory +Used to map widgets to SQL fields. | TQSqlPropertyMap Used to report errors with the QXmlErrorHandler interface. | QXmlParseException Used to start external programs and to communicate with them. | QProcess Validation of input text. | QValidator -- cgit v1.2.1