VR-Forces 4.0.4 Class Documentation
include/entityEditorImpl/uiForParameter.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2000 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: uiForParameter.h,v $ $Revision: 1.9 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DTUIFORPARAMETER_H_
00013 #define DTUIFORPARAMETER_H_
00014 
00015 #include "vrfutil/rwList.h"
00016 #include "vrfutil/rwString.h"
00017 #include "entityEditorImpl/uiElement.h"
00018 #include "vrfutil/rwBoolean.h"
00019 
00020 class QWidget;
00021 class DtVrfObjectParameters;
00022 class DtModelSetEntry;
00023 
00024 #include "entityEditorImpl/entityEditorImplDefines.h"
00025 
00026 class DtUiForParameter;
00027 
00028 class DT_DLL_entityeditorimpl DtUiForParameterSignaller : public QObject
00029 {
00030    Q_OBJECT
00031 
00032 public:
00033    DtUiForParameterSignaller() {};
00034 
00035    void setParent(DtUiForParameter* p) { myParent = p; };
00036 
00037 public slots:
00038    virtual void uiEvent(const DtUiElementEvent&);
00039 
00040 signals:
00041    void updateUiSaveState(const DtUiElementEvent&);
00042    void uiEventSignal(const DtUiElementEvent&);
00043 
00044 protected:
00045    DtUiForParameter* myParent;
00046 };
00047 
00048 class DT_DLL_entityeditorimpl DtUiForParameter : public DtRwList
00049 {
00050 public:
00051 
00053    DtUiForParameter
00054    (
00055       const DtString& name,
00056       DtReaderWriterRegistry* const parentRegistry = NULL
00057    );
00058 
00060    virtual ~DtUiForParameter();
00061 
00063    DtUiForParameter(const DtUiForParameter& orig);
00064 
00066    DtUiForParameter& operator=(const DtUiForParameter& orig);
00067 
00068    const DtString& parameterType() const;
00069    const DtString& objectTypeTemplate() const;
00070    const DtString& inheritFrom() const;
00071    const DtString& label() const;
00072    bool canBeAssigned() const;
00073    void setInheritFrom(const DtString&);
00074 
00075    virtual QWidget* createControls(DtVrfObjectParameters*, DtElementChangedCallbackFcn f, void* usr);
00076 
00077    virtual void inheritFrom(DtUiForParameter*);
00078    virtual DtUiElement* findElement(const DtString&) const;
00079    virtual bool isModified() const;
00080 
00082    virtual void mergeInto(const DtString& readerWriterName, bool after, DtUiElement* element);
00083 
00084    virtual DtUiForParameter* clone();
00085 
00089 
00090    static void elementChangedCallback(DtUiElement* element, void* usr);
00091    virtual void processElementChanged(DtUiElement* element);
00093 
00094    virtual void setModelModified(DtModelSetEntry*);
00095    virtual void uiEvent(const DtUiElementEvent&);
00096    virtual QMap<QString, QVariant> uiState() const;
00097    virtual void setUiState(const QMap<QString, QVariant>&);
00098 
00099    DtUiForParameterSignaller* signalHandler() { return &mySignalHandler; };
00100 
00101 protected:
00102    virtual DtlObjPtr getData(DtlObjPtr args, const DtFilename& searchPath, const DtVariableBindingsList &);
00103 
00104    virtual void emptyList();
00105 
00106    virtual void copyList(const DtUiForParameter& orig);
00107 
00108 protected:
00109    DtRwBoolean myCanBeAssigned;
00110    DtRwString  myParameterType;
00111    DtRwString  myInheritFrom;
00112    DtRwString  myLabel;
00113    DtRwString  myObjectTypeTemplate;
00114    DtUiForParameterSignaller  mySignalHandler;
00115 };
00116 
00117 inline const DtString& DtUiForParameter::parameterType() const
00118 {
00119    return myParameterType;
00120 }
00121 
00122 inline const DtString& DtUiForParameter::objectTypeTemplate() const
00123 {
00124    return myObjectTypeTemplate;
00125 }
00126 
00127 inline const DtString& DtUiForParameter::inheritFrom() const
00128 {
00129    return myInheritFrom;
00130 }
00131 
00132 inline void DtUiForParameter::setInheritFrom(const DtString& s)
00133 {
00134    myInheritFrom = s;
00135 }
00136 
00137 inline const DtString& DtUiForParameter::label() const
00138 {
00139    return myLabel;
00140 }
00141 
00142 inline bool DtUiForParameter::canBeAssigned() const
00143 {
00144    return myCanBeAssigned;
00145 }
00146 
00147 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)