VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtElementEditorLogic.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
13 
14 #include <vrvCoreQt/vrvCoreQt.h>
19 #include <vrvUtil/DtUnicode.h>
21 
22 namespace makVrv
23 {
24  class DtElementDefinitionManager;
25  class DtElementEditorInterface;
26  class DtVisualizerAttributeEditorInterface;
27  class DtPage;
28  class DtUnicode;
29  class DtVisualizerDefinition;
30 
33  {
34  public:
35 
38  DtDe& de, DtElementEditorInterface* iface, DtPersistenceControlsInterface* persistenceControls,
39  DtPage* page = 0);
40 
42  virtual ~DtElementEditorLogic();
43 
44  private:
52  DtElementEditorLogic& operator=(const DtElementEditorLogic&);
53 
54  public:
58  void selectElement(const DtUnicode& elementName, bool valid);
59 
62  virtual void setElementRemoveAllowed(const DtUnicode& elementName);
63 
65  virtual void checkIfModified();
66 
67  protected:
68 
69  void selectVisualizerDefinition(int index);
70  void selectAttribute(int index, const std::string& attrName);
71  void deselectAttribute(int index, const std::string& attrName);
72 
74  void refreshElementDefinitions();
75 
76  void refreshVisualizerDefinitionView();
77 
79  void clearElementSelection();
80 
83  void setupModifiedEntitiesDialog();
84 
87  void runThroughChildren(DtElementDefinitionNew* elem, std::map<std::string, std::string>& names);
88 
89  virtual void addVisualizerDefinition();
90  virtual void removeVisualizerDefinition(int index);
91  virtual void deselectVisualizerDefinition(int index);
92 
93  virtual void addElement(const DtUnicode& name);
94  virtual void removeElement();
95  virtual void renameElement(const DtUnicode& oldName, const DtUnicode& newName);
96 
97  virtual void addAttributeRequested(int index);
98  virtual void removeAttribute(int index, const std::string& name);
99  virtual void removeLocalAttribute(int index, const std::string& name);
100  virtual void refreshAttribute(const DtUnicode& origin, int index, const std::string& name);
101 
102  virtual void refreshModelSets();
103 
106  virtual void refreshFileSaveTo();
107 
111  void changeFileLocation();
112 
113  void updateAttributeEditorInterface(int index, const std::string& name,
115 
116  void changeModelSet(int index);
117 
120  void changeFileSaveTo(int index);
121 
124  void changeFileFilter();
125 
127  virtual void on_import();
128 
130  virtual void on_restoreFactory();
131 
133  virtual void on_restoreStartup();
134 
136  virtual void on_export();
137 
140  virtual void on_exportHier();
141 
143  virtual void on_exportAll();
144 
148  virtual void on_exportLeaves();
149 
153  virtual void on_exportSelectedLeaves();
154 
156  virtual void on_reloadFiles();
157 
159  virtual void on_merge();
160 
163  virtual void on_exportSelected();
164 
166  virtual void on_importFilePathChosen(const std::string& filePath);
167 
169  virtual void on_exportFilePathChosen(const std::string& filePath);
170 
172  virtual void on_mergeFilePathChosen(const std::string& filePath);
173 
175  virtual void on_reloadLeafFiles(const std::string& filePath);
176 
178  virtual void on_exportSelectedFilePathChosen(const std::string& filePath);
179 
181  virtual void on_exportHierFilePathChosen(const std::string& filePath);
182 
184  virtual void on_exportLeafFilePathChosen(const std::string& filePath);
185 
187  virtual void on_exportSelectedLeafFilePathChosen(const std::string& filePath);
188 
191  virtual void on_saveDefaults();
192 
194  virtual void on_copyVisualizerDefinition();
195 
199  virtual void on_pasteAndReplaceVisualizerDefinition();
200 
203  virtual void on_pasteAndAddVisualizerDefinition();
204 
207  virtual void on_clearVisualizerDefinitions();
208 
210  virtual bool shouldDisableSave();
211 
213  virtual void mapTypeToDirectoryPath(DtElementDefinitionTypeManager::ElementDefinitionType type);
214 
217  virtual void slot_managerAboutToBeDeleted();
218 
222  virtual void slot_currentStyleSheetsPathAboutToBeChanged();
223 
226  virtual void slot_postCurrentStyleSheetsPathChanged();
227 
229  virtual DtElementDefinitionManager& elementDefinitionManager();
230 
231  protected:
232 
234  unsigned int mySelectedModelSet;
235  unsigned int mySelectedFileSaveTo;
236 
238 
246  std::string myDirectoryPath;
247  std::string pathofSelectedModel;
248  std::vector<std::string> myNewList;
249  std::vector<std::string> myVisualList;
251  std::vector<DtVisualizerDefinition*> myCopiedVisDefs;
252  std::vector<std::string> myListOfCopiedVisDefs;
255 
256  };
257 
262  {
263  public:
266 
268  virtual ~DtElementEditorLogicCreator();
269 
271  static DtElementEditorLogicCreator& instance(DtDe&);
272 
274  static void registerInstance(DtDe&, DtElementEditorLogicCreator*);
275 
277  DtElementEditorInterface* iface, DtPersistenceControlsInterface* persistenceControls,
278  DtPage* page = 0);
279 
280  protected:
282  };
283 }
std::vector< DtVisualizerDefinition * > myCopiedVisDefs
Definition: DtElementEditorLogic.h:251
Base interface for the visualizer attribute editor to be passed to logics which will assign the attri...
Definition: DtVisualizerAttributeEditor.h:87
Definition: DtElementEditorInterface.h:19
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
DtDe & myDe
Definition: DtElementEditorLogic.h:281
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
DtUnicode mySelectedElement
Definition: DtElementEditorLogic.h:233
The DtElementEditorLogicCreator class presents a factory creator for the DtElementEditorLogic. To create a subclass of the DtElementEditorLogic, register an instance of the DtElementEditorLogicCreator and return your subclass in the create method.
Definition: DtElementEditorLogic.h:261
unsigned int mySelectedFileSaveTo
Definition: DtElementEditorLogic.h:235
voidpf uLong int origin
Definition: ioapi.h:42
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
int myVisualizerIndex
Definition: DtElementEditorLogic.h:254
Contains DLL export macros.
Manager which owns element definitions.for one type of element Use the makVrv::DtElementDefinitionTyp...
Definition: DtElementDefinitionManager.h:44
Abstract interface for controlling persistence of state in a dialog.
Definition: DtPersistenceControlsInterface.h:20
DtElementDefinitionManager * myManager
Definition: DtElementEditorLogic.h:242
unsigned int ElementDefinitionType
Identifier for a type of element definition.
Definition: DtElementDefinitionManager.h:506
std::string pathofSelectedModel
Definition: DtElementEditorLogic.h:247
std::vector< std::string > myVisualList
Definition: DtElementEditorLogic.h:249
Contains makVrv::DtVirtualBaseClass class.
DtElementEditorInterface * myInterface
Definition: DtElementEditorLogic.h:244
std::vector< std::string > myNewList
Definition: DtElementEditorLogic.h:248
A widget that displays a persistence GUI for element definitions Operations presented are restore fro...
Logic class for the DtElementEditorWidget.
Definition: DtElementEditorLogic.h:32
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
unsigned int mySelectedModelSet
Definition: DtElementEditorLogic.h:234
The element definition class contains the element definition information. The makVrv::DtElementDefini...
Definition: DtElementDefinitionNew.h:25
DtDe & myDe
Definition: DtElementEditorLogic.h:239
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:30
std::string myDirectoryPath
Definition: DtElementEditorLogic.h:246
DtPage * myPage
Definition: DtElementEditorLogic.h:237
DtSignalConnectionManager myManagerConnections
Definition: DtElementEditorLogic.h:241
Interface to a widget that displays a persistence GUI in some way.
DtPersistenceControlsInterface * myPersistenceControls
Definition: DtElementEditorLogic.h:245
Base class to provide boost signal/slot management.
DtVisualizerDefinition * myCopiedVisualizerDefinition
Definition: DtElementEditorLogic.h:250
A definition of a visualizer. Visualizer definition are always members of a visualizer definition set...
Definition: DtVisualizerDefinition.h:22
std::vector< std::string > myListOfCopiedVisDefs
Definition: DtElementEditorLogic.h:252
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:70
DtSignalConnectionManager myConnections
Definition: DtElementEditorLogic.h:240
bool myAdjustDropDown
Definition: DtElementEditorLogic.h:253
int myManagerType
Definition: DtElementEditorLogic.h:243

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)