-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChartModel.h
More file actions
73 lines (44 loc) · 1.87 KB
/
Copy pathChartModel.h
File metadata and controls
73 lines (44 loc) · 1.87 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef CHARTMODEL_H
#define CHARTMODEL_H
#include <QAbstractItemModel>
#include <QStringList>
#include "ChartGlobal.h"
class chartModel : public QAbstractTableModel
{
Q_OBJECT
private:
chartGlobal * chart;
public:
chartModel(chartGlobal * ch, QObject * parent = nullptr);
chartModel(QObject * parent = nullptr);
chartModel(const chartModel & copy);
chartModel & operator=(const chartModel & assing);
~chartModel();
double obtainTotal(u_int32 row) const;
QString getTitle() const;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole) override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override;
bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override;
bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
void init();
Qt::ItemFlags flags(const QModelIndex &index) const override;
signals:
void draw();
void sendText(const QString & text);
public slots:
void setTitle(const QString & text);
void pushColumn();
void spawnLabelMod(int index);
void spawnTimelineMod(int index);
void popColumn();
void pushRow();
void popRow();
void reset();
};
#endif // CHARTMODEL_H