2 // Author : Guillaume Boulant (EDF)
4 #ifndef DATASOURCE_CONTROLLER_H
5 #define DATASOURCE_CONTROLLER_H
7 #include <SALOMEconfig.h>
8 #include CORBA_CLIENT_HEADER(MEDDataManager)
9 #include <StandardApp_Module.hxx>
10 #include <SALOME_AppStudyEditor.hxx>
14 #include "XmedDataModel.hxx"
15 #include "DlgChangeUnderlyingMesh.hxx"
16 #include "MEDOPGUI.hxx"
18 // The DatasourceController defines data structures and classes to
19 // manage the usage of objects in the data space. The data space is
20 // technically the study, whose graphical representation is the
24 // A datasource event is used by the DatasourceController to notify a
25 // job to the Workspace controller (Qt signal/slot pattern connected
26 // by the main controller MEDOPModule). The setting of attributes and
27 // usage of these attributes in the WorkspaceController depends on the
28 // event type. For example, in the case of a IMPORT event, we just
29 // have to transmit the object, while in the USE event we have to
30 // transmit an object AND an alias.
34 EVENT_IMPORT_OBJECT, // Simply import the object in the workspace
35 EVENT_USE_OBJECT, // Import in the workspace AND define a proxy
36 // variable in the tui console to use it
37 EVENT_VIEW_OBJECT // View with a salome viewer (SMESH/VISU/PARAVIS)
40 XmedDataObject * objectdata;
45 // ==============================================================
46 // Datasource controller
47 // ==============================================================
49 class MEDOPGUI_EXPORT DatasourceController: public QObject {
53 DatasourceController(StandardApp_Module * salomeModule);
54 ~DatasourceController();
57 MEDOP::DatasourceHandler * addDatasource(const char * filename);
60 // Callback connected to dialog box validation signals
61 void OnChangeUnderlyingMeshInputValidated();
64 void datasourceSignal(const DatasourceEvent * event);
67 void OnAddDatasource();
68 void OnAddImagesource();
71 void OnUseInWorkspace();
72 void OnChangeUnderlyingMesh();
76 StandardApp_Module * _salomeModule;
77 SALOME_AppStudyEditor * _studyEditor;
79 DlgChangeUnderlyingMesh * _dlgChangeUnderlyingMesh;