direcs  2012-09-30
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
settingsDialog.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Copyright (C) Markus Knapp *
3  * www.direcs.de *
4  * *
5  * This file is part of direcs. *
6  * *
7  * direcs is free software: you can redistribute it and/or modify it *
8  * under the terms of the GNU General Public License as published *
9  * by the Free Software Foundation, version 3 of the License. *
10  * *
11  * direcs is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with direcs. If not, see <http://www.gnu.org/licenses/>. *
18  * *
19  *************************************************************************/
20 
21 #ifndef SETTINGSDIALOG_H
22 #define SETTINGSDIALOG_H
23 
24 #include <QtGui>
25 #include <QDialog>
26 
27 #include "ui_settingsDialog.h"
28 
35 class SettingsDialog : public QDialog
36 {
37  Q_OBJECT
38 
39  public:
40  SettingsDialog(QWidget* parent = 0);
41 
46  int getSliderMotorSpeed(int motor);
47 
51  int getSliderMinimumSpeed(void);
52 
56  int getSliderMaximumSpeed(void);
57 
62 
67 
72 
77 
81  Qt::CheckState getCheckBoxSaveSettings();
82  //Qt::CheckState getCheckBoxAutoSave();
83 
89  void setSliderMotorSpeed(int motor, int value);
90 
95  void setSliderMinimumSpeed(int speed);
96 
101  void setSliderMaximumSpeed(int speed);
102 
107  void setSliderObstacleValue(int value);
108 
113  void setSliderObstacleLaserScannerValue(int value);
114 
119  void setSliderPassageWidth(int width);
120 
125  void setSliderStraightForwardDeviation(int angle);
126 
130  void setCheckBoxSaveSettings(Qt::CheckState state);
131 
132 
133  signals:
139  void setMotorSpeed(int motor, int speed);
144  void setMaximumSpeed(int speed);
145 
150  void setRobotSlot(int angle);
151 
156  void setPassageWidth(int width);
157 
163  void setStraightForwardDeviation(int deviation);
164 
170  void setMinObstacleDistance(int distance);
171 
177  void setMinObstacleDistanceLaserFront(int distance);
178 
184  void setMinObstacleDistanceLaserRear(int distance);
185 
186 
187  private slots:
194 
195 
196  protected slots:
200  //void on_btnAboutQt_clicked(bool checked);
201 
202 
203  private:
204  Ui::settingsDialog ui;
205 
206  static const unsigned char MOTOR1 = 10;
207  static const unsigned char MOTOR2 = 20;
208  static const unsigned char MOTOR3 = 30;
209  static const unsigned char MOTOR4 = 40;
210  static const unsigned char ALLMOTORS = 90;
211 };
212 
213 #endif