openPilotLog
debugwidget.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 DEBUGWIDGET_H
19 #define DEBUGWIDGET_H
20 
21 #include <QWidget>
22 #include <QDir>
23 #include <QStandardPaths>
24 #include <QFile>
25 #include <QFileDialog>
26 #include <QMessageBox>
27 #include <QProcess>
28 #include "src/database/adatabasesetup.h"
29 #include "src/classes/adownload.h"
30 #include "src/functions/areadcsv.h"
31 
32 #include "src/database/adatabase.h"
33 #include "src/classes/aentry.h"
34 #include "src/classes/apilotentry.h"
35 
36 #include "src/testing/atimer.h"
37 #include "src/functions/alog.h"
38 
39 namespace Ui {
40 class DebugWidget;
41 }
42 
43 class DebugWidget : public QWidget
44 {
45  Q_OBJECT
46 
47 public:
48  explicit DebugWidget(QWidget *parent = nullptr);
49  ~DebugWidget();
50 
51 private slots:
52  void on_resetUserTablesPushButton_clicked();
53 
54  void on_resetDatabasePushButton_clicked();
55 
56  void downloadFinished();
57 
58  void on_fillUserDataPushButton_clicked();
59 
60  void on_selectCsvPushButton_clicked();
61 
62  void on_importCsvPushButton_clicked();
63 
64  void on_debugPushButton_clicked();
65 
66 private:
67  Ui::DebugWidget *ui;
68 
69  bool downloadComplete = false;
70 
71 protected:
72  void changeEvent(QEvent* event) override;
73 };
74 
75 #endif // DEBUGWIDGET_H
DebugWidget
Definition: debugwidget.h:44