1 // Copyright (C) 2006-2012 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.
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
23 #include "SalomeWrap_Module.hxx"
24 #include "Yacsgui_Resource.hxx"
25 #include <SALOMEconfig.h>
27 #include <QModelIndex>
40 class SalomeApp_Application;
41 class SUIT_ViewWindow;
43 class Yacsgui: public SalomeWrap_Module
47 friend class Yacsgui_Resource;
53 void initialize( CAM_Application* app);
54 void windows( QMap<int, int>& theMap) const;
55 virtual QString engineIOR() const;
57 virtual void viewManagers( QStringList& list) const;
58 virtual void setResource(SUIT_ResourceMgr* r);
59 virtual void createPreferences();
60 virtual void preferencesChanged( const QString& sect, const QString& name );
61 virtual void loadSchema(const std::string& filename,bool edit=true, bool arrangeLocalNodes=false);
62 virtual void studyActivated();
65 bool deactivateModule( SUIT_Study* theStudy);
66 bool activateModule( SUIT_Study* theStudy);
67 void onDblClick(const QModelIndex& index);
71 void onWindowActivated( SUIT_ViewWindow* svw);
72 void onWindowClosed( SUIT_ViewWindow* svw);
73 void onTryClose(bool &isClosed, QxScene_ViewWindow* window);
76 virtual CAM_DataModel* createDataModel();
77 bool createSComponent();
79 YACS::HMI::SuitWrapper* _wrapper;
80 YACS::HMI::GenericGui* _genericGui;
82 Yacsgui_Resource* _myresource;
83 SUIT_ViewWindow* _currentSVW;
84 std::map<int, YACS::HMI::QtGuiContext*> _studyContextMap;
85 static int _oldStudyId;