![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2011 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 00006 #pragma once 00007 #include <vrvCore/DtElementDefinitionManager.h> 00008 #include <vrvCoreQt/vrvCoreQt.h> 00009 #include <vrvCoreQt/DtPersistenceControlsInterface.h> 00010 #include <vrvUtil/DtVirtualBaseClass.h> 00011 #include <vrvUtil/DtSignalConnectionManager.h> 00012 #include <vrvUtil/DtUnicode.h> 00013 00014 namespace makVrv 00015 { 00016 class DtElementDefinitionManager; 00017 class DtElementEditorInterface; 00018 class DtVisualizerAttributeEditorInterface; 00019 00021 class DT_DLL_VRVCOREQT DtElementEditorLogic : public DtVirtualBaseClass 00022 { 00023 public: 00024 00026 DtElementEditorLogic(DtElementDefinitionTypeManager::ElementDefinitionType type, 00027 DtDe& de,DtElementEditorInterface* iface, DtPersistenceControlsInterface* persistenceControls); 00028 00030 ~DtElementEditorLogic(); 00031 00033 void selectElement(const DtUnicode& elementName); 00034 00035 protected: 00036 00037 void selectVisualizerDefinition(int index); 00038 void selectAttribute(int index, const std::string& attrName); 00039 void deselectAttribute(int index, const std::string& attrName); 00040 00042 void refreshElementDefinitions(); 00043 00044 void refreshVisualizerDefinitionView(); 00045 00047 void clearElementSelection(); 00048 00049 void addVisualizerDefinition(); 00050 void removeVisualizerDefinition(int index); 00051 void deselectVisualizerDefinition(int index); 00052 00053 void addElement(const DtUnicode& name); 00054 void removeElement(); 00055 void renameElement(const DtUnicode& oldName,const DtUnicode& newName); 00056 00057 void addAttributeRequested(int index); 00058 void removeAttribute(int index, const std::string& name); 00059 void removeLocalAttribute(int index, const std::string& name); 00060 void refreshAttribute(int index, const std::string& name); 00061 00062 void refreshModelSets(); 00063 00064 void updateAttributeEditorInterface(int index, const std::string& name, 00065 DtVisualizerAttributeEditorInterface* iface); 00066 00067 void changeModelSet(int index); 00068 00070 virtual void on_import(); 00071 00073 virtual void on_restoreFactory(); 00074 00076 virtual void on_restoreStartup(); 00077 00079 virtual void on_export(); 00080 00082 virtual void on_merge(); 00083 00086 virtual void on_exportSelected(); 00087 00089 virtual void on_importFilePathChosen(const std::string& filePath); 00090 00092 virtual void on_exportFilePathChosen(const std::string& filePath); 00093 00095 virtual void on_mergeFilePathChosen(const std::string& filePath); 00096 00098 virtual void on_exportSelectedFilePathChosen(const std::string& filePath); 00099 00100 00101 protected: 00102 00103 DtUnicode mySelectedElement; 00104 unsigned int mySelectedModelSet; 00105 00106 DtDe& myDe; 00107 DtSignalConnectionManager myConnections; 00108 DtElementDefinitionManager& myManager; 00109 DtElementEditorInterface* myInterface; 00110 DtPersistenceControlsInterface* myPersistenceControls; 00111 }; 00112 00113 }