VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
uiHitZonesElement.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
11 #include "uiElement.h"
16 
17 
18 #include <QTreeWidget>
19 #include <QAction>
20 
21 class DtRwHitZone;
22 
24 {
25  Q_OBJECT
26 
27  public:
28 
31 
33  virtual ~DtUiHitZoneElement() override;
34 
35 
37 
39  DtHitZoneModificationDialog* openModificationDialog(DtRwHitZone*, DtString);
40  void openEditDialog(DtRwHitZone*) ;
41  DtHitZoneModificationWithModelDialog* openAddDialog(DtString windowTitle);
42  void openAddDialog(DtRwHitZone*) ;
43 
44  void refreshAllHitZoneVisualizations();
45 
46  virtual makVrf::DtEntityFacadeCollection* getFacadeCollectionFromHitZone() const;
47  DtRwHitZone* getHitZoneFromId(const DtHitZoneId& id) const;
48  DtRwHitZoneList* retrieveHitZoneListModifiedVariableFromLdr() const;
49  void createHitZoneListModifiedVariable(DtRwHitZoneList*) const;
50  virtual void mapZoneIdToName(std::string& hitFunctionAndZone) const;
51 
52  void setSpecificModifierButtonsEnabled(bool) const;
53 
54  void removeHitZoneVisualizations( DtRwHitZone*);
55  void removeAllHitZoneVisualizations();
56 
57  void setAbleToSelect(bool);
58 
59  void slot_selectionChanged(
60  const makVrv::DtSelectionManager::IdSet& selected, const makVrv::DtSelectionManager::IdSet& deselected);
61  virtual void slot_facadesCreated(const DtDisplayDefinitionWidget::Facades&);
62 
63  void cleanUpModificationDialog();
64  void cleanUpAddDialog();
65  virtual bool canBeDamaged(DtRwHitZone*) const;
66 
67  protected slots:
69  virtual void onItemChanged(QTreeWidgetItem* item, int column);
70  virtual void onItemDoubleClicked(QTreeWidgetItem* item, int column);
71  virtual void onItemSelectionChanged();
72 
74  virtual void onEditButtonClicked();
75  virtual void onAddButtonClicked();
76  virtual void onDeleteButtonClicked();
77 
79  virtual void onItemAboutToBeAdded(DtRwHitZone*);
80  virtual void onItemAboutToBeDeleted(DtRwHitZone*);
81  virtual void onRefreshList();
82 
83  virtual void onRefreshHitZoneVisualizations(DtRwHitZone*, DtVector location, DtVector dimensions, HitZoneColor color, bool isSelected = false);
84  virtual void onAlterHitZoneFinished();
85 
86  virtual void onHitZoneEditDialogAccepted();
87  virtual void onHitZoneEditDialogRejected();
88 
89  virtual void onHitZoneAddDialogAccepted();
90  virtual void onHitZoneAddDialogRejected();
91 
92  void onResetVisualsFromEditDialog();
93 
94  void onHitZoneSmokeParticleVisualizerAddOrCreate(DtVector location);
95  void onHitZoneSmokeParticleVisualizerDelete();
96 
97  signals:
98 
99  void signal_itemAboutToBeAdded(DtRwHitZone*);
100  void signal_refreshList();
101  void signal_itemAboutToBeDeleted(DtRwHitZone*);
102 
103  protected:
104  virtual void processUiEvent(const DtUiElementEvent&) override;
105  virtual void createControls(QWidget*) override;
106  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw) override;
107  virtual void onVisualsReady();
108 
109  virtual const std::map<DtHitZoneId, QStringList> getAllAssociatedSystems();
110  virtual void clearAssociatedSystems(DtRwHitZone*);
111 
112  virtual DtRwHitZone* getHitZoneFromTreeItem(QTreeWidgetItem*);
113  virtual void addHitZoneToLdrList(DtRwHitZone*);
114  virtual void deleteHitZoneFromLdrList(DtRwHitZone*);
115 
116  virtual void addHitZoneList(std::vector<DtRwHitZone*>);
117 
118  boost::signals2::connection connectionOnPostTick;
119  boost::signals2::connection connectionOnSelectionChanged;
120  boost::signals2::connection connectionOnFacadesCreated;
121 
123 
127 
130 
132 
134 };
Definition: hitZoneModificationDialog.h:25
DtHitZoneModificationWithModelDialog * myAddDialog
Definition: uiHitZonesElement.h:129
boost::signals2::connection connectionOnPostTick
Definition: uiHitZonesElement.h:118
virtual void createControls(QWidget *parent)
If additional widgets or connections need to be made do it here. The parent is the myWidget member...
virtual void setFromParameters(DtReaderWriter *parentRw)
Calls setFromParameters with std::vector of parameter.
Contains the makVrf::DtEntityFacadeCollection class declaration.
DtHitZoneModificationDialog * myModificationDialog
Definition: uiHitZonesElement.h:128
namespace makVrv
Definition: vrfHitZoneVisualizer.h:31
virtual void processUiEvent(const DtUiElementEvent &)
Process ui event. Default does nothing.
Definition: uiElement.h:244
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:198
ID value for a hit zone. Consists of a zone function (weapon, sensor, movement, etc.) and a zone number. Includes functions for packing/unpacking into an int.
Definition: hitZoneId.h:21
boost::signals2::connection connectionOnFacadesCreated
Definition: uiHitZonesElement.h:120
QToolButton * myDeleteButton
Definition: uiHitZonesElement.h:125
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
QTreeWidget * myHitZoneTreeWidget
Definition: uiHitZonesElement.h:122
makVrv::DtSignalConnectionManager myConnections
Definition: uiHitZonesElement.h:133
std::vector< makVrf::DtVrfObjectFacadeInterface * > Facades
Definition: displayDefinitionWidget.h:193
Definition: hitZoneModificationWithModelDialog.h:28
Will create entity facades for each realized model set and manage them all.
Definition: entityFacadeCollection.h:67
boost::signals2::connection connectionOnSelectionChanged
Definition: uiHitZonesElement.h:119
QToolButton * myAddButton
Definition: uiHitZonesElement.h:124
The DtUiElement class is the base for which all UI elements are defined. If you wish to create a new ...
Definition: uiElement.h:97
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Definition: rwHitZoneList.h:11
QToolButton * myEditButton
Definition: uiHitZonesElement.h:126
Defines configuration for a hit zone within the entity bounding volume. The hit zone is a box axis al...
Definition: rwHitZone.h:23
Definition: uiHitZonesElement.h:23
bool myAbleToSelect
Definition: uiHitZonesElement.h:131
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:33
Base class of the ui element class chain. Properties available through designer for all ui elements a...
Definition: uiElement.h:193

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)