VR-Forces 4.0.4 Class Documentation
include/entityEditorImpl/uiSystemElement.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2007 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: uiSystemElement.h,v $ $Revision: 1.3 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00013 
00014 #ifndef uiSystemElement_h
00015 #define uiSystemElement_h
00016 
00017 #include "entityEditorImpl/uiElement.h"
00018 #include "vrfobjparam/compSystemDatabase.h"
00019 #include <QtCore/QObject>
00020 
00021 class DtUiSystemElement;
00022 class DtComponentSystemDescriptor;
00023 class DtSystemPropertyEditDialog;
00024 class DtRwBoolean;
00025 class QProcess;
00026 class DtRwVariableBindings;
00027 class DtMtlParameterDbEntry;
00028 
00029 #include "entityEditorImpl/entityEditorImplDefines.h"
00030 
00031 class DT_DLL_entityeditorimpl DtUiSystemElementSignalHandler : public QObject
00032 {
00033    Q_OBJECT
00034 
00035 public:
00036    DtUiSystemElementSignalHandler();
00037 
00038    void setUiElement(DtUiSystemElement* parent);
00039 
00040 public slots:
00041    virtual void editProperties();
00042    virtual void launchOpdEditor();
00043 
00044 protected:
00045    DtUiSystemElement* myParent;
00046 };
00047 
00048 class DT_DLL_entityeditorimpl DtUiSystemElement : public DtUiElement
00049 {
00050 public:
00051 
00053    DtUiSystemElement(const DtString& name,
00054       DtReaderWriterRegistry* const parentRegistry = NULL);
00055 
00057    virtual ~DtUiSystemElement();
00058 
00060    DtUiSystemElement(const DtUiSystemElement& orig);
00061 
00063    DtUiSystemElement& operator=(const DtUiSystemElement& orig);
00064 
00065    virtual void init();
00066 
00067    virtual void openPropertyEditWindow();
00068    virtual void launchOpdEditor();
00069 
00072    virtual QString getOpdEditorArguments() const;
00073 
00074    virtual bool isModified() const;
00075 
00077    static void stopOpdEditor();
00078 
00081    virtual void replaceSystem(DtMtlParameterDbEntry* entry, const DtComponentSystemDescriptor& system);
00082 
00084    virtual void deleteSystem(DtMtlParameterDbEntry* entry, const DtFilename& system);
00085 
00086    virtual void dialogDone(bool);
00087 
00088 protected:
00089    virtual DtUiElement* clone();
00090 
00091    virtual void setFromParameters(DtReaderWriter* parentRw);
00092    virtual DtReaderWriterRegistryData* value(DtReaderWriter* parentRw);
00093 
00096    virtual void findAvailableSystems();
00097 
00098    virtual void createSystemSignalHandler();
00099 
00103    virtual DtComponentSystemDescriptor* addSystemToParameters(const DtFilename& sysDefFilename, const DtString& name = "");
00104 
00105    virtual void removeSystemFromParameters(DtComponentSystemDescriptor* sysDescriptor, bool deleteDescriptor = true);
00106    virtual void removeSystemFromParameters(const DtComponentSystemDescriptor& sysDescriptor);
00107 
00110    virtual DtString availableSystemName(const DtString& baseName);
00111 
00115    virtual void addSoilTypesFromSystem(const DtComponentSystemDefinition* systemDef);
00116 
00119    virtual DtSystemPropertyEditDialog* createSystemPropertyDialog(
00120       DtComponentSystemDescriptor* desc, const DtComponentSystemDefinition* definition,
00121       QWidget* parentWidget);
00122 
00125    static const DtComponentSystemDefinition* findSystemInfoForFilename(const DtFilename& filename,
00126       const DtSystemDefinitionInfoList& list);
00127 
00129    virtual QList<DtComponentSystemDescriptor*> systemsFor(const DtFilename&) const;
00130 
00133    virtual void mergeBindings(const DtRwVariableBindings* source, DtRwVariableBindings* destination) const;
00134 
00135    virtual void loadSystem(DtMtlParameterDbEntry* entry, DtComponentSystemDescriptor* desc) const;
00136 
00137 protected:
00138    DtRwString                 myCategory;
00139    DtSystemDefinitionInfoList myAvailableSystems;
00140    DtUiSystemElementSignalHandler* mySystemElementSignalHandler;
00141    DtRwBoolean*  myModified; 
00142    DtVrfObjectParameters* myObjectParameters;
00143    static QProcess*  theOpdEditorProcess;
00144    bool myPassEventsToDialog;
00145 };
00146 
00147 
00148 #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)