summaryrefslogtreecommitdiffstats
path: root/doc/src/examples/completer.qdoc
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-03-30 14:56:41 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-03-30 14:56:41 (GMT)
commit87f66d52e362de003a9f2cdaafbfbe3ba4e5fbc3 (patch)
treef8b8c24056d54e19937dea1b0301af558597726a /doc/src/examples/completer.qdoc
parent09ce407aaa4a00013a606bf0011faf6cbc654c72 (diff)
parent00f7426f3906361fb5addb36e428648eee5e2983 (diff)
downloadQt-87f66d52e362de003a9f2cdaafbfbe3ba4e5fbc3.zip
Qt-87f66d52e362de003a9f2cdaafbfbe3ba4e5fbc3.tar.gz
Qt-87f66d52e362de003a9f2cdaafbfbe3ba4e5fbc3.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Conflicts: doc/src/modules.qdoc mkspecs/common/symbian/symbian.conf src/gui/graphicsview/qgraphicswidget.h src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'doc/src/examples/completer.qdoc')
-rw-r--r--doc/src/examples/completer.qdoc30
1 files changed, 15 insertions, 15 deletions
diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc
index b69ea69..c0eb947 100644
--- a/doc/src/examples/completer.qdoc
+++ b/doc/src/examples/completer.qdoc
@@ -48,7 +48,7 @@
\image completer-example.png
- This example uses a custom item model, \c DirModel, and a QCompleter object.
+ This example uses a custom item model, \c FileSystemModel, and a QCompleter object.
QCompleter is a class that provides completions based on an item model. The
type of model, the completion mode, and the case sensitivity can be
selected using combo boxes.
@@ -61,32 +61,32 @@
\quotefile examples/tools/completer/completer.qrc
- \section1 DirModel Class Definition
+ \section1 FileSystemModel Class Definition
- The \c DirModel class is a subclass of QDirModel, which provides a data
+ The \c FileSystemModel class is a subclass of QFileSystemModel, which provides a data
model for the local filesystem.
- \snippet examples/tools/completer/dirmodel.h 0
+ \snippet examples/tools/completer/fsmodel.h 0
This class only has a constructor and a \c data() function as it is only
created to enable \c data() to return the entire file path for the
- display role, unlike \l{QDirModel}'s \c data() function that only returns
+ display role, unlike \l{QFileSystemModel}'s \c data() function that only returns
the folder and not the drive label. This is further explained in
- \c DirModel's implementation.
+ \c FileSystemModel's implementation.
- \section1 DirModel Class Implementation
+ \section1 FileSystemModel Class Implementation
- The constructor for the \c DirModel class is used to pass \a parent to
- QDirModel.
+ The constructor for the \c FileSystemModel class is used to pass \a parent to
+ QFileSystemModel.
- \snippet examples/tools/completer/dirmodel.cpp 0
+ \snippet examples/tools/completer/fsmodel.cpp 0
As mentioned earlier, the \c data() function is reimplemented in order to
get it to return the entire file parth for the display role. For example,
- with a QDirModel, you will see "Program Files" in the view. However, with
- \c DirModel, you will see "C:\\Program Files".
+ with a QFileSystemModel, you will see "Program Files" in the view. However, with
+ \c FileSystemModel, you will see "C:\\Program Files".
- \snippet examples/tools/completer/dirmodel.cpp 1
+ \snippet examples/tools/completer/fsmodel.cpp 1
The screenshots below illustrate this difference:
@@ -120,7 +120,7 @@
is then invoked.
We set up three QComboBox objects, \c modelComb, \c modeCombo and
- \c caseCombo. By default, the \c modelCombo is set to QDirModel,
+ \c caseCombo. By default, the \c modelCombo is set to QFileSystemModel,
the \c modeCombo is set to "Filtered Popup" and the \c caseCombo is set
to "Case Insensitive".
@@ -202,7 +202,7 @@
model selected by the user.
A \c switch statement is used to change the item model based on the index
- of \c modelCombo. If \c case is 0, we use an unsorted QDirModel, providing
+ of \c modelCombo. If \c case is 0, we use an unsorted QFileSystemModel, providing
us with a file path excluding the drive label.
\snippet examples/tools/completer/mainwindow.cpp 11