mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-30 21:00:32 +05:00
IPAL21695 TC5.1.4: GEOM Dialogs Behavior
This commit is contained in:
parent
4d896c08e8
commit
1be2d39839
@ -271,6 +271,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize( minimumSizeHint() );
|
||||
SelectionIntoArgument();
|
||||
|
||||
myEditCurrentArgument->setFocus();
|
||||
globalSelection(); // close local contexts, if any
|
||||
|
@ -158,6 +158,10 @@ void BasicGUI_CurveDlg::ConstructorsClicked( int id )
|
||||
myPoints->length( 0 );
|
||||
|
||||
myEditCurrentArgument->setText( "" );
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize( minimumSizeHint() );
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
||||
|
@ -158,7 +158,8 @@ void BasicGUI_EllipseDlg::Init()
|
||||
|
||||
initName( tr( "GEOM_ELLIPSE" ) );
|
||||
|
||||
resize(100,100);
|
||||
resize( minimumSizeHint() );
|
||||
SelectionIntoArgument();
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,6 @@ void BasicGUI_LineDlg::ConstructorsClicked( int constructorId )
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize( minimumSizeHint() );
|
||||
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
@ -364,6 +364,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize( minimumSizeHint() );
|
||||
SelectionIntoArgument();
|
||||
|
||||
myEditCurrentArgument->setFocus();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
|
@ -231,6 +231,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize( minimumSizeHint() );
|
||||
SelectionIntoArgument();
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
|
@ -116,6 +116,7 @@ void BuildGUI_FaceDlg::Init()
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_FACE" ) );
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
||||
|
@ -112,7 +112,6 @@ void BuildGUI_ShellDlg::Init()
|
||||
aSubShapes.append( GEOM_FACE );
|
||||
globalSelection( aMap, aSubShapes );
|
||||
|
||||
|
||||
/* signals and slots connections */
|
||||
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||
@ -123,6 +122,7 @@ void BuildGUI_ShellDlg::Init()
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_SHELL" ) );
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
||||
|
@ -123,6 +123,7 @@ void BuildGUI_WireDlg::Init()
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_WIRE" ) );
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
||||
|
@ -298,6 +298,7 @@ void OperationGUI_FilletDlg::ConstructorsClicked (int constructorId)
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize(minimumSizeHint());
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -202,6 +202,7 @@ void OperationGUI_PartitionDlg::ConstructorsClicked( int constructorId )
|
||||
myEditCurrentArgument->setFocus();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,8 +54,7 @@
|
||||
//=================================================================================
|
||||
PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
|
||||
myInitial(true)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
|
||||
{
|
||||
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BOX_2P")));
|
||||
QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BOX_DXYZ")));
|
||||
@ -196,15 +195,9 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked (int constructorId)
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize(minimumSizeHint());
|
||||
SelectionIntoArgument();
|
||||
|
||||
if (myInitial) {
|
||||
// on dialog initialization we init the first field with a selected object (if any)
|
||||
SelectionIntoArgument();
|
||||
myInitial = false;
|
||||
}
|
||||
else {
|
||||
displayPreview();
|
||||
}
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -331,10 +324,6 @@ void PrimitiveGUI_BoxDlg::SetEditCurrentArgument()
|
||||
|
||||
// clear selection
|
||||
//disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
|
||||
//if (myInitial)
|
||||
// myInitial = false;
|
||||
//else
|
||||
// myGeomGUI->getApp()->selectionMgr()->clearSelected();
|
||||
|
||||
if (send == GroupPoints->PushButton1) {
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
|
@ -58,9 +58,6 @@ private:
|
||||
private:
|
||||
GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the vector */
|
||||
|
||||
// to initialize the first selection field with a selected object on the dialog creation
|
||||
bool myInitial;
|
||||
|
||||
DlgRef_2Sel* GroupPoints;
|
||||
DlgRef_3Spin* GroupDimensions;
|
||||
|
||||
|
@ -54,8 +54,7 @@
|
||||
//=================================================================================
|
||||
PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
|
||||
myInitial(true)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
|
||||
{
|
||||
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_CONE_PV")));
|
||||
QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_CONE_DXYZ")));
|
||||
@ -211,15 +210,9 @@ void PrimitiveGUI_ConeDlg::ConstructorsClicked (int constructorId)
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize(minimumSizeHint());
|
||||
SelectionIntoArgument();
|
||||
|
||||
if (myInitial) {
|
||||
// on dialog initialization we init the first field with a selected object (if any)
|
||||
SelectionIntoArgument();
|
||||
myInitial = false;
|
||||
}
|
||||
else {
|
||||
displayPreview();
|
||||
}
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -61,9 +61,6 @@ private:
|
||||
private:
|
||||
GEOM::GEOM_Object_var myPoint, myDir;
|
||||
|
||||
// to initialize the first selection field with a selected object on the dialog creation
|
||||
bool myInitial;
|
||||
|
||||
DlgRef_2Sel3Spin* GroupPoints;
|
||||
DlgRef_3Spin* GroupDimensions;
|
||||
|
||||
|
@ -202,20 +202,9 @@ void PrimitiveGUI_CylinderDlg::ConstructorsClicked (int constructorId)
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize(minimumSizeHint());
|
||||
SelectionIntoArgument();
|
||||
|
||||
if (myInitial) {
|
||||
myInitial = false;
|
||||
if (constructorId == 0) {
|
||||
// on dialog initialization we init the first field with a selected object (if any)
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
else {
|
||||
displayPreview();
|
||||
}
|
||||
}
|
||||
else {
|
||||
displayPreview();
|
||||
}
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -49,8 +49,7 @@
|
||||
//=================================================================================
|
||||
PrimitiveGUI_DiskDlg::PrimitiveGUI_DiskDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
|
||||
myInitial(true)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
|
||||
{
|
||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||
QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_DISK_PNT_VEC_R")));
|
||||
@ -253,20 +252,9 @@ void PrimitiveGUI_DiskDlg::ConstructorsClicked (int constructorId)
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize(minimumSizeHint());
|
||||
SelectionIntoArgument();
|
||||
|
||||
if (myInitial) {
|
||||
myInitial = false;
|
||||
if (constructorId == 1 || constructorId == 2) {
|
||||
// on dialog initialization we init the first field with a selected object (if any)
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
else {
|
||||
displayPreview();
|
||||
}
|
||||
}
|
||||
else {
|
||||
displayPreview();
|
||||
}
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -60,9 +60,6 @@ private:
|
||||
private:
|
||||
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3;
|
||||
|
||||
// to initialize the first selection field with a selected object on the dialog creation
|
||||
bool myInitial;
|
||||
|
||||
DlgRef_2Sel1Spin* GroupPntVecR;
|
||||
DlgRef_3Sel* Group3Pnts;
|
||||
DlgRef_1Spin* GroupDimensions;
|
||||
|
@ -193,6 +193,7 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked( int constructorId )
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize( minimumSizeHint() );
|
||||
SelectionIntoArgument();
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
|
@ -54,8 +54,7 @@
|
||||
//=================================================================================
|
||||
PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
|
||||
myInitial(true)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
|
||||
{
|
||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||
QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_TORUS_PV")));
|
||||
@ -201,20 +200,9 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked (int constructorId)
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize(minimumSizeHint());
|
||||
SelectionIntoArgument();
|
||||
|
||||
if (myInitial) {
|
||||
myInitial = false;
|
||||
if (constructorId == 0) {
|
||||
// on dialog initialization we init the first field with a selected object (if any)
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
else {
|
||||
displayPreview();
|
||||
}
|
||||
}
|
||||
else {
|
||||
displayPreview();
|
||||
}
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -60,9 +60,6 @@ private:
|
||||
private:
|
||||
GEOM::GEOM_Object_var myPoint, myDir;
|
||||
|
||||
// to initialize the first selection field with a selected object on the dialog creation
|
||||
bool myInitial;
|
||||
|
||||
DlgRef_2Sel2Spin* GroupPoints;
|
||||
DlgRef_2Spin* GroupDimensions;
|
||||
|
||||
|
@ -130,6 +130,7 @@ void TransformationGUI_OffsetDlg::Init()
|
||||
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
resize(100,100);
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user