SET(PROJECT_HEADERS
NewGeom.h
NewGeom_Module.h
+ NewGeom_DataModel.h
)
SET(PROJECT_AUTOMOC
- ${CMAKE_CURRENT_BINARY_DIR}/XGUI_automoc.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/NewGeom_automoc.cpp
)
SET(PROJECT_SOURCES
NewGeom_Module.cpp
+ NewGeom_DataModel.cpp
)
SET(PROJECT_RESOURCES
--- /dev/null
+
+#include "NewGeom_DataModel.h"
+
+
+NewGeom_DataModel::NewGeom_DataModel( CAM_Module* theModule )
+ : LightApp_DataModel(theModule)
+{
+}
+
+NewGeom_DataModel::~NewGeom_DataModel()
+{
+}
+
+bool NewGeom_DataModel::open( const QString& thePath, CAM_Study* theStudy, QStringList theFiles )
+{
+ return true;
+}
+
+bool NewGeom_DataModel::save( QStringList& theFiles )
+{
+ return true;
+}
+
+bool NewGeom_DataModel::saveAs( const QString& thePath, CAM_Study* theStudy, QStringList& theFiles )
+{
+ myStudyPath = thePath;
+ return save( theFiles );
+}
+
+bool NewGeom_DataModel::close()
+{
+ return LightApp_DataModel::close();
+}
+
+bool NewGeom_DataModel::create( CAM_Study* theStudy )
+{
+ return true;
+}
+
+bool NewGeom_DataModel::isModified() const
+{
+ return false;
+}
+
+bool NewGeom_DataModel::isSaved() const
+{
+ return true;
+}
+
+void NewGeom_DataModel::update( LightApp_DataObject* theObj, LightApp_Study* theStudy )
+{
+}
--- /dev/null
+
+
+#ifndef NEWGEOM_DATAMODEL_H
+#define NEWGEOM_DATAMODEL_H
+
+#include "NewGeom.h"
+#include <LightApp_DataModel.h>
+
+class NewGeom_EXPORT NewGeom_DataModel : public LightApp_DataModel
+{
+ Q_OBJECT
+public:
+ NewGeom_DataModel( CAM_Module* theModule );
+ virtual ~NewGeom_DataModel();
+
+ virtual bool open( const QString& thePath, CAM_Study* theStudy, QStringList theFiles );
+ virtual bool save( QStringList& theFiles );
+ virtual bool saveAs( const QString& thePath, CAM_Study* theStudy, QStringList& theFiles );
+ virtual bool close();
+ virtual bool create( CAM_Study* theStudy );
+
+ virtual bool isModified() const;
+ virtual bool isSaved() const;
+
+ virtual void update( LightApp_DataObject* theObj = 0, LightApp_Study* theStudy = 0 );
+
+private:
+ QString myStudyPath;
+
+};
+
+#endif
\ No newline at end of file
#include "NewGeom_Module.h"
+#include "NewGeom_DataModel.h"
#include <LightApp_Application.h>
#include <OCCViewer_ViewModel.h>
+extern "C" {
+ NewGeom_EXPORT CAM_Module* createModule() {
+ return new NewGeom_Module();
+ }
+
+ NewGeom_EXPORT char* getModuleVersion() {
+ return "0.0";
+ }
+}
+
+
NewGeom_Module::NewGeom_Module()
: LightApp_Module( "NewGeom" )
void NewGeom_Module::initialize(CAM_Application* theApp)
{
+ LightApp_Module::initialize(theApp);
}
void NewGeom_Module::windows(QMap<int, int>& theWndMap) const
return LightApp_Module::deactivateModule(theStudy);
}
+CAM_DataModel* NewGeom_Module::createDataModel()
+{
+ return new NewGeom_DataModel(this);
+}
bool activateModule( SUIT_Study* theStudy);
bool deactivateModule( SUIT_Study* theStudy);
+protected:
+ CAM_DataModel* createDataModel();
+
+
private:
};