summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/src/frameworks-technologies/model-view-programming.qdoc7
-rw-r--r--doc/src/platforms/platform-notes.qdoc34
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp35
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qidentityproxymodel.cpp64
4 files changed, 80 insertions, 60 deletions
diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc
index 58b51e5..2345990 100644
--- a/doc/src/frameworks-technologies/model-view-programming.qdoc
+++ b/doc/src/frameworks-technologies/model-view-programming.qdoc
@@ -1934,6 +1934,13 @@
\l{QSortFilterProxyModel::lessThan()}{lessThan()} function to perform custom
comparisons.
+ \section3 Custom data models
+
+ QIdentityProxyModel instances do not sort or filter the structure of the source model,
+ but provide a base class for creating a data proxy. This could be useful on top of a
+ QFileSystemModel for example to provide different colours for the BackgroundRole for
+ different types of files.
+
\section1 Model subclassing reference
Model subclasses need to provide implementations of many of the virtual functions
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 113ad86..24b297f 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -630,7 +630,7 @@
we need to do special bookkeeping in Qt to handle this correctly, which
unfortunately make mixing in native panels hard. The best way at the moment
to do this, is to follow the pattern below, where we post the call to the
- function with native code rather than calling it directly. Then we now that
+ function with native code rather than calling it directly. Then we know that
Qt has cleanly updated any pending event loop recursions before the native
panel is shown:
@@ -708,28 +708,8 @@
\section1 Supported Devices
- Qt is designed to work on any device which runs one of the following
- versions of Symbian:
-
- \table
- \header \o Symbian Version
- \row \o S60 3.1
- \row \o S60 3.2
- \row \o S60 5.0 (Symbian ^1)
- \endtable
-
- Qt has received \l{Tier 1 Platforms}{Tier 1} testing on the following phone models:
-
- \table
- \header \o Phone
- \row \o Nokia 5800
- \row \o Nokia E71
- \row \o Nokia E72
- \row \o Nokia N78
- \row \o Nokia N95
- \row \o Nokia N97
- \row \o Samsung i8910
- \endtable
+ See the list of supported devices at
+ http://wiki.forum.nokia.com/index.php/Nokia_Smart_Installer_for_Symbian#Supported_Devices
\section1 Supported Functionality
@@ -742,8 +722,6 @@
\o Planned for future release.
\row \o QtDBus
\o No current plans to support this feature.
- \row \o QtOpenGL ES
- \o Planned for future release.
\row \o Printing support
\o No current plans to support this feature.
\row \o Qt3Support
@@ -837,6 +815,12 @@
plugin. If the Helix plugin fails to load, the MMF plugin, if present on
the device, will be loaded instead.
+ \section1 QtOpenGL Support
+
+ Qt 4.7 introduces the QtOpenGL module to Symbian^3. QtOpenGL is supported on
+ devices which support OpenGL ES 2.0. Symbian platforms prior to Symbian^3
+ are not supported.
+
\section1 UI Performance in devices prior to Symbian^3
Qt uses the QPainter class to perform low-level painting on widgets and
diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
index cf40f9a..5919c01 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
@@ -86,38 +86,3 @@ beginMoveRows(parent, 2, 2, parent, 0);
//! [9]
beginMoveRows(parent, 2, 2, parent, 4);
//! [9]
-
-
-//! [10]
-class CustomDataProxy : public QSortFilterProxyModel
-{
- Q_OBJECT
-public:
- CustomDataProxy(QObject *parent)
- : QSortFilterProxyModel(parent)
- {
- }
-
- ...
-
- QVariant data(const QModelIndex &index, int role)
- {
- if (role != Qt::BackgroundRole)
- return QSortFilterProxyModel::data(index, role);
-
- if (m_customData.contains(index.row()))
- return m_customData.value(index.row());
- return QSortFilterProxyModel::data(index, role);
- }
-
-private slots:
- void resetInternalData()
- {
- m_customData.clear();
- }
-
-private:
- QHash<int, QVariant> m_customData;
-};
-//! [10]
-
diff --git a/doc/src/snippets/code/src_gui_itemviews_qidentityproxymodel.cpp b/doc/src/snippets/code/src_gui_itemviews_qidentityproxymodel.cpp
new file mode 100644
index 0000000..6bf6c89
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_itemviews_qidentityproxymodel.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+class DateFormatProxyModel : public QIdentityProxyModel
+{
+ // ...
+
+ void setDateFormatString(const QString &formatString)
+ {
+ m_formatString = formatString;
+ }
+
+ QVariant data(const QModelIndex &index, int role)
+ {
+ if (role != Qt::DisplayRole)
+ return QIdentityProxyModel::data(index, role);
+
+ const QDateTime dateTime = sourceModel()->data(SourceClass::DateRole).toDateTime();
+
+ return dateTime.toString(m_formatString);
+ }
+
+private:
+ QString m_formatString;
+};
+//! [0]