IPAL21695 TC5.1.4: GEOM Dialogs Behavior

This commit is contained in:
dmv 2010-05-24 07:55:16 +00:00
parent 4d896c08e8
commit 1be2d39839
22 changed files with 30 additions and 82 deletions

View File

@ -271,6 +271,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
SelectionIntoArgument();
myEditCurrentArgument->setFocus();
globalSelection(); // close local contexts, if any

View File

@ -158,6 +158,10 @@ void BasicGUI_CurveDlg::ConstructorsClicked( int id )
myPoints->length( 0 );
myEditCurrentArgument->setText( "" );
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
SelectionIntoArgument();
}

View File

@ -158,7 +158,8 @@ void BasicGUI_EllipseDlg::Init()
initName( tr( "GEOM_ELLIPSE" ) );
resize(100,100);
resize( minimumSizeHint() );
SelectionIntoArgument();
displayPreview();
}

View File

@ -228,7 +228,6 @@ void BasicGUI_LineDlg::ConstructorsClicked( int constructorId )
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
SelectionIntoArgument();
}

View File

@ -364,6 +364,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
SelectionIntoArgument();
myEditCurrentArgument->setFocus();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),

View File

@ -231,6 +231,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
SelectionIntoArgument();
displayPreview();
}

View File

@ -116,6 +116,7 @@ void BuildGUI_FaceDlg::Init()
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
initName( tr( "GEOM_FACE" ) );
SelectionIntoArgument();
}

View File

@ -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();
}

View File

@ -123,6 +123,7 @@ void BuildGUI_WireDlg::Init()
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
initName( tr( "GEOM_WIRE" ) );
SelectionIntoArgument();
}

View File

@ -298,6 +298,7 @@ void OperationGUI_FilletDlg::ConstructorsClicked (int constructorId)
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
SelectionIntoArgument();
}
//=================================================================================

View File

@ -202,6 +202,7 @@ void OperationGUI_PartitionDlg::ConstructorsClicked( int constructorId )
myEditCurrentArgument->setFocus();
connect( myGeomGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
SelectionIntoArgument();
}

View File

@ -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,16 +195,10 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked (int constructorId)
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
if (myInitial) {
// on dialog initialization we init the first field with a selected object (if any)
SelectionIntoArgument();
myInitial = false;
}
else {
displayPreview();
}
}
//=================================================================================
// function : ClickOnOk()
@ -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;

View File

@ -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;

View File

@ -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,16 +210,10 @@ void PrimitiveGUI_ConeDlg::ConstructorsClicked (int constructorId)
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
if (myInitial) {
// on dialog initialization we init the first field with a selected object (if any)
SelectionIntoArgument();
myInitial = false;
}
else {
displayPreview();
}
}
//=================================================================================
// function : ClickOnOk()

View File

@ -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;

View File

@ -202,21 +202,10 @@ void PrimitiveGUI_CylinderDlg::ConstructorsClicked (int constructorId)
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
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();
}
}
//=================================================================================
// function : ClickOnOk()

View File

@ -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,21 +252,10 @@ void PrimitiveGUI_DiskDlg::ConstructorsClicked (int constructorId)
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
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();
}
}
//=================================================================================
// function : ClickOnOk()

View File

@ -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;

View File

@ -193,6 +193,7 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked( int constructorId )
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
SelectionIntoArgument();
displayPreview();
}

View File

@ -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,21 +200,10 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked (int constructorId)
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
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();
}
}
//=================================================================================
// function : ClickOnOk()

View File

@ -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;

View File

@ -130,6 +130,7 @@ void TransformationGUI_OffsetDlg::Init()
globalSelection( GEOM_ALLSHAPES );
resize(100,100);
SelectionIntoArgument();
}