openPilotLog

settingswidget.h
1 /*
2 *openPilot Log - A FOSS Pilot Logbook Application
3 *Copyright (C) 2020 Felix Turowsky
4 *
5 *This program is free software: you can redistribute it and/or modify
6 *it under the terms of the GNU General Public License as published by
7 *the Free Software Foundation, either version 3 of the License, or
8 *(at your option) any later version.
9 *
10 *This program is distributed in the hope that it will be useful,
11 *but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *GNU General Public License for more details.
14 *
15 *You should have received a copy of the GNU General Public License
16 *along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18 #ifndef SETTINGSWIDGET_H
19 #define SETTINGSWIDGET_H
20
21 #include <QWidget>
22 #include <QButtonGroup>
23 #include <QValidator>
24 #include <QMessageBox>
25 #include <QProcess>
26 #include <QDebug>
27 #include "src/classes/asettings.h"
28 #include "src/experimental/adatabase.h"
29 #include "src/experimental/apilotentry.h"
30
31 namespace Ui {
32 class SettingsWidget;
33 }
34
35 class SettingsWidget : public QWidget
36 {
37 Q_OBJECT
38
39 public:
40 explicit SettingsWidget(QWidget *parent = nullptr);
41 ~SettingsWidget();
42
43 private slots:
44
45 void on_themeGroup_buttonClicked(int theme_id);
46 void on_aboutPushButton_clicked();
47 void on_acSortComboBox_currentIndexChanged(int index);
48 void on_acAllowIncompleteComboBox_currentIndexChanged(int index);
49 void on_prefixLineEdit_textChanged(const QString &arg1);
50 void on_lastnameLineEdit_editingFinished();
51 void on_firstnameLineEdit_editingFinished();
52 void on_employeeidLineEdit_editingFinished();
53 void on_emailLineEdit_editingFinished();
54 void on_phoneLineEdit_editingFinished();
55 void on_aliasComboBox_currentIndexChanged(int index);
56 void on_functionComboBox_currentIndexChanged(const QString &arg1);
57 void on_rulesComboBox_currentIndexChanged(const QString &arg1);
58 void on_approachComboBox_currentIndexChanged(const QString &arg1);
59 void on_nightComboBox_currentIndexChanged(int index);
60 void on_pilotSortComboBox_currentIndexChanged(int index);
61 void on_logbookViewComboBox_currentIndexChanged(int index);
62 void on_companyLineEdit_editingFinished();
63
64 private:
65 Ui::SettingsWidget *ui;
66
67 void readSettings();
68
69 void setupValidators();
70
71 void updatePersonalDetails();
72 signals:
73 void viewSelectionChanged(int view_id);
74 };
75
76 #endif // SETTINGSWIDGET_H
SettingsWidget
Definition: settingswidget.h:36