WSF
PointOfInterestPropertiesWidget.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 WIZPOIPROPERTIESWIDGET_HPP
13#define WIZPOIPROPERTIESWIDGET_HPP
14
15#include <unordered_map>
16
17#include <QComboBox>
18#include <QObject>
19
20#include "ViExport.hpp"
21#include "WsfPM_Root.hpp"
22#include "annotation/WkfPointOfInterestPropertiesWidget.hpp"
23
24namespace wizard
25{
26class VI_EXPORT PointOfInterestPropertiesWidget : public Annotation::PointOfInterestPropertiesWidget
27{
28 Q_OBJECT
29public:
30 PointOfInterestPropertiesWidget(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
32
33 void SetEntity(vespa::VaEntity* aEntityPtr, bool aCreate) override;
34 void PopulateFiles();
35 void OverwriteOriginalValues(const PoiInfo& aInfo) override;
36
38 {
39 std::string originalEntityName;
40 bool nameChanged{false};
41 bool positionChanged{false};
42 bool bullseyeChanged{false};
43 QString altString;
44 PoiInfo info;
45 };
46
47 std::string GetEntityUiName() const;
48 std::string GetOriginalName() const;
49
50signals:
51 void ChangesAccepted(const PoiChanges& aChanges);
52 void NewPoiAccepted(const std::string& aDestFile, const PoiChanges& aChanges);
54 void NameEdited(const std::string& aName, const QString& aNewName);
55 void PositionEdited(const std::string& aName, const vespa::VaPosition& aPosition);
56
57private:
58 void AcceptChanges() override;
59 void NameOperation() override;
60 void PositionOperation(const vespa::VaPosition& aPosition) override;
61 void BullseyeOperation(bool aBullseye) override;
62 void AssignAltitudeString();
63
64 PoiChanges mChanges;
65
66 QLabel* mFileLabel;
67 QComboBox* mFileComboBox;
68
69 WsfPM_Root mProxyRoot;
70 UtCallbackHolder mCallbackHolder;
71 std::unordered_map<std::string, std::string> mFilePaths;
72};
73} // namespace wizard
74
75#endif
#define VI_EXPORT
Definition ViExport.hpp:38
Definition WsfPM_Root.hpp:24
void NewPoiAccepted(const std::string &aDestFile, const PoiChanges &aChanges)
~PointOfInterestPropertiesWidget() override=default
void PopulateFiles()
Definition PointOfInterestPropertiesWidget.cpp:129
void OverwriteOriginalValues(const PoiInfo &aInfo) override
Definition PointOfInterestPropertiesWidget.cpp:118
std::string GetEntityUiName() const
Definition PointOfInterestPropertiesWidget.cpp:209
std::string GetOriginalName() const
Definition PointOfInterestPropertiesWidget.cpp:214
PointOfInterestPropertiesWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Definition PointOfInterestPropertiesWidget.cpp:22
void NameEdited(const std::string &aName, const QString &aNewName)
void PositionEdited(const std::string &aName, const vespa::VaPosition &aPosition)
void SetEntity(vespa::VaEntity *aEntityPtr, bool aCreate) override
Definition PointOfInterestPropertiesWidget.cpp:39
void ChangesAccepted(const PoiChanges &aChanges)
Definition Runner.hpp:22
Definition PointOfInterestPropertiesWidget.hpp:38
bool bullseyeChanged
Definition PointOfInterestPropertiesWidget.hpp:42
bool positionChanged
Definition PointOfInterestPropertiesWidget.hpp:41
bool nameChanged
Definition PointOfInterestPropertiesWidget.hpp:40
QString altString
Definition PointOfInterestPropertiesWidget.hpp:43
PoiInfo info
Definition PointOfInterestPropertiesWidget.hpp:44
std::string originalEntityName
Definition PointOfInterestPropertiesWidget.hpp:39
Copyrights Multiple, All Rights Reserved