-
Notifications
You must be signed in to change notification settings - Fork 0
/
setting.h
91 lines (58 loc) · 1.9 KB
/
setting.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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef SETTING_H
#define SETTING_H
#include <QWidget>
#include <QVector>
#include<QStandardItemModel>
#include<QTableWidget>
#include <QXmlStreamWriter>
#include<QTreeWidget>
#include<QTreeWidgetItem>
#include "qwcomboboxdelegate.h"
class DeviceSystem;
namespace Ui {
class Setting;
}
class Device;
class Setting : public QWidget
{
Q_OBJECT
public:
Setting(DeviceSystem *system, QWidget *parent = nullptr);
~Setting();
DeviceSystem *device_system;
signals:
void can_filter_update();
public slots:
void on_addcanrow(double time, int device, int channel,int id, QByteArray data);
bool WriteTableView(QString file = "");
bool ReadTableView(QString file = "");
void setTreeEnabled(bool status);
private slots:
void on_treeWidget_itemChanged(QTreeWidgetItem *item, int column);
void on_pushButton_add_1_clicked();
void on_pushButton_remove_1_clicked();
void on_pushButton_remove_2_clicked();
void on_tableView_clicked(const QModelIndex &index);
void on_tableView_3_clicked(const QModelIndex &index);
void on_itemChanged(QStandardItem *item);
void model3_itemChanged(QStandardItem *item);
// void on_sectionClicked(int);
void on_pushButton_clear_1_clicked();
void on_checkBox_enable_clicked(bool checked);
void on_pushButton_clear_2_clicked();
void on_pushButton_clicked();
private:
Ui::Setting *ui;
void TreeInit();
QStandardItemModel *theModel;//数据模型
QItemSelectionModel *theSelection;//Item选择模型
QStandardItemModel *theModel_2;//数据模型
QItemSelectionModel *theSelection_2;//Item选择模型
QStandardItemModel *theModel_3;//数据模型
QItemSelectionModel *theSelection_3;//Item选择模型
void TabelViewInit();
QWComboBoxDelegate combox_delegate_1;
QWComboBoxDelegate combox_delegate_2;
QWComboBoxDelegate combox_delegate_3;
};
#endif // SETTING_H