diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-01-08 15:16:00 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-01-08 15:16:50 (GMT) |
commit | 158d63b56da7433ca627ad82635541c3c17c74e1 (patch) | |
tree | 6405224558026faffdcd7b2d88b41a7aff23dfdc /doc | |
parent | 319b0262418d74cc416a7dd1f620b54ba45bad22 (diff) | |
download | Qt-158d63b56da7433ca627ad82635541c3c17c74e1.zip Qt-158d63b56da7433ca627ad82635541c3c17c74e1.tar.gz Qt-158d63b56da7433ca627ad82635541c3c17c74e1.tar.bz2 |
Rename files in completer example since QDirModel is not used.
Doc updated for the example.
Reviewed-by:TrustMe
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/examples/completer.qdoc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc index d092027..8a743a7 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 |