forked from NHERI-SimCenter/RDT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RendererModel.h
42 lines (31 loc) · 998 Bytes
/
RendererModel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef RENDERERMODEL_H
#define RENDERERMODEL_H
#include <QAbstractListModel>
#include <ClassBreaksRenderer.h>
Q_DECLARE_METATYPE(Esri::ArcGISRuntime::SimpleMarkerSymbolStyle)
class RendererModel : public QAbstractListModel
{
Q_OBJECT
enum RendererRoles{
Name = Qt::UserRole,
Description,
Minimum,
Maximum,
Color,
Size,
Shape
};
public:
RendererModel();
void setRenderer(Esri::ArcGISRuntime::ClassBreaksRenderer* renderer);
// QAbstractItemModel interface
public:
int rowCount(const QModelIndex &parent) const override;
QVariant data(const QModelIndex &index, int role) const override;
QHash<int, QByteArray> roleNames() const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
private:
Esri::ArcGISRuntime::ClassBreaksRenderer* m_renderer = nullptr;
};
#endif // RENDERERMODEL_H