![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2007 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: uiPositionElement.h,v $ $Revision: 1.2 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00013 00014 #ifndef uiPositionElement_h 00015 #define uiPositionElement_h 00016 00017 #include "entityEditorImpl/uiFrameElement.h" 00018 #include "vrfutil/rwInt.h" 00019 #include "vrfutil/rwReal.h" 00020 00021 #include <matrix/vlVector.h> 00022 00023 class QDoubleValidator; 00024 class QLineEdit; 00025 class QLabel; 00026 class DtRwVector; 00027 00030 00031 #include "entityEditorImpl/entityEditorImplDefines.h" 00032 00033 class DT_DLL_entityeditorimpl DtUiPositionElement : public DtUiFrameElement 00034 { 00035 public: 00036 00038 DtUiPositionElement 00039 ( 00040 const DtString& name, 00041 DtReaderWriterRegistry* const parentRegistry = NULL 00042 ); 00043 00045 virtual ~DtUiPositionElement(); 00046 00048 DtUiPositionElement(const DtUiPositionElement& orig); 00049 00051 DtUiPositionElement& operator=(const DtUiPositionElement& orig); 00052 00053 virtual QWidget* createLabelWidget(QWidget* parent) {return 0;}; 00054 virtual QWidget* createControls(QWidget*); 00055 virtual void setFromParameters(DtReaderWriter* parentRw); 00056 00057 virtual const DtString& parameterName() const; 00058 virtual const DtString& relativeTo() const; 00059 virtual void processUiEvent(const DtUiElementEvent&); 00060 00061 protected: 00062 virtual void elementChanged(); 00063 virtual void decorateElement(); 00064 00065 virtual void setModifiedFont(QLabel* l, bool modified); 00066 virtual void setPosition(DtRwVector* sourceVec); 00067 00068 virtual void sendEvent(); 00069 00070 virtual DtReaderWriterRegistryData* createBackup(const DtString& backupName); 00071 00072 virtual DtVector relativePosition(const DtString&) const; 00073 virtual void setFromSystemParameterData(const DtSystemParameterData* data); 00074 00075 virtual void deleteBackup(const DtString& backupName); 00076 00077 protected: 00078 virtual DtUiElement* clone(); 00079 00080 protected: 00081 QDoubleValidator* myValidator; 00082 00083 DtRwInt myDecimals; 00084 QLabel* myForwardLabel; 00085 QLabel* myRightLabel; 00086 QLabel* myUpLabel; 00087 QLineEdit* myForwardLineEdit; 00088 QLineEdit* myRightLineEdit; 00089 QLineEdit* myUpLineEdit; 00090 double myForwardDiff; 00091 double myRightDiff; 00092 double myUpDiff; 00093 00094 DtString myRelativeTo; 00095 DtString myParameterName; 00096 00097 typedef std::map<DtString, DtVector> RelativePositions; 00098 RelativePositions myRelativePositions; 00099 00100 bool mySendingEvent; 00101 }; 00102 00103 #endif