diff options
Diffstat (limited to 'examples/sql/doc')
-rw-r--r-- | examples/sql/doc/images/books-demo.png | bin | 14782 -> 13975 bytes | |||
-rw-r--r-- | examples/sql/doc/images/drilldown-example.png | bin | 6612 -> 10335 bytes | |||
-rw-r--r-- | examples/sql/doc/src/books.qdoc | 1 | ||||
-rw-r--r-- | examples/sql/doc/src/cachedtable.qdoc | 7 | ||||
-rw-r--r-- | examples/sql/doc/src/drilldown.qdoc | 11 | ||||
-rw-r--r-- | examples/sql/doc/src/masterdetail.qdoc | 1 | ||||
-rw-r--r-- | examples/sql/doc/src/querymodel.qdoc | 1 | ||||
-rw-r--r-- | examples/sql/doc/src/relationaltablemodel.qdoc | 1 | ||||
-rw-r--r-- | examples/sql/doc/src/sqlbrowser.qdoc | 1 | ||||
-rw-r--r-- | examples/sql/doc/src/sqlwidgetmapper.qdoc | 12 | ||||
-rw-r--r-- | examples/sql/doc/src/tablemodel.qdoc | 1 |
11 files changed, 20 insertions, 16 deletions
diff --git a/examples/sql/doc/images/books-demo.png b/examples/sql/doc/images/books-demo.png Binary files differindex 77b3b308c9..29f5c84473 100644 --- a/examples/sql/doc/images/books-demo.png +++ b/examples/sql/doc/images/books-demo.png diff --git a/examples/sql/doc/images/drilldown-example.png b/examples/sql/doc/images/drilldown-example.png Binary files differindex 39a4117637..b6cf443e7c 100644 --- a/examples/sql/doc/images/drilldown-example.png +++ b/examples/sql/doc/images/drilldown-example.png diff --git a/examples/sql/doc/src/books.qdoc b/examples/sql/doc/src/books.qdoc index c08d2f975a..b4ca8bdd2e 100644 --- a/examples/sql/doc/src/books.qdoc +++ b/examples/sql/doc/src/books.qdoc @@ -5,6 +5,7 @@ \example books \title Books \ingroup sql_examples + \examplecategory {Data Processing & I/O} \brief Shows how to use Qt SQL classes with a model/view framework. The Books example shows how Qt's SQL classes can be used with the model/view diff --git a/examples/sql/doc/src/cachedtable.qdoc b/examples/sql/doc/src/cachedtable.qdoc index ff04fb114a..ff60f7b1b7 100644 --- a/examples/sql/doc/src/cachedtable.qdoc +++ b/examples/sql/doc/src/cachedtable.qdoc @@ -3,8 +3,9 @@ /*! \example cachedtable - \title Cached Table Example + \title Cached SQL Table \ingroup sql_examples + \examplecategory {Data Processing & I/O} \brief The Cached Table example shows how a table view can be used to access a database, caching any changes to the data until the user explicitly submits them using a @@ -14,7 +15,7 @@ The example consists of a single class, \c TableEditor, which is a custom dialog widget that allows the user to modify data stored in - a database. We will first review the class definiton and how to + a database. We will first review the class definition and how to use the class, then we will take a look at the implementation. \section1 TableEditor Class Definition @@ -40,7 +41,7 @@ We are also going to show how a table view can be used to cache any changes to the data until the user explicitly requests to submit them. For that reason we need to declare a \c submit() slot - in additon to the model and the editor's buttons. + in addition to the model and the editor's buttons. \table 100% \header \li Connecting to a Database diff --git a/examples/sql/doc/src/drilldown.qdoc b/examples/sql/doc/src/drilldown.qdoc index d7f7bdc858..d334018b4a 100644 --- a/examples/sql/doc/src/drilldown.qdoc +++ b/examples/sql/doc/src/drilldown.qdoc @@ -5,6 +5,7 @@ \example drilldown \title Drill Down Example \ingroup sql_examples + \examplecategory {Data Processing & I/O} \brief The Drill Down example shows how to read data from a database as well as submit changes, using the QSqlRelationalTableModel and @@ -45,8 +46,8 @@ \snippet drilldown/informationwindow.h 0 When we create an information window, we pass the associated - item ID, a parent, and a pointer to the database, to the - constructor. We will use the database pointer to populate our + item ID, a pointer to the model, and a parent to the + constructor. We will use the model pointer to populate our window with data, while passing the parent parameter on to the base class. The ID is stored for future reference. @@ -153,10 +154,6 @@ We need to use lambdas for connecting the \c enableButtons slot because its signature does not match \c QTextEdit::textChanged and \c QComboBox::currentIndexChanged. - Since the latter has another overload with the signature - \c {const QString &} and the selected signal would be ambiguous, - we need to use \c QOverload<int>::of to select a specific overload - for \c currentIndexChanged. We add all the widgets into a layout, store the item ID and the name of the displayed image file for future reference, and set @@ -283,7 +280,7 @@ The \c findWindow() function, on the other hand, is frequently used. It is called from the \c showInformation() function to - detemine whether a window is already created for the given + determine whether a window is already created for the given item (whenever we create an \c InformationWindow object, we store a reference to it in the \c informationWindows list). The latter function is in turn called from our custom \c diff --git a/examples/sql/doc/src/masterdetail.qdoc b/examples/sql/doc/src/masterdetail.qdoc index 9fcf50870b..fec579a6a0 100644 --- a/examples/sql/doc/src/masterdetail.qdoc +++ b/examples/sql/doc/src/masterdetail.qdoc @@ -5,6 +5,7 @@ \example masterdetail \title Master Detail Example \ingroup sql_examples + \examplecategory {Data Processing & I/O} \brief The Master Detail Example shows how to present data from different data sources in the same application. The album titles, and the diff --git a/examples/sql/doc/src/querymodel.qdoc b/examples/sql/doc/src/querymodel.qdoc index 38f7acab5c..c9fa4cec96 100644 --- a/examples/sql/doc/src/querymodel.qdoc +++ b/examples/sql/doc/src/querymodel.qdoc @@ -5,6 +5,7 @@ \example querymodel \title Query Model Example \ingroup sql_examples + \examplecategory {Data Processing & I/O} \brief The Query Model example shows how to make customized versions of data obtained from a SQL query, using a model that encapsulates diff --git a/examples/sql/doc/src/relationaltablemodel.qdoc b/examples/sql/doc/src/relationaltablemodel.qdoc index cf95cb4aad..371fef8133 100644 --- a/examples/sql/doc/src/relationaltablemodel.qdoc +++ b/examples/sql/doc/src/relationaltablemodel.qdoc @@ -5,6 +5,7 @@ \example relationaltablemodel \title Relational Table Model Example \ingroup sql_examples + \examplecategory {Data Processing & I/O} \brief The Relational Table Model example shows how to use table views with a relational model to visualize the relations between items in a database. diff --git a/examples/sql/doc/src/sqlbrowser.qdoc b/examples/sql/doc/src/sqlbrowser.qdoc index 0cabea09aa..ad783f5760 100644 --- a/examples/sql/doc/src/sqlbrowser.qdoc +++ b/examples/sql/doc/src/sqlbrowser.qdoc @@ -5,6 +5,7 @@ \example sqlbrowser \title SQL Browser \ingroup sql_examples + \examplecategory {Data Processing & I/O} \brief The SQL Browser example shows how a data browser can be used to visualize the results of SQL statements on a live database. diff --git a/examples/sql/doc/src/sqlwidgetmapper.qdoc b/examples/sql/doc/src/sqlwidgetmapper.qdoc index 2e921f479c..0764e601c3 100644 --- a/examples/sql/doc/src/sqlwidgetmapper.qdoc +++ b/examples/sql/doc/src/sqlwidgetmapper.qdoc @@ -5,6 +5,7 @@ \example sqlwidgetmapper \title SQL Widget Mapper Example \ingroup sql_examples + \examplecategory {Data Processing & I/O} \brief The SQL Widget Mapper example shows how to use a map information from a database to widgets on a form. @@ -101,8 +102,7 @@ As a result, the user is able to select an item from the combo box, and the associated value is written back to the model. - The rest of the constructor is very similar to that of the - \l{Simple Widget Mapper Example}: + The rest of the constructor sets up connections and layouts: \snippet sqlwidgetmapper/window.cpp Set up connections and layouts @@ -115,7 +115,7 @@ \section1 Delegate Class Definition and Implementation The delegate we use to mediate interaction between the widget mapper and - the input widgets is a small QItemDelegate subclass: + the input widgets is a small QStyledItemDelegate subclass: \snippet sqlwidgetmapper/delegate.h Delegate class definition @@ -126,7 +126,7 @@ Since we only provide an empty implementation of the constructor, we concentrate on the other two functions. - The \l{QItemDelegate::}{setEditorData()} implementation takes the data + The \l{QStyledItemDelegate::}{setEditorData()} implementation takes the data referred to by the model index supplied and processes it according to the presence of a \c currentIndex property in the editor widget: @@ -138,10 +138,10 @@ values needed for the \c currentIndex property. As a result, instead of showing "0", "1" or "2" in the combo box, one of - its predefined set of items is shown. We call QItemDelegate::setEditorData() + its predefined set of items is shown. We call QStyledItemDelegate::setEditorData() for widgets without the \c currentIndex property. - The \l{QItemDelegate::}{setModelData()} implementation performs the reverse + The \l{QStyledItemDelegate::}{setModelData()} implementation performs the reverse process, taking the value stored in the widget's \c currentIndex property and storing it back in the model: diff --git a/examples/sql/doc/src/tablemodel.qdoc b/examples/sql/doc/src/tablemodel.qdoc index 420c3cd943..1542d121aa 100644 --- a/examples/sql/doc/src/tablemodel.qdoc +++ b/examples/sql/doc/src/tablemodel.qdoc @@ -5,6 +5,7 @@ \example tablemodel \title Table Model Example \ingroup sql_examples + \examplecategory {Data Processing & I/O} \brief The Table Model example shows how to use a specialized SQL table model with table views to edit information in a database. |