VR-Forces 4.8 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) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
13 
14 #include <vrvCoreQt/vrvCoreQt.h>
18 #include <vrvUtil/DtUnicode.h>
19 
20 namespace makVrv
21 {
22  class DtElementDefinitionManager;
23  class DtElementEditorInterface;
24  class DtVisualizerAttributeEditorInterface;
25  class DtPage;
26  class DtUnicode;
27  class DtVisualizerDefinition;
28 
31  {
32  public:
33 
36  DtDe& de, DtElementEditorInterface* iface, DtPersistenceControlsInterface* persistenceControls,
37  DtPage* page = 0);
38 
40  virtual ~DtElementEditorLogic();
41 
42  private:
50  DtElementEditorLogic& operator=(const DtElementEditorLogic&);
51 
52  public:
56  void selectElement(const DtUnicode& elementName, bool valid);
57 
60  virtual void setElementRemoveAllowed(const DtUnicode& elementName);
61 
63  virtual void checkIfModified();
64 
65  protected:
66 
67  void selectVisualizerDefinition(int index);
68  void selectAttribute(int index, const std::string& attrName);
69  void deselectAttribute(int index, const std::string& attrName);
70 
72  void refreshElementDefinitions();
73 
74  void refreshVisualizerDefinitionView();
75 
77  void clearElementSelection();
78 
79  void addVisualizerDefinition();
80  void removeVisualizerDefinition(int index);
81  void deselectVisualizerDefinition(int index);
82 
83  void addElement(const DtUnicode& name);
84  void removeElement();
85  void renameElement(const DtUnicode& oldName, const DtUnicode& newName);
86 
87  void addAttributeRequested(int index);
88  void removeAttribute(int index, const std::string& name);
89  void removeLocalAttribute(int index, const std::string& name);
90  void refreshAttribute(const DtUnicode& origin, int index, const std::string& name);
91 
92  void refreshModelSets();
93 
96  void refreshFileSaveTo();
97 
101  void changeFileLocation();
102 
103  void updateAttributeEditorInterface(int index, const std::string& name,
105 
106  void changeModelSet(int index);
107 
110  void changeFileSaveTo(int index);
111 
114  void changeFileFilter();
115 
117  virtual void on_import();
118 
120  virtual void on_restoreFactory();
121 
123  virtual void on_restoreStartup();
124 
126  virtual void on_export();
127 
130  virtual void on_exportHier();
131 
133  virtual void on_exportAll();
134 
138  virtual void on_exportLeaves();
139 
143  virtual void on_exportSelectedLeaves();
144 
146  virtual void on_merge();
147 
150  virtual void on_exportSelected();
151 
153  virtual void on_importFilePathChosen(const std::string& filePath);
154 
156  virtual void on_exportFilePathChosen(const std::string& filePath);
157 
159  virtual void on_mergeFilePathChosen(const std::string& filePath);
160 
162  virtual void on_exportSelectedFilePathChosen(const std::string& filePath);
163 
165  virtual void on_exportHierFilePathChosen(const std::string& filePath);
166 
168  virtual void on_exportLeafFilePathChosen(const std::string& filePath);
169 
171  virtual void on_exportSelectedLeafFilePathChosen(const std::string& filePath);
172 
175  virtual void on_saveDefaults();
176 
178  virtual void on_copyVisualizerDefinition();
179 
182  virtual void on_pasteVisualizerDefinition();
183 
186  virtual void on_clearVisualizerDefinitions();
187 
189  virtual bool shouldDisableSave();
190 
192  virtual void mapTypeToDirectoryPath(DtElementDefinitionTypeManager::ElementDefinitionType type);
193 
196  virtual void slot_managerAboutToBeDeleted();
197 
199  virtual DtElementDefinitionManager& elementDefinitionManager();
200 
201  protected:
202 
204  unsigned int mySelectedModelSet;
205  unsigned int mySelectedFileSaveTo;
206 
208 
216  std::string myDirectoryPath;
217  std::string pathofSelectedModel;
218  std::vector<std::string> myNewList;
219  std::vector<std::string> myVisualList;
221  std::vector<DtVisualizerDefinition*> myCopiedVisDefs;
222  std::vector<std::string> myListOfCopiedVisDefs;
225 
226  };
227 
228 }
std::vector< DtVisualizerDefinition * > myCopiedVisDefs
Definition: DtElementEditorLogic.h:221
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:22
A unicode string.
Definition: DtUnicode.h:33
DtUnicode mySelectedElement
Definition: DtElementEditorLogic.h:203
unsigned int mySelectedFileSaveTo
Definition: DtElementEditorLogic.h:205
voidpf uLong int origin
Definition: ioapi.h:42
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
int myVisualizerIndex
Definition: DtElementEditorLogic.h:224
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:212
unsigned int ElementDefinitionType
Identifier for a type of element definition.
Definition: DtElementDefinitionManager.h:500
std::string pathofSelectedModel
Definition: DtElementEditorLogic.h:217
std::vector< std::string > myVisualList
Definition: DtElementEditorLogic.h:219
Contains makVrv::DtVirtualBaseClass class.
DtElementEditorInterface * myInterface
Definition: DtElementEditorLogic.h:214
std::vector< std::string > myNewList
Definition: DtElementEditorLogic.h:218
Logic class for the DtElementEditorWidget.
Definition: DtElementEditorLogic.h:30
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
unsigned int mySelectedModelSet
Definition: DtElementEditorLogic.h:204
DtDe & myDe
Definition: DtElementEditorLogic.h:209
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:30
std::string myDirectoryPath
Definition: DtElementEditorLogic.h:216
DtPage * myPage
Definition: DtElementEditorLogic.h:207
DtSignalConnectionManager myManagerConnections
Definition: DtElementEditorLogic.h:211
Interface to a widget that displays a persistence GUI in some way.
DtPersistenceControlsInterface * myPersistenceControls
Definition: DtElementEditorLogic.h:215
Base class to provide boost signal/slot management.
DtVisualizerDefinition * myCopiedVisualizerDefinition
Definition: DtElementEditorLogic.h:220
A definition of a visualizer.
Definition: DtVisualizerDefinition.h:22
std::vector< std::string > myListOfCopiedVisDefs
Definition: DtElementEditorLogic.h:222
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtSignalConnectionManager myConnections
Definition: DtElementEditorLogic.h:210
bool myAdjustDropDown
Definition: DtElementEditorLogic.h:223
int myManagerType
Definition: DtElementEditorLogic.h:213

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)