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