dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
alarmsmonitorwidget.h
Go to the documentation of this file.
1 
11 /*
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20  * for more details.
21  *
22  * You should have received a copy of the GNU General Public License along
23  * with this program; if not, see <http://www.gnu.org/licenses/>
24  */
25 #ifndef ALARMSMONITORWIDGET_H
26 #define ALARMSMONITORWIDGET_H
27 
28 #include <QObject>
29 #include <QGraphicsSvgItem>
30 #include <QGraphicsTextItem>
31 #include <QSvgRenderer>
32 #include <QTimer>
33 
34 class AlarmsMonitorWidget : public QObject
35 {
36  Q_OBJECT
37 public:
39  {
40  static AlarmsMonitorWidget instance;
41  return instance;
42  }
43  void init(QSvgRenderer *renderer, QGraphicsSvgItem *graph);
44 signals:
45 
46 public slots:
47  void processAlerts();
48  void updateMessages();
49  void updateNeeded();
50 
51 private:
53  AlarmsMonitorWidget(AlarmsMonitorWidget const &); // Don't Implement.
54  void operator=(AlarmsMonitorWidget const &); // Don't implement
55  QGraphicsSvgItem *error_sym;
56  QGraphicsSvgItem *warning_sym;
57  QGraphicsSvgItem *info_sym;
58  QGraphicsTextItem *error_txt;
59  QGraphicsTextItem *warning_txt;
60  QGraphicsTextItem *info_txt;
61  bool hasErrors;
62  bool hasWarnings;
63  bool hasInfos;
64  QTimer alertTimer;
65  bool needsUpdate;
66 };
67 
68 #endif // ALARMSMONITORWIDGET_H
void init(QSvgRenderer *renderer, QGraphicsSvgItem *graph)
static AlarmsMonitorWidget & getInstance()