mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-31 02:20:34 +05:00
Implementation of inheritance from base class SALOMEGUI
This commit is contained in:
parent
bbbd230dc9
commit
a352ef8b0b
@ -58,10 +58,9 @@ typedef bool CP(QAD_Desktop*, QPopupMenu*, const QString&,
|
|||||||
// function : GeometryGUI()
|
// function : GeometryGUI()
|
||||||
// purpose : Constructor
|
// purpose : Constructor
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GeometryGUI::GeometryGUI() :
|
GeometryGUI::GeometryGUI( const QString& theName, QObject* theParent ) :
|
||||||
QObject()
|
SALOMEGUI( theName, theParent )
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -589,49 +588,15 @@ void GeometryGUI::BuildPresentation(const Handle(SALOME_InteractiveObject)& theI
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=================================================================================
|
void GeometryGUI::SupportedViewType(int* buffer, int bufferSize)
|
||||||
// EXPORTED METHODS
|
|
||||||
//=================================================================================
|
|
||||||
extern "C"
|
|
||||||
{
|
{
|
||||||
bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
if(!buffer || !bufferSize) return;
|
||||||
{return GeometryGUI::OnGUIEvent(theCommandID, parent);}
|
buffer[0] = (int)VIEW_OCC;
|
||||||
|
if (--bufferSize) buffer[1] = (int)VIEW_VTK;
|
||||||
bool OnKeyPress(QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
|
}
|
||||||
{return GeometryGUI::OnKeyPress(pe, parent, studyFrame);}
|
|
||||||
|
void GeometryGUI::Deactivate()
|
||||||
bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
|
{
|
||||||
{return GeometryGUI::OnMousePress(pe, parent, studyFrame);}
|
if ( GeomGUI )
|
||||||
|
GeomGUI->EmitSignalCloseAllDialogs();
|
||||||
bool OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
|
|
||||||
{return GeometryGUI::OnMouseMove(pe, parent, studyFrame);}
|
|
||||||
|
|
||||||
bool SetSettings(QAD_Desktop* parent)
|
|
||||||
{return GeometryGUI::SetSettings(parent);}
|
|
||||||
|
|
||||||
bool customPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext,
|
|
||||||
const QString & theParent, const QString & theObject)
|
|
||||||
{return GeometryGUI::CustomPopup(parent, popup, theContext, theParent, theObject);}
|
|
||||||
|
|
||||||
void definePopup(QString & theContext, QString & parent, QString & theObject)
|
|
||||||
{GeometryGUI::DefinePopup(theContext, parent, theObject);}
|
|
||||||
|
|
||||||
bool activeStudyChanged(QAD_Desktop* parent)
|
|
||||||
{GeometryGUI::activeStudyChanged(parent);}
|
|
||||||
|
|
||||||
void buildPresentation(const Handle(SALOME_InteractiveObject)& theIO)
|
|
||||||
{GeometryGUI::BuildPresentation(theIO);}
|
|
||||||
|
|
||||||
void supportedViewType(int* buffer, int bufferSize)
|
|
||||||
{
|
|
||||||
if(!buffer || !bufferSize) return;
|
|
||||||
buffer[0] = (int)VIEW_OCC;
|
|
||||||
if (--bufferSize) buffer[1] = (int)VIEW_VTK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void deactivate()
|
|
||||||
{
|
|
||||||
if ( GeomGUI )
|
|
||||||
GeomGUI->EmitSignalCloseAllDialogs();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -29,34 +29,36 @@
|
|||||||
#ifndef GEOMETRYGUI_H
|
#ifndef GEOMETRYGUI_H
|
||||||
#define GEOMETRYGUI_H
|
#define GEOMETRYGUI_H
|
||||||
|
|
||||||
|
#include "SALOMEGUI.h"
|
||||||
#include "GEOMContext.h"
|
#include "GEOMContext.h"
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : GeometryGUI
|
// class : GeometryGUI
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GeometryGUI : public QObject
|
class GeometryGUI : public SALOMEGUI
|
||||||
{
|
{
|
||||||
Q_OBJECT /* for QT compatibility */
|
Q_OBJECT /* for QT compatibility */
|
||||||
|
|
||||||
public :
|
public :
|
||||||
GeometryGUI();
|
GeometryGUI( const QString& name, QObject* parent = 0 );
|
||||||
~GeometryGUI();
|
~GeometryGUI();
|
||||||
|
|
||||||
static GEOMContext* GetOrCreateGeometryGUI(QAD_Desktop* desktop);
|
static GEOMContext* GetOrCreateGeometryGUI(QAD_Desktop* desktop);
|
||||||
|
|
||||||
/* Managed by IAPP */
|
/* Managed by IAPP */
|
||||||
Standard_EXPORT static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
|
virtual bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
|
||||||
Standard_EXPORT static bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
|
virtual bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
|
||||||
Standard_EXPORT static bool OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
|
virtual bool OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
|
||||||
Standard_EXPORT static bool OnKeyPress(QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
|
virtual bool OnKeyPress(QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
|
||||||
Standard_EXPORT static bool SetSettings(QAD_Desktop* parent);
|
virtual bool SetSettings(QAD_Desktop* parent);
|
||||||
Standard_EXPORT static void activeStudyChanged(QAD_Desktop* parent);
|
virtual void activeStudyChanged(QAD_Desktop* parent);
|
||||||
Standard_EXPORT static void BuildPresentation(const Handle(SALOME_InteractiveObject)&);
|
virtual void BuildPresentation(const Handle(SALOME_InteractiveObject)&);
|
||||||
Standard_EXPORT static void DefinePopup(QString & theContext, QString & theParent, QString & theObject);
|
virtual void DefinePopup(QString & theContext, QString & theParent, QString & theObject);
|
||||||
Standard_EXPORT static bool CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString& theContext,
|
virtual bool CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString& theContext,
|
||||||
const QString& theParent, const QString& theObject);
|
const QString& theParent, const QString& theObject);
|
||||||
|
virtual void SupportedViewType (int* buffer, int bufferSize);
|
||||||
|
virtual void Deactivate ();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user