mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-15 12:30:36 +05:00
Change base class from MeasureGUI_Skeleton to GEOMBase_Skeleton
This commit is contained in:
parent
f00228b813
commit
942d70ff34
@ -26,6 +26,7 @@
|
||||
#include "MeasureGUI_CheckSelfIntersectionsDlg.h"
|
||||
#include "MeasureGUI_Widgets.h"
|
||||
|
||||
#include <SUIT_OverrideCursor.h>
|
||||
#include <SUIT_Session.h>
|
||||
#include <SUIT_ResourceMgr.h>
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
@ -52,7 +53,7 @@
|
||||
// true to construct a modal dialog.
|
||||
//=================================================================================
|
||||
MeasureGUI_CheckSelfIntersectionsDlg::MeasureGUI_CheckSelfIntersectionsDlg (GeometryGUI* GUI, QWidget* parent)
|
||||
: MeasureGUI_Skeleton(GUI, parent, false)
|
||||
: GEOMBase_Skeleton(GUI, parent, false)
|
||||
{
|
||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||
QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_CHECK_SELF_INTERSECTIONS")));
|
||||
@ -63,6 +64,10 @@ MeasureGUI_CheckSelfIntersectionsDlg::MeasureGUI_CheckSelfIntersectionsDlg (Geom
|
||||
/***************************************************************/
|
||||
mainFrame()->GroupConstructors->setTitle(tr("GEOM_CHECK_SELF_INTERSECTIONS"));
|
||||
mainFrame()->RadioButton1->setIcon(image0);
|
||||
mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
|
||||
mainFrame()->RadioButton2->close();
|
||||
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||
mainFrame()->RadioButton3->close();
|
||||
|
||||
myGrp = new MeasureGUI_1Sel1TextView2ListBox (centralWidget());
|
||||
myGrp->GroupBox1->setTitle(tr("GEOM_CHECK_INFOS"));
|
||||
@ -107,12 +112,60 @@ MeasureGUI_CheckSelfIntersectionsDlg::~MeasureGUI_CheckSelfIntersectionsDlg()
|
||||
//=================================================================================
|
||||
void MeasureGUI_CheckSelfIntersectionsDlg::Init()
|
||||
{
|
||||
mySelBtn = myGrp->PushButton1;
|
||||
mySelEdit = myGrp->LineEdit1;
|
||||
MeasureGUI_Skeleton::Init();
|
||||
|
||||
connect(myGrp->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
||||
connect(myGrp->ListBox1, SIGNAL(itemSelectionChanged()), SLOT(onErrorsListSelectionChanged()));
|
||||
connect(myGrp->ListBox2, SIGNAL(itemSelectionChanged()), SLOT(onSubShapesListSelectionChanged()));
|
||||
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
|
||||
this, SLOT(SelectionIntoArgument()));
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : createOperation
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_IOperations_ptr MeasureGUI_CheckSelfIntersectionsDlg::createOperation()
|
||||
{
|
||||
return getGeomEngine()->GetIMeasureOperations( getStudyId() );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : SetEditCurrentArgument
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void MeasureGUI_CheckSelfIntersectionsDlg::SetEditCurrentArgument()
|
||||
{
|
||||
myGrp->LineEdit1->setFocus();
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : SelectionIntoArgument
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void MeasureGUI_CheckSelfIntersectionsDlg::SelectionIntoArgument()
|
||||
{
|
||||
myObj = GEOM::GEOM_Object::_nil();
|
||||
|
||||
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
|
||||
SALOME_ListIO aSelList;
|
||||
aSelMgr->selectedObjects(aSelList);
|
||||
|
||||
GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||
|
||||
if (aSelList.Extent() > 0) {
|
||||
aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
|
||||
}
|
||||
|
||||
if (aSelectedObject->_is_nil()) {
|
||||
myGrp->LineEdit1->setText("");
|
||||
processObject();
|
||||
erasePreview();
|
||||
return;
|
||||
}
|
||||
|
||||
myObj = aSelectedObject;
|
||||
myGrp->LineEdit1->setText(GEOMBase::GetName(myObj));
|
||||
processObject();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -26,7 +26,7 @@
|
||||
#ifndef MEASUREGUI_CHECKSELFINTERDLG_H
|
||||
#define MEASUREGUI_CHECKSELFINTERDLG_H
|
||||
|
||||
#include <MeasureGUI_Skeleton.h>
|
||||
#include <GEOMBase_Skeleton.h>
|
||||
|
||||
class MeasureGUI_1Sel1TextView2ListBox;
|
||||
|
||||
@ -35,29 +35,38 @@ class MeasureGUI_1Sel1TextView2ListBox;
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
|
||||
class MeasureGUI_CheckSelfIntersectionsDlg : public MeasureGUI_Skeleton
|
||||
class MeasureGUI_CheckSelfIntersectionsDlg : public GEOMBase_Skeleton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
MeasureGUI_CheckSelfIntersectionsDlg(GeometryGUI*, QWidget*);
|
||||
~MeasureGUI_CheckSelfIntersectionsDlg();
|
||||
|
||||
protected:
|
||||
// redefined from GEOMBase_Helper and MeasureGUI_Skeleton
|
||||
virtual void processObject();
|
||||
// redefined from GEOMBase_Helper
|
||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||
|
||||
void processObject();
|
||||
|
||||
private slots:
|
||||
|
||||
void onErrorsListSelectionChanged();
|
||||
void onSubShapesListSelectionChanged();
|
||||
void SelectionIntoArgument();
|
||||
void SetEditCurrentArgument();
|
||||
|
||||
private:
|
||||
|
||||
void Init();
|
||||
|
||||
private:
|
||||
MeasureGUI_1Sel1TextView2ListBox* myGrp;
|
||||
|
||||
MeasureGUI_1Sel1TextView2ListBox* myGrp;
|
||||
GEOM::GEOM_Object_var myObj;
|
||||
GEOM::ListOfLong_var myInters;
|
||||
|
||||
};
|
||||
|
||||
#endif // MEASUREGUI_CHECKSELFINTERDLG_H
|
||||
|
Loading…
Reference in New Issue
Block a user