mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
Implementation of inheritance from base class SALOMEGUI
This commit is contained in:
parent
143d55f45f
commit
adcfad4a39
@ -527,8 +527,8 @@ class CustomItem:public QCustomMenuItem
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
SMESHGUI::SMESHGUI():
|
SMESHGUI::SMESHGUI( const QString& theName, QObject* theParent ) :
|
||||||
QObject()
|
SALOMEGUI( theName, theParent )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -553,6 +553,12 @@ SMESHGUI* SMESHGUI::GetSMESHGUI()
|
|||||||
return smeshGUI;
|
return smeshGUI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
Standard_EXPORT SALOMEGUI* GetComponentGUI() {
|
||||||
|
return SMESHGUI::GetSMESHGUI();
|
||||||
|
}
|
||||||
|
}
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
@ -724,7 +730,7 @@ QAD_Desktop *SMESHGUI::GetDesktop()
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void SMESHGUI::activeStudyChanged(QAD_Desktop* parent)
|
bool SMESHGUI::ActiveStudyChanged(QAD_Desktop* parent)
|
||||||
{
|
{
|
||||||
MESSAGE("SMESHGUI::activeStudyChanged init.");
|
MESSAGE("SMESHGUI::activeStudyChanged init.");
|
||||||
QAD_Study* prevStudy = 0;
|
QAD_Study* prevStudy = 0;
|
||||||
@ -740,7 +746,8 @@ void SMESHGUI::activeStudyChanged(QAD_Desktop* parent)
|
|||||||
//smeshGUI = 0;
|
//smeshGUI = 0;
|
||||||
::UpdateSelectionProp();
|
::UpdateSelectionProp();
|
||||||
}
|
}
|
||||||
MESSAGE("SMESHGUI::activeStudyChanged done.") return;
|
MESSAGE("SMESHGUI::activeStudyChanged done.");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -3762,76 +3769,21 @@ void SMESHGUI::DiagonalInversion(SMESH::SMESH_Mesh_ptr aMesh,
|
|||||||
//=====================================================================================
|
//=====================================================================================
|
||||||
// EXPORTED METHODS
|
// EXPORTED METHODS
|
||||||
//=====================================================================================
|
//=====================================================================================
|
||||||
extern "C"
|
void SMESHGUI::SupportedViewType(int *buffer, int bufferSize)
|
||||||
{
|
{
|
||||||
bool OnGUIEvent(int theCommandID, QAD_Desktop * parent)
|
|
||||||
{
|
|
||||||
return SMESHGUI::OnGUIEvent(theCommandID, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OnKeyPress(QKeyEvent * pe, QAD_Desktop * parent,
|
|
||||||
QAD_StudyFrame * studyFrame)
|
|
||||||
{
|
|
||||||
return SMESHGUI::OnKeyPress(pe, parent, studyFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OnMousePress(QMouseEvent * pe, QAD_Desktop * parent,
|
|
||||||
QAD_StudyFrame * studyFrame)
|
|
||||||
{
|
|
||||||
return SMESHGUI::OnMousePress(pe, parent, studyFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OnMouseMove(QMouseEvent * pe, QAD_Desktop * parent,
|
|
||||||
QAD_StudyFrame * studyFrame)
|
|
||||||
{
|
|
||||||
return SMESHGUI::OnMouseMove(pe, parent, studyFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SetSettings(QAD_Desktop * parent)
|
|
||||||
{
|
|
||||||
return SMESHGUI::SetSettings(parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool customPopup(QAD_Desktop * parent, QPopupMenu * popup,
|
|
||||||
const QString & theContext, const QString & theParent,
|
|
||||||
const QString & theObject)
|
|
||||||
{
|
|
||||||
return SMESHGUI::CustomPopup(parent, popup, theContext, theParent,
|
|
||||||
theObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
void definePopup(QString & theContext, QString & theParent,
|
|
||||||
QString & theObject)
|
|
||||||
{
|
|
||||||
SMESHGUI::DefinePopup(theContext, theParent, theObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool activeStudyChanged(QAD_Desktop * parent)
|
|
||||||
{
|
|
||||||
SMESHGUI::activeStudyChanged(parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void buildPresentation(const Handle(SALOME_InteractiveObject) & theIO)
|
|
||||||
{
|
|
||||||
SMESHGUI::BuildPresentation(theIO);
|
|
||||||
}
|
|
||||||
|
|
||||||
void supportedViewType(int *buffer, int bufferSize)
|
|
||||||
{
|
|
||||||
if (!buffer || !bufferSize)
|
if (!buffer || !bufferSize)
|
||||||
return;
|
return;
|
||||||
buffer[0] = (int)VIEW_VTK;
|
buffer[0] = (int)VIEW_VTK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void deactivate()
|
void SMESHGUI::Deactivate()
|
||||||
{
|
{
|
||||||
if ( SMESHGUI::GetSMESHGUI() ) {
|
if ( SMESHGUI::GetSMESHGUI() ) {
|
||||||
SMESHGUI::GetSMESHGUI()->EmitSignalCloseAllDialogs();
|
SMESHGUI::GetSMESHGUI()->EmitSignalCloseAllDialogs();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "SMESHDS_Document.hxx"
|
#include "SMESHDS_Document.hxx"
|
||||||
|
|
||||||
// SALOME Includes
|
// SALOME Includes
|
||||||
|
#include "SALOMEGUI.h"
|
||||||
#include "QAD_Desktop.h"
|
#include "QAD_Desktop.h"
|
||||||
#include "SALOME_Selection.h"
|
#include "SALOME_Selection.h"
|
||||||
#include "SALOME_InteractiveObject.hxx"
|
#include "SALOME_InteractiveObject.hxx"
|
||||||
@ -68,7 +69,7 @@ class SMESH_Actor;
|
|||||||
// class : SMESHGUI
|
// class : SMESHGUI
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class SMESHGUI : public QObject
|
class SMESHGUI : public SALOMEGUI
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -108,7 +109,7 @@ private :
|
|||||||
|
|
||||||
public :
|
public :
|
||||||
|
|
||||||
SMESHGUI();
|
SMESHGUI( const QString& name = "", QObject* parent = 0 );
|
||||||
~SMESHGUI();
|
~SMESHGUI();
|
||||||
|
|
||||||
static SMESHGUI* GetOrCreateSMESHGUI( QAD_Desktop* desktop );
|
static SMESHGUI* GetOrCreateSMESHGUI( QAD_Desktop* desktop );
|
||||||
@ -127,25 +128,18 @@ public :
|
|||||||
bool DefineDlgPosition(QWidget* aDlg, int& x, int& y) ;
|
bool DefineDlgPosition(QWidget* aDlg, int& x, int& y) ;
|
||||||
|
|
||||||
|
|
||||||
/* Managed by IAPP */
|
virtual bool OnGUIEvent (int theCommandID, QAD_Desktop* parent);
|
||||||
Standard_EXPORT static bool OnGUIEvent ( int theCommandID, QAD_Desktop* parent) ;
|
virtual bool OnMousePress (QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
|
||||||
Standard_EXPORT static bool OnMousePress ( QMouseEvent* pe, QAD_Desktop* parent,
|
virtual bool OnMouseMove (QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
|
||||||
QAD_StudyFrame* studyFrame );
|
virtual bool OnKeyPress (QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
|
||||||
Standard_EXPORT static bool OnMouseMove ( QMouseEvent* pe, QAD_Desktop* parent,
|
virtual bool ActiveStudyChanged( QAD_Desktop* parent );
|
||||||
QAD_StudyFrame* studyFrame );
|
virtual bool SetSettings ( QAD_Desktop* parent );
|
||||||
Standard_EXPORT static bool OnKeyPress ( QKeyEvent* pe, QAD_Desktop* parent,
|
virtual void DefinePopup ( QString & theContext, QString & theParent, QString & theObject );
|
||||||
QAD_StudyFrame* studyFrame );
|
virtual bool CustomPopup ( QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext,
|
||||||
Standard_EXPORT static void activeStudyChanged ( QAD_Desktop* parent );
|
const QString & theParent, const QString & theObject );
|
||||||
Standard_EXPORT static bool SetSettings ( QAD_Desktop* parent );
|
virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO );
|
||||||
Standard_EXPORT static void DefinePopup( QString & theContext,
|
virtual void SupportedViewType (int* buffer, int bufferSize);
|
||||||
QString & theParent,
|
virtual void Deactivate ();
|
||||||
QString & theObject );
|
|
||||||
Standard_EXPORT static bool CustomPopup ( QAD_Desktop* parent,
|
|
||||||
QPopupMenu* popup,
|
|
||||||
const QString& theContext,
|
|
||||||
const QString& theParent,
|
|
||||||
const QString& theObject );
|
|
||||||
Standard_EXPORT static void BuildPresentation(const Handle(SALOME_InteractiveObject)&);
|
|
||||||
|
|
||||||
void OnEditDelete();
|
void OnEditDelete();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user