Move proxy and selection models to QtCore.

Change-Id: I71097855cb9e28105238e496778f29f99f7fc84e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Stephen Kelly 2011-12-10 19:13:51 +01:00 committed by Qt by Nokia
parent 9bc4b56656
commit 211e434a05
36 changed files with 49 additions and 49 deletions

View File

@ -2,7 +2,19 @@
HEADERS += \
itemmodels/qabstractitemmodel.h \
itemmodels/qabstractitemmodel_p.h
itemmodels/qabstractitemmodel_p.h \
itemmodels/qabstractproxymodel.h \
itemmodels/qabstractproxymodel_p.h \
itemmodels/qitemselectionmodel.h \
itemmodels/qitemselectionmodel_p.h \
itemmodels/qidentityproxymodel.h \
itemmodels/qsortfilterproxymodel.h \
itemmodels/qstringlistmodel.h
SOURCES += \
itemmodels/qabstractitemmodel.cpp
itemmodels/qabstractitemmodel.cpp \
itemmodels/qabstractproxymodel.cpp \
itemmodels/qitemselectionmodel.cpp \
itemmodels/qidentityproxymodel.cpp \
itemmodels/qsortfilterproxymodel.cpp \
itemmodels/qstringlistmodel.cpp

View File

@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
\brief The QAbstractProxyModel class provides a base class for proxy item
models that can do sorting, filtering or other data processing tasks.
\ingroup model-view
\inmodule QtWidgets
\inmodule QtCore
This class defines the standard interface that proxy models must use to be
able to interoperate correctly with other model/view components. It is not

View File

@ -48,14 +48,14 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
QT_MODULE(Core)
#ifndef QT_NO_PROXYMODEL
class QAbstractProxyModelPrivate;
class QItemSelection;
class Q_WIDGETS_EXPORT QAbstractProxyModel : public QAbstractItemModel
class Q_CORE_EXPORT QAbstractProxyModel : public QAbstractItemModel
{
Q_OBJECT

View File

@ -60,7 +60,7 @@
QT_BEGIN_NAMESPACE
class QAbstractProxyModelPrivate : public QAbstractItemModelPrivate
class Q_CORE_EXPORT QAbstractProxyModelPrivate : public QAbstractItemModelPrivate
{
Q_DECLARE_PUBLIC(QAbstractProxyModel)
public:

View File

@ -90,7 +90,7 @@ class QIdentityProxyModelPrivate : public QAbstractProxyModelPrivate
\brief The QIdentityProxyModel class proxies its source model unmodified
\ingroup model-view
\inmodule QtWidgets
\inmodule QtCore
QIdentityProxyModel can be used to forward the structure of a source model exactly, with no sorting, filtering or other transformation.
This is similar in concept to an identity matrix where A.I = A.

View File

@ -43,7 +43,7 @@
#ifndef QIDENTITYPROXYMODEL_H
#define QIDENTITYPROXYMODEL_H
#include <QtWidgets/qabstractproxymodel.h>
#include <QtCore/qabstractproxymodel.h>
#ifndef QT_NO_IDENTITYPROXYMODEL
@ -51,11 +51,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
QT_MODULE(Core)
class QIdentityProxyModelPrivate;
class Q_WIDGETS_EXPORT QIdentityProxyModel : public QAbstractProxyModel
class Q_CORE_EXPORT QIdentityProxyModel : public QAbstractProxyModel
{
Q_OBJECT
public:

View File

@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
range of selected items in a model.
\ingroup model-view
\inmodule QtWidgets
\inmodule QtCore
A QItemSelectionRange contains information about a range of
selected items in a model. A range of items is a contiguous array
@ -331,7 +331,7 @@ QModelIndexList QItemSelectionRange::indexes() const
\brief The QItemSelection class manages information about selected items in a model.
\ingroup model-view
\inmodule QtWidgets
\inmodule QtCore
A QItemSelection describes the items in a model that have been
selected by the user. A QItemSelection is basically a list of
@ -921,7 +921,7 @@ void QItemSelectionModelPrivate::_q_layoutChanged()
\brief The QItemSelectionModel class keeps track of a view's selected items.
\ingroup model-view
\inmodule QtWidgets
\inmodule QtCore
A QItemSelectionModel keeps track of the selected items in a view, or
in several views onto the same model. It also keeps track of the

View File

@ -51,11 +51,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
QT_MODULE(Core)
#ifndef QT_NO_ITEMVIEWS
class Q_WIDGETS_EXPORT QItemSelectionRange
class Q_CORE_EXPORT QItemSelectionRange
{
public:
@ -148,7 +148,7 @@ inline QItemSelectionRange::QItemSelectionRange(const QModelIndex &atopLeft,
class QItemSelection;
class QItemSelectionModelPrivate;
class Q_WIDGETS_EXPORT QItemSelectionModel : public QObject
class Q_CORE_EXPORT QItemSelectionModel : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QItemSelectionModel)
@ -229,7 +229,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QItemSelectionModel::SelectionFlags)
// dummy implentation of qHash() necessary for instantiating QList<QItemSelectionRange>::toSet() with MSVC
inline uint qHash(const QItemSelectionRange &) { return 0; }
class Q_WIDGETS_EXPORT QItemSelection : public QList<QItemSelectionRange>
class Q_CORE_EXPORT QItemSelection : public QList<QItemSelectionRange>
{
public:
QItemSelection() {}
@ -244,7 +244,7 @@ public:
};
#ifndef QT_NO_DEBUG_STREAM
Q_WIDGETS_EXPORT QDebug operator<<(QDebug, const QItemSelectionRange &);
Q_CORE_EXPORT QDebug operator<<(QDebug, const QItemSelectionRange &);
#endif
#endif // QT_NO_ITEMVIEWS

View File

@ -1496,7 +1496,7 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved(
filtering data passed between another model and a view.
\ingroup model-view
\inmodule QtWidgets
\inmodule QtCore
QSortFilterProxyModel can be used for sorting items, filtering out items,
or both. The model transforms the structure of a source model by mapping

View File

@ -42,7 +42,7 @@
#ifndef QSORTFILTERPROXYMODEL_H
#define QSORTFILTERPROXYMODEL_H
#include <QtWidgets/qabstractproxymodel.h>
#include <QtCore/qabstractproxymodel.h>
#ifndef QT_NO_SORTFILTERPROXYMODEL
@ -52,13 +52,13 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
QT_MODULE(Core)
class QSortFilterProxyModelPrivate;
class QSortFilterProxyModelLessThan;
class QSortFilterProxyModelGreaterThan;
class Q_WIDGETS_EXPORT QSortFilterProxyModel : public QAbstractProxyModel
class Q_CORE_EXPORT QSortFilterProxyModel : public QAbstractProxyModel
{
friend class QSortFilterProxyModelLessThan;
friend class QSortFilterProxyModelGreaterThan;

View File

@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
\brief The QStringListModel class provides a model that supplies strings to views.
\ingroup model-view
\inmodule QtWidgets
\inmodule QtCore
QStringListModel is an editable model that can be used for simple
cases where you need to display a number of strings in a view

View File

@ -49,11 +49,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
QT_MODULE(Core)
#ifndef QT_NO_STRINGLISTMODEL
class Q_WIDGETS_EXPORT QStringListModel : public QAbstractListModel
class Q_CORE_EXPORT QStringListModel : public QAbstractListModel
{
Q_OBJECT
public:

View File

@ -4,7 +4,6 @@ HEADERS += \
itemviews/qabstractitemview.h \
itemviews/qabstractitemview_p.h \
itemviews/qheaderview.h \
itemviews/qidentityproxymodel.h \
itemviews/qlistview.h \
itemviews/qlistview_p.h \
itemviews/qbsptree_p.h \
@ -14,8 +13,6 @@ HEADERS += \
itemviews/qtreeview_p.h \
itemviews/qabstractitemdelegate.h \
itemviews/qitemdelegate.h \
itemviews/qitemselectionmodel.h \
itemviews/qitemselectionmodel_p.h \
itemviews/qdirmodel.h \
itemviews/qlistwidget.h \
itemviews/qlistwidget_p.h \
@ -26,14 +23,10 @@ HEADERS += \
itemviews/qwidgetitemdata_p.h \
itemviews/qproxymodel.h \
itemviews/qproxymodel_p.h \
itemviews/qabstractproxymodel.h \
itemviews/qabstractproxymodel_p.h \
itemviews/qsortfilterproxymodel.h \
itemviews/qitemeditorfactory.h \
itemviews/qitemeditorfactory_p.h \
itemviews/qstandarditemmodel.h \
itemviews/qstandarditemmodel_p.h \
itemviews/qstringlistmodel.h \
itemviews/qtreewidgetitemiterator.h \
itemviews/qdatawidgetmapper.h \
itemviews/qfileiconprovider.h \
@ -45,24 +38,19 @@ HEADERS += \
SOURCES += \
itemviews/qabstractitemview.cpp \
itemviews/qheaderview.cpp \
itemviews/qidentityproxymodel.cpp \
itemviews/qlistview.cpp \
itemviews/qbsptree.cpp \
itemviews/qtableview.cpp \
itemviews/qtreeview.cpp \
itemviews/qabstractitemdelegate.cpp \
itemviews/qitemdelegate.cpp \
itemviews/qitemselectionmodel.cpp \
itemviews/qdirmodel.cpp \
itemviews/qlistwidget.cpp \
itemviews/qtablewidget.cpp \
itemviews/qtreewidget.cpp \
itemviews/qproxymodel.cpp \
itemviews/qabstractproxymodel.cpp \
itemviews/qsortfilterproxymodel.cpp \
itemviews/qitemeditorfactory.cpp \
itemviews/qstandarditemmodel.cpp \
itemviews/qstringlistmodel.cpp \
itemviews/qtreewidgetitemiterator.cpp \
itemviews/qdatawidgetmapper.cpp \
itemviews/qfileiconprovider.cpp \

View File

@ -44,7 +44,7 @@
#include <QtWidgets/qabstractscrollarea.h>
#include <QtCore/qabstractitemmodel.h>
#include <QtWidgets/qitemselectionmodel.h>
#include <QtCore/qitemselectionmodel.h>
#include <QtWidgets/qabstractitemdelegate.h>
QT_BEGIN_HEADER

View File

@ -45,7 +45,7 @@
#include <QtWidgets/qlistview.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvector.h>
#include <QtWidgets/qitemselectionmodel.h>
#include <QtCore/qitemselectionmodel.h>
QT_BEGIN_HEADER

View File

@ -147,7 +147,7 @@
#ifndef QT_NO_COMPLETER
#include "QtWidgets/qscrollbar.h"
#include "QtWidgets/qstringlistmodel.h"
#include "QtCore/qstringlistmodel.h"
#include "QtWidgets/qdirmodel.h"
#include "QtWidgets/qfilesystemmodel.h"
#include "QtWidgets/qheaderview.h"

View File

@ -59,7 +59,7 @@
#ifndef QT_NO_COMPLETER
#include "QtWidgets/qtreeview.h"
#include "QtWidgets/qabstractproxymodel.h"
#include "QtCore/qabstractproxymodel.h"
#include "qcompleter.h"
#include "QtWidgets/qitemdelegate.h"
#include "QtGui/qpainter.h"

View File

@ -1,5 +1,10 @@
TEMPLATE=subdirs
SUBDIRS = qabstractitemmodel
SUBDIRS = qabstractitemmodel \
qabstractproxymodel \
qidentityproxymodel \
qitemselectionmodel \
qsortfilterproxymodel \
qstringlistmodel
mac: qabstractitemmodel.CONFIG = no_check_target # QTBUG-22748

View File

@ -42,8 +42,8 @@
#include <QtTest/QtTest>
#include <QtCore/QtCore>
#include <QtWidgets/QSortFilterProxyModel>
#include <QtWidgets/QStringListModel>
#include <QtCore/QSortFilterProxyModel>
#include <QtCore/QStringListModel>
#include "dynamictreemodel.h"

View File

@ -1,23 +1,18 @@
TEMPLATE=subdirs
SUBDIRS=\
qabstractitemview \
qabstractproxymodel \
qcolumnview \
qdatawidgetmapper \
qdirmodel \
qfileiconprovider \
qheaderview \
qidentityproxymodel \
qitemdelegate \
qitemeditorfactory \
qitemselectionmodel \
qitemview \
qlistview \
qlistwidget \
qsortfilterproxymodel \
qstandarditem \
qstandarditemmodel \
qstringlistmodel \
qtableview \
qtablewidget \
qtreeview \