X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSalomeApp%2FSalomeApp_Study.h;h=cf93e4056d5126217a114889a4f829e9c6ae650b;hb=e16094d9d06b05aba94fb4f646d26e3b5f35d8e7;hp=ef5c127fd11caa68c3007ae77ed3723351d8ab8f;hpb=399155730966dfc225fbb24f66204b05664385f2;p=modules%2Fgui.git diff --git a/src/SalomeApp/SalomeApp_Study.h b/src/SalomeApp/SalomeApp_Study.h index ef5c127fd..cf93e4056 100644 --- a/src/SalomeApp/SalomeApp_Study.h +++ b/src/SalomeApp/SalomeApp_Study.h @@ -1,28 +1,31 @@ -// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D -// +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// // 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// 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 +// 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 SALOMEAPP_STUDY_H #define SALOMEAPP_STUDY_H #include "SalomeApp.h" #include -#include #ifdef WIN32 #pragma warning( disable:4251 ) @@ -34,13 +37,16 @@ class SALOMEAPP_EXPORT SalomeApp_Study : public LightApp_Study { Q_OBJECT + class Observer_i; + public: SalomeApp_Study( SUIT_Application* ); virtual ~SalomeApp_Study(); virtual int id() const; + virtual QString studyName() const; - virtual void createDocument(); + virtual bool createDocument( const QString& ); virtual bool openDocument( const QString& ); virtual bool loadDocument( const QString& ); @@ -49,8 +55,11 @@ public: virtual void closeDocument(bool permanently = true); + virtual bool dump( const QString&, bool, bool, bool ); + virtual bool isSaved() const; virtual bool isModified() const; + virtual void Modified(); virtual void addComponent ( const CAM_DataModel* dm); @@ -66,12 +75,19 @@ public: virtual bool isComponent( const QString& ) const; virtual void children( const QString&, QStringList& ) const; virtual void components( QStringList& ) const; + virtual QString centry( const QString& ) const; std::vector getSavePoints(); void removeSavePoint(int savePoint); QString getNameOfSavePoint(int savePoint); void setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint); - virtual std::string getVisualComponentName(); + + virtual void restoreState(int savePoint); +#ifndef DISABLE_PYCONSOLE + void updateFromNotebook(const QString&, bool); +#endif + + virtual LightApp_DataObject* findObjectByEntry( const QString& theEntry ); protected: virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles ); @@ -88,15 +104,25 @@ protected: virtual void dataModelInserted( const CAM_DataModel* ); virtual bool openDataModel( const QString&, CAM_DataModel* ); void setStudyDS(const _PTR(Study)& s ); - + virtual CAM_ModuleObject* createModuleObject( LightApp_DataModel* theDataModel, + SUIT_DataObject* theParent ) const; protected slots: virtual void updateModelRoot( const CAM_DataModel* ); +#ifndef DISABLE_PYCONSOLE + void onNoteBookVarUpdate( QString theVarName ); +#endif private: QString newStudyName() const; private: _PTR(Study) myStudyDS; + Observer_i* myObserver; + +#ifndef DISABLE_PYCONSOLE + signals: + void notebookVarUpdated( QString theVarName ); +#endif }; #ifdef WIN32