1 // SALOME SALOMEGUI : implementation of desktop and GUI kernel
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOMEGUI_Application.h
25 // Author : Nicolas REJNERI
29 #ifndef SALOMEGUI_APPLICATION_H
30 #define SALOMEGUI_APPLICATION_H
32 #include "QAD_Application.h"
33 #include "QAD_ViewFrame.h"
34 #include "QAD_Action.h"
37 #include <SALOMEconfig.h>
38 #include CORBA_SERVER_HEADER(SALOMEDS)
39 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
45 #include <qpopupmenu.h>
47 class SALOMEGUI_Application : public QAD_Application
50 enum { ViewToolBarId = 100 };
52 enum { ViewDumpId, ViewTrihedronId, ViewFitAllId, ViewFitAreaId,
53 ViewZoomId, ViewPanId, ViewRotateId, ViewGlobalPanId,
54 ViewFrontId, ViewBackId, ViewTopId, ViewBottomId, ViewLeftId,
55 ViewRightId, ViewResetId };
57 SALOMEGUI_Application ( const QString& format,
58 const QString& description,
59 const QString& filters);
60 ~SALOMEGUI_Application();
62 // Common display services
67 /* application management */
68 bool initApp( SALOME_NamingService* name_service );
69 bool createDesktop( SALOME_NamingService* name_service );
74 /* document management */
75 void onStudyCreated( QAD_Study* );
76 void onStudyOpened( QAD_Study* );
77 void onActiveStudyChanged( QAD_Study* oldActiveStudy,
78 QAD_Study* newActiveStudy );
79 void onStudyShown( QAD_Study* );
82 int onUpdateViewActions ( QPopupMenu*, bool add, int index );
85 void onDesktopCreated();
88 void connectToViewer( QAD_ViewFrame* );
89 void disconnectFromViewer( QAD_ViewFrame* );
94 ActionMap myViewActions;
95 QAD_Operation* myCurOperation;