Salome HOME
mergefrom branch BR_V511_PR tag mergeto_trunk_03feb09
[modules/yacs.git] / src / hmi / guiContext.hxx
index cfa2e6410edf81143f973838239ac408bd1bbf40..e4d63444f11c37b2f749de2059aa5646bb3b7107 100644 (file)
@@ -1,4 +1,21 @@
-
+//  Copyright (C) 2006-2008  CEA/DEN, EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 #ifndef _GUICONTEXT_HXX_
 #define _GUICONTEXT_HXX_
 
@@ -7,8 +24,6 @@
 #include "commandsProc.hxx"
 #include "guiObservers.hxx"
 
-#include <qcanvas.h>
-#include <qwidgetstack.h>
 #include <map>
 #include <string>
 
@@ -16,14 +31,13 @@ namespace YACS
 {
   namespace HMI
   {
-//     class Subject;
 
     class GuiContext: public Subject
     {
     public:
       GuiContext();
       virtual ~GuiContext();
-      void setProc(YACS::ENGINE::Proc* proc);
+      virtual void setProc(YACS::ENGINE::Proc* proc);
       long getNewId(YACS::HMI::TypeOfElem type);
 
       inline YACS::ENGINE::Catalog* getBuiltinCatalog()        {return _builtinCatalog; };
@@ -34,15 +48,10 @@ namespace YACS
       inline YACS::ENGINE::Proc* getProc()                     {return _proc; };
       inline YACS::HMI::ProcInvoc* getInvoc()                  {return _invoc; };
       inline YACS::HMI::SubjectProc* getSubjectProc()          {return _subjectProc; };
-      inline QCanvas* getCanvas()                              {return _canvas; };
-      inline QCanvasItem* getSelectedCanvasItem()              {return _selectedCanvasItem; };
       inline long getNewId()                                   {return _numItem++; };
-      inline QWidgetStack* getWidgetStack()                    {return _widgetStack; };
       inline std::string getXMLSchema()                        {return _xmlSchema; };
       inline std::pair<std::string, std::string> getYACSCont() {return _YACSEngineContainer; }
 
-      inline void setSelectedCanvasItem(QCanvasItem *c)                    {_selectedCanvasItem = c; };
-      inline void setWidgetStack(QWidgetStack* ws)                         {_widgetStack = ws; };
       inline void setSessionCatalog(YACS::ENGINE::Catalog* cata)           {_sessionCatalog = cata; };
       inline void setProcCatalog(YACS::ENGINE::Catalog* cata)              {_procCatalog = cata; };
       inline void setCurrentCatalog(YACS::ENGINE::Catalog* cata)           {_currentCatalog = cata; };
@@ -59,6 +68,7 @@ namespace YACS
       std::map<YACS::ENGINE::ComponentInstance*, YACS::HMI::SubjectComponent*>                     _mapOfSubjectComponent;
       std::map<YACS::ENGINE::Container*, YACS::HMI::SubjectContainer*>                             _mapOfSubjectContainer;
       std::map<std::string, YACS::HMI::SubjectDataType*>                                           _mapOfSubjectDataType;
+      std::map<int,YACS::HMI::SubjectNode*>                                                        _mapOfExecSubjectNode;
       std::string _lastErrorMessage;
 
     protected:
@@ -71,9 +81,6 @@ namespace YACS
       YACS::HMI::SubjectProc *_subjectProc;
       long _numItem;
       static GuiContext* _current;
-      QCanvas *_canvas;
-      QCanvasItem *_selectedCanvasItem;
-      QWidgetStack* _widgetStack;
       std::string _xmlSchema;
       std::pair<std::string, std::string> _YACSEngineContainer; // --- <ContainerName, HostName>