smesh/src/SMESHGUI/SMESHGUI.h

102 lines
3.4 KiB
C
Raw Normal View History

2003-07-10 19:18:22 +06:00
// SMESH SMESHGUI : GUI for SMESH component
//
// Copyright (C) 2003 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
// 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
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : SMESHGUI.h
// Author : Nicolas REJNERI
// Module : SMESH
2003-05-19 20:07:00 +06:00
// $Header$
#ifndef SMESHGUI_HeaderFile
#define SMESHGUI_HeaderFile
// SALOME Includes
2004-06-18 14:34:31 +06:00
#include "SALOMEGUI.h"
2003-05-19 20:07:00 +06:00
#include "SALOME_InteractiveObject.hxx"
2004-12-01 15:48:31 +05:00
class QAD_Desktop;
class QAD_Study;
2003-05-19 20:07:00 +06:00
2004-12-01 15:48:31 +05:00
class QDialog;
2004-06-18 14:34:31 +06:00
2003-05-19 20:07:00 +06:00
//=================================================================================
// class : SMESHGUI
// purpose :
//=================================================================================
2004-06-18 14:34:31 +06:00
class SMESHGUI : public SALOMEGUI
2003-05-19 20:07:00 +06:00
{
2004-12-01 15:48:31 +05:00
Q_OBJECT;
2003-05-19 20:07:00 +06:00
private :
2004-12-01 15:48:31 +05:00
QAD_Desktop* myDesktop;
QAD_Study* myActiveStudy;
QDialog* myActiveDialogBox;
2003-05-19 20:07:00 +06:00
2004-12-01 15:48:31 +05:00
int myState;
bool myAutomaticUpdate;
2004-06-18 14:34:31 +06:00
2003-05-19 20:07:00 +06:00
public :
2004-06-18 14:34:31 +06:00
SMESHGUI( const QString& name = "", QObject* parent = 0 );
2003-05-19 20:07:00 +06:00
static SMESHGUI* GetSMESHGUI() ;
2004-12-01 15:48:31 +05:00
~SMESHGUI();
2003-05-19 20:07:00 +06:00
QAD_Desktop* GetDesktop() ;
2004-12-01 15:48:31 +05:00
QAD_Study* GetActiveStudy() ;
bool ActiveStudyLocked();
2003-05-19 20:07:00 +06:00
QDialog* GetActiveDialogBox() ;
void SetActiveDialogBox(QDialog* aDlg) ;
void ResetState() ;
2004-12-01 15:48:31 +05:00
void SetState(int aState) ;
2003-05-19 20:07:00 +06:00
bool DefineDlgPosition(QWidget* aDlg, int& x, int& y) ;
2004-06-18 14:34:31 +06:00
virtual bool OnGUIEvent (int theCommandID, QAD_Desktop* parent);
virtual bool OnMousePress (QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
virtual bool OnMouseMove (QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
virtual bool OnKeyPress (QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
virtual bool ActiveStudyChanged( QAD_Desktop* parent );
virtual bool SetSettings ( QAD_Desktop* parent );
virtual void DefinePopup ( QString & theContext, QString & theParent, QString & theObject );
virtual bool CustomPopup ( QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext,
const QString & theParent, const QString & theObject );
2004-12-01 15:48:31 +05:00
virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO,
QAD_ViewFrame* = 0 );
2004-06-18 14:34:31 +06:00
virtual void SupportedViewType (int* buffer, int bufferSize);
virtual void Deactivate ();
2003-05-19 20:07:00 +06:00
/* Non modal dialog boxes magement */
void EmitSignalDeactivateDialog() ;
2004-12-01 15:48:31 +05:00
void EmitSignalStudyFrameChanged() ;
2003-05-19 20:07:00 +06:00
void EmitSignalCloseAllDialogs() ;
signals:
void SignalDeactivateActiveDialog() ;
2004-12-01 15:48:31 +05:00
void SignalStudyFrameChanged() ;
2003-05-19 20:07:00 +06:00
void SignalCloseAllDialogs() ;
2004-12-01 15:48:31 +05:00
2003-05-19 20:07:00 +06:00
};
2004-12-01 15:48:31 +05:00
2003-05-19 20:07:00 +06:00
#endif