swift
configurationwizard.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2017 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_COMPONENTS_CONFIGURATIONWIZARD_H
7 #define SWIFT_GUI_COMPONENTS_CONFIGURATIONWIZARD_H
8 
9 #include <QScopedPointer>
10 #include <QWizard>
11 
12 #include "gui/swiftguiexport.h"
13 
14 namespace Ui
15 {
16  class CConfigurationWizard;
17 }
18 namespace swift::gui::components
19 {
23  class SWIFT_GUI_EXPORT CConfigurationWizard : public QWizard
24  {
25  Q_OBJECT
26 
27  public:
29  enum Pages
30  {
31  Legal,
32  DataLoad,
33  CopyModels,
34  CopySettingsAndCaches,
35  ConfigSimulator,
36  FirstModelSet,
37  XSwiftBus,
38  ConfigHotkeys
39  };
40 
42  explicit CConfigurationWizard(QWidget *parent = nullptr);
43 
45  virtual ~CConfigurationWizard() override;
46 
48  bool lastStepSkipped() const;
49 
51  static bool lastWizardStepSkipped(const QWizard *standardWizard);
52 
53  protected:
55  virtual bool event(QEvent *event) override;
56 
57  private:
59  void wizardCurrentIdChanged(int id);
60 
62  void clickedCustomButton(int which);
63 
65  void ended();
66 
68  void setParentOpacity(qreal opacity);
69 
71  void setScreenGeometry();
72 
73  QScopedPointer<Ui::CConfigurationWizard> ui;
74  int m_previousId = -1;
75  int m_minId = -1;
76  int m_maxId = -1;
77  bool m_skipped = false;
78  };
79 } // namespace swift::gui::components
80 #endif // SWIFT_GUI_COMPONENTS_CONFIGURATIONWIZARD_H
Configure the most important settings.
Plugin loaded by X-Plane which publishes a DBus service.
Definition: command.h:14
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.