]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robomon/RobomonTuning.h
7683173a54d26db68726ae3538f8a5e0686a505d
[eurobot/public.git] / src / robomon / RobomonTuning.h
1 /*
2  * RobomonTuning.h                      07/10/31
3  *
4  * Robot's visualization and control GUI for robot of the
5  * Eurobot 2008 competition (Mission to Mars).
6  *
7  * Copyright: (c) 2008 DCE Eurobot Dragon Team
8  *            CTU FEE - Department of Control Engineering
9  * Authors: Martin Zidek, Michal Sojka, Tran Duy Khanh
10  * License: GNU GPL v.2
11  */
12
13 #ifndef ROBOMON_TUNING_H
14 #define ROBOMON_TUNING_H
15
16 #include <QDialog>
17
18 #include <sharp.h>
19 #include <trgen.h>
20 #include "PlaygroundScene.h"
21 #include "Robot.h"
22 #include "robomon_orte.h"
23 #include <roboorte_robottype.h>
24 #include <roboorte.h>
25
26 class QHBoxLayout;
27 class QVBoxLayout;
28 class QGridLayout;
29 class QGroupBox;
30 class QGraphicsView;
31 class QLabel;
32 class QPushButton;
33 class QCheckBox;
34 class QLineEdit;
35 class QTextEdit;
36 class QDial;
37 class QSlider;
38 class QProgressBar;
39 class QFont;
40
41
42 class RobomonTuning : public QWidget
43 {
44         Q_OBJECT
45
46 public:
47         RobomonTuning(QWidget *parent = 0);
48
49 protected:
50         bool event(QEvent *event);
51         void keyPressEvent(QKeyEvent *event);
52         void keyReleaseEvent(QKeyEvent *event);
53         void closeEvent(QCloseEvent *event);
54
55 signals:
56
57 private slots:
58         /************************************************************
59          * GUI actions 
60          ************************************************************/
61         void setServos(int value);
62         void setMotors(int state);
63         void setPwrAlert(int state);
64         void setCanMsg();
65
66         /************************************************************
67          * ORTE 
68          ************************************************************/
69 private:
70         /************************************************************
71          * GUI
72          ************************************************************/
73         void createLeftLayout();
74         void createRightLayout();
75
76         void createMotorsGroupBox();
77         void createServosGroupBox();
78         void createPwrGroupBox();
79         void createCanGroupBox();
80
81
82         void createActions();
83
84         QGroupBox *enginesGroupBox;
85         QGroupBox *servosGroupBox;
86         QGroupBox *pwrGroupBox;
87         QGroupBox *canGroupBox;
88
89
90         QVBoxLayout *leftLayout;
91         QVBoxLayout *rightLayout;
92
93         /* motors control */
94         QDial *brushLeft;
95         QDial *brushRight;
96         QDial *roboBagr;
97         QDial *carousel;
98         
99         QLineEdit *brushLeftLEdit;
100         QLineEdit *brushRightLEdit;
101         QLineEdit *roboBagrLEdit;
102         QLineEdit *carouselLEdit;
103
104         /* servos control */
105         QDial *servoBrushLeft;
106         QDial *servoBrushRight;
107         QDial *servoDoorBottom;
108         QDial *servoDoorTop;
109         QDial *servoDoorBack;
110         QDial *servoReserve;
111
112         QLineEdit *servoBrushLeftLEdit;
113         QLineEdit *servoBrushRightLEdit;
114         QLineEdit *servoDoorBottomLEdit;
115         QLineEdit *servoDoorTopLEdit;
116         QLineEdit *servoDoorBackLEdit;
117
118         QLineEdit *canData1;
119         QLineEdit *canData2;
120         QLineEdit *canData3;
121         QLineEdit *canData4;
122         QLineEdit *canData5;
123         QLineEdit *canData6;
124         QLineEdit *canData7;
125         QLineEdit *canData8;
126         QLineEdit *canMsgLen;
127         QLineEdit *canId;
128         QPushButton *canSendPButton;
129
130         QCheckBox *pwrAlertCBox;
131
132         /************************************************************
133          * ORTE 
134          ************************************************************/
135         void createOrte();
136
137         struct robottype_orte_data orte;
138 };
139
140 #endif /* ROBOMON_TUNING_H */