swift
modelmappingmodifyform.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2016 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_EDITORS_MODELMAPPINGMODIFYFORM_H
7 #define SWIFT_GUI_EDITORS_MODELMAPPINGMODIFYFORM_H
8 
9 #include <QFrame>
10 #include <QObject>
11 #include <QScopedPointer>
12 
13 #include "gui/editors/form.h"
14 #include "gui/swiftguiexport.h"
16 
17 class QCheckBox;
18 
19 namespace Ui
20 {
21  class CModelMappingModifyForm;
22 }
23 namespace swift::misc::simulation
24 {
25  class CAircraftModel;
26 }
27 namespace swift::gui::editors
28 {
33  {
34  Q_OBJECT
35 
36  public:
38  explicit CModelMappingModifyForm(QWidget *parent = nullptr);
39 
41  virtual ~CModelMappingModifyForm() override;
42 
44  swift::misc::CPropertyIndexVariantMap getValues() const;
45 
47  void setValue(const swift::misc::simulation::CAircraftModel &model);
48 
50  virtual void setReadOnly(bool readOnly) override;
51 
52  protected:
54  virtual void userChanged() override;
55 
56  private:
58  void returnPressed();
59 
61  void changed();
62 
64  QCheckBox *widgetToCheckbox(QObject *widget) const;
65 
67  void onCGEdited();
68 
69  QScopedPointer<Ui::CModelMappingModifyForm> ui;
70  };
71 } // namespace swift::gui::editors
72 
73 #endif // SWIFT_GUI_EDITORS_MODELMAPPINGMODIFYFORM_H
Form base class.
Definition: form.h:72
Allows to modify individual fields of the model form.
Specialized value object compliant map for variants, based on indexes.
Aircraft model (used by another pilot, my models on disk)
Definition: aircraftmodel.h:71
#define SWIFT_GUI_EXPORT
Export a class or function from the library.