Branch data Line data Source code
1 : : // Copyright (C) 2021 The Qt Company Ltd.
2 : : // Copyright (C) 2019 Luxoft Sweden AB
3 : : // Copyright (C) 2018 Pelagicore AG
4 : : // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
5 : :
6 : : #ifndef QIFPAGINGMODEL_P_H
7 : : #define QIFPAGINGMODEL_P_H
8 : :
9 : : //
10 : : // W A R N I N G
11 : : // -------------
12 : : //
13 : : // This file is not part of the Qt API. It exists purely as an
14 : : // implementation detail. This header file may change from version to
15 : : // version without notice, or even be removed.
16 : : //
17 : : // We mean it.
18 : : //
19 : :
20 : : #include <QtInterfaceFramework/private/qifabstractfeaturelistmodel_p.h>
21 : : #include <private/qtifglobal_p.h>
22 : :
23 : : #include "qifpagingmodel.h"
24 : : #include "qifpagingmodelinterface.h"
25 : : #include "qifstandarditem.h"
26 : :
27 : : #include <QtCore/QBitArray>
28 : : #include <QtCore/QUuid>
29 : :
30 : : QT_BEGIN_NAMESPACE
31 : :
32 : : class Q_QTINTERFACEFRAMEWORK_EXPORT QIfPagingModelPrivate : public QIfAbstractFeatureListModelPrivate
33 : : {
34 : : public:
35 : : QIfPagingModelPrivate(const QString &interface, QIfPagingModel *model);
36 : : ~QIfPagingModelPrivate() override;
37 : :
38 : : void initialize() override;
39 : : void onInitializationDone();
40 : : void onCapabilitiesChanged(QUuid identifier, QtInterfaceFrameworkModule::ModelCapabilities capabilities);
41 : : void onDataFetched(QUuid identifier, const QList<QVariant> &items, int start, bool moreAvailable);
42 : : void onCountChanged(QUuid identifier, int new_length);
43 : : void onDataChanged(QUuid identifier, const QList<QVariant> &data, int start, int count);
44 : : void onFetchMoreThresholdReached();
45 : : virtual void resetModel();
46 : : virtual void clearToDefaults();
47 : : const QIfStandardItem *itemAt(int i) const;
48 : : void fetchData(int startIndex);
49 : :
50 : : QIfPagingModelInterface *backend() const;
51 : :
52 : : QIfPagingModel * const q_ptr;
53 [ + + + + ]: 905 : Q_DECLARE_PUBLIC(QIfPagingModel)
54 : :
55 : : QtInterfaceFrameworkModule::ModelCapabilities m_capabilities;
56 : : int m_chunkSize;
57 : :
58 : : QList<QVariant> m_itemList;
59 : : QBitArray m_availableChunks;
60 : : bool m_moreAvailable;
61 : :
62 : : QUuid m_identifier;
63 : : int m_fetchMoreThreshold;
64 : : int m_fetchedDataCount;
65 : : QIfPagingModel::LoadingType m_loadingType;
66 : : };
67 : :
68 : : QT_END_NAMESPACE
69 : :
70 : : #endif // QIFPAGINGMODEL_P_H
|