WSF
VtkInterface.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 2018 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 VTKINTERFACE_HPP
13#define VTKINTERFACE_HPP
14
15class QDragEnterEvent;
16class QDropEvent;
17class QMenu;
18class QMimeData;
19#include <QObject>
20class QWidget;
21#include "UtOptional.hpp"
22#include "VaCallbackHolder.hpp"
23#include "WkfPlatform.hpp"
24class WsfPathList;
25#include "WsfPM_Root.hpp"
26
27namespace vespa
28{
29class VaEntity;
30class VaViewer;
31class VaWidget;
32} // namespace vespa
33
34namespace wizard
35{
36class ZoneSet;
37class Platform;
38class ProxyChange;
39
40class VtkInterface : public QObject
41{
42 Q_OBJECT
43public:
45 ~VtkInterface() override;
46
47 void OnProxyAvailable(WsfPProxy* aProxyPtr);
48
49 // place an order to select a platform when it exists
50 void RequestSelectPlatform(const QString& aPlatformName);
51
60
63 void SetMoveMode(MoveMode aMoveMode) noexcept;
66 MoveMode GetMoveMode() const noexcept;
67
68signals:
69
70 void AttachmentAdded(vespa::VaAttachment* aAttachmentPtr);
71
72private:
73 void ActionsForNodeRequested(const WsfPProxyNode& aNode, QMenu* aMenuPtr, QWidget* aParentWidgetPtr);
74 void PlatformAdded(WsfPM_Platform& aPlatform);
75 void PlatformRemoved(const WsfPM_Platform& aPlatform);
76 void PlatformUpdated(WsfPM_Platform& aPlatform);
77
78 bool ZoneExists(WsfPM_Zone& aZone) const;
79 void ZoneAdded(WsfPM_Zone& aZone);
80 void RemoveZone(WsfPM_Zone& aZone);
81 void UpdateZone(WsfPM_Zone& aZone);
82 void UpdateReferencePlatformZones(const std::string& aPlatformName);
83 void OnPlatformListChange(const ProxyChange& aProxyChange);
84 void OnZoneListChange(const ProxyChange& aProxyChange);
85 void OnScenarioChange(const ProxyChange& aProxyChange);
86 unsigned int AssignId(const std::string& aPath);
87 unsigned int LookupId(const std::string& aPath) const;
88 void ClearData();
89
90 void DragEnter(QDragEnterEvent* aEvent);
91 void DragDrop(QDropEvent* aEvent);
92 bool PasteMime(const QMimeData* aMimeData, double aLat, double aLon);
93 void MoveSelectionAndAttachmentComplete(const wkf::PlatformList& aPlatformList,
94 const wkf::EntityList& aNonPlatformList,
95 const vespa::VaAttachmentList& aAttachmentList);
96
97 void UpdateClassificationBannerText(const std::string& aText, const UtColor& aColor);
98 void StandardWidgetChangedCB(vespa::VaWidget* aWidgetPtr);
99
100 WsfPM_Root mProxyRoot;
101 UtCallbackHolder mProxyCallbacks;
102 UtCallbackHolder mProxyAvailableCallback;
103 unsigned int mNextId;
104 std::map<std::string, unsigned int> mNameToIdMap;
105 std::map<unsigned int, std::string> mIdToNameMap;
106 std::map<unsigned int, Platform*> mPlatformMap;
107 std::vector<std::unique_ptr<ZoneSet>> mZoneSetList;
108 QMetaObject::Connection mConnection;
109 vespa::VaCallbackHolder mVtkCallbacks;
110 ut::optional<QString> mPlatformSelectionRequest;
111
112 static const std::string cGLOBAL_ZONES_PREFIX;
113
115};
116} // namespace wizard
117
118#endif
Definition WsfPM_Platform.hpp:34
Definition WsfPM_Root.hpp:24
Definition WsfPM_Zone.hpp:57
Definition WsfPProxyNode.hpp:60
Definition WsfPProxy.hpp:32
Defines a list of motions a platform could take.
Definition WsfPathList.hpp:30
Definition wizard/lib/source/map/Platform.hpp:37
Records a change to proxy data.
Definition ProxyChange.hpp:21
~VtkInterface() override
Definition VtkInterface.cpp:88
void AttachmentAdded(vespa::VaAttachment *aAttachmentPtr)
MoveMode GetMoveMode() const noexcept
Definition VtkInterface.cpp:192
void SetMoveMode(MoveMode aMoveMode) noexcept
Definition VtkInterface.cpp:187
VtkInterface()
Definition VtkInterface.cpp:67
void OnProxyAvailable(WsfPProxy *aProxyPtr)
Definition VtkInterface.cpp:93
MoveMode
Represents the transformation used when moving entities and attachments.
Definition VtkInterface.hpp:54
@ TranslateSelection
mode for translation of a selection (the default)
Definition VtkInterface.hpp:58
@ RotateScenario
mode for rotation of the entire scenario
Definition VtkInterface.hpp:55
@ TranslateScenario
mode for translation of the entire scenario
Definition VtkInterface.hpp:57
@ RotateSelection
mode for rotation of a selection
Definition VtkInterface.hpp:56
void RequestSelectPlatform(const QString &aPlatformName)
Definition VtkInterface.cpp:165
Definition ZoneSet.hpp:35
Template specialization for wsf::comm::Address. Allows usage of Address in std::unordered_map/set.
Definition WsfCommAddress.hpp:185
Definition WsfSensorErrorModel.hpp:21
Definition EditorHelpers.hpp:37
Definition Runner.hpp:22
Definition ActionManager.hpp:28
Copyrights Multiple, All Rights Reserved