Back to index

salome-gui  6.5.0
CAF_Application.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 CAF_APPLICATION_H
00024 #define CAF_APPLICATION_H
00025 
00026 #include "CAF.h"
00027 
00028 #include "STD_Application.h"
00029 
00030 #include <TDocStd_Application.hxx>
00031 
00032 class CAF_Study;
00033 
00034 #if defined WIN32
00035 #pragma warning ( disable: 4251 )
00036 #endif
00037 
00038 class CAF_EXPORT CAF_Application : public STD_Application
00039 {
00040   Q_OBJECT
00041 
00042 public:
00043   CAF_Application();
00044   CAF_Application( const Handle(TDocStd_Application)& );
00045   virtual ~CAF_Application();
00046 
00047   virtual QString             applicationName() const;
00048 
00049   Handle(TDocStd_Application) stdApp() const;
00050 
00051   virtual QString             getFileFilter() const;
00052 
00053 public slots:  
00054   virtual void                onHelpAbout();
00055 
00056 protected slots:
00057   virtual bool                onUndo( int );
00058   virtual bool                onRedo( int );
00059   
00060 protected:
00061   enum {  EditUndoId = STD_Application::UserID, EditRedoId, UserID };
00062 
00063 protected:
00064   virtual void                createActions();
00065   virtual void                updateCommandsStatus();
00066 
00067   virtual SUIT_Study*         createNewStudy();
00068 
00069   bool                        undo( CAF_Study* doc );
00070   bool                        redo( CAF_Study* doc );
00071 
00072   virtual void                setStdApp( const Handle(TDocStd_Application)& );
00073 
00074 private:
00075   Handle(TDocStd_Application) myStdApp;
00076 };
00077 
00078 #if defined WIN32
00079 #pragma warning ( default: 4251 )
00080 #endif
00081 
00082 #endif