1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // Author : Guillaume Boulant (EDF)
22 #ifndef _WORKSPACE_CONTROLLER_HXX
23 #define _WORKSPACE_CONTROLLER_HXX
25 #include "TreeGuiManager.hxx"
26 #include "MEDEventListener_i.hxx"
27 #include "XmedConsoleDriver.hxx"
28 #include "DatasourceController.hxx"
29 #include "MEDCALCGUI.hxx"
31 #include <SALOMEconfig.h>
32 #include CORBA_CLIENT_HEADER(MEDDataManager)
33 //#include <StandardApp_Module.hxx>
34 #include <SalomeApp_Module.h>
41 * This class defines a DockWidget plugged in the SALOME application,
42 * and containing a tree view for rendering a hierarchical data
43 * model. This datamodel contains the objects used in the workspace.
45 class MEDCALCGUI_EXPORT WorkspaceController: public TreeGuiManager {
50 //WorkspaceController(StandardApp_Module * salomeModule);
51 WorkspaceController(MEDModule * salomeModule);
52 ~WorkspaceController();
57 // Slots overiding TreeGuiManager
58 void processItemList(QStringList itemNameIdList, int actionId);
61 void processMedEvent(const MEDCALC::MedEvent * event);
62 void processDatasourceEvent(const DatasourceEvent * event);
63 void OnSaveWorkspace();
64 void OnCleanWorkspace();
67 void workspaceSignal(const MEDCALC::MedEvent * event);
70 XmedConsoleDriver * _consoleDriver;
71 //StandardApp_Module * _salomeModule;
72 MEDModule * _salomeModule;
73 void _importItem(QString itemNameId);
74 void _importItemList(QStringList itemNameIdList);
75 void _importFieldIntoConsole(MEDCALC::FieldHandler * fieldHandler,
77 const char * alias=NULL);
79 void _exportItemList(QStringList itemNameIdList);
80 void _saveItemList(QStringList itemNameIdList);
81 void _removeItemList(QStringList itemNameIdList);
82 void _viewItemList(QStringList itemNameIdList);
84 MEDEventListener_i * _medEventListener;
86 // This structure is intended to memorized in a bundle the whole set
87 // of integers identifying the actions of the popup menu associated
88 // to the TreeView embedded in this TreeGuiManager
97 ActionIdentifiers _actionIds;
101 #endif // _WORKSPACE_CONTROLLER_HXX