/** * @file WellLogWorkflowDataModel.h * @brief 工作流数据模型 * @date 2014-10-29 * @author: hudongfang */ #ifndef PAI_FRAME_CPAIWELLLOGWORKFLOWDATAMODEL_H #define PAI_FRAME_CPAIWELLLOGWORKFLOWDATAMODEL_H #pragma warning( push ,0) #include "OSGDataModel.h" #include "BaseObject.h" #include "PaiWorkflowDataModel.h" #include "Module.h" using namespace pai::objectmodel; #pragma warning( pop ) BEGIN_OSGDATAMODEL_NAMESPACE; class OSGDATAMODEL_EXPORT CWellLogWorkflowDataModel : public PaiWorkflowDataModel,public CBaseObject { public: CWellLogWorkflowDataModel(QUuid id=QUuid()); ~CWellLogWorkflowDataModel(); DECLARE_COSGOBJECT_H public: virtual QUuid GetTypeID()const; virtual pai::ios::welllog::DataObject *GetDbObject(); virtual void ReloadDataModuel(); virtual CBaseObject * GetVecWindowDocument() { if(m_SingleWellWindowDocument)return m_SingleWellWindowDocument; else return m_MultiWellWindowDocument; } CBaseObject * GetMWVecWindowDocument(){return m_MultiWellWindowDocument;} bool IsSingleModuleMode() const { return isSingleModuleMode; } void SetSingleModuleMode(bool val) { isSingleModuleMode = val; } bool IsDefineMothodMode() const { return isDefineMothodMode; } void SetDefineMothodMode(bool val) { isDefineMothodMode = val; } QString GetCurrentModuleID() const { return CurrentModuleID; } void SetCurrentModuleID(QString val) { CurrentModuleID = val; } ///** //* @brief 得到"Wells"文件夹 //*/ //COSGObject *GetWellsFolder(bool bCreateIfNotExist); ///** //* @brief 得到"Windows"文件夹 //*/ //COSGObject *GetWindowDocuments(bool bCreateIfNotExist); //PaiObject *GetGeologicalStratificationRoot(bool bCreateIfNotExist); //pai::ios::welllog::Project &GetProject(); ///** //* @brief 项目文件全路径 //*/ //QString GetProjectPath(); //void SetProjectPath(QString strProjectPath ); //virtual void CopyFrom( COSGObject *pOSGObjectOther ); QString GetCurrentWellRoundPath() const { return CurrentWellRoundPath; } void SetCurrentWellRoundPath(QString val) { CurrentWellRoundPath = val; } /** * @brief 查询所有工作流模板 * @param[in,out] workflows 存放查询到的工作流, 请自行释放List * @return 是否查询成功 */ bool GetWorkflowTemplates(QList< CWellLogWorkflowDataModel* > & workflows); void LoadFromTemplateFile(); pai::module::CModule* m_pModule; private: CBaseObject * m_SingleWellWindowDocument; CBaseObject * m_MultiWellWindowDocument; bool isSingleModuleMode;//true则是单方法模式,false就是workflow模式 bool isDefineMothodMode;//true则是运行模式,false就是定义合成方法模式 QString CurrentWellRoundPath;//当前井次 QString CurrentModuleID;//单方法处理模式下,启动的方法 bool isLoaded;//实现懒加载,双击模版树上的时候才加载 }; END_OSGDATAMODEL_NAMESPACE using namespace pai::datamodel; #endif