mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
new method setContentActive( bool ): if parameter is true, all content to enable or disable state
This commit is contained in:
parent
388e2dfade
commit
0dad7e18fd
@ -1,17 +1,36 @@
|
|||||||
|
|
||||||
#include <SMESHGUI_Dialog.h>
|
#include <SMESHGUI_Dialog.h>
|
||||||
#include <SMESHGUI_Utils.h>
|
#include <SMESHGUI_Utils.h>
|
||||||
|
#include <SMESHGUI_Operation.h>
|
||||||
|
#include <SMESH_Type.h>
|
||||||
#include <SMESHGUI.h>
|
#include <SMESHGUI.h>
|
||||||
|
|
||||||
#include <SUIT_Desktop.h>
|
#include <SUIT_Desktop.h>
|
||||||
|
|
||||||
SMESHGUI_Dialog::SMESHGUI_Dialog( SMESHGUI* theModule, const bool modal, const bool allowResize,
|
SMESHGUI_Dialog::SMESHGUI_Dialog( SMESHGUI* theModule, const bool modal, const bool allowResize,
|
||||||
const int flags )
|
const int flags )
|
||||||
: SalomeApp_Dialog( SMESH::GetDesktop( theModule ), "", modal, allowResize, flags )
|
: SalomeApp_Dialog( SMESH::GetDesktop( theModule ), "", modal, allowResize, flags ),
|
||||||
|
mySMESHGUI( theModule )
|
||||||
{
|
{
|
||||||
|
int prefix = SMESHGUI_Operation::prefix( "SMESH" );
|
||||||
|
typeName( prefix + MESH ) = tr( "DLG_MESH" );
|
||||||
|
typeName( prefix + HYPOTHESIS ) = tr( "DLG_HYPO" );
|
||||||
|
typeName( prefix + ALGORITHM ) = tr( "DLG_ALGO" );
|
||||||
}
|
}
|
||||||
|
|
||||||
SMESHGUI_Dialog::~SMESHGUI_Dialog()
|
SMESHGUI_Dialog::~SMESHGUI_Dialog()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SMESHGUI_Dialog::show()
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
mySMESHGUI->DefineDlgPosition(this, x, y);
|
||||||
|
move(x, y);
|
||||||
|
SalomeApp_Dialog::show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMESHGUI_Dialog::setContentActive( const bool active ) const
|
||||||
|
{
|
||||||
|
mainFrame()->setEnabled( active );
|
||||||
|
}
|
||||||
|
@ -13,6 +13,14 @@ class SMESHGUI_Dialog : public SalomeApp_Dialog
|
|||||||
public:
|
public:
|
||||||
SMESHGUI_Dialog( SMESHGUI*, const bool = false, const bool = false, const int = OK | Cancel | Apply );
|
SMESHGUI_Dialog( SMESHGUI*, const bool = false, const bool = false, const int = OK | Cancel | Apply );
|
||||||
virtual ~SMESHGUI_Dialog();
|
virtual ~SMESHGUI_Dialog();
|
||||||
|
|
||||||
|
virtual void show();
|
||||||
|
|
||||||
|
//! set all content to enable (parameter is true) or disable state
|
||||||
|
void setContentActive( const bool ) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
SMESHGUI* mySMESHGUI;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user