swift
configsimulatorcomponent.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_CONFIGSIMULATORCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_CONFIGSIMULATORCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QScopedPointer>
11 #include <QWizardPage>
12 
15 
16 namespace Ui
17 {
18  class CConfigSimulatorComponent;
19 }
20 namespace swift::gui::components
21 {
25  class CConfigSimulatorComponent : public QFrame
26  {
27  Q_OBJECT
28 
29  public:
31  explicit CConfigSimulatorComponent(QWidget *parent = nullptr);
32 
35 
37  void save();
38 
40  bool hasUnsavedChanges() const;
41 
43  void resetUnsavedChanges();
44 
45  private:
47  void preselectSimulators();
48 
50  QStringList selectedSimsToPluginIds();
51 
53  swift::misc::simulation::data::CModelSetCaches m_modelSets { true, this };
54  QScopedPointer<Ui::CConfigSimulatorComponent> ui;
55  };
56 
60  class CConfigSimulatorWizardPage : public QWizardPage
61  {
62  Q_OBJECT
63 
64  public:
66  using QWizardPage::QWizardPage;
67 
69  void setConfigComponent(CConfigSimulatorComponent *config) { m_config = config; }
70 
72  virtual void initializePage() override;
73 
75  virtual bool validatePage() override;
76 
77  private:
78  CConfigSimulatorComponent *m_config = nullptr;
79  };
80 } // namespace swift::gui::components
81 #endif // SWIFT_GUI_COMPONENTS_CONFIGSIMULATORCOMPONENT_H
CConfigSimulatorComponent(QWidget *parent=nullptr)
Constructor.
Wizard page for CConfigSimulatorComponent.
void setConfigComponent(CConfigSimulatorComponent *config)
Set config.
Bundle of caches for model sets of all simulators.
Definition: modelcaches.h:382
High level reusable GUI components.
Definition: aboutdialog.cpp:13