![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2011 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 00008 00009 #pragma once 00010 00011 #include <vrvCoreQt/DtPage.h> 00012 00013 #include <vrvCore/DtSelectionManager.h> 00014 #include <vrvCore/DtSubjectObserver.h> 00015 00016 class QGridLayout; 00017 class QLabel; 00018 class QComboBox; 00019 class QTimer; 00020 class DtVector; 00021 00022 namespace makVrv 00023 { 00024 class DtElementEntry; 00025 00026 namespace vrvExampleDisplayUnitsPlugin 00027 { 00028 00032 class ElementInspectorPage : public DtPage, public DtDeObserver 00033 { 00034 Q_OBJECT; 00035 public: 00038 ElementInspectorPage(DtDe& de,QWidget* parent = 0, Qt::WindowFlags f = 0); 00039 00041 virtual ~ElementInspectorPage(); 00042 00044 virtual QIcon icon(); 00045 00047 virtual QString title(); 00048 00050 virtual const std::string& pageClassName() const; 00051 00053 static const std::string& thePageClassName(); 00054 00055 protected slots: 00056 00058 void onCurrentElementIdChanged(int index); 00059 00061 void onRefreshElementDisplay(); 00062 00063 protected: 00064 00065 void setupGui(); 00066 00068 virtual void activate(); 00069 00071 virtual void deactivate(); 00072 00074 virtual void slot_activate(DtDe* de); 00075 00077 virtual void slot_deactivate(DtDe* de); 00078 00082 void selectionChanged(const DtSelectionManager::IdSet& selected, 00083 const DtSelectionManager::IdSet& deselected, 00084 DtSelectionManager::SelectionType newType, 00085 DtSelectionManager::SelectionType oldType); 00086 00088 void updateElementParameters(DtElementEntry* entry); 00089 00091 void updateElementPosition( DtElementEntry* entry ); 00092 00094 void updateElementType( DtElementEntry* entry ) ; 00095 00098 DtVector getPosition( DtElementEntry* entry ); 00099 00102 std::string getElementName( DtElementEntry * entry ); 00103 00104 protected: 00105 00106 DtSignalConnectionManager mySignals; 00107 QGridLayout* myMainLayout; 00108 QLabel* myIdLabel; 00109 QComboBox* myIdBox; 00110 00111 QLabel* myTypeLabel; 00112 QLabel* myTypeValue; 00113 00114 QLabel* myXLabel; 00115 QLabel* myYLabel; 00116 QLabel* myZLabel; 00117 00118 QLabel* myXValue; 00119 QLabel* myYValue; 00120 QLabel* myZValue; 00121 00122 QTimer* myRefreshTimer; 00123 }; 00124 00125 typedef DtPageCreatorTemplate<ElementInspectorPage> ElementInspectorPageCreator; 00126 } 00127 }