Back to index

salome-gui  6.5.0
CAM_Study.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef CAM_STUDY_H
00024 #define CAM_STUDY_H
00025 
00026 #include "CAM.h"
00027 
00028 #include <SUIT_Study.h>
00029 #include <QList>
00030 
00031 class CAM_DataModel;
00032 
00033 #ifdef WIN32
00034 #pragma warning( disable:4251 )
00035 #endif
00036 
00037 class CAM_EXPORT CAM_Study : public SUIT_Study
00038 {
00039   Q_OBJECT
00040 
00041 public:
00042   typedef QList<CAM_DataModel*> ModelList;
00043 
00044 public:
00045   CAM_Study( SUIT_Application* );
00046   virtual ~CAM_Study();
00047 
00048   virtual void closeDocument( bool permanently = true );
00049 
00050   bool         appendDataModel( const CAM_DataModel* );
00051   virtual bool insertDataModel( const CAM_DataModel*, const int = -1 );
00052   bool         insertDataModel( const CAM_DataModel*, const CAM_DataModel* );
00053 
00054   virtual bool removeDataModel( const CAM_DataModel* );
00055 
00056   bool         containsDataModel( const CAM_DataModel* ) const;
00057 
00058   void         dataModels( ModelList& ) const;
00059 
00060 protected:
00061   virtual void dataModelInserted( const CAM_DataModel* );
00062   virtual bool openDataModel( const QString&, CAM_DataModel* );
00063   virtual bool saveDataModel( const QString&, CAM_DataModel* );
00064 
00065 protected slots:
00066   virtual void updateModelRoot( const CAM_DataModel* );
00067 
00068 private:
00069   ModelList    myDataModels;   
00070 };
00071 
00072 #ifdef WIN32
00073 #pragma warning( default:4251 )
00074 #endif
00075 
00076 #endif