summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qabstractitemmodel.h
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-07-09 09:56:56 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-13 01:51:44 +0200
commit536ec793b69c16611e73cff4360c6f49b644f740 (patch)
treebe2a36264a4cb22a131944e10918bdc089ae24e2 /src/corelib/itemmodels/qabstractitemmodel.h
parent0efa445141ce3d7243f28e7b6da730d8dec17e23 (diff)
Make it possible to use new syntax to connect to model signals.
The private signals can not be used as function pointers, as required by the new syntax, so we introduce a parameter which can only be created privately. Change-Id: I3d7bb8a163e764d685e8007cba831fb77e3c6855 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/itemmodels/qabstractitemmodel.h')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h86
1 files changed, 69 insertions, 17 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index 41e733919a..66af606dac 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -249,30 +249,82 @@ Q_SIGNALS:
void layoutChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>());
void layoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>());
-#if !defined(Q_MOC_RUN) && !defined(qdoc)
-private: // can only be emitted by QAbstractItemModel
+ void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last
+#if !defined(qdoc)
+ , QPrivateSignal
#endif
- void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last);
- void rowsInserted(const QModelIndex &parent, int first, int last);
-
- void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
- void rowsRemoved(const QModelIndex &parent, int first, int last);
+ );
+ void rowsInserted(const QModelIndex &parent, int first, int last
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
- void columnsAboutToBeInserted(const QModelIndex &parent, int first, int last);
- void columnsInserted(const QModelIndex &parent, int first, int last);
+ void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
+ void rowsRemoved(const QModelIndex &parent, int first, int last
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
- void columnsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
- void columnsRemoved(const QModelIndex &parent, int first, int last);
+ void columnsAboutToBeInserted(const QModelIndex &parent, int first, int last
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
+ void columnsInserted(const QModelIndex &parent, int first, int last
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
- void modelAboutToBeReset();
- void modelReset();
+ void columnsAboutToBeRemoved(const QModelIndex &parent, int first, int last
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
+ void columnsRemoved(const QModelIndex &parent, int first, int last
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
- void rowsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow );
- void rowsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row );
+ void modelAboutToBeReset(
+#if !defined(qdoc)
+ QPrivateSignal
+#endif
+ );
+ void modelReset(
+#if !defined(qdoc)
+ QPrivateSignal
+#endif
+ );
- void columnsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn );
- void columnsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column );
+ void rowsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
+ void rowsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
+ void columnsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
+ void columnsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column
+#if !defined(qdoc)
+ , QPrivateSignal
+#endif
+ );
public Q_SLOTS:
virtual bool submit();