swift
modelmappingform.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2015 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_MODELMAPPINGFORM_H
7 #define SWIFT_GUI_EDITORS_MODELMAPPINGFORM_H
8 
9 #include <QObject>
10 #include <QScopedPointer>
11 
12 #include "gui/editors/form.h"
13 #include "gui/swiftguiexport.h"
15 #include "misc/statusmessagelist.h"
16 
17 namespace Ui
18 {
19  class CModelMappingForm;
20 }
21 namespace swift::gui::editors
22 {
27  {
28  Q_OBJECT
29 
30  public:
32  explicit CModelMappingForm(QWidget *parent = nullptr);
33 
35  virtual ~CModelMappingForm() override;
36 
39 
41 
44  virtual void setReadOnly(bool readonly) override;
45  virtual void setSelectOnly() override;
46  virtual swift::misc::CStatusMessageList validate(bool withNestedObjects) const override;
48 
50  void setValue(swift::misc::simulation::CAircraftModel &model);
51 
52  signals:
54  void requestStash();
55 
56  protected:
58  virtual void userChanged() override;
59 
60  private:
63 
65  void setCGtoUI(const swift::misc::physical_quantities::CLength &cg);
66 
68  void onCgEditFinished();
69 
70  QScopedPointer<Ui::CModelMappingForm> ui;
72  };
73 } // namespace swift::gui::editors
74 
75 #endif // SWIFT_GUI_EDITORS_MODELMAPPINGFORM_H
Form base class.
Definition: form.h:72
void requestStash()
Request stashing for model.
Status messages, e.g. from Core -> GUI.
Physical unit length (length)
Definition: length.h:18
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.