1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the QtGraphs API. It exists purely as an
9// implementation detail. This header file may change from version to
10// version without notice, or even be removed.
11//
12// We mean it.
13
14#ifndef BARITEMMODELHANDLER_P_H
15#define BARITEMMODELHANDLER_P_H
16
17#include "abstractitemmodelhandler_p.h"
18#include "qitemmodelbardataproxy_p.h"
19
20QT_BEGIN_NAMESPACE
21
22class BarItemModelHandler : public AbstractItemModelHandler
23{
24 Q_OBJECT
25public:
26 BarItemModelHandler(QItemModelBarDataProxy *proxy, QObject *parent = 0);
27 virtual ~BarItemModelHandler();
28
29public Q_SLOTS:
30 void handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
31 const QList<int> &roles = QList<int>()) override;
32
33protected:
34 void resolveModel() override;
35
36 QItemModelBarDataProxy *m_proxy; // Not owned
37 QBarDataArray *m_proxyArray; // Not owned
38 int m_columnCount;
39 int m_valueRole;
40 int m_rotationRole;
41 QRegularExpression m_valuePattern;
42 QRegularExpression m_rotationPattern;
43 QString m_valueReplace;
44 QString m_rotationReplace;
45 bool m_haveValuePattern;
46 bool m_haveRotationPattern;
47};
48
49QT_END_NAMESPACE
50
51#endif
52

source code of qtgraphs/src/graphs/data/baritemmodelhandler_p.h