dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
seppukuconfiguration.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  * Additional note on redistribution: The copyright and license notices above
26  * must be maintained in each individual source file that is a derivative work
27  * of this source file; otherwise redistribution is prohibited.
28  */
29 
30 #ifndef SEPPUKUCONFIGURATION_H
31 #define SEPPUKUCONFIGURATION_H
32 
33 #include <QSvgRenderer>
34 #include <QGraphicsSvgItem>
35 
37 #include "ui_seppuku.h"
38 
40 {
41  Q_OBJECT
42 public:
43  SeppukuConfiguration(QWidget *parent = nullptr);
45 
46 private:
47  Ui::Seppuku *ui;
48  QSvgRenderer *m_renderer;
49  QGraphicsSvgItem *m_background;
50  QGraphicsSvgItem *m_uart3;
51  QGraphicsSvgItem *m_uart4;
52  QGraphicsScene *m_scene;
53 
54  void setupGraphicsScene();
55  QGraphicsSvgItem *addGraphicsElement(const QString &elementId);
56  void resizeEvent(QResizeEvent *event);
57  void showEvent(QShowEvent *event);
58  void setMessage(const QString &name, const QString &msg = QString(),
59  const QString &severity = QString("warning"));
60 
61 private slots:
62  void magChanged(const QString &newVal);
63  void outputsChanged(const QString &newVal);
64  void checkExtMag();
65  void checkDsm();
66  void checkUart3(const QString &newVal);
67  void checkRcvr(const QString &newVal);
68 };
69 
70 #endif // SEPPUKUCONFIGURATION_H
71 
SeppukuConfiguration(QWidget *parent=nullptr)