dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
upgradeassistantdialog.h
Go to the documentation of this file.
1 
11 /*
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20  * for more details.
21  *
22  * You should have received a copy of the GNU General Public License along
23  * with this program; if not, see <http://www.gnu.org/licenses/>
24  *
25  * Additional note on redistribution: The copyright and license notices above
26  * must be maintained in each individual source file that is a derivative work
27  * of this source file; otherwise redistribution is prohibited.
28  */
29 
30 #ifndef UPGRADEASSISTANT_H
31 #define UPGRADEASSISTANT_H
32 
33 #include <QDialog>
34 #include <QLabel>
35 #include <QMap>
36 #include <QString>
37 
38 namespace Ui {
39 class UpgradeAssistant;
40 }
41 
42 class UpgradeAssistantDialog : public QDialog
43 {
44  Q_OBJECT
45 public:
46  typedef enum {
58  STEP_NUM = STEP_DONE // STEP_DONE is not a real step with a label
60 
61  explicit UpgradeAssistantDialog(QWidget *parent = nullptr);
63 
64  void setOperatingMode(bool upgradingBootloader, bool blankFC);
65 
66  int PromptUser(QString promptText, QString detailText, QStringList buttonText);
67 
68  // public slots:
70 
71 protected:
72  void closeEvent(QCloseEvent *event);
73 
74 private:
75  Ui::UpgradeAssistant *ui;
76 
77  QLabel *stepLabels[STEP_NUM];
78 
79  QString *originalText[STEP_NUM];
80 
81  UpgradeAssistantStep curStep;
82 };
83 
84 #endif // UPGRADEASSISTANT_H
void closeEvent(QCloseEvent *event)
int PromptUser(QString promptText, QString detailText, QStringList buttonText)
UpgradeAssistantDialog(QWidget *parent=nullptr)
void setOperatingMode(bool upgradingBootloader, bool blankFC)
void onStepChanged(UpgradeAssistantStep step)