VR-Forces 4.10 Class Documentation
 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>
20 
21 namespace makVrv
22 {
23  class DtElementDefinitionManager;
24  class DtElementEditorInterface;
25  class DtVisualizerAttributeEditorInterface;
26  class DtPage;
27  class DtUnicode;
28  class DtVisualizerDefinition;
29 
32  {
33  public:
34 
37  DtDe& de, DtElementEditorInterface* iface, DtPersistenceControlsInterface* persistenceControls,
38  DtPage* page = 0);
39 
41  virtual ~DtElementEditorLogic();
42 
43  private:
51  DtElementEditorLogic& operator=(const DtElementEditorLogic&);
52 
53  public:
57  void selectElement(const DtUnicode& elementName, bool valid);
58 
61  virtual void setElementRemoveAllowed(const DtUnicode& elementName);
62 
64  virtual void checkIfModified();
65 
66  protected:
67 
68  void selectVisualizerDefinition(int index);
69  void selectAttribute(int index, const std::string& attrName);
70  void deselectAttribute(int index, const std::string& attrName);
71 
73  void refreshElementDefinitions();
74 
75  void refreshVisualizerDefinitionView();
76 
78  void clearElementSelection();
79 
82  void setupModifiedEntitiesDialog();
83 
86  void runThroughChildren(DtElementDefinitionNew* elem, std::map<std::string, std::string>& names);
87 
88  void addVisualizerDefinition();
89  void removeVisualizerDefinition(int index);
90  void deselectVisualizerDefinition(int index);
91 
92  void addElement(const DtUnicode& name);
93  void removeElement();
94  void renameElement(const DtUnicode& oldName, const DtUnicode& newName);
95 
96  void addAttributeRequested(int index);
97  void removeAttribute(int index, const std::string& name);
98  void removeLocalAttribute(int index, const std::string& name);
99  void refreshAttribute(const DtUnicode& origin, int index, const std::string& name);
100 
101  void refreshModelSets();
102 
105  void refreshFileSaveTo();
106 
110  void changeFileLocation();
111 
112  void updateAttributeEditorInterface(int index, const std::string& name,
114 
115  void changeModelSet(int index);
116 
119  void changeFileSaveTo(int index);
120 
123  void changeFileFilter();
124 
126  virtual void on_import();
127 
129  virtual void on_restoreFactory();
130 
132  virtual void on_restoreStartup();
133 
135  virtual void on_export();
136 
139  virtual void on_exportHier();
140 
142  virtual void on_exportAll();
143 
147  virtual void on_exportLeaves();
148 
152  virtual void on_exportSelectedLeaves();
153 
155  virtual void on_reloadFiles();
156 
158  virtual void on_merge();
159 
162  virtual void on_exportSelected();
163 
165  virtual void on_importFilePathChosen(const std::string& filePath);
166 
168  virtual void on_exportFilePathChosen(const std::string& filePath);
169 
171  virtual void on_mergeFilePathChosen(const std::string& filePath);
172 
174  virtual void on_reloadLeafFiles(const std::string& filePath);
175 
177  virtual void on_exportSelectedFilePathChosen(const std::string& filePath);
178 
180  virtual void on_exportHierFilePathChosen(const std::string& filePath);
181 
183  virtual void on_exportLeafFilePathChosen(const std::string& filePath);
184 
186  virtual void on_exportSelectedLeafFilePathChosen(const std::string& filePath);
187 
190  virtual void on_saveDefaults();
191 
193  virtual void on_copyVisualizerDefinition();
194 
198  virtual void on_pasteAndReplaceVisualizerDefinition();
199 
202  virtual void on_pasteAndAddVisualizerDefinition();
203 
206  virtual void on_clearVisualizerDefinitions();
207 
209  virtual bool shouldDisableSave();
210 
212  virtual void mapTypeToDirectoryPath(DtElementDefinitionTypeManager::ElementDefinitionType type);
213 
216  virtual void slot_managerAboutToBeDeleted();
217 
219  virtual DtElementDefinitionManager& elementDefinitionManager();
220 
221  protected:
222 
224  unsigned int mySelectedModelSet;
225  unsigned int mySelectedFileSaveTo;
226 
228 
236  std::string myDirectoryPath;
237  std::string pathofSelectedModel;
238  std::vector<std::string> myNewList;
239  std::vector<std::string> myVisualList;
241  std::vector<DtVisualizerDefinition*> myCopiedVisDefs;
242  std::vector<std::string> myListOfCopiedVisDefs;
245 
246  };
247 
248 }
std::vector< DtVisualizerDefinition * > myCopiedVisDefs
Definition: DtElementEditorLogic.h:241
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.
Definition: DtVirtualBaseClass.h:19
A unicode string.
Definition: DtUnicode.h:33
DtUnicode mySelectedElement
Definition: DtElementEditorLogic.h:223
unsigned int mySelectedFileSaveTo
Definition: DtElementEditorLogic.h:225
voidpf uLong int origin
Definition: ioapi.h:42
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
int myVisualizerIndex
Definition: DtElementEditorLogic.h:244
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:232
unsigned int ElementDefinitionType
Identifier for a type of element definition.
Definition: DtElementDefinitionManager.h:506
std::string pathofSelectedModel
Definition: DtElementEditorLogic.h:237
std::vector< std::string > myVisualList
Definition: DtElementEditorLogic.h:239
Contains makVrv::DtVirtualBaseClass class.
DtElementEditorInterface * myInterface
Definition: DtElementEditorLogic.h:234
std::vector< std::string > myNewList
Definition: DtElementEditorLogic.h:238
A widget that displays a persistence GUI for element definitions Operations presented are restore fro...
Logic class for the DtElementEditorWidget.
Definition: DtElementEditorLogic.h:31
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
unsigned int mySelectedModelSet
Definition: DtElementEditorLogic.h:224
The element definition class contains the element definition information.
Definition: DtElementDefinitionNew.h:25
DtDe & myDe
Definition: DtElementEditorLogic.h:229
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:27
std::string myDirectoryPath
Definition: DtElementEditorLogic.h:236
DtPage * myPage
Definition: DtElementEditorLogic.h:227
DtSignalConnectionManager myManagerConnections
Definition: DtElementEditorLogic.h:231
Interface to a widget that displays a persistence GUI in some way.
DtPersistenceControlsInterface * myPersistenceControls
Definition: DtElementEditorLogic.h:235
Base class to provide boost signal/slot management.
DtVisualizerDefinition * myCopiedVisualizerDefinition
Definition: DtElementEditorLogic.h:240
A definition of a visualizer.
Definition: DtVisualizerDefinition.h:22
std::vector< std::string > myListOfCopiedVisDefs
Definition: DtElementEditorLogic.h:242
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtSignalConnectionManager myConnections
Definition: DtElementEditorLogic.h:230
bool myAdjustDropDown
Definition: DtElementEditorLogic.h:243
int myManagerType
Definition: DtElementEditorLogic.h:233

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)