forked from donaloconnor/automon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
monitoringwidget.h
101 lines (83 loc) · 3.5 KB
/
monitoringwidget.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
92
93
94
95
96
97
98
99
100
#ifndef MONITORINGWIDGET_H
#define MONITORINGWIDGET_H
/*
==================================================================================================
| monitoringwudget.h |
| Part of the Automon application. |
| |
| Final Year Project - "An Embedded Automotive Monitoring Device" |
| |
| By Donal O' Connor for completion of B.Sc (Hons) Software Development and Computer Networking |
| Email: [email protected] |
| Website/Blog: http://automon.killarneyonline.eu |
| |
| Cork Institute of Technology, Cork, Ireland - http://www.cit.ie/ |
| |
| Copyright © 2009 Donal O'Connor <[email protected]> |
==================================================================================================
This is one of the stacked widgets/ views that the user of Automon sees.
It is the Monitoring widget. It is a very complex widget that allows the user to set up
multiple sensors to set up and what rules they want to apply.
*/
#include <QWidget>
#include <QList>
#include "automon.h"
class QLabel;
class QVBoxLayout;
class QHBoxLayout;
class QTableWidget;
class QPushButton;
class QComboBox;
using namespace AutomonKernel;
class MonitoringWidget : public QWidget
{
Q_OBJECT
public:
MonitoringWidget(Automon * kernel, QWidget * parent = 0);
signals:
void changeStatus(const QString & status);
void changePanel(int panelID);
public slots:
void addSensor();
void removeSensor();
void addRule();
void removeRule();
void display(double sensorVal);
void startMonitoring();
void ruleHandler(QString ruleString);
void displayRuleEditor();
void refreshRules();
private:
void populateRulesAvailableList();
void populateSensorCombo();
void populateFrequencyUpdateList();
int m_tableWidth;
QLabel * m_header;
QHBoxLayout * m_mainLayout;
QVBoxLayout * m_verticalLayout;
QHBoxLayout * m_mainSensorLayout;
QVBoxLayout * m_sensorLeftLayout;
QVBoxLayout * m_sensorRightLayout;
QVBoxLayout * m_sensorAddRemoveButtonsLayout;
QHBoxLayout * m_sensorComboboxes;
QHBoxLayout * m_mainRuleLayout;
QVBoxLayout * m_ruleLeftLayout;
QVBoxLayout * m_ruleRightLayout;
QVBoxLayout * m_ruleAddRemoveButtonsLayout;
QHBoxLayout * m_ruleComboboxes;
QTableWidget * m_sensorsList;
QComboBox * m_availableRulesList;
QTableWidget * m_addedRulesList;
QPushButton * m_addRuleButton;
QPushButton * m_removeRuleButton;
QPushButton * m_addSensorButton;
QPushButton * m_removeSensorButton;
QPushButton * m_ruleEditorButton;
QPushButton * m_startStopMonitoring;
QComboBox * m_sensorComboList;
QComboBox * m_frequencyUpdateList;
QList<Rule*> m_rules;
Automon * m_kernel;
bool m_isMonitoring;
};
#endif // MONITORINGWIDGET_H