PAL12488: Cannot set a working plane (in second study). Suppress using static member.

This commit is contained in:
jfa 2006-05-31 10:20:25 +00:00
parent ff317e1070
commit 38c7af7b96
2 changed files with 37 additions and 47 deletions

View File

@ -57,18 +57,13 @@
using namespace std; using namespace std;
BasicGUI* BasicGUI::myGUIObject = 0;
//======================================================================= //=======================================================================
// function : GetBasicGUI() // function : GetBasicGUI()
// purpose : Get the only BasicGUI object [ static ] // purpose : Get the only BasicGUI object [ static ]
//======================================================================= //=======================================================================
BasicGUI* BasicGUI::GetBasicGUI( GeometryGUI* parent ) BasicGUI* BasicGUI::GetBasicGUI( GeometryGUI* parent )
{ {
if ( myGUIObject == 0 ) { return new BasicGUI( parent );
myGUIObject = new BasicGUI( parent );
}
return myGUIObject;
} }
//======================================================================= //=======================================================================
@ -80,7 +75,6 @@ BasicGUI::BasicGUI( GeometryGUI* parent ) :
{ {
} }
//======================================================================= //=======================================================================
// function : ~BasicGUI() // function : ~BasicGUI()
// purpose : Destructor // purpose : Destructor

View File

@ -24,7 +24,6 @@
// File : BasicGUI.h // File : BasicGUI.h
// Author : Damien COQUERET // Author : Damien COQUERET
// Module : GEOM // Module : GEOM
// $Header$
#ifndef BASICGUI_H #ifndef BASICGUI_H
#define BASICGUI_H #define BASICGUI_H
@ -33,12 +32,12 @@
#include "GEOMBase.h" #include "GEOMBase.h"
#include <V3d_View.hxx> #include <V3d_View.hxx>
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS #if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport ) #define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else #else
#define BASICGUI_WNT_EXPORT #define BASICGUI_WNT_EXPORT
#endif #endif
//================================================================================= //=================================================================================
// class : BasicGUI // class : BasicGUI
// purpose : // purpose :
@ -48,7 +47,7 @@ class BasicGUI : public GEOMGUI
protected: protected:
BasicGUI( GeometryGUI* parent ); // hide constructor to avoid direct creation BasicGUI( GeometryGUI* parent ); // hide constructor to avoid direct creation
public : public:
~BasicGUI(); ~BasicGUI();
// Get the only BasicGUI object // Get the only BasicGUI object
@ -58,9 +57,6 @@ public :
bool OnMousePress(QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* theViewWindow); bool OnMousePress(QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* theViewWindow);
gp_Pnt ConvertClickToPoint( int x, int y, Handle(V3d_View) aView ); gp_Pnt ConvertClickToPoint( int x, int y, Handle(V3d_View) aView );
private:
static BasicGUI* myGUIObject; // the only BasicGUI object
}; };
#endif #endif