summaryrefslogtreecommitdiffstats
path: root/examples/itemmodel/doc/src/itemmodel.qdoc
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2013-11-26 14:53:50 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2013-11-27 11:29:30 +0200
commit7c942cc0f497fe7e61ce6a10fce45771c0858e09 (patch)
treeaab5d2285b8e583f3565e305e0818a49503cf95c /examples/itemmodel/doc/src/itemmodel.qdoc
parente029d0ea1d486dd3dbbfa4519a2125da202f22e4 (diff)
Integrated item model mappings to item model proxies
Separate mapping object was redundant. Task-number: QTRD-2564 Change-Id: I6b1a23ba52dbb184f46df0fdd64184eeb145c0c3 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'examples/itemmodel/doc/src/itemmodel.qdoc')
-rw-r--r--examples/itemmodel/doc/src/itemmodel.qdoc19
1 files changed, 8 insertions, 11 deletions
diff --git a/examples/itemmodel/doc/src/itemmodel.qdoc b/examples/itemmodel/doc/src/itemmodel.qdoc
index 6c192f6f..14cc2637 100644
--- a/examples/itemmodel/doc/src/itemmodel.qdoc
+++ b/examples/itemmodel/doc/src/itemmodel.qdoc
@@ -27,7 +27,7 @@
\list
\li How to create an application with Q3DBars and widgets
- \li How to use QItemModelBarDataMapping and QItemModelBarDataProxy to set data to the graph
+ \li How to use QItemModelBarDataProxy to set data to the graph
\li How to use a table widget to modify the data in the graph
\endlist
@@ -52,15 +52,13 @@
The table widget is going to be used to display the numerical data being inserted into the
graph, and to modify it (See \l {Adding data to the graph} and \l {Interacting with the data}).
- We need to instantiate QItemModelBarDataMapping and QItemModelBarDataProxy and give them to the
- graph:
+ We need to instantiate QItemModelBarDataProxy and give it to the graph:
\snippet ../examples/itemmodel/main.cpp 2
- Here we tell the mapping object to directly map the model's rows and columns into the proxy's rows and
+ Here we tell the proxy to directly map the model's rows and columns into the proxy's rows and
columns instead of defining row and column roles to map for them. Then we give the model from
- the table widget and the mapping object to the proxy. Finally we set the proxy as the active
- data proxy for the graph.
+ the table widget to the proxy. Finally we set the proxy to a series and add it to the graph.
Next, let's create another class to handle the data addition and other interaction with the
graph. Let's call it GraphDataGenerator (See \l {Setting up the graph} and
@@ -149,11 +147,10 @@
\snippet ../examples/itemmodel/main.cpp 2
- We created QItemModelBarDataMapping and QItemModelBarDataProxy instances, and gave the proxy
- the model of the table widget and the model mapping we just created. Then we set the proxy as
- the active proxy for the graph. The proxy maps the rows and the columns in the model of the table
- widget into rows and columns for itself using the model mapping, and the graph gets the data
- to be displayed from its active proxy.
+ We created QItemModelBarDataProxy instance, and gave the proxy the model of the table widget
+ we just created. The proxy maps the rows and the columns in the model of the table widget into
+ rows and columns for itself directly, as we set the useModelCategories property to true, and
+ the graph gets the data to be displayed via the series that owns the proxy.
\section1 Interacting with the data