mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-27 09:10:33 +05:00
getDesktop() method is changed: now it is NOT virtual, it is implemented in GEOMBase_Helper and removed from all successors.
This commit is contained in:
parent
694a9aaaee
commit
c03f2eac0d
@ -62,7 +62,8 @@ using namespace std;
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, const char* name, bool modal, WFlags fl)
|
EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||||
:EntityGUI_Skeleton_QTD(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose), GEOMBase_Helper(), myIsAllAdded( false ),
|
:EntityGUI_Skeleton_QTD(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose), myIsAllAdded( false ),
|
||||||
|
GEOMBase_Helper( dynamic_cast<SUIT_Desktop*>( parent ) ),
|
||||||
myGeometryGUI( GUI )
|
myGeometryGUI( GUI )
|
||||||
{
|
{
|
||||||
myGeometryGUI->SetActiveDialogBox(this);
|
myGeometryGUI->SetActiveDialogBox(this);
|
||||||
@ -1396,15 +1397,6 @@ bool EntityGUI_SketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
|
||||||
// function : getDesktop()
|
|
||||||
// purpose :
|
|
||||||
//=================================================================================
|
|
||||||
SUIT_Desktop* EntityGUI_SketcherDlg::getDesktop() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<SUIT_Desktop*>( parentWidget() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,8 +74,6 @@ protected:
|
|||||||
|
|
||||||
void closeEvent( QCloseEvent* e );
|
void closeEvent( QCloseEvent* e );
|
||||||
|
|
||||||
virtual SUIT_Desktop* getDesktop() const;
|
|
||||||
|
|
||||||
private :
|
private :
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent(QEvent* e);
|
||||||
|
@ -92,8 +92,8 @@ GEOM::GEOM_Gen_ptr GEOMBase_Helper::getGeomEngine()
|
|||||||
// Function : GEOMBase_Helper
|
// Function : GEOMBase_Helper
|
||||||
// Purpose :
|
// Purpose :
|
||||||
//================================================================
|
//================================================================
|
||||||
GEOMBase_Helper::GEOMBase_Helper()
|
GEOMBase_Helper::GEOMBase_Helper( SUIT_Desktop* desktop )
|
||||||
: myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), isPreview( false )
|
: myDesktop( desktop ), myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), isPreview( false )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -963,3 +963,12 @@ Handle(SALOME_InteractiveObject) GEOMBase_Helper::lastIObject()
|
|||||||
return aList.Extent() > 0 ? aList.Last() : Handle(SALOME_InteractiveObject)();
|
return aList.Extent() > 0 ? aList.Last() : Handle(SALOME_InteractiveObject)();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================
|
||||||
|
// Function : getDesktop
|
||||||
|
// Purpose : Returns myDesktop field. Initialized in constructor, usually as dynamic_cast<SUIT_Desktop*>(parentWidget())
|
||||||
|
//================================================================
|
||||||
|
SUIT_Desktop* GEOMBase_Helper::getDesktop() const
|
||||||
|
{
|
||||||
|
return myDesktop;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class TColStd_MapOfInteger;
|
|||||||
class GEOMBase_Helper
|
class GEOMBase_Helper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GEOMBase_Helper();
|
GEOMBase_Helper( SUIT_Desktop* );
|
||||||
virtual ~GEOMBase_Helper();
|
virtual ~GEOMBase_Helper();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -171,7 +171,7 @@ protected:
|
|||||||
bool IsPreview() {return isPreview;}
|
bool IsPreview() {return isPreview;}
|
||||||
|
|
||||||
GEOM_Displayer* getDisplayer();
|
GEOM_Displayer* getDisplayer();
|
||||||
virtual SUIT_Desktop* getDesktop() const = 0;
|
SUIT_Desktop* getDesktop() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
char* getEntry ( GEOM::GEOM_Object_ptr ) const;
|
char* getEntry ( GEOM::GEOM_Object_ptr ) const;
|
||||||
@ -188,6 +188,7 @@ private:
|
|||||||
QString myPrefix;
|
QString myPrefix;
|
||||||
bool isPreview;
|
bool isPreview;
|
||||||
SALOME_ListIO mySelected;
|
SALOME_ListIO mySelected;
|
||||||
|
SUIT_Desktop* myDesktop;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,7 +44,8 @@ using namespace std;
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOMBase_Skeleton::GEOMBase_Skeleton(QWidget* parent, const char* name, bool modal, WFlags fl)
|
GEOMBase_Skeleton::GEOMBase_Skeleton(QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||||
:DlgRef_Skeleton_QTD(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ), GEOMBase_Helper()
|
:DlgRef_Skeleton_QTD( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
|
||||||
|
GEOMBase_Helper( dynamic_cast<SUIT_Desktop*>( parent ) )
|
||||||
{
|
{
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("GEOMBase_Skeleton");
|
setName("GEOMBase_Skeleton");
|
||||||
@ -215,12 +216,3 @@ int GEOMBase_Skeleton::getConstructorId() const
|
|||||||
return GroupConstructors->id( GroupConstructors->selected() );
|
return GroupConstructors->id( GroupConstructors->selected() );
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
|
||||||
// function : getDesktop()
|
|
||||||
// purpose :
|
|
||||||
//=================================================================================
|
|
||||||
SUIT_Desktop* GEOMBase_Skeleton::getDesktop() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<SUIT_Desktop*>( parentWidget() );
|
|
||||||
}
|
|
||||||
|
@ -60,7 +60,6 @@ protected:
|
|||||||
void initName( const char* thePrefix = 0 ); // initialize "Name" field with a string "thePrefix_X" (Vertex_3)
|
void initName( const char* thePrefix = 0 ); // initialize "Name" field with a string "thePrefix_X" (Vertex_3)
|
||||||
virtual const char* getNewObjectName() const; // returns contents of "Name" field
|
virtual const char* getNewObjectName() const; // returns contents of "Name" field
|
||||||
int getConstructorId() const; // returns id of a selected "constructor" radio button or '-1' in case of error
|
int getConstructorId() const; // returns id of a selected "constructor" radio button or '-1' in case of error
|
||||||
virtual SUIT_Desktop* getDesktop() const;
|
|
||||||
|
|
||||||
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
|
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
|
||||||
GEOMBase* myGeomBase; // SAN -- TO BE REMOVED !!!
|
GEOMBase* myGeomBase; // SAN -- TO BE REMOVED !!!
|
||||||
|
@ -56,6 +56,7 @@ MeasureGUI_Skeleton::MeasureGUI_Skeleton( GeometryGUI* GUI,
|
|||||||
const char* name )
|
const char* name )
|
||||||
: MeasureGUI_Skeleton_QTD( parent, name, false,
|
: MeasureGUI_Skeleton_QTD( parent, name, false,
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
|
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
|
||||||
|
GEOMBase_Helper( dynamic_cast<SUIT_Desktop*>( parent ) ),
|
||||||
myGeomGUI( GUI )
|
myGeomGUI( GUI )
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -341,11 +342,3 @@ GEOM::GEOM_IOperations_ptr MeasureGUI_Skeleton::createOperation()
|
|||||||
return getGeomEngine()->GetIMeasureOperations( getStudyId() );
|
return getGeomEngine()->GetIMeasureOperations( getStudyId() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
|
||||||
// function : getDesktop()
|
|
||||||
// purpose :
|
|
||||||
//=================================================================================
|
|
||||||
SUIT_Desktop* MeasureGUI_Skeleton::getDesktop() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<SUIT_Desktop*>( parentWidget() );
|
|
||||||
}
|
|
||||||
|
@ -74,8 +74,6 @@ protected:
|
|||||||
|
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
|
|
||||||
virtual SUIT_Desktop* getDesktop() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
QPushButton* mySelBtn;
|
QPushButton* mySelBtn;
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
RepairGUI_FreeBoundDlg::RepairGUI_FreeBoundDlg( GeometryGUI* theGUI, QWidget* theParent )
|
RepairGUI_FreeBoundDlg::RepairGUI_FreeBoundDlg( GeometryGUI* theGUI, QWidget* theParent )
|
||||||
: QDialog( theParent, "RepairGUI_FreeBoundDlg", false,
|
: QDialog( theParent, "RepairGUI_FreeBoundDlg", false,
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
|
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
|
||||||
|
GEOMBase_Helper( dynamic_cast<SUIT_Desktop*>( theParent ) ),
|
||||||
myGeomGUI ( theGUI )
|
myGeomGUI ( theGUI )
|
||||||
{
|
{
|
||||||
setCaption( tr( "CAPTION" ) );
|
setCaption( tr( "CAPTION" ) );
|
||||||
@ -277,14 +278,5 @@ bool RepairGUI_FreeBoundDlg::execute( ObjectList& objects )
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
|
||||||
// function : getDesktop()
|
|
||||||
// purpose :
|
|
||||||
//=================================================================================
|
|
||||||
SUIT_Desktop* RepairGUI_FreeBoundDlg::getDesktop() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<SUIT_Desktop*>( parentWidget() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +67,6 @@ private:
|
|||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& objects );
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual SUIT_Desktop* getDesktop() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ using namespace std;
|
|||||||
RepairGUI_FreeFacesDlg::RepairGUI_FreeFacesDlg(GeometryGUI* GUI, QWidget* parent, const char* name, bool modal, WFlags fl)
|
RepairGUI_FreeFacesDlg::RepairGUI_FreeFacesDlg(GeometryGUI* GUI, QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||||
:QDialog( parent, "RepairGUI_FreeBoundDlg", false,
|
:QDialog( parent, "RepairGUI_FreeBoundDlg", false,
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
|
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
|
||||||
|
GEOMBase_Helper( dynamic_cast<SUIT_Desktop*>( parent ) ),
|
||||||
myGeomGUI( GUI )
|
myGeomGUI( GUI )
|
||||||
{
|
{
|
||||||
myDisplayer = 0;
|
myDisplayer = 0;
|
||||||
@ -327,11 +328,3 @@ void RepairGUI_FreeFacesDlg::onSetEditCurrentArgument()
|
|||||||
onSelectionDone();
|
onSelectionDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
|
||||||
// function : getDesktop()
|
|
||||||
// purpose :
|
|
||||||
//=================================================================================
|
|
||||||
SUIT_Desktop* RepairGUI_FreeFacesDlg::getDesktop() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<SUIT_Desktop*>( parentWidget() );
|
|
||||||
}
|
|
||||||
|
@ -55,7 +55,6 @@ protected:
|
|||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& objects );
|
||||||
virtual SUIT_Desktop* getDesktop() const;
|
|
||||||
|
|
||||||
private :
|
private :
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user