swift
interpolationsetupcomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2018 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_INTERPOLATIONSETUPCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_INTERPOLATIONSETUPCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QModelIndex>
11 #include <QScopedPointer>
12 
15 
16 namespace Ui
17 {
18  class CInterpolationSetupComponent;
19 }
20 namespace swift::gui::components
21 {
24  {
25  Q_OBJECT
26 
27  public:
29  enum Mode
30  {
31  SetupGlobal,
32  SetupPerCallsign
33  };
34 
36  explicit CInterpolationSetupComponent(QWidget *parent = nullptr);
37 
39  virtual ~CInterpolationSetupComponent() override;
40 
42  Mode getSetupMode() const;
43 
44  private:
45  QScopedPointer<Ui::CInterpolationSetupComponent> ui;
46 
48  void onRowDoubleClicked(const QModelIndex &index);
49 
51  void onModeChanged();
52 
54  void onModelChanged();
55 
57  void onReloadSetup();
58 
60  void reloadSetup();
61 
63  void saveSetup();
64 
66  void removeOrResetSetup();
67 
69  void setUiValuesFromGlobal();
70 
72  void displaySetupsPerCallsign();
73 
75  bool checkPrerequisites(bool checkSim, bool showOverlay);
76 
78  bool setSetupsToContext(const swift::misc::simulation::CInterpolationSetupList &setups, bool force = false);
79 
81  void onSetupChanged();
82 
84  void onObjectsDeleted(const swift::misc::CVariant &deletedObjects);
85 
86  swift::misc::simulation::CInterpolationSetupList m_lastSetSetups;
87  };
88 } // namespace swift::gui::components
89 
90 #endif // SWIFT_GUI_COMPONENTS_INTERPOLATIONSETUPCOMPONENT_H
Using this class provides a QFrame with the overlay functionality already integrated.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
Definition: variant.h:66
High level reusable GUI components.
Definition: aboutdialog.cpp:13