SynchroTime
settingsdialog.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Home Office
3 // Nürnberg, Germany
4 // E-Mail: sergej1@email.ua
5 //
6 // Copyright (C) 2020 free Project SynchroTime RTC DS3231. All rights reserved.
7 //------------------------------------------------------------------------------
8 // Project SynchroTime: Command-line client for adjust the exact time and
9 // calibrating the RTC DS3231 module via the serial interface (UART).
10 //------------------------------------------------------------------------------
11 #ifndef SETTINGSDIALOG_H
12 #define SETTINGSDIALOG_H
13 
14 //------------------------------------------------------------------------------
15 // Includes
16 //------------------------------------------------------------------------------
17 #include <QDialog>
18 #include "serialportsettings.h"
19 
20 //------------------------------------------------------------------------------
21 // Preprocessor
22 //------------------------------------------------------------------------------
23 
24 //------------------------------------------------------------------------------
25 // Enums
26 //------------------------------------------------------------------------------
27 
28 //------------------------------------------------------------------------------
29 // Types
30 //------------------------------------------------------------------------------
31 QT_USE_NAMESPACE
32 namespace Ui {
33 class SettingsDialog;
34 }
35 class QIntValidator;
36 
43 class SettingsDialog : public QDialog
44 {
45  Q_OBJECT
46 
47 public:
48  explicit SettingsDialog( QWidget *parent = 0 );
49  ~SettingsDialog();
50 
51  Settings settings() const;
52  Settings *serialPortSettings();
53  void fillSettingsUi();
54 
55 public slots:
56  void show();
57 
58 private slots:
59  void showPortInfo(int idx);
60  void apply();
61  void cansel();
62  void reset();
63  void checkCustomBaudRatePolicy(int idx);
64  void checkCustomDevicePathPolicy(int idx);
65  void on_statusControlCheckBox_clicked( bool checked );
66 
67 private:
68  void fillPortsParameters();
69  void fillPortsInfo();
70  void updateSettings();
71 
72  Ui::SettingsDialog *ui;
74  QIntValidator *intValidator;
75 };
76 
77 #endif // SETTINGSDIALOG_H
Definition: mainwindow.h:38
QIntValidator * intValidator
Definition: settingsdialog.h:74
Ui::SettingsDialog * ui
Definition: settingsdialog.h:72
The SettingsDialog class.
Definition: settingsdialog.h:43
The Settings class.
Definition: serialportsettings.h:43
Settings currentSettings
Definition: settingsdialog.h:73