Salome HOME
PR: merge from branch BR_UnitTests tag mergeto_trunk_17oct05
[modules/kernel.git] / src / SALOMEGUI / SALOMEGUI.cxx
1 //  SALOME SALOMEGUI : implementation of desktop and GUI kernel
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
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. 
10 // 
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. 
15 // 
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 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SALOMEGUI.cxx
25 //  Author : Sergey ANIKIN
26 //  Module : SALOME
27 //  $Header$
28
29 #include "SALOMEGUI.h"
30 #include "QAD_Desktop.h"
31
32 using namespace std;
33
34 //=============================================================================
35 /*!
36  *
37  */
38 //=============================================================================
39 SALOMEGUI::SALOMEGUI( const QString& name, QObject* parent )
40 : QObject( parent ),
41   myName( name )
42 {
43 }
44
45 //=============================================================================
46 /*!
47  *
48  */
49 //=============================================================================
50 SALOMEGUI::~SALOMEGUI()
51 {
52 }
53
54 //=============================================================================
55 /*!
56  *
57  */
58 //=============================================================================
59 bool SALOMEGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
60 {
61   return true;
62 }
63
64 //=============================================================================
65 /*!
66  *
67  */
68 //=============================================================================
69 bool SALOMEGUI::OnKeyPress(QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
70 {
71   return true;
72 }
73
74 //=============================================================================
75 /*!
76  *
77  */
78 //=============================================================================
79 bool SALOMEGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
80 {
81   return true;
82 }
83
84 //=============================================================================
85 /*!
86  *
87  */
88 //=============================================================================
89 bool SALOMEGUI::OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
90 {
91   return true;
92 }
93
94 //=============================================================================
95 /*!
96  *
97  */
98 //=============================================================================
99 bool SALOMEGUI::SetSettings( QAD_Desktop* parent )
100 {
101   return true;
102 }
103
104 //=============================================================================
105 /*!
106  *
107  */
108 //=============================================================================
109 bool SALOMEGUI::SetSettings( QAD_Desktop* parent, char* compName )
110 {
111   return SetSettings( parent);
112 }
113
114 //=============================================================================
115 /*!
116  *
117  */
118 //=============================================================================
119 bool SALOMEGUI::CustomPopup( QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext,
120                                    const QString & theParent, const QString & theObject )
121 {
122   return true;
123 }
124
125 //=============================================================================
126 /*!
127  *
128  */
129 //=============================================================================
130 void SALOMEGUI::DefinePopup( QString & theContext, QString & theParent, QString & theObject )
131 {
132 }
133
134 //=============================================================================
135 /*!
136  *
137  */
138 //=============================================================================
139 bool SALOMEGUI::ActiveStudyChanged( QAD_Desktop* parent )
140 {
141   //static QAD_Study* aPrevStudy = NULL;
142   //QAD_Study* aStudy = parent->getActiveStudy();
143   //if(!aPrevStudy)
144   //  aPrevStudy = aStudy;
145   //if(aStudy != aPrevStudy){
146   //  emit SignalCloseAllDialogs();
147   //  aPrevStudy = aStudy;
148   //}
149   emit SignalCloseAllDialogs();
150   return true;
151 }
152
153 //=============================================================================
154 /*!
155  *
156  */
157 //=============================================================================
158 void SALOMEGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)&,
159                                    QAD_ViewFrame* )
160 {
161 }
162
163 //=============================================================================
164 /*!
165  *
166  */
167 //=============================================================================
168 void SALOMEGUI::SupportedViewType(int* /*buffer*/, int /*bufferSize*/ )
169 {
170 }
171
172 //=============================================================================
173 /*!
174  *
175  */
176 //=============================================================================
177 void SALOMEGUI::Deactivate()
178 {
179   emit SignalCloseAllDialogs();
180 }
181