openPilotLog
firstrundialog.h
1 /*
2  *openPilotLog - A FOSS Pilot Logbook Application
3  *Copyright (C) 2020-2021 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 FIRSTRUNDIALOG_H
19 #define FIRSTRUNDIALOG_H
20 
21 #include <QDialog>
22 #include <QButtonGroup>
23 #include <QMessageBox>
24 #include <QStringBuilder>
25 #include <QDateEdit>
26 
27 namespace Ui {
28 class FirstRunDialog;
29 }
30 
31 class FirstRunDialog : public QDialog
32 {
33  Q_OBJECT
34 
35 public:
36  explicit FirstRunDialog(QWidget *parent = nullptr);
37  ~FirstRunDialog();
38 
39 private slots:
40 
41  void on_previousPushButton_clicked();
42 
43  void on_nextPushButton_clicked();
44 
45  void on_styleComboBox_currentTextChanged(const QString &new_style_setting);
46 
47  void on_currWarningCheckBox_stateChanged(int arg1);
48 
49  void on_currWarningThresholdSpinBox_valueChanged(int arg1);
50 
51  void on_currCustom1LineEdit_editingFinished();
52 
53  void on_currCustom2LineEdit_editingFinished();
54 
55  void on_dateFormatComboBox_currentIndexChanged(int index);
56 
60  void on_importPushButton_clicked();
61 
62 private:
63  Ui::FirstRunDialog *ui;
64  bool useRessourceData;
65 
66  void writeSettings();
67  bool setupDatabase();
68  bool createUserEntry();
69  bool writeCurrencies();
70  bool finishSetup();
71 
72  QList<QDateEdit*> dateEdits;
73 
74  void reject() override;
75 };
76 
77 #endif // FIRSTRUNDIALOG_H
FirstRunDialog
Definition: firstrundialog.h:32