| 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 }
75 class FirstRunDialog : public QDialog
76 {
77 Q_OBJECT
78
79 public:
80 explicit FirstRunDialog(QWidget *parent = nullptr);
81 ~FirstRunDialog();
82
83 private slots:
84
85 void on_previousPushButton_clicked();
86 void on_nextPushButton_clicked();
87 void on_styleComboBox_currentTextChanged(const QString &new_style_setting);
88 void on_currCustom1LineEdit_editingFinished();
89 void on_currCustom2LineEdit_editingFinished();
90
94 void on_importPushButton_clicked();
95
96 private:
97 Ui::FirstRunDialog *ui;
98 bool useRessourceData;
99
104 bool finishSetup();
105
109 void writeSettings();
110
114 bool setupDatabase();
118 bool createUserEntry();
119
123 bool writeCurrencies();
124
128 bool downloadTemplates(QString branch_name);
132 bool verifyTemplates();
133
134 protected:
135 void reject() override;
145 void keyPressEvent(QKeyEvent* keyEvent) override;
146 };
147
148 #endif // FIRSTRUNDIALOG_H
FirstRunDialog
The FirstRunDialog is used as a set-up wizard for the application.
Definition: firstrundialog.h:76
FirstRunDialog::keyPressEvent
void keyPressEvent(QKeyEvent *keyEvent) override
Shows the debug widget by pressing <ctrl + t>
Definition: firstrundialog.cpp:371