Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qabstractproxymodel_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QABSTRACTPROXYMODEL_P_H
5#define QABSTRACTPROXYMODEL_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of QAbstractItemModel*. This header file may change from version
13// to version without notice, or even be removed.
14//
15// We mean it.
16//
17//
18
19#include "qabstractproxymodel.h"
20#include "private/qabstractitemmodel_p.h"
21#include "private/qproperty_p.h"
22
24
26
28{
29 Q_DECLARE_PUBLIC(QAbstractProxyModel)
30public:
33 sourceHadZeroRows(false),
34 sourceHadZeroColumns(false),
35 updateVerticalHeader(false),
36 updateHorizontalHeader(false)
37 {}
39 {
40 q_func()->setSourceModel(sourceModel);
41 }
43 {
44 Q_EMIT q_func()->sourceModelChanged(QAbstractProxyModel::QPrivateSignal());
45 }
46 QAbstractItemModel *getModelForwarder() const { return q_func()->sourceModel(); }
47
52 virtual void _q_sourceModelDestroyed();
53 void _q_sourceModelRowsAboutToBeInserted(const QModelIndex &parent, int first, int last);
54 void _q_sourceModelRowsInserted(const QModelIndex &parent, int first, int last);
55 void _q_sourceModelRowsRemoved(const QModelIndex &parent, int first, int last);
56 void _q_sourceModelColumnsAboutToBeInserted(const QModelIndex &parent, int first, int last);
57 void _q_sourceModelColumnsInserted(const QModelIndex &parent, int first, int last);
58 void _q_sourceModelColumnsRemoved(const QModelIndex &parent, int first, int last);
59
60 void mapDropCoordinatesToSource(int row, int column, const QModelIndex &parent,
61 int *source_row, int *source_column, QModelIndex *source_parent) const;
62
63 void scheduleHeaderUpdate(Qt::Orientation orientation);
64 void emitHeaderDataChanged();
65
66 unsigned int sourceHadZeroRows : 1;
67 unsigned int sourceHadZeroColumns : 1;
68 unsigned int updateVerticalHeader : 1;
69 unsigned int updateHorizontalHeader : 1;
70};
71
73
74#endif // QABSTRACTPROXYMODEL_P_H
QAbstractItemModel * getModelForwarder() const
void setModelForwarder(QAbstractItemModel *sourceModel)
Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QAbstractProxyModelPrivate, QAbstractItemModel *, model, &QAbstractProxyModelPrivate::setModelForwarder, &QAbstractProxyModelPrivate::modelChangedForwarder, &QAbstractProxyModelPrivate::getModelForwarder, nullptr) virtual void _q_sourceModelDestroyed()
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting,...
\inmodule QtCore
Combined button and popup list for selecting options.
Definition qcompare.h:63
GLint first
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
#define QT_REQUIRE_CONFIG(feature)
#define Q_EMIT
QSqlQueryModel * model
[16]