WSF
RangeRingPropertiesWidget.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2019 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WIZRINGPROPERTIESWIDGET_HPP
13#define WIZRINGPROPERTIESWIDGET_HPP
14
15#include "ViExport.hpp"
16#include "WsfPM_Root.hpp"
17#include "annotation/WkfRingPropertiesWidget.hpp"
18
19namespace wizard
20{
21class VI_EXPORT RingPropertiesWidget : public Annotation::RingPropertiesWidget
22{
23 Q_OBJECT
24public:
25 RingPropertiesWidget(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
26 ~RingPropertiesWidget() override = default;
27
29 {
31 UnitStrings(const QString& aAdditionalRingRadius,
32 const QString& aBaseRadius,
33 const QString& aCenterAngle,
34 const QString& aWidth,
35 const QString& aRadialRate)
36 : additionalRingRadius(aAdditionalRingRadius)
37 , baseRadius(aBaseRadius)
38 , centerAngle(aCenterAngle)
39 , width(aWidth)
40 , radialRate(aRadialRate)
41 {
42 }
43
45 QString baseRadius;
46 QString centerAngle;
47 QString width;
48 QString radialRate;
49 };
50
52 {
53 std::string originalRingName;
54 std::string entityName;
55 bool newRing;
57 bool nameChanged{false};
58 bool baseRadiusChanged{false};
61 bool centerAngleChanged{false};
62 bool widthChanged{false};
63 bool radialRateChanged{false};
64 bool ringColorChanged{false};
65 bool radialColorChanged{false};
73 wkf::AttachmentRangeRing::Properties properties;
75 };
76
78 void SetCurrentNameIndex(int aIndex);
79 void SetEntity(vespa::VaEntity* aEntityPtr, const RingFlags& aFlags) override;
80 void OverwriteOriginalValues(const wkf::AttachmentRangeRing::Properties& aInfo) override;
81
82signals:
83 void ChangesAccepted(const RingChanges& aChanges);
84 void NewPoiRingAccepted(const std::string& aDestFile,
85 const RingChanges& aChanges,
86 const std::string& aName,
87 vespa::VaPosition& aPos);
88 void NewRingAccepted(const std::string& aDestFile, const RingChanges& aChanges);
89
90private:
91 void CheckDefaults();
92 void AcceptChangesP() override;
93 void PopulateFiles(vespa::VaEntity* aEntityPtr);
94 std::unordered_set<std::string> GetRingList() const override;
95
96 void SetCenterRadius() override;
97 void SetAdditionalRadii() override;
98 void SetNumberAdditonalRings(const int aValue) override;
99 void SetCenterAngle() override;
100 void SetAngleWidth() override;
101 void SetRadialRate() override;
102 void RingColorUpdated(const QColor& aColor) override;
103 void RadialColorUpdated(const QColor& aColor) override;
104 void SetRingLineWidth(const int aValue) override;
105 void SetRadialLineWidth(const int aValue) override;
106 void RangeLabelsToggled(bool aState) override;
107 void AngleLabelsToggled(bool aState) override;
108 void RangeLabelColorUpdated(const QColor& aColor) override;
109 void AngleLabelColorUpdated(const QColor& aColor) override;
110 void SetAlignWithPlatform(bool aState) override;
111 void NameChanged(const QString& aName) override;
112 void SelectionChanged(int aIndex) override;
113
114 QLabel* mFileLabel;
115 QComboBox* mFileComboBox;
116
117 RingChanges mChanges;
118 WsfPM_Root mProxyRoot;
119 UtCallbackHolder mCallbackHolder;
120 std::unordered_map<std::string, std::string> mFilePaths;
121};
122} // namespace wizard
123
124#endif
#define VI_EXPORT
Definition ViExport.hpp:38
Definition WsfPM_Root.hpp:24
void NewRingAccepted(const std::string &aDestFile, const RingChanges &aChanges)
void OverwriteOriginalValues(const wkf::AttachmentRangeRing::Properties &aInfo) override
Definition RangeRingPropertiesWidget.cpp:70
~RingPropertiesWidget() override=default
void ChangesAccepted(const RingChanges &aChanges)
void NewPoiRingAccepted(const std::string &aDestFile, const RingChanges &aChanges, const std::string &aName, vespa::VaPosition &aPos)
RingPropertiesWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Definition RangeRingPropertiesWidget.cpp:19
void SetCurrentNameIndex(int aIndex)
Definition RangeRingPropertiesWidget.cpp:38
void SetEntity(vespa::VaEntity *aEntityPtr, const RingFlags &aFlags) override
Definition RangeRingPropertiesWidget.cpp:46
int GetCurrentNameIndex()
Definition RangeRingPropertiesWidget.cpp:33
Definition Runner.hpp:22
Definition RangeRingPropertiesWidget.hpp:52
bool centerAngleChanged
Definition RangeRingPropertiesWidget.hpp:61
bool additionalRingsChanged
Definition RangeRingPropertiesWidget.hpp:59
bool widthChanged
Definition RangeRingPropertiesWidget.hpp:62
bool baseRadiusChanged
Definition RangeRingPropertiesWidget.hpp:58
bool angleLabelColorChanged
Definition RangeRingPropertiesWidget.hpp:71
bool alignPlatformChanged
Definition RangeRingPropertiesWidget.hpp:72
bool nameChanged
Definition RangeRingPropertiesWidget.hpp:57
bool radialColorChanged
Definition RangeRingPropertiesWidget.hpp:65
bool ringLineWidthChanged
Definition RangeRingPropertiesWidget.hpp:66
bool newRing
Definition RangeRingPropertiesWidget.hpp:55
bool showAngleLabelsChanged
Definition RangeRingPropertiesWidget.hpp:69
bool radialRateChanged
Definition RangeRingPropertiesWidget.hpp:63
wkf::AttachmentRangeRing::Properties properties
Definition RangeRingPropertiesWidget.hpp:73
bool rangeLabelColorChanged
Definition RangeRingPropertiesWidget.hpp:70
bool radialLineWidthChanged
Definition RangeRingPropertiesWidget.hpp:67
UnitStrings unitStrings
Definition RangeRingPropertiesWidget.hpp:74
bool entityContext
Definition RangeRingPropertiesWidget.hpp:56
std::string originalRingName
Definition RangeRingPropertiesWidget.hpp:53
bool ringColorChanged
Definition RangeRingPropertiesWidget.hpp:64
bool additionalRingRadiusChanged
Definition RangeRingPropertiesWidget.hpp:60
std::string entityName
Definition RangeRingPropertiesWidget.hpp:54
bool showRangeLabelsChanged
Definition RangeRingPropertiesWidget.hpp:68
Definition RangeRingPropertiesWidget.hpp:29
QString radialRate
Definition RangeRingPropertiesWidget.hpp:48
QString baseRadius
Definition RangeRingPropertiesWidget.hpp:45
UnitStrings()
Definition RangeRingPropertiesWidget.hpp:30
QString additionalRingRadius
Definition RangeRingPropertiesWidget.hpp:44
UnitStrings(const QString &aAdditionalRingRadius, const QString &aBaseRadius, const QString &aCenterAngle, const QString &aWidth, const QString &aRadialRate)
Definition RangeRingPropertiesWidget.hpp:31
QString centerAngle
Definition RangeRingPropertiesWidget.hpp:46
QString width
Definition RangeRingPropertiesWidget.hpp:47
Copyrights Multiple, All Rights Reserved