DCQ : New Architecture...

This commit is contained in:
dcq 2003-10-28 18:21:06 +00:00
parent a3da831cde
commit 9e7c6a0dff
126 changed files with 8515 additions and 6990 deletions

View File

@ -36,6 +36,8 @@ using namespace std;
#include <Precision.hxx> #include <Precision.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <ProjLib.hxx>
#include <ElSLib.hxx>
#include "BasicGUI_PointDlg.h" // Method POINT #include "BasicGUI_PointDlg.h" // Method POINT
#include "BasicGUI_LineDlg.h" // Method LINE #include "BasicGUI_LineDlg.h" // Method LINE
@ -166,10 +168,10 @@ bool BasicGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame
if(ic->MoreSelected()) if(ic->MoreSelected())
thePoint = BRep_Tool::Pnt(TopoDS::Vertex(ic->SelectedShape())); thePoint = BRep_Tool::Pnt(TopoDS::Vertex(ic->SelectedShape()));
else else
thePoint = myBasicGUI->myGeomBase->ConvertClickToPoint(pe->x(), pe->y(), ((OCCViewer_ViewPort3d*)vp)->getView()); thePoint = myBasicGUI->ConvertClickToPoint(pe->x(), pe->y(), ((OCCViewer_ViewPort3d*)vp)->getView());
} }
else else
thePoint = myBasicGUI->myGeomBase->ConvertClickToPoint(pe->x(), pe->y(), ((OCCViewer_ViewPort3d*)vp)->getView()); thePoint = myBasicGUI->ConvertClickToPoint(pe->x(), pe->y(), ((OCCViewer_ViewPort3d*)vp)->getView());
if(DialogPt != 0) if(DialogPt != 0)
DialogPt->PointIntoCoordinates(thePoint, true); /* display point */ DialogPt->PointIntoCoordinates(thePoint, true); /* display point */
@ -180,6 +182,33 @@ bool BasicGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame
} }
//=======================================================================
// function : ConvertClickToPoint()
// purpose : Returns the point clicked in 3D view
//=======================================================================
gp_Pnt BasicGUI::ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView)
{
V3d_Coordinate XEye, YEye, ZEye, XAt, YAt, ZAt;
aView->Eye(XEye, YEye, ZEye);
aView->At(XAt, YAt, ZAt);
gp_Pnt EyePoint(XEye, YEye, ZEye);
gp_Pnt AtPoint(XAt, YAt, ZAt);
gp_Vec EyeVector(EyePoint, AtPoint);
gp_Dir EyeDir(EyeVector);
gp_Pln PlaneOfTheView = gp_Pln(AtPoint,EyeDir);
Standard_Real X, Y, Z;
aView->Convert(x, y, X, Y, Z);
gp_Pnt ConvertedPoint(X, Y, Z);
gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project(PlaneOfTheView, ConvertedPoint);
gp_Pnt ResultPoint = ElSLib::Value(ConvertedPointOnPlane.X(), ConvertedPointOnPlane.Y(), PlaneOfTheView);
return ResultPoint;
}
//======================================================================= //=======================================================================
// function : MakePointAndDisplay // function : MakePointAndDisplay
// purpose : // purpose :

View File

@ -30,6 +30,7 @@
#define BASICGUI_H #define BASICGUI_H
#include "GEOMBase.h" #include "GEOMBase.h"
#include <V3d_View.hxx>
//================================================================================= //=================================================================================
// class : BasicGUI // class : BasicGUI
@ -46,6 +47,8 @@ public :
static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
static bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame); static bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView);
void MakePointAndDisplay(const double x, const double y, const double z); void MakePointAndDisplay(const double x, const double y, const double z);
void MakeLineAndDisplay(const gp_Pnt InitPoint, const gp_Pnt LastPoint); void MakeLineAndDisplay(const gp_Pnt InitPoint, const gp_Pnt LastPoint);
void MakeCircleAndDisplay(const gp_Pnt CenterPoint, const gp_Dir dir, const Standard_Real Radius); void MakeCircleAndDisplay(const gp_Pnt CenterPoint, const gp_Dir dir, const Standard_Real Radius);

View File

@ -252,6 +252,7 @@ void BasicGUI_ArcDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
mySelection->AddFilter(myVertexFilter);
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;

View File

@ -251,6 +251,9 @@ void BasicGUI_CircleDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
GroupPoints->LineEdit1->setFocus();
myEditCurrentArgument = GroupPoints->LineEdit1;
mySelection->AddFilter(myVertexFilter);
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;

View File

@ -258,6 +258,9 @@ void BasicGUI_EllipseDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
GroupPoints->LineEdit1->setFocus();
myEditCurrentArgument = GroupPoints->LineEdit1;
mySelection->AddFilter(myVertexFilter);
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;

View File

@ -238,6 +238,7 @@ void BasicGUI_LineDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
mySelection->AddFilter(myVertexFilter);
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;

View File

@ -131,19 +131,20 @@ void BasicGUI_PlaneDlg::Init()
this->myTrimSize = 2000.0; this->myTrimSize = 2000.0;
/* min, max, step and decimals for spin boxes */ /* min, max, step and decimals for spin boxes */
GroupPointDirection->SpinBox_DX->RangeStepAndValidator(+0.001, 10000000.0, step, 5); GroupPointDirection->SpinBox_DX->RangeStepAndValidator(0.001, 10000000.0, step, 3);
GroupPointDirection->SpinBox_DX->SetValue(myTrimSize); GroupPointDirection->SpinBox_DX->SetValue(myTrimSize);
GroupPointPlusCoordinates->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); double SpecificStep = 1;
GroupPointPlusCoordinates->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupPointPlusCoordinates->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3);
GroupPointPlusCoordinates->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupPointPlusCoordinates->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3);
GroupPointPlusCoordinates->SpinBox_DX->SetValue(1.0); GroupPointPlusCoordinates->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3);
GroupPointPlusCoordinates->SpinBox_DY->SetValue(1.0); GroupPointPlusCoordinates->SpinBox_DX->SetValue(0.0);
GroupPointPlusCoordinates->SpinBox_DY->SetValue(0.0);
GroupPointPlusCoordinates->SpinBox_DZ->SetValue(1.0); GroupPointPlusCoordinates->SpinBox_DZ->SetValue(1.0);
GroupPointPlusCoordinates->SpinBox_S->RangeStepAndValidator(+0.001, 10000000.0, step, 5); GroupPointPlusCoordinates->SpinBox_S->RangeStepAndValidator(0.001, 10000000.0, step, 3);
GroupPointPlusCoordinates->SpinBox_S->SetValue(myTrimSize) ; GroupPointPlusCoordinates->SpinBox_S->SetValue(myTrimSize) ;
GroupFace->SpinBox_DX->RangeStepAndValidator(+0.001, 10000000.0, step, 5); GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, 10000000.0, step, 3);
GroupFace->SpinBox_DX->SetValue(myTrimSize); GroupFace->SpinBox_DX->SetValue(myTrimSize);
/* signals and slots connections */ /* signals and slots connections */
@ -226,8 +227,8 @@ void BasicGUI_PlaneDlg::ConstructorsClicked(int constructorId)
myEditCurrentArgument = GroupPointPlusCoordinates->LineEdit1; myEditCurrentArgument = GroupPointPlusCoordinates->LineEdit1;
GroupPointPlusCoordinates->LineEdit1->setText(tr("")); GroupPointPlusCoordinates->LineEdit1->setText(tr(""));
GroupPointPlusCoordinates->SpinBox_DX->SetValue(1.0); GroupPointPlusCoordinates->SpinBox_DX->SetValue(0.0);
GroupPointPlusCoordinates->SpinBox_DY->SetValue(1.0); GroupPointPlusCoordinates->SpinBox_DY->SetValue(0.0);
GroupPointPlusCoordinates->SpinBox_DZ->SetValue(1.0); GroupPointPlusCoordinates->SpinBox_DZ->SetValue(1.0);
myOkCoordinates = true; myOkCoordinates = true;
@ -493,6 +494,30 @@ void BasicGUI_PlaneDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
switch(myConstructorId)
{
case 0:
{
GroupPointDirection->LineEdit1->setFocus();
myEditCurrentArgument = GroupPointDirection->LineEdit1;
mySelection->AddFilter(myVertexFilter);
break;
}
case 1:
{
GroupPointPlusCoordinates->LineEdit1->setFocus();
myEditCurrentArgument = GroupPointPlusCoordinates->LineEdit1;
mySelection->AddFilter(myVertexFilter);
break;
}
case 2:
{
GroupFace->LineEdit1->setFocus();
myEditCurrentArgument = GroupFace->LineEdit1;
mySelection->AddFilter(myFaceFilter);
break;
}
}
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;

View File

@ -29,6 +29,9 @@
using namespace std; using namespace std;
#include "BasicGUI_PointDlg.h" #include "BasicGUI_PointDlg.h"
#include "QAD_RightFrame.h"
#include "OCCViewer_Viewer3d.h"
#include <BRepBuilderAPI_MakeVertex.hxx> #include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BRepAlgoAPI.hxx> #include <BRepAlgoAPI.hxx>
@ -46,8 +49,8 @@ using namespace std;
BasicGUI_PointDlg::BasicGUI_PointDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, const Handle (AIS_InteractiveContext)& ic, bool modal, WFlags fl) BasicGUI_PointDlg::BasicGUI_PointDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, const Handle (AIS_InteractiveContext)& ic, bool modal, WFlags fl)
:GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
{ {
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POINT_EDGE"))); QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POINT")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POINT"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POINT_EDGE")));
QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_POINT_TITLE")); setCaption(tr("GEOM_POINT_TITLE"));
@ -58,17 +61,17 @@ BasicGUI_PointDlg::BasicGUI_PointDlg(QWidget* parent, const char* name, BasicGUI
RadioButton2->setPixmap(image1); RadioButton2->setPixmap(image1);
RadioButton3->close(TRUE); RadioButton3->close(TRUE);
GroupPoints = new DlgRef_1Sel1Spin(this, "GroupPoints"); GroupPoints = new DlgRef_3Spin(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_PARAM_POINT")); GroupPoints->GroupBox1->setTitle(tr("GEOM_COORDINATES"));
GroupPoints->TextLabel1->setText(tr("GEOM_EDGE")); GroupPoints->TextLabel1->setText(tr("GEOM_X"));
GroupPoints->TextLabel2->setText(tr("GEOM_PARAMETER")); GroupPoints->TextLabel2->setText(tr("GEOM_Y"));
GroupPoints->PushButton1->setPixmap(image2); GroupPoints->TextLabel3->setText(tr("GEOM_Z"));
GroupDimensions = new DlgRef_3Spin(this, "GroupDimensions"); GroupDimensions = new DlgRef_1Sel1Spin(this, "GroupDimensions");
GroupDimensions->GroupBox1->setTitle(tr("GEOM_COORDINATES")); GroupDimensions->GroupBox1->setTitle(tr("GEOM_PARAM_POINT"));
GroupDimensions->TextLabel1->setText(tr("GEOM_X")); GroupDimensions->TextLabel1->setText(tr("GEOM_EDGE"));
GroupDimensions->TextLabel2->setText(tr("GEOM_Y")); GroupDimensions->TextLabel2->setText(tr("GEOM_PARAMETER"));
GroupDimensions->TextLabel3->setText(tr("GEOM_Z")); GroupDimensions->PushButton1->setPixmap(image2);
Layout1->addWidget(GroupPoints, 1, 0); Layout1->addWidget(GroupPoints, 1, 0);
Layout1->addWidget(GroupDimensions, 1, 0); Layout1->addWidget(GroupDimensions, 1, 0);
@ -98,7 +101,7 @@ void BasicGUI_PointDlg::Init(const Handle(AIS_InteractiveContext)& ic)
{ {
/* init variables */ /* init variables */
myConstructorId = 0; myConstructorId = 0;
myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument = GroupDimensions->LineEdit1;
myIC = ic; myIC = ic;
myParameter = 0.50; myParameter = 0.50;
@ -109,7 +112,6 @@ void BasicGUI_PointDlg::Init(const Handle(AIS_InteractiveContext)& ic)
/* Vertices Filter for all arguments */ /* Vertices Filter for all arguments */
myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom);
mySelection->AddFilter(myEdgeFilter);
/* Get setting of step value from file configuration */ /* Get setting of step value from file configuration */
QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep");
@ -117,14 +119,14 @@ void BasicGUI_PointDlg::Init(const Handle(AIS_InteractiveContext)& ic)
/* min, max, step and decimals for spin boxes */ /* min, max, step and decimals for spin boxes */
double specificStep = 0.1; double specificStep = 0.1;
GroupPoints->SpinBox_DX->RangeStepAndValidator(-999999.99999, 999999.99999, specificStep, 5); GroupDimensions->SpinBox_DX->RangeStepAndValidator(-999999.99999, 999999.99999, specificStep, 5);
GroupDimensions->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3);
GroupDimensions->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupPoints->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3);
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupPoints->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
GroupPoints->SpinBox_DX->SetValue(myParameter); GroupDimensions->SpinBox_DX->SetValue(myParameter);
GroupDimensions->SpinBox_DX->SetValue(0.0); GroupPoints->SpinBox_DX->SetValue(0.0);
GroupDimensions->SpinBox_DY->SetValue(0.0); GroupPoints->SpinBox_DY->SetValue(0.0);
GroupDimensions->SpinBox_DZ->SetValue(0.0); GroupPoints->SpinBox_DZ->SetValue(0.0);
if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
myLocalContextId = myIC->OpenLocalContext(); myLocalContextId = myIC->OpenLocalContext();
@ -133,9 +135,9 @@ void BasicGUI_PointDlg::Init(const Handle(AIS_InteractiveContext)& ic)
myLocalContextMode = TopAbs_VERTEX; myLocalContextMode = TopAbs_VERTEX;
myIC->ActivateStandardMode(myLocalContextMode); myIC->ActivateStandardMode(myLocalContextMode);
myUseLocalContext = true; myUseLocalContext = true;
} else {
myUseLocalContext = false;
} }
else
myUseLocalContext = false;
TopoDS_Shape S; TopoDS_Shape S;
bool displayPoint = true; bool displayPoint = true;
@ -144,24 +146,29 @@ void BasicGUI_PointDlg::Init(const Handle(AIS_InteractiveContext)& ic)
if(myGeomBase->VertexToPoint(S, myPoint)) if(myGeomBase->VertexToPoint(S, myPoint))
displayPoint = false; displayPoint = false;
} }
this->PointIntoCoordinates(myPoint, displayPoint);
/* signals and slots connections */ /* signals and slots connections */
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupDimensions->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupDimensions->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
connect(GroupDimensions->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
connect(GroupPoints->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX, SLOT(SetStep(double)));
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DZ, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double)));
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DZ, SLOT(SetStep(double)));
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
@ -189,26 +196,6 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
switch (constructorId) switch (constructorId)
{ {
case 0: case 0:
{
if (myUseLocalContext == true && myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
myIC->CloseLocalContext(myLocalContextId);
myUseLocalContext = false;
}
GroupDimensions->hide();
resize(0, 0);
GroupPoints->show();
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit1->setText("");
myOkEdge = false;
/* filter for next selections */
mySelection->AddFilter(myEdgeFilter);
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
break;
}
case 1:
{ {
if(myUseLocalContext == false && myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { if(myUseLocalContext == false && myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
myLocalContextId = myIC->OpenLocalContext(); myLocalContextId = myIC->OpenLocalContext();
@ -219,12 +206,32 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
myUseLocalContext = true; myUseLocalContext = true;
} }
GroupDimensions->hide();
resize(0, 0);
GroupPoints->show();
/* Display point simulation */
PointIntoCoordinates(myPoint, true);
break;
}
case 1:
{
if(myUseLocalContext == true && myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
myIC->CloseLocalContext(myLocalContextId);
myUseLocalContext = false;
}
GroupPoints->hide(); GroupPoints->hide();
resize(0, 0); resize(0, 0);
GroupDimensions->show(); GroupDimensions->show();
/* Display point simulation */ myEditCurrentArgument = GroupDimensions->LineEdit1;
PointIntoCoordinates(myPoint, true); GroupDimensions->LineEdit1->setText("");
myOkEdge = false;
/* filter for next selections */
mySelection->AddFilter(myEdgeFilter);
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
break; break;
} }
} }
@ -239,7 +246,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
void BasicGUI_PointDlg::ClickOnOk() void BasicGUI_PointDlg::ClickOnOk()
{ {
this->ClickOnApply(); this->ClickOnApply();
ClickOnCancel(); this->ClickOnCancel();
return; return;
} }
@ -265,19 +272,11 @@ void BasicGUI_PointDlg::ClickOnApply()
switch(myConstructorId) switch(myConstructorId)
{ {
case 0 : case 0 :
{
if(myOkEdge == true) {
/* this constructor method has no idl interface : we use same than constructor 0 */
myBasicGUI->MakePointAndDisplay(myPoint.X(), myPoint.Y(), myPoint.Z());
}
break;
}
case 1 :
{ {
/* Recup args and call method */ /* Recup args and call method */
double x = GroupDimensions->SpinBox_DX->GetValue(); double x = GroupPoints->SpinBox_DX->GetValue();
double y = GroupDimensions->SpinBox_DY->GetValue(); double y = GroupPoints->SpinBox_DY->GetValue();
double z = GroupDimensions->SpinBox_DZ->GetValue(); double z = GroupPoints->SpinBox_DZ->GetValue();
myBasicGUI->MakePointAndDisplay(x,y,z); /* WARNING : no display if a local context is opened */ myBasicGUI->MakePointAndDisplay(x,y,z); /* WARNING : no display if a local context is opened */
if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
@ -291,7 +290,35 @@ void BasicGUI_PointDlg::ClickOnApply()
} }
break; break;
} }
case 1 :
{
if(myOkEdge == true) {
/* this constructor method has no idl interface : we use same than constructor 0 */
myBasicGUI->MakePointAndDisplay(myPoint.X(), myPoint.Y(), myPoint.Z());
} }
break;
}
}
return;
}
//=======================================================================
// function : ClickOnCancel()
// purpose :
//=======================================================================
void BasicGUI_PointDlg::ClickOnCancel()
{
if(myConstructorId == 0 && myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
myIC = v3d->getAISContext();
if(myIC->HasOpenedContext()) {
myIC->CloseLocalContext(myLocalContextId);
myUseLocalContext = false;
}
}
GEOMBase_Skeleton::ClickOnCancel();
return; return;
} }
@ -321,7 +348,7 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
if(S.ShapeType() == TopAbs_EDGE) { if(S.ShapeType() == TopAbs_EDGE) {
if(CalculateVertexOnCurve(TopoDS::Edge(S), myParameter, mySimulationTopoDs)) { if(CalculateVertexOnCurve(TopoDS::Edge(S), myParameter, mySimulationTopoDs)) {
if(myGeomBase->VertexToPoint(mySimulationTopoDs, myPoint)) { if(myGeomBase->VertexToPoint(mySimulationTopoDs, myPoint)) {
GroupPoints->LineEdit1->setText(aString); GroupDimensions->LineEdit1->setText(aString);
myOkEdge = true; myOkEdge = true;
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
} }
@ -338,8 +365,8 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
void BasicGUI_PointDlg::LineEditReturnPressed() void BasicGUI_PointDlg::LineEditReturnPressed()
{ {
QLineEdit* send = (QLineEdit*)sender(); QLineEdit* send = (QLineEdit*)sender();
if(send == GroupPoints->LineEdit1) if(send == GroupDimensions->LineEdit1)
myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument = GroupDimensions->LineEdit1;
else else
return; return;
@ -356,9 +383,9 @@ void BasicGUI_PointDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
if(send == GroupPoints->PushButton1) { if(send == GroupDimensions->PushButton1) {
GroupPoints->LineEdit1->setFocus(); GroupDimensions->LineEdit1->setFocus();
myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument = GroupDimensions->LineEdit1;
mySelection->AddFilter(myEdgeFilter); mySelection->AddFilter(myEdgeFilter);
this->SelectionIntoArgument(); this->SelectionIntoArgument();
} }
@ -379,6 +406,17 @@ void BasicGUI_PointDlg::enterEvent(QEvent* e)
} }
//=======================================================================
// function : closeEvent()
// purpose :
//=======================================================================
void BasicGUI_PointDlg::closeEvent(QCloseEvent* e)
{
/* same than click on cancel button */
this->ClickOnCancel();
}
//================================================================================= //=================================================================================
// function : ActivateThisDialog() // function : ActivateThisDialog()
// purpose : // purpose :
@ -388,17 +426,20 @@ void BasicGUI_PointDlg::ActivateThisDialog( )
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
// myGeomGUI->SetState(POINT_METHOD); myGeomGUI->SetState(POINT_METHOD);
// if( myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC ) { if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
// OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
// myIC = v3d->getAISContext(); myIC = v3d->getAISContext();
// myLocalContextId = myIC->OpenLocalContext(); myLocalContextId = myIC->OpenLocalContext();
// myGeomBase->SetDisplayedObjectList(); myGeomBase->SetDisplayedObjectList();
// /* sub shapes selection */ /* sub shapes selection */
// myLocalContextMode = TopAbs_VERTEX ; myLocalContextMode = TopAbs_VERTEX;
// myIC->ActivateStandardMode(myLocalContextMode); myIC->ActivateStandardMode(myLocalContextMode);
// myUseLocalContext = true ; myUseLocalContext = true;
// } }
if(myConstructorId == 1)
mySelection->AddFilter(myEdgeFilter);
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
@ -406,6 +447,21 @@ void BasicGUI_PointDlg::ActivateThisDialog( )
} }
//=================================================================================
// function : DeactivateActiveDialog()
// purpose : public slot to deactivate if active
//=================================================================================
void BasicGUI_PointDlg::DeactivateActiveDialog()
{
if(myConstructorId == 0 && myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
myIC->CloseLocalContext(myLocalContextId);
myUseLocalContext = false;
}
GEOMBase_Skeleton::DeactivateActiveDialog();
return;
}
//================================================================================= //=================================================================================
// function : ValueChangedInSpinBox() // function : ValueChangedInSpinBox()
// purpose : // purpose :
@ -415,19 +471,19 @@ void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue)
DlgRef_SpinBox* send = (DlgRef_SpinBox*)sender(); DlgRef_SpinBox* send = (DlgRef_SpinBox*)sender();
double vx, vy, vz; double vx, vy, vz;
if(send == GroupDimensions->SpinBox_DX) { if(send == GroupPoints->SpinBox_DX) {
vx = newValue; vx = newValue;
vy = GroupDimensions->SpinBox_DY->GetValue(); vy = GroupPoints->SpinBox_DY->GetValue();
vz = GroupDimensions->SpinBox_DZ->GetValue(); vz = GroupPoints->SpinBox_DZ->GetValue();
} else if(send == GroupDimensions->SpinBox_DY) { } else if(send == GroupPoints->SpinBox_DY) {
vx = GroupDimensions->SpinBox_DX->GetValue(); vx = GroupPoints->SpinBox_DX->GetValue();
vy = newValue; vy = newValue;
vz = GroupDimensions->SpinBox_DZ->GetValue(); vz = GroupPoints->SpinBox_DZ->GetValue();
} else if(send == GroupDimensions->SpinBox_DZ) { } else if(send == GroupPoints->SpinBox_DZ) {
vx = GroupDimensions->SpinBox_DX->GetValue(); vx = GroupPoints->SpinBox_DX->GetValue();
vy = GroupDimensions->SpinBox_DY->GetValue(); vy = GroupPoints->SpinBox_DY->GetValue();
vz = newValue; vz = newValue;
} else if(send == GroupPoints->SpinBox_DX) { } else if(send == GroupDimensions->SpinBox_DX) {
myParameter = newValue; myParameter = newValue;
} else } else
return; return;
@ -436,14 +492,14 @@ void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue)
{ {
case 0: // default constructor case 0: // default constructor
{ {
this->SelectionIntoArgument(); myPoint.SetCoord(vx, vy, vz);
mySimulationTopoDs = BRepBuilderAPI_MakeVertex (myPoint).Shape();
myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
break; break;
} }
case 1: case 1:
{ {
myPoint.SetCoord(vx, vy, vz); this->SelectionIntoArgument();
mySimulationTopoDs = BRepBuilderAPI_MakeVertex (myPoint).Shape();
myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
break; break;
} }
} }
@ -490,10 +546,10 @@ bool BasicGUI_PointDlg::CalculateVertexOnCurve(const TopoDS_Edge& anEdge, const
//======================================================================= //=======================================================================
void BasicGUI_PointDlg::PointIntoCoordinates(gp_Pnt P, bool displayPoint) void BasicGUI_PointDlg::PointIntoCoordinates(gp_Pnt P, bool displayPoint)
{ {
GroupDimensions->SpinBox_DX->SetValue(P.X()); GroupPoints->SpinBox_DX->SetValue(P.X());
GroupDimensions->SpinBox_DY->SetValue(P.Y()); GroupPoints->SpinBox_DY->SetValue(P.Y());
GroupDimensions->SpinBox_DZ->SetValue(P.Z()); GroupPoints->SpinBox_DZ->SetValue(P.Z());
this->myPoint.SetCoord(P.X(), P.Y(), P.Z()); myPoint.SetCoord(P.X(), P.Y(), P.Z());
if(displayPoint) { if(displayPoint) {
mySimulationTopoDs = BRepBuilderAPI_MakeVertex(P).Shape(); mySimulationTopoDs = BRepBuilderAPI_MakeVertex(P).Shape();
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);

View File

@ -54,6 +54,7 @@ public:
private : private :
void Init(const Handle(AIS_InteractiveContext)& ic); void Init(const Handle(AIS_InteractiveContext)& ic);
void enterEvent(QEvent* e); void enterEvent(QEvent* e);
void closeEvent(QCloseEvent* e);
BasicGUI* myBasicGUI; BasicGUI* myBasicGUI;
@ -71,13 +72,15 @@ private :
TopAbs_ShapeEnum myLocalContextMode; /* identify a selection mode into local context */ TopAbs_ShapeEnum myLocalContextMode; /* identify a selection mode into local context */
bool myUseLocalContext; /* true when method as opened a local context */ bool myUseLocalContext; /* true when method as opened a local context */
DlgRef_1Sel1Spin* GroupPoints; DlgRef_1Sel1Spin* GroupDimensions;
DlgRef_3Spin* GroupDimensions; DlgRef_3Spin* GroupPoints;
private slots: private slots:
void ClickOnOk(); void ClickOnOk();
void ClickOnCancel();
void ClickOnApply(); void ClickOnApply();
void ActivateThisDialog(); void ActivateThisDialog();
void DeactivateActiveDialog();
void LineEditReturnPressed(); void LineEditReturnPressed();
void SelectionIntoArgument(); void SelectionIntoArgument();
void SetEditCurrentArgument(); void SetEditCurrentArgument();

View File

@ -363,6 +363,8 @@ void BasicGUI_VectorDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
if(myConstructorId == 0)
mySelection->AddFilter(myVertexFilter);
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;
@ -392,19 +394,12 @@ void BasicGUI_VectorDlg::ValueChangedInSpinBox( double newValue )
mySimulationTopoDs.Nullify(); mySimulationTopoDs.Nullify();
QObject* send = (QObject*)sender(); QObject* send = (QObject*)sender();
if(send == GroupDimensions->SpinBox_DX ) { if(send == GroupDimensions->SpinBox_DX)
myDx = newValue; myDx = newValue;
myDy = GroupDimensions->SpinBox_DY->GetValue(); else if (send == GroupDimensions->SpinBox_DY)
myDz = GroupDimensions->SpinBox_DZ->GetValue();
} else if (send == GroupDimensions->SpinBox_DY) {
myDx = GroupDimensions->SpinBox_DX->GetValue();
myDy = newValue; myDy = newValue;
myDz = GroupDimensions->SpinBox_DZ->GetValue(); else if (send == GroupDimensions->SpinBox_DZ)
} else if (send == GroupDimensions->SpinBox_DZ) {
myDx = GroupDimensions->SpinBox_DX->GetValue();
myDy = GroupDimensions->SpinBox_DY->GetValue();
myDz = newValue; myDz = newValue;
}
myPoint1.SetCoord(0.0, 0.0, 0.0); myPoint1.SetCoord(0.0, 0.0, 0.0);
myPoint2.SetCoord(myDx, myDy, myDz); myPoint2.SetCoord(myDx, myDy, myDz);
@ -452,11 +447,10 @@ void BasicGUI_VectorDlg::ReverseVector(int state)
mySimulationTopoDs.Nullify(); mySimulationTopoDs.Nullify();
myDx = -myDx; myDx = -myDx;
myDy = -myDy;
myDz = -myDz;
GroupDimensions->SpinBox_DX->SetValue(myDx); GroupDimensions->SpinBox_DX->SetValue(myDx);
myDy = -myDy;
GroupDimensions->SpinBox_DY->SetValue(myDy); GroupDimensions->SpinBox_DY->SetValue(myDy);
myDz = -myDz;
GroupDimensions->SpinBox_DZ->SetValue(myDz); GroupDimensions->SpinBox_DZ->SetValue(myDz);
myPoint1.SetCoord(0.0, 0.0, 0.0); myPoint1.SetCoord(0.0, 0.0, 0.0);

View File

@ -199,6 +199,7 @@ void BasicGUI_WorkingPlaneDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
mySelection->AddFilter(myFaceFilter);
return; return;
} }

View File

@ -277,6 +277,38 @@ void BuildGUI::MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR)
} }
//=====================================================================================
// function : SObjectExist()
// purpose :
//=====================================================================================
bool BuildGUI::SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR)
{
SALOMEDS::Study_var aStudy = myGeomGUI->GetActiveStudy()->getStudyDocument();
SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(theFatherObject);
SALOMEDS::SObject_var RefSO;
SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributeIOR_var anIOR;
for(; it->More();it->Next()) {
SALOMEDS::SObject_var SO= it->Value();
if(SO->FindAttribute(anAttr, "AttributeIOR")) {
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
if(strcmp( anIOR->Value(), IOR ) == 0)
return true;
}
if(SO->ReferencedObject(RefSO)) {
if(RefSO->FindAttribute(anAttr, "AttributeIOR")) {
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
if(strcmp(anIOR->Value(), IOR) == 0)
return true;
}
}
}
return false;
}
//===================================================================================== //=====================================================================================
// function : OnSubShapeGetAll() // function : OnSubShapeGetAll()
// purpose : Explode a shape in all sub shapes with a SubShapeType // purpose : Explode a shape in all sub shapes with a SubShapeType
@ -405,7 +437,7 @@ bool BuildGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shape
} }
else { else {
allreadyexist = true; allreadyexist = true;
if(!myGeomBase->SObjectExist(theObj, aResult->Name())) { if(!this->SObjectExist(theObj, aResult->Name())) {
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj); SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj);
aStudyBuilder->Addreference(newObj1, SO); aStudyBuilder->Addreference(newObj1, SO);
IO->setEntry(SO->GetID()); IO->setEntry(SO->GetID());
@ -462,7 +494,7 @@ bool BuildGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shape
} }
else { else {
allreadyexist = true; allreadyexist = true;
if(!myGeomBase->SObjectExist(theObj, aResult->Name())) { if(!this->SObjectExist(theObj, aResult->Name())) {
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj); SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj);
aStudyBuilder->Addreference(newObj1, SO); aStudyBuilder->Addreference(newObj1, SO);
IO->setEntry(SO->GetID()); IO->setEntry(SO->GetID());
@ -655,7 +687,7 @@ bool BuildGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char*
} }
else { else {
allreadyexist = true; allreadyexist = true;
if(!myGeomBase->SObjectExist(theObj, aResult->Name())) { if(!this->SObjectExist(theObj, aResult->Name())) {
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj); SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj);
aStudyBuilder->Addreference(newObj1, SO); aStudyBuilder->Addreference(newObj1, SO);

View File

@ -53,6 +53,7 @@ public :
void MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR); void MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
/* Methods for sub shapes explode */ /* Methods for sub shapes explode */
bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR);
bool OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType); bool OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType);
bool OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType, bool OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType,
Standard_Integer& aLocalContextId, bool& myUseLocalContext); Standard_Integer& aLocalContextId, bool& myUseLocalContext);

View File

@ -237,6 +237,7 @@ void BuildGUI_EdgeDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
mySelection->AddFilter(myVertexFilter);
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;

View File

@ -201,6 +201,7 @@ void BuildGUI_FaceDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
mySelection->AddFilter(myWireFilter);
return; return;
} }

View File

@ -165,13 +165,10 @@ void BuildGUI_ShellDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
mySelection->ClearFilters() ; mySelection->ClearFilters() ;
if(send == GroupShell->PushButton1) {
GroupShell->LineEdit1->setFocus(); GroupShell->LineEdit1->setFocus();
myEditCurrentArgument = GroupShell->LineEdit1; myEditCurrentArgument = GroupShell->LineEdit1;
mySelection->AddFilter(myFaceFilter); mySelection->AddFilter(myFaceFilter);
} this->SelectionIntoArgument();
SelectionIntoArgument();
return; return;
} }
@ -184,6 +181,7 @@ void BuildGUI_ShellDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
mySelection->AddFilter(myFaceFilter);
return; return;
} }

View File

@ -164,14 +164,10 @@ void BuildGUI_SolidDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
mySelection->ClearFilters() ; mySelection->ClearFilters() ;
if(send == GroupSolid->PushButton1) {
GroupSolid->LineEdit1->setFocus(); GroupSolid->LineEdit1->setFocus();
myEditCurrentArgument = GroupSolid->LineEdit1; myEditCurrentArgument = GroupSolid->LineEdit1;
mySelection->AddFilter(myShellFilter); mySelection->AddFilter(myShellFilter);
}
SelectionIntoArgument(); SelectionIntoArgument();
return; return;
} }
@ -184,6 +180,7 @@ void BuildGUI_SolidDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
mySelection->AddFilter(myShellFilter);
return; return;
} }

View File

@ -61,7 +61,7 @@ BuildGUI_SubShapeDlg::BuildGUI_SubShapeDlg(QWidget* parent, const char* name, Bu
GroupPoints = new DlgRef_1Sel1Check1List_QTD(this, "GroupPoints"); GroupPoints = new DlgRef_1Sel1Check1List_QTD(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
GroupPoints->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); GroupPoints->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
//GroupPoints->ComboBox1->setText(tr("GEOM_SUBSHAPE_TYPE")); GroupPoints->TextLabel2->setText(tr("GEOM_SUBSHAPE_TYPE"));
GroupPoints->CheckButton1->setText(tr("GEOM_SUBSHAPE_SELECT")); GroupPoints->CheckButton1->setText(tr("GEOM_SUBSHAPE_SELECT"));
GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton1->setPixmap(image1);
@ -112,7 +112,14 @@ void BuildGUI_SubShapeDlg::Init(Handle(AIS_InteractiveContext) ic)
myShapeType = GroupPoints->ComboBox1->currentItem(); myShapeType = GroupPoints->ComboBox1->currentItem();
myOkSelectSubMode = GroupPoints->CheckButton1->isChecked(); myOkSelectSubMode = GroupPoints->CheckButton1->isChecked();
if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC)
GroupPoints->CheckButton1->setEnabled(false);
/* signals and slots connections */ /* signals and slots connections */
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
@ -204,14 +211,13 @@ void BuildGUI_SubShapeDlg::ClickOnCancel()
if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
myIC = v3d->getAISContext(); myIC = v3d->getAISContext();
if(myUseLocalContext) { if(myUseLocalContext) {
myIC->CloseLocalContext(myLocalContextId); myIC->CloseLocalContext(myLocalContextId);
myUseLocalContext = false; myUseLocalContext = false;
}
DisplayGUI* myDisplayGUI = new DisplayGUI(); DisplayGUI* myDisplayGUI = new DisplayGUI();
myDisplayGUI->OnDisplayAll(true); myDisplayGUI->OnDisplayAll(true);
} }
}
GEOMBase_Skeleton::ClickOnCancel(); GEOMBase_Skeleton::ClickOnCancel();
return; return;
} }
@ -361,10 +367,8 @@ void BuildGUI_SubShapeDlg::LineEditReturnPressed()
void BuildGUI_SubShapeDlg::DeactivateActiveDialog() void BuildGUI_SubShapeDlg::DeactivateActiveDialog()
{ {
if(GroupConstructors->isEnabled()) { if(GroupConstructors->isEnabled()) {
GEOMBase_Skeleton::DeactivateActiveDialog();
this->ResetStateOfDialog(); this->ResetStateOfDialog();
DisplayGUI* myDisplayGUI = new DisplayGUI(); GEOMBase_Skeleton::DeactivateActiveDialog();
myDisplayGUI->OnDisplayAll(true);
} }
return; return;
} }
@ -378,6 +382,10 @@ void BuildGUI_SubShapeDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC)
GroupPoints->CheckButton1->setEnabled(true);
else
GroupPoints->CheckButton1->setEnabled(false);
return; return;
} }
@ -447,14 +455,13 @@ void BuildGUI_SubShapeDlg::ResetStateOfDialog()
if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
myIC = v3d->getAISContext(); myIC = v3d->getAISContext();
if(myUseLocalContext) { if(myUseLocalContext) {
myIC->CloseLocalContext(myLocalContextId); myIC->CloseLocalContext(myLocalContextId);
myUseLocalContext = false; myUseLocalContext = false;
}
DisplayGUI* myDisplayGUI = new DisplayGUI(); DisplayGUI* myDisplayGUI = new DisplayGUI();
myDisplayGUI->OnDisplayAll(true); myDisplayGUI->OnDisplayAll(true);
} }
}
return; return;
} }
@ -492,10 +499,10 @@ void BuildGUI_SubShapeDlg::AllOrNotAll()
if(myUseLocalContext) { if(myUseLocalContext) {
myIC->CloseLocalContext(myLocalContextId); myIC->CloseLocalContext(myLocalContextId);
myUseLocalContext = false; myUseLocalContext = false;
}
DisplayGUI* myDisplayGUI = new DisplayGUI(); DisplayGUI* myDisplayGUI = new DisplayGUI();
myDisplayGUI->OnDisplayAll(true); myDisplayGUI->OnDisplayAll(true);
} }
}
else { else {
myGeomGUI->GetDesktop()->putInfo(tr("GEOM_PRP_NOT_FOR_VTK_VIEWER")); myGeomGUI->GetDesktop()->putInfo(tr("GEOM_PRP_NOT_FOR_VTK_VIEWER"));
return; return;
@ -534,10 +541,10 @@ void BuildGUI_SubShapeDlg::ComboTextChanged()
if(myUseLocalContext) { if(myUseLocalContext) {
myIC->CloseLocalContext(myLocalContextId); myIC->CloseLocalContext(myLocalContextId);
myUseLocalContext = false; myUseLocalContext = false;
}
DisplayGUI* myDisplayGUI = new DisplayGUI(); DisplayGUI* myDisplayGUI = new DisplayGUI();
myDisplayGUI->OnDisplayAll(true); myDisplayGUI->OnDisplayAll(true);
} }
}
return; return;
} }

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** Form implementation generated from reading ui file 'DlgRef_1Sel1Check1List_QTD.ui' ** Form implementation generated from reading ui file 'DlgRef_1Sel1Check1List_QTD.ui'
** **
** Created: jeu oct 16 10:43:10 2003 ** Created: lun oct 27 16:18:55 2003
** by: The User Interface Compiler (uic) ** by: The User Interface Compiler (uic)
** **
** WARNING! All changes made in this file will be lost! ** WARNING! All changes made in this file will be lost!
@ -41,12 +41,25 @@ DlgRef_1Sel1Check1List_QTD::DlgRef_1Sel1Check1List_QTD( QWidget* parent, const
GroupBox1Layout->setAlignment( Qt::AlignTop ); GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
QSpacerItem* spacer = new QSpacerItem( 0, 166, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 3, 2 );
CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" ); CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" );
CheckButton1->setText( trUtf8( "" ) ); CheckButton1->setText( trUtf8( "" ) );
Layout1->addMultiCellWidget( CheckButton1, 2, 2, 0, 2 ); Layout1->addMultiCellWidget( CheckButton1, 2, 2, 0, 2 );
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout1->addMultiCellWidget( TextLabel2, 1, 1, 0, 1 );
ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
Layout1->addWidget( ComboBox1, 1, 2 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 ); Layout1->addWidget( LineEdit1, 0, 2 );
@ -63,13 +76,6 @@ DlgRef_1Sel1Check1List_QTD::DlgRef_1Sel1Check1List_QTD( QWidget* parent, const
Layout1->addWidget( PushButton1, 0, 1 ); Layout1->addWidget( PushButton1, 0, 1 );
ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
Layout1->addWidget( ComboBox1, 1, 2 );
QSpacerItem* spacer = new QSpacerItem( 0, 60, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 3, 2 );
GroupBox1Layout->addLayout( Layout1, 0, 0 ); GroupBox1Layout->addLayout( Layout1, 0, 0 );
DlgRef_1Sel1Check1List_QTDLayout->addWidget( GroupBox1, 0, 0 ); DlgRef_1Sel1Check1List_QTDLayout->addWidget( GroupBox1, 0, 0 );

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** Form interface generated from reading ui file 'DlgRef_1Sel1Check1List_QTD.ui' ** Form interface generated from reading ui file 'DlgRef_1Sel1Check1List_QTD.ui'
** **
** Created: jeu oct 16 10:43:10 2003 ** Created: lun oct 27 16:18:55 2003
** by: The User Interface Compiler (uic) ** by: The User Interface Compiler (uic)
** **
** WARNING! All changes made in this file will be lost! ** WARNING! All changes made in this file will be lost!
@ -31,10 +31,11 @@ public:
QGroupBox* GroupBox1; QGroupBox* GroupBox1;
QRadioButton* CheckButton1; QRadioButton* CheckButton1;
QLabel* TextLabel2;
QComboBox* ComboBox1;
QLineEdit* LineEdit1; QLineEdit* LineEdit1;
QLabel* TextLabel1; QLabel* TextLabel1;
QPushButton* PushButton1; QPushButton* PushButton1;
QComboBox* ComboBox1;
protected: protected:

View File

@ -47,10 +47,10 @@ DlgRef_1Sel3Spin::DlgRef_1Sel3Spin(QWidget* parent, const char* name, WFlags fl
Layout2->addWidget(SpinBox_DX, 0, 1); Layout2->addWidget(SpinBox_DX, 0, 1);
SpinBox_DY = new DlgRef_SpinBox( GroupBox1, "SpinBox_DY"); SpinBox_DY = new DlgRef_SpinBox( GroupBox1, "SpinBox_DY");
Layout2->addWidget(SpinBox_DY, 0, 3); Layout2->addWidget(SpinBox_DY, 1, 1);
SpinBox_DZ = new DlgRef_SpinBox( GroupBox1, "SpinBox_DZ"); SpinBox_DZ = new DlgRef_SpinBox( GroupBox1, "SpinBox_DZ");
Layout2->addWidget(SpinBox_DZ, 0, 5); Layout2->addWidget(SpinBox_DZ, 2, 1);
} }

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** Form implementation generated from reading ui file 'DlgRef_1Sel3Spin_QTD.ui' ** Form implementation generated from reading ui file 'DlgRef_1Sel3Spin_QTD.ui'
** **
** Created: mer oct 1 16:53:03 2003 ** Created: ven oct 24 15:55:11 2003
** by: The User Interface Compiler (uic) ** by: The User Interface Compiler (uic)
** **
** WARNING! All changes made in this file will be lost! ** WARNING! All changes made in this file will be lost!
@ -27,7 +27,7 @@ DlgRef_1Sel3Spin_QTD::DlgRef_1Sel3Spin_QTD( QWidget* parent, const char* name,
{ {
if ( !name ) if ( !name )
setName( "DlgRef_1Sel3Spin_QTD" ); setName( "DlgRef_1Sel3Spin_QTD" );
resize( 232, 87 ); resize( 129, 143 );
setCaption( trUtf8( "DlgRef_1Sel3Spin_QTD" ) ); setCaption( trUtf8( "DlgRef_1Sel3Spin_QTD" ) );
DlgRef_1Sel3Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_1Sel3Spin_QTDLayout"); DlgRef_1Sel3Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_1Sel3Spin_QTDLayout");
@ -41,58 +41,58 @@ DlgRef_1Sel3Spin_QTD::DlgRef_1Sel3Spin_QTD( QWidget* parent, const char* name,
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
QSpacerItem* spacer = new QSpacerItem( 0, 207, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 2, 2 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) ); TextLabel1->setText( trUtf8( "TL1" ) );
Layout1->addWidget( TextLabel1, 0, 0 ); Layout1->addWidget( TextLabel1, 0, 0 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 ); Layout1->addWidget( LineEdit1, 0, 2 );
QSpacerItem* spacer = new QSpacerItem( 0, 150, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 2, 2 );
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout2->addWidget( TextLabel4, 0, 5 ); Layout2->addWidget( SpinBox2, 1, 1 );
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout2->addWidget( TextLabel2, 0, 1 );
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( trUtf8( "TL3" ) ); TextLabel3->setText( trUtf8( "TL3" ) );
Layout2->addWidget( TextLabel3, 0, 3 ); Layout2->addWidget( TextLabel3, 1, 0 );
SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" ); SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) ); SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
Layout2->addWidget( SpinBox3, 0, 6 ); Layout2->addWidget( SpinBox3, 2, 1 );
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" ); SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) ); SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
Layout2->addWidget( SpinBox1, 0, 2 ); Layout2->addWidget( SpinBox1, 0, 1 );
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" ); TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) ); TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout2->addWidget( SpinBox2, 0, 4 ); Layout2->addWidget( TextLabel4, 2, 0 );
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout2->addWidget( TextLabel2, 0, 0 );
Layout1->addMultiCellLayout( Layout2, 1, 1, 0, 2 ); Layout1->addMultiCellLayout( Layout2, 1, 1, 0, 2 );

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** Form interface generated from reading ui file 'DlgRef_1Sel3Spin_QTD.ui' ** Form interface generated from reading ui file 'DlgRef_1Sel3Spin_QTD.ui'
** **
** Created: mer oct 1 16:53:02 2003 ** Created: ven oct 24 15:55:10 2003
** by: The User Interface Compiler (uic) ** by: The User Interface Compiler (uic)
** **
** WARNING! All changes made in this file will be lost! ** WARNING! All changes made in this file will be lost!
@ -29,15 +29,15 @@ public:
~DlgRef_1Sel3Spin_QTD(); ~DlgRef_1Sel3Spin_QTD();
QGroupBox* GroupBox1; QGroupBox* GroupBox1;
QPushButton* PushButton1;
QLabel* TextLabel1; QLabel* TextLabel1;
QPushButton* PushButton1;
QLineEdit* LineEdit1; QLineEdit* LineEdit1;
QLabel* TextLabel4; QSpinBox* SpinBox2;
QLabel* TextLabel2;
QLabel* TextLabel3; QLabel* TextLabel3;
QSpinBox* SpinBox3; QSpinBox* SpinBox3;
QSpinBox* SpinBox1; QSpinBox* SpinBox1;
QSpinBox* SpinBox2; QLabel* TextLabel4;
QLabel* TextLabel2;
protected: protected:

View File

@ -0,0 +1,57 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : DlgRef_2Sel1Spin1Check.cxx
// Author : Damien COQUERET
// Module : GEOM
// $Header:
#include "DlgRef_2Sel2Spin1Check.h"
#include <qlayout.h>
#include <qspinbox.h>
#include <qgroupbox.h>
/*
* Constructs a DlgRef_2Sel1Spin which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
DlgRef_2Sel2Spin1Check::DlgRef_2Sel2Spin1Check(QWidget* parent, const char* name, WFlags fl)
:DlgRef_2Sel2Spin1Check_QTD(parent, name, fl)
{
SpinBox1->close(TRUE);
SpinBox2->close(TRUE);
SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
Layout2->addWidget(SpinBox_DX, 0, 1);
Layout2->addWidget(SpinBox_DY, 1, 1);
}
/*
* Destroys the object and frees any allocated resources
*/
DlgRef_2Sel2Spin1Check::~DlgRef_2Sel2Spin1Check()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,48 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : DlgRef_2Sel1Spin1Check.h
// Author : Damien COQUERET
// Module : GEOM
// $Header:
#ifndef DLGREF_2SEL2SPIN1CHECK_H
#define DLGREF_2SEL2SPIN1CHECK_H
#include "DlgRef_2Sel2Spin1Check_QTD.h"
#include "DlgRef_SpinBox.h"
class DlgRef_2Sel2Spin1Check : public DlgRef_2Sel2Spin1Check_QTD
{
Q_OBJECT
public:
DlgRef_2Sel2Spin1Check(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
~DlgRef_2Sel2Spin1Check();
DlgRef_SpinBox* SpinBox_DX;
DlgRef_SpinBox* SpinBox_DY;
};
#endif // DLGREF_2SEL2SPIN1CHECK_H

View File

@ -0,0 +1,122 @@
/****************************************************************************
** Form implementation generated from reading ui file 'DlgRef_2Sel2Spin1Check_QTD.ui'
**
** Created: ven oct 24 09:53:25 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "DlgRef_2Sel2Spin1Check_QTD.h"
#include <qvariant.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a DlgRef_2Sel2Spin1Check_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
DlgRef_2Sel2Spin1Check_QTD::DlgRef_2Sel2Spin1Check_QTD( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "DlgRef_2Sel2Spin1Check_QTD" );
resize( 129, 164 );
setCaption( trUtf8( "DlgRef_2Sel2Spin1Check_QTD" ) );
DlgRef_2Sel2Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_2Sel2Spin1Check_QTDLayout");
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setTitle( trUtf8( "" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 6 );
GroupBox1->layout()->setMargin( 11 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout1->addWidget( TextLabel2, 1, 0 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
Layout2->addWidget( SpinBox1, 0, 1 );
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( trUtf8( "TL3" ) );
Layout2->addWidget( TextLabel3, 0, 0 );
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout2->addWidget( TextLabel4, 1, 0 );
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
Layout2->addWidget( SpinBox2, 1, 1 );
Layout1->addMultiCellLayout( Layout2, 2, 2, 0, 2 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) );
Layout1->addWidget( TextLabel1, 0, 0 );
PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
PushButton2->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton2, 1, 1 );
QSpacerItem* spacer = new QSpacerItem( 0, 275, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 4, 2 );
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
Layout1->addWidget( LineEdit2, 1, 2 );
CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" );
CheckButton1->setText( trUtf8( "" ) );
Layout1->addMultiCellWidget( CheckButton1, 3, 3, 0, 2 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 );
GroupBox1Layout->addLayout( Layout1, 0, 0 );
DlgRef_2Sel2Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
DlgRef_2Sel2Spin1Check_QTD::~DlgRef_2Sel2Spin1Check_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,53 @@
/****************************************************************************
** Form interface generated from reading ui file 'DlgRef_2Sel2Spin1Check_QTD.ui'
**
** Created: ven oct 24 09:53:25 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef DLGREF_2SEL2SPIN1CHECK_QTD_H
#define DLGREF_2SEL2SPIN1CHECK_QTD_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QSpinBox;
class DlgRef_2Sel2Spin1Check_QTD : public QWidget
{
Q_OBJECT
public:
DlgRef_2Sel2Spin1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~DlgRef_2Sel2Spin1Check_QTD();
QGroupBox* GroupBox1;
QLabel* TextLabel2;
QPushButton* PushButton1;
QSpinBox* SpinBox1;
QLabel* TextLabel3;
QLabel* TextLabel4;
QSpinBox* SpinBox2;
QLabel* TextLabel1;
QPushButton* PushButton2;
QLineEdit* LineEdit2;
QRadioButton* CheckButton1;
QLineEdit* LineEdit1;
protected:
QGridLayout* DlgRef_2Sel2Spin1Check_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* Layout1;
QGridLayout* Layout2;
};
#endif // DLGREF_2SEL2SPIN1CHECK_QTD_H

View File

@ -0,0 +1,63 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : DlgRef_2Sel4Spin1Check.cxx
// Author : Damien COQUERET
// Module : GEOM
// $Header:
#include "DlgRef_2Sel4Spin1Check.h"
#include <qlayout.h>
#include <qspinbox.h>
#include <qgroupbox.h>
/*
* Constructs a DlgRef_2Sel1Spin which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
DlgRef_2Sel4Spin1Check::DlgRef_2Sel4Spin1Check(QWidget* parent, const char* name, WFlags fl)
:DlgRef_2Sel4Spin1Check_QTD(parent, name, fl)
{
SpinBox1->close(TRUE);
SpinBox2->close(TRUE);
SpinBox3->close(TRUE);
SpinBox4->close(TRUE);
SpinBox_DX1 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX1");
SpinBox_DY1 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY1");
SpinBox_DX2 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX2");
SpinBox_DY2 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY2");
Layout2->addWidget(SpinBox_DX1, 0, 1);
Layout2->addWidget(SpinBox_DY1, 1, 1);
Layout3->addWidget(SpinBox_DX2, 0, 1);
Layout3->addWidget(SpinBox_DY2, 1, 1);
}
/*
* Destroys the object and frees any allocated resources
*/
DlgRef_2Sel4Spin1Check::~DlgRef_2Sel4Spin1Check()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,50 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : DlgRef_2Sel4Spin1Check.h
// Author : Damien COQUERET
// Module : GEOM
// $Header:
#ifndef DLGREF_2SEL4SPIN1CHECK_H
#define DLGREF_2SEL4SPIN1CHECK_H
#include "DlgRef_2Sel4Spin1Check_QTD.h"
#include "DlgRef_SpinBox.h"
class DlgRef_2Sel4Spin1Check : public DlgRef_2Sel4Spin1Check_QTD
{
Q_OBJECT
public:
DlgRef_2Sel4Spin1Check(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
~DlgRef_2Sel4Spin1Check();
DlgRef_SpinBox* SpinBox_DX1;
DlgRef_SpinBox* SpinBox_DY1;
DlgRef_SpinBox* SpinBox_DX2;
DlgRef_SpinBox* SpinBox_DY2;
};
#endif // DLGREF_2SEL4SPIN1CHECK_H

View File

@ -0,0 +1,148 @@
/****************************************************************************
** Form implementation generated from reading ui file 'DlgRef_2Sel4Spin1Check_QTD.ui'
**
** Created: lun oct 27 11:40:44 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "DlgRef_2Sel4Spin1Check_QTD.h"
#include <qvariant.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a DlgRef_2Sel4Spin1Check_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
DlgRef_2Sel4Spin1Check_QTD::DlgRef_2Sel4Spin1Check_QTD( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "DlgRef_2Sel4Spin1Check_QTD" );
resize( 129, 222 );
setCaption( trUtf8( "DlgRef_2Sel4Spin1Check_QTD" ) );
DlgRef_2Sel4Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_2Sel4Spin1Check_QTDLayout");
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setTitle( trUtf8( "" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 6 );
GroupBox1->layout()->setMargin( 11 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
Layout1->addWidget( LineEdit2, 1, 2 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( trUtf8( "TL3" ) );
Layout2->addWidget( TextLabel3, 0, 0 );
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
Layout2->addWidget( SpinBox1, 0, 1 );
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
Layout2->addWidget( SpinBox2, 1, 1 );
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout2->addWidget( TextLabel4, 1, 0 );
Layout1->addMultiCellLayout( Layout2, 2, 2, 0, 2 );
Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3");
SpinBox4 = new QSpinBox( GroupBox1, "SpinBox4" );
SpinBox4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox4->sizePolicy().hasHeightForWidth() ) );
Layout3->addWidget( SpinBox4, 1, 1 );
TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
TextLabel5->setText( trUtf8( "TL5" ) );
Layout3->addWidget( TextLabel5, 0, 0 );
SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
Layout3->addWidget( SpinBox3, 0, 1 );
TextLabel6 = new QLabel( GroupBox1, "TextLabel6" );
TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) );
TextLabel6->setText( trUtf8( "TL6" ) );
Layout3->addWidget( TextLabel6, 1, 0 );
Layout1->addMultiCellLayout( Layout3, 4, 4, 0, 2 );
PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
PushButton2->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton2, 1, 1 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) );
Layout1->addWidget( TextLabel1, 0, 0 );
CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" );
CheckButton1->setText( trUtf8( "" ) );
Layout1->addMultiCellWidget( CheckButton1, 3, 3, 0, 2 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 );
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout1->addWidget( TextLabel2, 1, 0 );
QSpacerItem* spacer = new QSpacerItem( 0, 177, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 5, 2 );
GroupBox1Layout->addLayout( Layout1, 0, 0 );
DlgRef_2Sel4Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
DlgRef_2Sel4Spin1Check_QTD::~DlgRef_2Sel4Spin1Check_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,58 @@
/****************************************************************************
** Form interface generated from reading ui file 'DlgRef_2Sel4Spin1Check_QTD.ui'
**
** Created: lun oct 27 11:40:44 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef DLGREF_2SEL4SPIN1CHECK_QTD_H
#define DLGREF_2SEL4SPIN1CHECK_QTD_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QSpinBox;
class DlgRef_2Sel4Spin1Check_QTD : public QWidget
{
Q_OBJECT
public:
DlgRef_2Sel4Spin1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~DlgRef_2Sel4Spin1Check_QTD();
QGroupBox* GroupBox1;
QLineEdit* LineEdit2;
QPushButton* PushButton1;
QLabel* TextLabel3;
QSpinBox* SpinBox1;
QSpinBox* SpinBox2;
QLabel* TextLabel4;
QSpinBox* SpinBox4;
QLabel* TextLabel5;
QSpinBox* SpinBox3;
QLabel* TextLabel6;
QPushButton* PushButton2;
QLabel* TextLabel1;
QRadioButton* CheckButton1;
QLineEdit* LineEdit1;
QLabel* TextLabel2;
protected:
QGridLayout* DlgRef_2Sel4Spin1Check_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* Layout1;
QGridLayout* Layout2;
QGridLayout* Layout3;
};
#endif // DLGREF_2SEL4SPIN1CHECK_QTD_H

View File

@ -0,0 +1,63 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : DlgRef_3Sel4Spin2Check.cxx
// Author : Damien COQUERET
// Module : GEOM
// $Header:
#include "DlgRef_3Sel4Spin2Check.h"
#include <qlayout.h>
#include <qspinbox.h>
#include <qgroupbox.h>
/*
* Constructs a DlgRef_2Sel1Spin which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
DlgRef_3Sel4Spin2Check::DlgRef_3Sel4Spin2Check(QWidget* parent, const char* name, WFlags fl)
:DlgRef_3Sel4Spin2Check_QTD(parent, name, fl)
{
SpinBox1->close(TRUE);
SpinBox2->close(TRUE);
SpinBox3->close(TRUE);
SpinBox4->close(TRUE);
SpinBox_DX1 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX1");
SpinBox_DY1 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY1");
SpinBox_DX2 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX2");
SpinBox_DY2 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY2");
Layout2->addWidget(SpinBox_DX1, 0, 1);
Layout2->addWidget(SpinBox_DY1, 1, 1);
Layout3->addWidget(SpinBox_DX2, 0, 1);
Layout3->addWidget(SpinBox_DY2, 1, 1);
}
/*
* Destroys the object and frees any allocated resources
*/
DlgRef_3Sel4Spin2Check::~DlgRef_3Sel4Spin2Check()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,50 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : DlgRef_3Sel4Spin2Check.h
// Author : Damien COQUERET
// Module : GEOM
// $Header:
#ifndef DLGREF_3SEL4SPIN2CHECK_H
#define DLGREF_3SEL4SPIN2CHECK_H
#include "DlgRef_3Sel4Spin2Check_QTD.h"
#include "DlgRef_SpinBox.h"
class DlgRef_3Sel4Spin2Check : public DlgRef_3Sel4Spin2Check_QTD
{
Q_OBJECT
public:
DlgRef_3Sel4Spin2Check(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
~DlgRef_3Sel4Spin2Check();
DlgRef_SpinBox* SpinBox_DX1;
DlgRef_SpinBox* SpinBox_DY1;
DlgRef_SpinBox* SpinBox_DX2;
DlgRef_SpinBox* SpinBox_DY2;
};
#endif // DLGREF_3SEL4SPIN2CHECK_H

View File

@ -0,0 +1,169 @@
/****************************************************************************
** Form implementation generated from reading ui file 'DlgRef_3Sel4Spin2Check_QTD.ui'
**
** Created: ven oct 24 09:53:25 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "DlgRef_3Sel4Spin2Check_QTD.h"
#include <qvariant.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a DlgRef_3Sel4Spin2Check_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
DlgRef_3Sel4Spin2Check_QTD::DlgRef_3Sel4Spin2Check_QTD( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "DlgRef_3Sel4Spin2Check_QTD" );
resize( 129, 271 );
setCaption( trUtf8( "DlgRef_3Sel4Spin2Check_QTD" ) );
DlgRef_3Sel4Spin2Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_3Sel4Spin2Check_QTDLayout");
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setTitle( trUtf8( "" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 6 );
GroupBox1->layout()->setMargin( 11 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout1->addWidget( TextLabel2, 1, 0 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
PushButton3 = new QPushButton( GroupBox1, "PushButton3" );
PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) );
PushButton3->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton3, 2, 1 );
QSpacerItem* spacer = new QSpacerItem( 0, 155, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 7, 2 );
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
TextLabel5->setText( trUtf8( "TL5" ) );
Layout2->addWidget( TextLabel5, 1, 0 );
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout2->addWidget( TextLabel4, 0, 0 );
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
Layout2->addWidget( SpinBox1, 0, 1 );
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
Layout2->addWidget( SpinBox2, 1, 1 );
Layout1->addMultiCellLayout( Layout2, 3, 3, 0, 2 );
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( trUtf8( "TL3" ) );
Layout1->addWidget( TextLabel3, 2, 0 );
LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" );
Layout1->addWidget( LineEdit3, 2, 2 );
Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3");
SpinBox4 = new QSpinBox( GroupBox1, "SpinBox4" );
SpinBox4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox4->sizePolicy().hasHeightForWidth() ) );
Layout3->addWidget( SpinBox4, 1, 1 );
SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
Layout3->addWidget( SpinBox3, 0, 1 );
TextLabel7 = new QLabel( GroupBox1, "TextLabel7" );
TextLabel7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel7->sizePolicy().hasHeightForWidth() ) );
TextLabel7->setText( trUtf8( "TL7" ) );
Layout3->addWidget( TextLabel7, 1, 0 );
TextLabel6 = new QLabel( GroupBox1, "TextLabel6" );
TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) );
TextLabel6->setText( trUtf8( "TL6" ) );
Layout3->addWidget( TextLabel6, 0, 0 );
Layout1->addMultiCellLayout( Layout3, 5, 5, 0, 2 );
CheckButton2 = new QRadioButton( GroupBox1, "CheckButton2" );
CheckButton2->setText( trUtf8( "" ) );
Layout1->addMultiCellWidget( CheckButton2, 6, 6, 0, 2 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) );
Layout1->addWidget( TextLabel1, 0, 0 );
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
Layout1->addWidget( LineEdit2, 1, 2 );
PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
PushButton2->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton2, 1, 1 );
CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" );
CheckButton1->setText( trUtf8( "" ) );
Layout1->addMultiCellWidget( CheckButton1, 4, 4, 0, 2 );
GroupBox1Layout->addLayout( Layout1, 0, 0 );
DlgRef_3Sel4Spin2Check_QTDLayout->addWidget( GroupBox1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
DlgRef_3Sel4Spin2Check_QTD::~DlgRef_3Sel4Spin2Check_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,62 @@
/****************************************************************************
** Form interface generated from reading ui file 'DlgRef_3Sel4Spin2Check_QTD.ui'
**
** Created: ven oct 24 09:53:25 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef DLGREF_3SEL4SPIN2CHECK_QTD_H
#define DLGREF_3SEL4SPIN2CHECK_QTD_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QSpinBox;
class DlgRef_3Sel4Spin2Check_QTD : public QWidget
{
Q_OBJECT
public:
DlgRef_3Sel4Spin2Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~DlgRef_3Sel4Spin2Check_QTD();
QGroupBox* GroupBox1;
QLabel* TextLabel2;
QLineEdit* LineEdit1;
QPushButton* PushButton1;
QPushButton* PushButton3;
QLabel* TextLabel5;
QLabel* TextLabel4;
QSpinBox* SpinBox1;
QSpinBox* SpinBox2;
QLabel* TextLabel3;
QLineEdit* LineEdit3;
QSpinBox* SpinBox4;
QSpinBox* SpinBox3;
QLabel* TextLabel7;
QLabel* TextLabel6;
QRadioButton* CheckButton2;
QLabel* TextLabel1;
QLineEdit* LineEdit2;
QPushButton* PushButton2;
QRadioButton* CheckButton1;
protected:
QGridLayout* DlgRef_3Sel4Spin2Check_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* Layout1;
QGridLayout* Layout2;
QGridLayout* Layout3;
};
#endif // DLGREF_3SEL4SPIN2CHECK_QTD_H

View File

@ -0,0 +1,133 @@
/****************************************************************************
** Form implementation generated from reading ui file 'DlgRef_4Sel1List_QTD.ui'
**
** Created: lun oct 27 17:21:04 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "DlgRef_4Sel1List_QTD.h"
#include <qvariant.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a DlgRef_4Sel1List_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
DlgRef_4Sel1List_QTD::DlgRef_4Sel1List_QTD( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "DlgRef_4Sel1List_QTD" );
resize( 129, 175 );
setCaption( trUtf8( "DlgRef_4Sel1List_QTD" ) );
DlgRef_4Sel1List_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_4Sel1List_QTDLayout");
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setTitle( trUtf8( "" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 6 );
GroupBox1->layout()->setMargin( 11 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
Layout1->addWidget( LineEdit2, 1, 2 );
PushButton4 = new QPushButton( GroupBox1, "PushButton4" );
PushButton4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton4->sizePolicy().hasHeightForWidth() ) );
PushButton4->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton4, 4, 1 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
LineEdit4 = new QLineEdit( GroupBox1, "LineEdit4" );
Layout1->addWidget( LineEdit4, 4, 2 );
PushButton3 = new QPushButton( GroupBox1, "PushButton3" );
PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) );
PushButton3->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton3, 3, 1 );
PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
PushButton2->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton2, 1, 1 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) );
Layout1->addWidget( TextLabel1, 0, 0 );
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout1->addWidget( TextLabel4, 3, 0 );
QSpacerItem* spacer = new QSpacerItem( 0, 80, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 5, 2 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 );
TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
TextLabel5->setText( trUtf8( "TL5" ) );
Layout1->addWidget( TextLabel5, 4, 0 );
LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" );
Layout1->addWidget( LineEdit3, 3, 2 );
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout1->addWidget( TextLabel2, 1, 0 );
ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
Layout1->addWidget( ComboBox1, 2, 2 );
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( trUtf8( "TL3" ) );
Layout1->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 );
GroupBox1Layout->addLayout( Layout1, 0, 0 );
DlgRef_4Sel1List_QTDLayout->addWidget( GroupBox1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
DlgRef_4Sel1List_QTD::~DlgRef_4Sel1List_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,54 @@
/****************************************************************************
** Form interface generated from reading ui file 'DlgRef_4Sel1List_QTD.ui'
**
** Created: lun oct 27 17:21:03 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef DLGREF_4SEL1LIST_QTD_H
#define DLGREF_4SEL1LIST_QTD_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QComboBox;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class DlgRef_4Sel1List_QTD : public QWidget
{
Q_OBJECT
public:
DlgRef_4Sel1List_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~DlgRef_4Sel1List_QTD();
QGroupBox* GroupBox1;
QLineEdit* LineEdit2;
QPushButton* PushButton4;
QPushButton* PushButton1;
QLineEdit* LineEdit4;
QPushButton* PushButton3;
QPushButton* PushButton2;
QLabel* TextLabel1;
QLabel* TextLabel4;
QLineEdit* LineEdit1;
QLabel* TextLabel5;
QLineEdit* LineEdit3;
QLabel* TextLabel2;
QComboBox* ComboBox1;
QLabel* TextLabel3;
protected:
QGridLayout* DlgRef_4Sel1List_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* Layout1;
};
#endif // DLGREF_4SEL1LIST_QTD_H

View File

@ -52,6 +52,10 @@ LIB_SRC = DlgRef_Skeleton_QTD.cxx \
DlgRef_2Sel2Spin_QTD.cxx \ DlgRef_2Sel2Spin_QTD.cxx \
DlgRef_2Sel3Spin_QTD.cxx \ DlgRef_2Sel3Spin_QTD.cxx \
DlgRef_2Sel1Spin1Check_QTD.cxx \ DlgRef_2Sel1Spin1Check_QTD.cxx \
DlgRef_2Sel2Spin1Check_QTD.cxx \
DlgRef_2Sel4Spin1Check_QTD.cxx \
DlgRef_3Sel4Spin2Check_QTD.cxx \
DlgRef_4Sel1List_QTD.cxx \
DlgRef_1Spin_QTD.cxx \ DlgRef_1Spin_QTD.cxx \
DlgRef_2Spin_QTD.cxx \ DlgRef_2Spin_QTD.cxx \
DlgRef_3Spin_QTD.cxx \ DlgRef_3Spin_QTD.cxx \
@ -66,6 +70,9 @@ LIB_SRC = DlgRef_Skeleton_QTD.cxx \
DlgRef_2Sel2Spin.cxx \ DlgRef_2Sel2Spin.cxx \
DlgRef_2Sel3Spin.cxx \ DlgRef_2Sel3Spin.cxx \
DlgRef_2Sel1Spin1Check.cxx \ DlgRef_2Sel1Spin1Check.cxx \
DlgRef_2Sel2Spin1Check.cxx \
DlgRef_2Sel4Spin1Check.cxx \
DlgRef_3Sel4Spin2Check.cxx \
DlgRef_1Spin.cxx \ DlgRef_1Spin.cxx \
DlgRef_2Spin.cxx \ DlgRef_2Spin.cxx \
DlgRef_3Spin.cxx \ DlgRef_3Spin.cxx \
@ -87,6 +94,10 @@ LIB_MOC = \
DlgRef_2Sel2Spin_QTD.h \ DlgRef_2Sel2Spin_QTD.h \
DlgRef_2Sel3Spin_QTD.h \ DlgRef_2Sel3Spin_QTD.h \
DlgRef_2Sel1Spin1Check_QTD.h \ DlgRef_2Sel1Spin1Check_QTD.h \
DlgRef_2Sel2Spin1Check_QTD.h \
DlgRef_2Sel4Spin1Check_QTD.h \
DlgRef_3Sel4Spin2Check_QTD.h \
DlgRef_4Sel1List_QTD.h \
DlgRef_1Spin_QTD.h \ DlgRef_1Spin_QTD.h \
DlgRef_2Spin_QTD.h \ DlgRef_2Spin_QTD.h \
DlgRef_3Spin_QTD.h \ DlgRef_3Spin_QTD.h \
@ -101,6 +112,9 @@ LIB_MOC = \
DlgRef_2Sel2Spin.h \ DlgRef_2Sel2Spin.h \
DlgRef_2Sel3Spin.h \ DlgRef_2Sel3Spin.h \
DlgRef_2Sel1Spin1Check.h \ DlgRef_2Sel1Spin1Check.h \
DlgRef_2Sel2Spin1Check.h \
DlgRef_2Sel4Spin1Check.h \
DlgRef_3Sel4Spin2Check.h \
DlgRef_1Spin.h \ DlgRef_1Spin.h \
DlgRef_2Spin.h \ DlgRef_2Spin.h \
DlgRef_3Spin.h \ DlgRef_3Spin.h \

View File

@ -56,6 +56,23 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<spacer row="3" column="2">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>166</height>
</size>
</property>
</spacer>
<widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="3"> <widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>CheckButton1</cstring> <cstring>CheckButton1</cstring>
@ -64,6 +81,35 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QComboBox" row="1" column="2">
<property name="name">
<cstring>ComboBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2"> <widget class="QLineEdit" row="0" column="2">
<property name="name"> <property name="name">
<cstring>LineEdit1</cstring> <cstring>LineEdit1</cstring>
@ -101,36 +147,6 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QComboBox" row="1" column="2">
<property name="name">
<cstring>ComboBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<spacer row="3" column="2">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
</spacer>
</grid> </grid>
</widget> </widget>
</grid> </grid>

View File

@ -8,8 +8,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>232</width> <width>129</width>
<height>87</height> <height>143</height>
</rect> </rect>
</property> </property>
<property name="caption"> <property name="caption">
@ -56,39 +56,6 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<spacer row="2" column="2">
<property name="name">
<cstring>Spacer6</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>207</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="0" column="0"> <widget class="QLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>TextLabel1</cstring> <cstring>TextLabel1</cstring>
@ -105,11 +72,44 @@
<string>TL1</string> <string>TL1</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2"> <widget class="QLineEdit" row="0" column="2">
<property name="name"> <property name="name">
<cstring>LineEdit1</cstring> <cstring>LineEdit1</cstring>
</property> </property>
</widget> </widget>
<spacer row="2" column="2">
<property name="name">
<cstring>Spacer6</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="3"> <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>Layout2</cstring> <cstring>Layout2</cstring>
@ -124,39 +124,20 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QLabel" row="0" column="5"> <widget class="QSpinBox" row="1" column="1">
<property name="name"> <property name="name">
<cstring>TextLabel4</cstring> <cstring>SpinBox2</cstring>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy> <sizepolicy>
<hsizetype>0</hsizetype> <hsizetype>7</hsizetype>
<vsizetype>0</vsizetype> <vsizetype>0</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string>TL4</string>
</property>
</widget> </widget>
<widget class="QLabel" row="0" column="1"> <widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QLabel" row="0" column="3">
<property name="name"> <property name="name">
<cstring>TextLabel3</cstring> <cstring>TextLabel3</cstring>
</property> </property>
@ -172,7 +153,7 @@
<string>TL3</string> <string>TL3</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="0" column="6"> <widget class="QSpinBox" row="2" column="1">
<property name="name"> <property name="name">
<cstring>SpinBox3</cstring> <cstring>SpinBox3</cstring>
</property> </property>
@ -185,7 +166,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="0" column="2"> <widget class="QSpinBox" row="0" column="1">
<property name="name"> <property name="name">
<cstring>SpinBox1</cstring> <cstring>SpinBox1</cstring>
</property> </property>
@ -198,18 +179,37 @@
</sizepolicy> </sizepolicy>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="0" column="4"> <widget class="QLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>SpinBox2</cstring> <cstring>TextLabel4</cstring>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy> <sizepolicy>
<hsizetype>7</hsizetype> <hsizetype>0</hsizetype>
<vsizetype>0</vsizetype> <vsizetype>0</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string>TL4</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget> </widget>
</grid> </grid>
</widget> </widget>

View File

@ -0,0 +1,239 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>DlgRef_2Sel2Spin1Check_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>DlgRef_2Sel2Spin1Check_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>129</width>
<height>164</height>
</rect>
</property>
<property name="caption">
<string>DlgRef_2Sel2Spin1Check_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QSpinBox" row="0" column="1">
<property name="name">
<cstring>SpinBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL4</string>
</property>
</widget>
<widget class="QSpinBox" row="1" column="1">
<property name="name">
<cstring>SpinBox2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</grid>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QPushButton" row="1" column="1">
<property name="name">
<cstring>PushButton2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<spacer row="4" column="2">
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>275</height>
</size>
</property>
</spacer>
<widget class="QLineEdit" row="1" column="2">
<property name="name">
<cstring>LineEdit2</cstring>
</property>
</widget>
<widget class="QRadioButton" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>CheckButton1</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,313 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>DlgRef_2Sel4Spin1Check_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>DlgRef_2Sel4Spin1Check_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>129</width>
<height>222</height>
</rect>
</property>
<property name="caption">
<string>DlgRef_2Sel4Spin1Check_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLineEdit" row="1" column="2">
<property name="name">
<cstring>LineEdit2</cstring>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
<widget class="QSpinBox" row="0" column="1">
<property name="name">
<cstring>SpinBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QSpinBox" row="1" column="1">
<property name="name">
<cstring>SpinBox2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL4</string>
</property>
</widget>
</grid>
</widget>
<widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QSpinBox" row="1" column="1">
<property name="name">
<cstring>SpinBox4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel5</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL5</string>
</property>
</widget>
<widget class="QSpinBox" row="0" column="1">
<property name="name">
<cstring>SpinBox3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel6</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL6</string>
</property>
</widget>
</grid>
</widget>
<widget class="QPushButton" row="1" column="1">
<property name="name">
<cstring>PushButton2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QRadioButton" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>CheckButton1</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<spacer row="5" column="2">
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>177</height>
</size>
</property>
</spacer>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,358 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>DlgRef_3Sel4Spin2Check_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>DlgRef_3Sel4Spin2Check_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>129</width>
<height>271</height>
</rect>
</property>
<property name="caption">
<string>DlgRef_3Sel4Spin2Check_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QPushButton" row="2" column="1">
<property name="name">
<cstring>PushButton3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<spacer row="7" column="2">
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>155</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel5</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL5</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL4</string>
</property>
</widget>
<widget class="QSpinBox" row="0" column="1">
<property name="name">
<cstring>SpinBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QSpinBox" row="1" column="1">
<property name="name">
<cstring>SpinBox2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</grid>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
<widget class="QLineEdit" row="2" column="2">
<property name="name">
<cstring>LineEdit3</cstring>
</property>
</widget>
<widget class="QLayoutWidget" row="5" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QSpinBox" row="1" column="1">
<property name="name">
<cstring>SpinBox4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QSpinBox" row="0" column="1">
<property name="name">
<cstring>SpinBox3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel7</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL7</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel6</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL6</string>
</property>
</widget>
</grid>
</widget>
<widget class="QRadioButton" row="6" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>CheckButton2</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QLineEdit" row="1" column="2">
<property name="name">
<cstring>LineEdit2</cstring>
</property>
</widget>
<widget class="QPushButton" row="1" column="1">
<property name="name">
<cstring>PushButton2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QRadioButton" row="4" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>CheckButton1</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,260 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>DlgRef_4Sel1List_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>DlgRef_4Sel1List_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>129</width>
<height>175</height>
</rect>
</property>
<property name="caption">
<string>DlgRef_4Sel1List_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLineEdit" row="1" column="2">
<property name="name">
<cstring>LineEdit2</cstring>
</property>
</widget>
<widget class="QPushButton" row="4" column="1">
<property name="name">
<cstring>PushButton4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="4" column="2">
<property name="name">
<cstring>LineEdit4</cstring>
</property>
</widget>
<widget class="QPushButton" row="3" column="1">
<property name="name">
<cstring>PushButton3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QPushButton" row="1" column="1">
<property name="name">
<cstring>PushButton2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QLabel" row="3" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL4</string>
</property>
</widget>
<spacer row="5" column="2">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
</spacer>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
<widget class="QLabel" row="4" column="0">
<property name="name">
<cstring>TextLabel5</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL5</string>
</property>
</widget>
<widget class="QLineEdit" row="3" column="2">
<property name="name">
<cstring>LineEdit3</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QComboBox" row="2" column="2">
<property name="name">
<cstring>ComboBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -6,12 +6,6 @@
#uic -o DlgRef_1Sel_QTD.h DlgRef_1Sel_QTD.ui #uic -o DlgRef_1Sel_QTD.h DlgRef_1Sel_QTD.ui
#uic -o DlgRef_1Sel_QTD.cxx -impl DlgRef_1Sel_QTD.h DlgRef_1Sel_QTD.ui #uic -o DlgRef_1Sel_QTD.cxx -impl DlgRef_1Sel_QTD.h DlgRef_1Sel_QTD.ui
#uic -o DlgRef_1Sel1Check_QTD.h DlgRef_1Sel1Check_QTD.ui
#uic -o DlgRef_1Sel1Check_QTD.cxx -impl DlgRef_1Sel1Check_QTD.h DlgRef_1Sel1Check_QTD.ui
uic -o DlgRef_1Sel1Check1List_QTD.h DlgRef_1Sel1Check1List_QTD.ui
uic -o DlgRef_1Sel1Check1List_QTD.cxx -impl DlgRef_1Sel1Check1List_QTD.h DlgRef_1Sel1Check1List_QTD.ui
#uic -o DlgRef_1Sel1Spin_QTD.h DlgRef_1Sel1Spin_QTD.ui #uic -o DlgRef_1Sel1Spin_QTD.h DlgRef_1Sel1Spin_QTD.ui
#uic -o DlgRef_1Sel1Spin_QTD.cxx -impl DlgRef_1Sel1Spin_QTD.h DlgRef_1Sel1Spin_QTD.ui #uic -o DlgRef_1Sel1Spin_QTD.cxx -impl DlgRef_1Sel1Spin_QTD.h DlgRef_1Sel1Spin_QTD.ui
@ -27,6 +21,15 @@ uic -o DlgRef_1Sel1Check1List_QTD.cxx -impl DlgRef_1Sel1Check1List_QTD.h DlgRef_
#uic -o DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui #uic -o DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui
#uic -o DlgRef_1Sel5Spin_QTD.cxx -impl DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui #uic -o DlgRef_1Sel5Spin_QTD.cxx -impl DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui
#uic -o DlgRef_1Sel1Check_QTD.h DlgRef_1Sel1Check_QTD.ui
#uic -o DlgRef_1Sel1Check_QTD.cxx -impl DlgRef_1Sel1Check_QTD.h DlgRef_1Sel1Check_QTD.ui
#uic -o DlgRef_1Sel1Check1List_QTD.h DlgRef_1Sel1Check1List_QTD.ui
#uic -o DlgRef_1Sel1Check1List_QTD.cxx -impl DlgRef_1Sel1Check1List_QTD.h DlgRef_1Sel1Check1List_QTD.ui
#uic -o DlgRef_2Sel_QTD.h DlgRef_2Sel_QTD.ui
#uic -o DlgRef_2Sel_QTD.cxx -impl DlgRef_2Sel_QTD.h DlgRef_2Sel_QTD.ui
#uic -o DlgRef_2Sel1Spin_QTD.h DlgRef_2Sel1Spin_QTD.ui #uic -o DlgRef_2Sel1Spin_QTD.h DlgRef_2Sel1Spin_QTD.ui
#uic -o DlgRef_2Sel1Spin_QTD.cxx -impl DlgRef_2Sel1Spin_QTD.h DlgRef_2Sel1Spin_QTD.ui #uic -o DlgRef_2Sel1Spin_QTD.cxx -impl DlgRef_2Sel1Spin_QTD.h DlgRef_2Sel1Spin_QTD.ui
@ -36,15 +39,24 @@ uic -o DlgRef_1Sel1Check1List_QTD.cxx -impl DlgRef_1Sel1Check1List_QTD.h DlgRef_
#uic -o DlgRef_2Sel2Spin_QTD.h DlgRef_2Sel2Spin_QTD.ui #uic -o DlgRef_2Sel2Spin_QTD.h DlgRef_2Sel2Spin_QTD.ui
#uic -o DlgRef_2Sel2Spin_QTD.cxx -impl DlgRef_2Sel2Spin_QTD.h DlgRef_2Sel2Spin_QTD.ui #uic -o DlgRef_2Sel2Spin_QTD.cxx -impl DlgRef_2Sel2Spin_QTD.h DlgRef_2Sel2Spin_QTD.ui
#uic -o DlgRef_2Sel2Spin1Check_QTD.h DlgRef_2Sel2Spin1Check_QTD.ui
#uic -o DlgRef_2Sel2Spin1Check_QTD.cxx -impl DlgRef_2Sel2Spin1Check_QTD.h DlgRef_2Sel2Spin1Check_QTD.ui
#uic -o DlgRef_2Sel3Spin_QTD.h DlgRef_2Sel3Spin_QTD.ui #uic -o DlgRef_2Sel3Spin_QTD.h DlgRef_2Sel3Spin_QTD.ui
#uic -o DlgRef_2Sel3Spin_QTD.cxx -impl DlgRef_2Sel3Spin_QTD.h DlgRef_2Sel3Spin_QTD.ui #uic -o DlgRef_2Sel3Spin_QTD.cxx -impl DlgRef_2Sel3Spin_QTD.h DlgRef_2Sel3Spin_QTD.ui
#uic -o DlgRef_2Sel_QTD.h DlgRef_2Sel_QTD.ui #uic -o DlgRef_2Sel4Spin1Check_QTD.h DlgRef_2Sel4Spin1Check_QTD.ui
#uic -o DlgRef_2Sel_QTD.cxx -impl DlgRef_2Sel_QTD.h DlgRef_2Sel_QTD.ui #uic -o DlgRef_2Sel4Spin1Check_QTD.cxx -impl DlgRef_2Sel4Spin1Check_QTD.h DlgRef_2Sel4Spin1Check_QTD.ui
uic -o DlgRef_4Sel1List_QTD.h DlgRef_4Sel1List_QTD.ui
uic -o DlgRef_4Sel1List_QTD.cxx -impl DlgRef_4Sel1List_QTD.h DlgRef_4Sel1List_QTD.ui
#uic -o DlgRef_3Sel_QTD.h DlgRef_3Sel_QTD.ui #uic -o DlgRef_3Sel_QTD.h DlgRef_3Sel_QTD.ui
#uic -o DlgRef_3Sel_QTD.cxx -impl DlgRef_3Sel_QTD.h DlgRef_3Sel_QTD.ui #uic -o DlgRef_3Sel_QTD.cxx -impl DlgRef_3Sel_QTD.h DlgRef_3Sel_QTD.ui
#uic -o DlgRef_3Sel4Spin2Check_QTD.h DlgRef_3Sel4Spin2Check_QTD.ui
#uic -o DlgRef_3Sel4Spin2Check_QTD.cxx -impl DlgRef_3Sel4Spin2Check_QTD.h DlgRef_3Sel4Spin2Check_QTD.ui
#uic -o DlgRef_1Spin_QTD.h DlgRef_1Spin_QTD.ui #uic -o DlgRef_1Spin_QTD.h DlgRef_1Spin_QTD.ui
#uic -o DlgRef_1Spin_QTD.cxx -impl DlgRef_1Spin_QTD.h DlgRef_1Spin_QTD.ui #uic -o DlgRef_1Spin_QTD.cxx -impl DlgRef_1Spin_QTD.h DlgRef_1Spin_QTD.ui

View File

@ -3612,6 +3612,94 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFace( GEOM::GEOM_Shape_ptr wire,
} }
//=================================================================================
// function : MakeShell()
// purpose : Make a compound from a list containing one or more shapes
//=================================================================================
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeShell( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
throw (SALOME::SALOME_Exception)
{
GEOM::GEOM_Shape_var result ;
BRepTools_Quilt Glue;
TopoDS_Shape C;
for ( unsigned int i = 0; i < ListShapes.length(); i++) {
GEOM::GEOM_Shape_var aShape = GetIORFromString( ListShapes[i] );
TopoDS_Shape Shape = GetTopoShape(aShape) ;
if( Shape.IsNull() ) {
THROW_SALOME_CORBA_EXCEPTION("Shell aborted : null shape during operation", SALOME::BAD_PARAM);
}
Glue.Add(Shape) ;
}
TopExp_Explorer exp(Glue.Shells(), TopAbs_SHELL);
Standard_Integer ish = 0;
for (; exp.More(); exp.Next()) {
C = exp.Current();
ish++;
}
if (ish != 1)
C = Glue.Shells();
if ( C.IsNull() ) {
THROW_SALOME_CORBA_EXCEPTION("Null result : Shell operation aborted", SALOME::BAD_PARAM);
}
else {
result = CreateObject(C) ;
InsertInLabelMoreArguments(C, result, ListShapes, myCurrentOCAFDoc) ;
}
return result;
}
//=================================================================================
// function : MakeSolid()
// purpose : Make a compound from a list containing one or more shapes
//=================================================================================
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSolid( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
throw (SALOME::SALOME_Exception)
{
GEOM::GEOM_Shape_var result ;
Standard_Integer ish = 0;
TopoDS_Compound Res;
TopoDS_Solid Sol;
BRep_Builder B;
TopoDS_Shape Shape;
B.MakeCompound(Res);
for ( unsigned int i = 0; i < ListShapes.length(); i++) {
GEOM::GEOM_Shape_var aShape = GetIORFromString( ListShapes[i] );
TopoDS_Shape Sh = GetTopoShape(aShape) ;
if( Sh.IsNull() ) {
THROW_SALOME_CORBA_EXCEPTION("Solid aborted : null shape during operation", SALOME::BAD_PARAM);
}
B.MakeSolid(Sol);
B.Add(Sol,Sh);
BRepClass3d_SolidClassifier SC(Sol);
SC.PerformInfinitePoint(Precision::Confusion());
if (SC.State() == TopAbs_IN) {
B.MakeSolid(Sol);
B.Add(Sol,Sh.Reversed());
}
B.Add(Res,Sol);
ish++;
}
if (ish == 1) { Shape = Sol;}
else { Shape = Res;}
if ( Shape.IsNull() ) {
THROW_SALOME_CORBA_EXCEPTION("Null result : Solid operation aborted", SALOME::BAD_PARAM);
}
else {
result = CreateObject(Shape) ;
InsertInLabelMoreArguments(Shape, result, ListShapes, myCurrentOCAFDoc) ;
}
return result;
}
//================================================================================ //================================================================================
// function : MakeLine // function : MakeLine
// purpose : Make a Line topology // purpose : Make a Line topology

File diff suppressed because it is too large Load Diff

View File

@ -30,9 +30,7 @@
#define GEOMBASE_H #define GEOMBASE_H
#include "GEOMContext.h" #include "GEOMContext.h"
#include "SALOME_Selection.h" #include "SALOME_Selection.h"
#include <V3d_View.hxx>
//================================================================================= //=================================================================================
// class : GEOMBase // class : GEOMBase
@ -46,57 +44,49 @@ public :
GEOMBase(); GEOMBase();
~GEOMBase(); ~GEOMBase();
bool Display(GEOM::GEOM_Shape_ptr aShape, Standard_CString name = "");
bool AddInStudy(bool selection = false, const Handle(SALOME_InteractiveObject)& anIO = 0); bool AddInStudy(bool selection = false, const Handle(SALOME_InteractiveObject)& anIO = 0);
/* Selection and objects management */
int GetIndex(const TopoDS_Shape& subshape, const TopoDS_Shape& shape, int ShapeType);
TopoDS_Shape GetShapeFromIOR(QString IOR);
bool GetTopoFromSelection(SALOME_Selection *Sel, TopoDS_Shape& tds);
int GetNameOfSelectedIObjects(SALOME_Selection* Sel, QString& aName);
bool GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& aTypeString);
/* Convertions */
GEOM::GEOM_Shape_ptr ConvertIOinGEOMShape(const Handle(SALOME_InteractiveObject)& IO,
Standard_Boolean& testResult);
Handle(GEOM_AISShape) ConvertIOinGEOMAISShape(const Handle(SALOME_InteractiveObject)& IO,
Standard_Boolean& testResult,
bool onlyInActiveView = false);
void ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList,
GEOM::GEOM_Gen::ListOfIOR& listIOR);
/* Geometry */
bool VertexToPoint(const TopoDS_Shape& S, gp_Pnt& P); bool VertexToPoint(const TopoDS_Shape& S, gp_Pnt& P);
/* Used just by Plane and Prism */
bool LinearEdgeExtremities(const TopoDS_Shape& S, gp_Pnt& P1, gp_Pnt& P2); bool LinearEdgeExtremities(const TopoDS_Shape& S, gp_Pnt& P1, gp_Pnt& P2);
gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView);
void GetBipointDxDyDz(gp_Pnt P1, gp_Pnt P2, double& dx, double& dy, double& dz); void GetBipointDxDyDz(gp_Pnt P1, gp_Pnt P2, double& dx, double& dy, double& dz);
/* User dialog 1 parameter returned */ /* User dialog 1 parameter returned */
double Parameter(Standard_Boolean& res, double Parameter(Standard_Boolean& res,
const char* aValue1 = 0, const char* aTitle1 = 0, const char* aValue1 = 0, const char* aTitle1 = 0,
const char* aTitle = 0, const double bottom = -1E6, const char* aTitle = 0, const double bottom = -1E6,
const double top = +1E6, const int decimals = 6); const double top = +1E6, const int decimals = 6);
bool DefineDlgPosition(QWidget* aDlg, int& x, int& y);
bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR);
/* Selection and objects management */
TopoDS_Shape GetShapeFromIOR(QString IOR);
bool GetTopoFromSelection(SALOME_Selection *Sel, TopoDS_Shape& tds);
int GetNameOfSelectedIObjects(SALOME_Selection* Sel, QString& aName);
bool GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& aTypeString);
GEOM::GEOM_Shape_ptr ConvertIOinGEOMShape(const Handle(SALOME_InteractiveObject)& IO,
Standard_Boolean& testResult);
Handle(GEOM_AISShape) ConvertIOinGEOMAISShape(const Handle(SALOME_InteractiveObject)& IO,
Standard_Boolean& testResult,
bool onlyInActiveView = false);
Handle(GEOM_AISShape) ConvertIORinGEOMAISShape(const char * IOR,
Standard_Boolean& testResult,
bool onlyInActiveView = false);
GEOM_Actor* ConvertIORinGEOMActor(const char * IOR, Standard_Boolean& testResult,
bool onlyInActiveView = false);
void ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList,
GEOM::GEOM_Gen::ListOfIOR& listIOR);
/* Method used by dialog boxes called when used has entered a name of object in a LineEdit */
bool SelectionByNameInDialogs(QWidget* aWidget, const QString& userObjectName, SALOME_Selection *Sel);
int GetIndex(const TopoDS_Shape& subshape, const TopoDS_Shape& shape, int ShapeType);
/* Define a list of indices of sub shapes selected in a local context */
bool GetIndexSubShapeSelected(const TopoDS_Shape& ShapeTopo, const int SubShapeType,
GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID,
Standard_Integer& aLocalContextId, bool& myUseLocalContext);
void SetDisplayedObjectList(); void SetDisplayedObjectList();
bool Display(GEOM::GEOM_Shape_ptr aShape, Standard_CString name = "");
/* Simulation management */ /* Simulation management */
bool CreateArrowForLinearEdge(const TopoDS_Shape& tds, TopoDS_Shape& ArrowCone); bool CreateArrowForLinearEdge(const TopoDS_Shape& tds, TopoDS_Shape& ArrowCone);
void DisplaySimulationShape(const TopoDS_Shape& S); void DisplaySimulationShape(const TopoDS_Shape& S);
void EraseSimulationShape(); void EraseSimulationShape();
/* Method used by dialog boxes called when used has entered a name of object in a LineEdit */
bool SelectionByNameInDialogs(QWidget* aWidget, const QString& userObjectName, SALOME_Selection *Sel);
bool DefineDlgPosition(QWidget* aDlg, int& x, int& y);
GEOMContext* myGeomGUI; GEOMContext* myGeomGUI;
GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */

View File

@ -77,8 +77,6 @@ void GEOMBase_Skeleton::Init(SALOME_Selection* Sel)
myGeomBase = new GEOMBase(); myGeomBase = new GEOMBase();
myGeomGUI = GEOMContext::GetGeomGUI(); myGeomGUI = GEOMContext::GetGeomGUI();
myGeomGUI->SetActiveDialogBox((QDialog*)this); myGeomGUI->SetActiveDialogBox((QDialog*)this);
// Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
// myGeom = GEOM::GEOM_Gen::_narrow(comp);
myGeom = myGeomGUI->myComponentGeom; myGeom = myGeomGUI->myComponentGeom;
/* signals and slots connections */ /* signals and slots connections */
@ -88,7 +86,7 @@ void GEOMBase_Skeleton::Init(SALOME_Selection* Sel)
/* Move widget on the botton right corner of main widget */ /* Move widget on the botton right corner of main widget */
// int x, y; // int x, y;
// myGeomGUI->DefineDlgPosition( this, x, y ); // myGeomBase->DefineDlgPosition( this, x, y );
/* displays Dialog */ /* displays Dialog */
RadioButton1->setChecked(TRUE); RadioButton1->setChecked(TRUE);
@ -142,6 +140,7 @@ void GEOMBase_Skeleton::DeactivateActiveDialog()
{ {
this->setEnabled(false); this->setEnabled(false);
mySelection->ClearFilters(); mySelection->ClearFilters();
myGeomGUI->ResetState();
disconnect(mySelection, 0, this, 0); disconnect(mySelection, 0, this, 0);
myGeomBase->EraseSimulationShape(); myGeomBase->EraseSimulationShape();
myGeomGUI->SetActiveDialogBox(0); myGeomGUI->SetActiveDialogBox(0);

View File

@ -451,8 +451,6 @@ bool GeometryGUI::SetSettings(QAD_Desktop* parent)
return true; return true;
} }
SALOME_Selection* Sel = SALOME_Selection::Selection(GeomGUI->GetActiveStudy()->getSelection());
theObject = "";
//================================================================================= //=================================================================================
// function : DefinePopup() // function : DefinePopup()
@ -495,18 +493,6 @@ void GeometryGUI::DefinePopup(QString & theContext, QString & theParent, QString
return; return;
} }
if((theParent.compare("Viewer")==0)) {
if(GeomGUI->GetState() == CURRENT_SKETCH)
theContext = "Sketch";
else {
if(Sel->IObjectCount() > 0)
theContext = "";
else
theContext = "NothingSelected";
}
}
else
theContext = "";
//================================================================================= //=================================================================================
// function : CustomPopup() // function : CustomPopup()

View File

@ -502,6 +502,101 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
} }
//=======================================================================
// function : ConvertIORinGEOMAISShape()
// purpose :
//=======================================================================
Handle(GEOM_AISShape) GEOMToolsGUI::ConvertIORinGEOMAISShape(const char * IOR, Standard_Boolean& testResult, bool onlyInActiveView)
{
Handle(GEOM_AISShape) resultShape;
testResult = false;
int nbSf = myGeomGUI->GetActiveStudy()->getStudyFramesCount();
for(int i = 0; i < nbSf; i++) {
QAD_StudyFrame* sf = myGeomGUI->GetActiveStudy()->getStudyFrame(i);
if(sf->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getViewer();
Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
AIS_ListOfInteractive List;
ic->DisplayedObjects(List);
AIS_ListOfInteractive List1;
ic->ObjectsInCollector(List1);
List.Append(List1);
AIS_ListIteratorOfListOfInteractive ite(List);
while(ite.More()) {
if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value());
if(aSh->hasIO()) {
Handle(GEOM_InteractiveObject) GIO = Handle(GEOM_InteractiveObject)::DownCast(aSh->getIO());
Standard_CString theIOR = GIO->getIOR();
if(strcmp(IOR, theIOR) == 0) {
if(onlyInActiveView) {
if(sf == myGeomGUI->GetActiveStudy()->getActiveStudyFrame()) {
testResult = true;
resultShape = aSh;
return resultShape;
}
}
else {
testResult = true;
resultShape = aSh;
return resultShape;
}
}
}
}
ite.Next();
}
}
}
return resultShape;
}
//=======================================================================
// function : ConvertIORinGEOMActor()
// purpose :
//=======================================================================
GEOM_Actor* GEOMToolsGUI::ConvertIORinGEOMActor(const char* IOR, Standard_Boolean& testResult, bool onlyInActiveView)
{
int nbSf = myGeomGUI->GetActiveStudy()->getStudyFramesCount();
for(int i = 0; i < nbSf; i++) {
QAD_StudyFrame* sf = myGeomGUI->GetActiveStudy()->getStudyFrame(i);
if(sf->getTypeView() == VIEW_VTK) {
vtkRenderer* Renderer = ((VTKViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getRenderer();
vtkActorCollection* theActors = Renderer->GetActors();
theActors->InitTraversal();
vtkActor *ac = theActors->GetNextActor();
while(!(ac==NULL)) {
if( ac->IsA("GEOM_Actor")) {
GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(ac);
if(anActor->hasIO()) {
Handle(GEOM_InteractiveObject) GIO = Handle(GEOM_InteractiveObject)::DownCast(anActor->getIO());
Standard_CString theIOR = GIO->getIOR();
if(strcmp(IOR, theIOR) == 0) {
if(onlyInActiveView) {
if(sf == myGeomGUI->GetActiveStudy()->getActiveStudyFrame()) {
testResult = true;
return anActor;
}
}
else {
testResult = true;
return anActor;
}
}
}
}
ac = theActors->GetNextActor();
}
}
}
testResult = false;
return GEOM_Actor::New();
}
//=============================================================================== //===============================================================================
// function : OnEditDelete() // function : OnEditDelete()
// purpose : // purpose :
@ -546,13 +641,13 @@ void GEOMToolsGUI::OnEditDelete()
if ( sf->getTypeView() == VIEW_OCC ) { if ( sf->getTypeView() == VIEW_OCC ) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getViewer(); OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getViewer();
Handle (AIS_InteractiveContext) myContext = v3d->getAISContext(); Handle (AIS_InteractiveContext) myContext = v3d->getAISContext();
Handle(GEOM_AISShape) Result = myGeomBase->ConvertIORinGEOMAISShape( anIOR->Value(), found ); Handle(GEOM_AISShape) Result = this->ConvertIORinGEOMAISShape( anIOR->Value(), found );
if ( found ) if ( found )
myContext->Erase( Result, true, false ); myContext->Erase( Result, true, false );
} else if ( sf->getTypeView() == VIEW_VTK ) { } else if ( sf->getTypeView() == VIEW_VTK ) {
//vtkRenderer* Renderer = ((VTKViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getRenderer(); //vtkRenderer* Renderer = ((VTKViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getRenderer();
VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getRWInteractor(); VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getRWInteractor();
GEOM_Actor* ac = myGeomBase->ConvertIORinGEOMActor( anIOR->Value(), found ); GEOM_Actor* ac = this->ConvertIORinGEOMActor( anIOR->Value(), found );
if ( found ) { if ( found ) {
//Renderer->RemoveActor(ac); //Renderer->RemoveActor(ac);
if ( ac->hasIO() ) if ( ac->hasIO() )

View File

@ -45,6 +45,12 @@ public :
static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
Handle(GEOM_AISShape) ConvertIORinGEOMAISShape(const char * IOR,
Standard_Boolean& testResult,
bool onlyInActiveView = false);
GEOM_Actor* ConvertIORinGEOMActor(const char * IOR, Standard_Boolean& testResult,
bool onlyInActiveView = false);
/* Import and export topology methods */ /* Import and export topology methods */
bool Import(); bool Import();
bool Export(); bool Export();

View File

@ -100,16 +100,14 @@ void GenerationGUI_FillingDlg::Init()
myCompoundFilter = new GEOM_ShapeTypeFilter(TopAbs_COMPOUND, myGeom); myCompoundFilter = new GEOM_ShapeTypeFilter(TopAbs_COMPOUND, myGeom);
mySelection->AddFilter(myCompoundFilter); mySelection->AddFilter(myCompoundFilter);
/* Get setting of step value from file configuration */ double SpecificStep1 = 1;
QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); double SpecificStep2 = 0.00001;
step = St.toInt();
/* min, max, step and decimals for spin boxes & initial values */ /* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox_1->RangeStepAndValidator(0.001, 999.999, step, 3); GroupPoints->SpinBox_1->RangeStepAndValidator(1.0, 999.999, SpecificStep1, 3);
GroupPoints->SpinBox_2->RangeStepAndValidator(0.00001, 10000.0, 3, 10); GroupPoints->SpinBox_2->RangeStepAndValidator(0.00001, 10000.0, SpecificStep2, 5);
GroupPoints->SpinBox_3->RangeStepAndValidator(0.001, 999.999, step, 3); GroupPoints->SpinBox_3->RangeStepAndValidator(1.0, 999.999, SpecificStep1, 3);
GroupPoints->SpinBox_4->RangeStepAndValidator(0.001, 999.999, step, 3); GroupPoints->SpinBox_4->RangeStepAndValidator(1.0, 999.999, SpecificStep1, 3);
GroupPoints->SpinBox_5->RangeStepAndValidator(0.00001, 10000.0, 3, 10); GroupPoints->SpinBox_5->RangeStepAndValidator(0.00001, 10000.0, SpecificStep2, 5);
GroupPoints->SpinBox_1->SetValue(myMinDeg); GroupPoints->SpinBox_1->SetValue(myMinDeg);
GroupPoints->SpinBox_2->SetValue(myTol2D); GroupPoints->SpinBox_2->SetValue(myTol2D);
@ -246,6 +244,7 @@ void GenerationGUI_FillingDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
mySelection->AddFilter(myCompoundFilter);
return; return;
} }

View File

@ -54,7 +54,6 @@ private:
GenerationGUI* myGenerationGUI; GenerationGUI* myGenerationGUI;
int step;
Handle(GEOM_ShapeTypeFilter) myCompoundFilter; /* Filter selection */ Handle(GEOM_ShapeTypeFilter) myCompoundFilter; /* Filter selection */
GEOM::GEOM_Shape_var myGeomShape; /* is mySectionShape */ GEOM::GEOM_Shape_var myGeomShape; /* is mySectionShape */

View File

@ -168,7 +168,9 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
if(!myGeomBase->GetTopoFromSelection(mySelection, S)) if(!myGeomBase->GetTopoFromSelection(mySelection, S))
return; return;
if(myEditCurrentArgument == GroupPoints->LineEdit1 && S.ShapeType() != TopAbs_COMPSOLID && S.ShapeType() != TopAbs_COMPOUND && S.ShapeType() != TopAbs_SOLID && S.ShapeType() != TopAbs_SHAPE) { if(myEditCurrentArgument == GroupPoints->LineEdit1) {
myOkShape1 = false;
if(S.ShapeType() != TopAbs_COMPSOLID && S.ShapeType() != TopAbs_COMPOUND && S.ShapeType() != TopAbs_SOLID && S.ShapeType() != TopAbs_SHAPE) {
myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult) if(!testResult)
return; return;
@ -176,7 +178,10 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
myOkShape1 = true; myOkShape1 = true;
myShape1 = S; myShape1 = S;
} }
else if(myEditCurrentArgument == GroupPoints->LineEdit2 && S.ShapeType() != TopAbs_COMPSOLID && S.ShapeType() != TopAbs_COMPOUND && S.ShapeType() != TopAbs_SOLID && S.ShapeType() != TopAbs_SHAPE) { }
else if(myEditCurrentArgument == GroupPoints->LineEdit2) {
myOkShape2 = false;
if(S.ShapeType() != TopAbs_COMPSOLID && S.ShapeType() != TopAbs_COMPOUND && S.ShapeType() != TopAbs_SOLID && S.ShapeType() != TopAbs_SHAPE && S.ShapeType() != TopAbs_VERTEX) {
myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult) if(!testResult)
return; return;
@ -184,6 +189,7 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
myOkShape2 = true; myOkShape2 = true;
myShape2 = S; myShape2 = S;
} }
}
if(myOkShape1 && myOkShape2) if(myOkShape1 && myOkShape2)
this->MakePipeSimulationAndDisplay(); this->MakePipeSimulationAndDisplay();

View File

@ -288,6 +288,8 @@ void GenerationGUI_PrismDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
GroupPoints->LineEdit1->setFocus();
myEditCurrentArgument = GroupPoints->LineEdit1;
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;

View File

@ -96,12 +96,9 @@ void GenerationGUI_RevolDlg::Init()
myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom);
/* Get setting of step value from file configuration */ double SpecificStep = 5;
QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep");
step = St.toDouble();
/* min, max, step and decimals for spin boxes & initial values */ /* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3);
GroupPoints->SpinBox_DX->SetValue(myAngle); GroupPoints->SpinBox_DX->SetValue(myAngle);
/* signals and slots connections */ /* signals and slots connections */
@ -115,7 +112,9 @@ void GenerationGUI_RevolDlg::Init()
connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseVector(int))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseAngle(int)));
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
@ -260,6 +259,8 @@ void GenerationGUI_RevolDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
GroupPoints->LineEdit1->setFocus();
myEditCurrentArgument = GroupPoints->LineEdit1;
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;

View File

@ -56,7 +56,6 @@ private :
GenerationGUI* myGenerationGUI; GenerationGUI* myGenerationGUI;
double step;
Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filters selection */ Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filters selection */
TopoDS_Shape myBase; TopoDS_Shape myBase;

View File

@ -41,6 +41,13 @@ EXPORT_HEADERS=
LIB = libMeasureGUI.la LIB = libMeasureGUI.la
LIB_SRC = MeasureGUI.cxx \ LIB_SRC = MeasureGUI.cxx \
MeasureGUI_Skeleton_QTD.cxx \
MeasureGUI_1Sel3LineEdit_QTD.cxx \
MeasureGUI_1Sel6LineEdit_QTD.cxx \
MeasureGUI_1Sel12LineEdit_QTD.cxx \
MeasureGUI_1Sel1TextView_QTD.cxx \
MeasureGUI_2Sel1LineEdit_QTD.cxx \
MeasureGUI_Skeleton.cxx \
MeasureGUI_PropertiesDlg.cxx \ MeasureGUI_PropertiesDlg.cxx \
MeasureGUI_CenterMassDlg.cxx \ MeasureGUI_CenterMassDlg.cxx \
MeasureGUI_InertiaDlg.cxx \ MeasureGUI_InertiaDlg.cxx \
@ -48,10 +55,17 @@ LIB_SRC = MeasureGUI.cxx \
MeasureGUI_DistanceDlg.cxx \ MeasureGUI_DistanceDlg.cxx \
MeasureGUI_MaxToleranceDlg.cxx \ MeasureGUI_MaxToleranceDlg.cxx \
MeasureGUI_WhatisDlg.cxx \ MeasureGUI_WhatisDlg.cxx \
MeasureGUI_CheckShape.cxx MeasureGUI_CheckShapeDlg.cxx
LIB_MOC = \ LIB_MOC = \
MeasureGUI.h \ MeasureGUI.h \
MeasureGUI_Skeleton_QTD.h \
MeasureGUI_1Sel3LineEdit_QTD.h \
MeasureGUI_1Sel6LineEdit_QTD.h \
MeasureGUI_1Sel12LineEdit_QTD.h \
MeasureGUI_1Sel1TextView_QTD.h \
MeasureGUI_2Sel1LineEdit_QTD.h \
MeasureGUI_Skeleton.h \
MeasureGUI_PropertiesDlg.h \ MeasureGUI_PropertiesDlg.h \
MeasureGUI_CenterMassDlg.h \ MeasureGUI_CenterMassDlg.h \
MeasureGUI_InertiaDlg.h \ MeasureGUI_InertiaDlg.h \
@ -59,7 +73,7 @@ LIB_MOC = \
MeasureGUI_DistanceDlg.h \ MeasureGUI_DistanceDlg.h \
MeasureGUI_MaxToleranceDlg.h \ MeasureGUI_MaxToleranceDlg.h \
MeasureGUI_WhatisDlg.h \ MeasureGUI_WhatisDlg.h \
MeasureGUI_CheckShape.h MeasureGUI_CheckShapeDlg.h
LIB_CLIENT_IDL = SALOME_Exception.idl \ LIB_CLIENT_IDL = SALOME_Exception.idl \
GEOM_Gen.idl \ GEOM_Gen.idl \
@ -76,6 +90,6 @@ LIB_SERVER_IDL =
CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
LDFLAGS += -lOCCViewer -lVTKViewer -lSalomeObject -lSalomeGUI -lGEOMClient -lGEOMObject -lGEOMFiltersSelection -lDlgRef -lGEOMContext -lGEOMBase -L${KERNEL_ROOT_DIR}/lib/salome LDFLAGS += -lOCCViewer -lVTKViewer -lSalomeObject -lSalomeGUI -lGEOMClient -lGEOMObject -lGEOMBase -L${KERNEL_ROOT_DIR}/lib/salome
@CONCLUDE@ @CONCLUDE@

View File

@ -38,7 +38,7 @@ using namespace std;
#include "MeasureGUI_DistanceDlg.h" // Method DISTANCE #include "MeasureGUI_DistanceDlg.h" // Method DISTANCE
#include "MeasureGUI_MaxToleranceDlg.h" // Method MAXTOLERANCE #include "MeasureGUI_MaxToleranceDlg.h" // Method MAXTOLERANCE
#include "MeasureGUI_WhatisDlg.h" // Method WHATIS #include "MeasureGUI_WhatisDlg.h" // Method WHATIS
#include "MeasureGUI_CheckShape.h" // Method CHECKSHAPE #include "MeasureGUI_CheckShapeDlg.h" // Method CHECKSHAPE
//======================================================================= //=======================================================================
// function : MeasureGUI() // function : MeasureGUI()
@ -111,7 +111,7 @@ bool MeasureGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
} }
case 707: // CHECKSHAPE case 707: // CHECKSHAPE
{ {
MeasureGUI_CheckShape *aDlg = new MeasureGUI_CheckShape(parent, "", Sel); MeasureGUI_CheckShapeDlg *aDlg = new MeasureGUI_CheckShapeDlg(parent, "", Sel);
break; break;
} }
default: default:

View File

@ -0,0 +1,150 @@
/****************************************************************************
** Form implementation generated from reading ui file 'MeasureGUI_1Sel12LineEdit_QTD.ui'
**
** Created: mar oct 28 16:11:14 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "MeasureGUI_1Sel12LineEdit_QTD.h"
#include <qvariant.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a MeasureGUI_1Sel12LineEdit_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
MeasureGUI_1Sel12LineEdit_QTD::MeasureGUI_1Sel12LineEdit_QTD( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "MeasureGUI_1Sel12LineEdit_QTD" );
resize( 131, 171 );
setCaption( trUtf8( "MeasureGUI_1Sel12LineEdit_QTD" ) );
MeasureGUI_1Sel12LineEdit_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_1Sel12LineEdit_QTDLayout");
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) );
GroupBox1->setTitle( trUtf8( "" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 6 );
GroupBox1->layout()->setMargin( 11 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
LineEdit12 = new QLineEdit( GroupBox1, "LineEdit12" );
Layout2->addWidget( LineEdit12, 0, 2 );
LineEdit11 = new QLineEdit( GroupBox1, "LineEdit11" );
Layout2->addWidget( LineEdit11, 0, 1 );
LineEdit42 = new QLineEdit( GroupBox1, "LineEdit42" );
Layout2->addWidget( LineEdit42, 3, 2 );
TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
TextLabel5->setText( trUtf8( "TL5" ) );
Layout2->addWidget( TextLabel5, 3, 0 );
LineEdit31 = new QLineEdit( GroupBox1, "LineEdit31" );
Layout2->addWidget( LineEdit31, 2, 1 );
LineEdit41 = new QLineEdit( GroupBox1, "LineEdit41" );
Layout2->addWidget( LineEdit41, 3, 1 );
LineEdit23 = new QLineEdit( GroupBox1, "LineEdit23" );
Layout2->addWidget( LineEdit23, 1, 3 );
LineEdit33 = new QLineEdit( GroupBox1, "LineEdit33" );
Layout2->addWidget( LineEdit33, 2, 3 );
LineEdit43 = new QLineEdit( GroupBox1, "LineEdit43" );
Layout2->addWidget( LineEdit43, 3, 3 );
LineEdit22 = new QLineEdit( GroupBox1, "LineEdit22" );
Layout2->addWidget( LineEdit22, 1, 2 );
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout2->addWidget( TextLabel2, 0, 0 );
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout2->addWidget( TextLabel4, 2, 0 );
LineEdit13 = new QLineEdit( GroupBox1, "LineEdit13" );
Layout2->addWidget( LineEdit13, 0, 3 );
LineEdit32 = new QLineEdit( GroupBox1, "LineEdit32" );
Layout2->addWidget( LineEdit32, 2, 2 );
LineEdit21 = new QLineEdit( GroupBox1, "LineEdit21" );
Layout2->addWidget( LineEdit21, 1, 1 );
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( trUtf8( "TL3" ) );
Layout2->addWidget( TextLabel3, 1, 0 );
Layout1->addMultiCellLayout( Layout2, 1, 1, 0, 2 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 );
QSpacerItem* spacer = new QSpacerItem( 0, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 2, 2 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) );
Layout1->addWidget( TextLabel1, 0, 0 );
GroupBox1Layout->addLayout( Layout1, 0, 0 );
MeasureGUI_1Sel12LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
MeasureGUI_1Sel12LineEdit_QTD::~MeasureGUI_1Sel12LineEdit_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,59 @@
/****************************************************************************
** Form interface generated from reading ui file 'MeasureGUI_1Sel12LineEdit_QTD.ui'
**
** Created: mar oct 28 16:11:14 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef MEASUREGUI_1SEL12LINEEDIT_QTD_H
#define MEASUREGUI_1SEL12LINEEDIT_QTD_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class MeasureGUI_1Sel12LineEdit_QTD : public QWidget
{
Q_OBJECT
public:
MeasureGUI_1Sel12LineEdit_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~MeasureGUI_1Sel12LineEdit_QTD();
QGroupBox* GroupBox1;
QLineEdit* LineEdit12;
QLineEdit* LineEdit11;
QLineEdit* LineEdit42;
QLabel* TextLabel5;
QLineEdit* LineEdit31;
QLineEdit* LineEdit41;
QLineEdit* LineEdit23;
QLineEdit* LineEdit33;
QLineEdit* LineEdit43;
QLineEdit* LineEdit22;
QLabel* TextLabel2;
QLabel* TextLabel4;
QLineEdit* LineEdit13;
QLineEdit* LineEdit32;
QLineEdit* LineEdit21;
QLabel* TextLabel3;
QLineEdit* LineEdit1;
QPushButton* PushButton1;
QLabel* TextLabel1;
protected:
QGridLayout* MeasureGUI_1Sel12LineEdit_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* Layout1;
QGridLayout* Layout2;
};
#endif // MEASUREGUI_1SEL12LINEEDIT_QTD_H

View File

@ -0,0 +1,77 @@
/****************************************************************************
** Form implementation generated from reading ui file 'MeasureGUI_1Sel1TextView_QTD.ui'
**
** Created: mar oct 28 14:01:15 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "MeasureGUI_1Sel1TextView_QTD.h"
#include <qvariant.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qtextedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a MeasureGUI_1Sel1TextView_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
MeasureGUI_1Sel1TextView_QTD::MeasureGUI_1Sel1TextView_QTD( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "MeasureGUI_1Sel1TextView_QTD" );
resize( 130, 160 );
setCaption( trUtf8( "MeasureGUI_1Sel1TextView_QTD" ) );
MeasureGUI_1Sel1TextView_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_1Sel1TextView_QTDLayout");
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) );
GroupBox1->setTitle( trUtf8( "" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 6 );
GroupBox1->layout()->setMargin( 11 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) );
Layout1->addWidget( TextLabel1, 0, 0 );
TextEdit1 = new QTextEdit( GroupBox1, "TextEdit1" );
Layout1->addMultiCellWidget( TextEdit1, 1, 1, 0, 2 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
GroupBox1Layout->addLayout( Layout1, 0, 0 );
MeasureGUI_1Sel1TextView_QTDLayout->addWidget( GroupBox1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
MeasureGUI_1Sel1TextView_QTD::~MeasureGUI_1Sel1TextView_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,44 @@
/****************************************************************************
** Form interface generated from reading ui file 'MeasureGUI_1Sel1TextView_QTD.ui'
**
** Created: mar oct 28 14:01:14 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef MEASUREGUI_1SEL1TEXTVIEW_QTD_H
#define MEASUREGUI_1SEL1TEXTVIEW_QTD_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QTextEdit;
class MeasureGUI_1Sel1TextView_QTD : public QWidget
{
Q_OBJECT
public:
MeasureGUI_1Sel1TextView_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~MeasureGUI_1Sel1TextView_QTD();
QGroupBox* GroupBox1;
QLabel* TextLabel1;
QTextEdit* TextEdit1;
QLineEdit* LineEdit1;
QPushButton* PushButton1;
protected:
QGridLayout* MeasureGUI_1Sel1TextView_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* Layout1;
};
#endif // MEASUREGUI_1SEL1TEXTVIEW_QTD_H

View File

@ -0,0 +1,104 @@
/****************************************************************************
** Form implementation generated from reading ui file 'MeasureGUI_1Sel3LineEdit_QTD.ui'
**
** Created: mar oct 28 16:11:13 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "MeasureGUI_1Sel3LineEdit_QTD.h"
#include <qvariant.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a MeasureGUI_1Sel3LineEdit_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
MeasureGUI_1Sel3LineEdit_QTD::MeasureGUI_1Sel3LineEdit_QTD( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "MeasureGUI_1Sel3LineEdit_QTD" );
resize( 129, 141 );
setCaption( trUtf8( "MeasureGUI_1Sel3LineEdit_QTD" ) );
MeasureGUI_1Sel3LineEdit_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_1Sel3LineEdit_QTDLayout");
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) );
GroupBox1->setTitle( trUtf8( "" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 6 );
GroupBox1->layout()->setMargin( 11 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) );
Layout2->addWidget( TextLabel1, 0, 0 );
LineEdit4 = new QLineEdit( GroupBox1, "LineEdit4" );
Layout2->addMultiCellWidget( LineEdit4, 3, 3, 1, 2 );
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( trUtf8( "TL3" ) );
Layout2->addWidget( TextLabel3, 2, 0 );
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
Layout2->addMultiCellWidget( LineEdit2, 1, 1, 1, 2 );
QSpacerItem* spacer = new QSpacerItem( 0, 80, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout2->addItem( spacer, 4, 2 );
LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" );
Layout2->addMultiCellWidget( LineEdit3, 2, 2, 1, 2 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout2->addWidget( LineEdit1, 0, 2 );
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout2->addWidget( TextLabel4, 3, 0 );
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout2->addWidget( TextLabel2, 1, 0 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout2->addWidget( PushButton1, 0, 1 );
GroupBox1Layout->addLayout( Layout2, 0, 0 );
MeasureGUI_1Sel3LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
MeasureGUI_1Sel3LineEdit_QTD::~MeasureGUI_1Sel3LineEdit_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,48 @@
/****************************************************************************
** Form interface generated from reading ui file 'MeasureGUI_1Sel3LineEdit_QTD.ui'
**
** Created: mar oct 28 16:11:13 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef MEASUREGUI_1SEL3LINEEDIT_QTD_H
#define MEASUREGUI_1SEL3LINEEDIT_QTD_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class MeasureGUI_1Sel3LineEdit_QTD : public QWidget
{
Q_OBJECT
public:
MeasureGUI_1Sel3LineEdit_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~MeasureGUI_1Sel3LineEdit_QTD();
QGroupBox* GroupBox1;
QLabel* TextLabel1;
QLineEdit* LineEdit4;
QLabel* TextLabel3;
QLineEdit* LineEdit2;
QLineEdit* LineEdit3;
QLineEdit* LineEdit1;
QLabel* TextLabel4;
QLabel* TextLabel2;
QPushButton* PushButton1;
protected:
QGridLayout* MeasureGUI_1Sel3LineEdit_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* Layout2;
};
#endif // MEASUREGUI_1SEL3LINEEDIT_QTD_H

View File

@ -0,0 +1,132 @@
/****************************************************************************
** Form implementation generated from reading ui file 'MeasureGUI_1Sel6LineEdit_QTD.ui'
**
** Created: mar oct 28 16:11:14 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "MeasureGUI_1Sel6LineEdit_QTD.h"
#include <qvariant.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a MeasureGUI_1Sel6LineEdit_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
MeasureGUI_1Sel6LineEdit_QTD::MeasureGUI_1Sel6LineEdit_QTD( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "MeasureGUI_1Sel6LineEdit_QTD" );
resize( 129, 163 );
setCaption( trUtf8( "MeasureGUI_1Sel6LineEdit_QTD" ) );
MeasureGUI_1Sel6LineEdit_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_1Sel6LineEdit_QTDLayout");
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) );
GroupBox1->setTitle( trUtf8( "" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 6 );
GroupBox1->layout()->setMargin( 11 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
QSpacerItem* spacer = new QSpacerItem( 0, 50, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 2, 2 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) );
Layout1->addWidget( TextLabel1, 0, 0 );
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
LineEdit22 = new QLineEdit( GroupBox1, "LineEdit22" );
Layout2->addWidget( LineEdit22, 2, 2 );
LineEdit32 = new QLineEdit( GroupBox1, "LineEdit32" );
Layout2->addWidget( LineEdit32, 3, 2 );
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout2->addWidget( TextLabel4, 1, 0 );
LineEdit31 = new QLineEdit( GroupBox1, "LineEdit31" );
Layout2->addWidget( LineEdit31, 3, 1 );
TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
TextLabel5->setText( trUtf8( "TL5" ) );
Layout2->addWidget( TextLabel5, 2, 0 );
LineEdit11 = new QLineEdit( GroupBox1, "LineEdit11" );
Layout2->addWidget( LineEdit11, 1, 1 );
TextLabel6 = new QLabel( GroupBox1, "TextLabel6" );
TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) );
TextLabel6->setText( trUtf8( "TL6" ) );
Layout2->addWidget( TextLabel6, 3, 0 );
LineEdit12 = new QLineEdit( GroupBox1, "LineEdit12" );
Layout2->addWidget( LineEdit12, 1, 2 );
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout2->addWidget( TextLabel2, 0, 1 );
LineEdit21 = new QLineEdit( GroupBox1, "LineEdit21" );
Layout2->addWidget( LineEdit21, 2, 1 );
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( trUtf8( "TL3" ) );
Layout2->addWidget( TextLabel3, 0, 2 );
Layout1->addMultiCellLayout( Layout2, 1, 1, 0, 2 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 );
GroupBox1Layout->addLayout( Layout1, 0, 0 );
MeasureGUI_1Sel6LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
MeasureGUI_1Sel6LineEdit_QTD::~MeasureGUI_1Sel6LineEdit_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,54 @@
/****************************************************************************
** Form interface generated from reading ui file 'MeasureGUI_1Sel6LineEdit_QTD.ui'
**
** Created: mar oct 28 16:11:13 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef MEASUREGUI_1SEL6LINEEDIT_QTD_H
#define MEASUREGUI_1SEL6LINEEDIT_QTD_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class MeasureGUI_1Sel6LineEdit_QTD : public QWidget
{
Q_OBJECT
public:
MeasureGUI_1Sel6LineEdit_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~MeasureGUI_1Sel6LineEdit_QTD();
QGroupBox* GroupBox1;
QLabel* TextLabel1;
QLineEdit* LineEdit22;
QLineEdit* LineEdit32;
QLabel* TextLabel4;
QLineEdit* LineEdit31;
QLabel* TextLabel5;
QLineEdit* LineEdit11;
QLabel* TextLabel6;
QLineEdit* LineEdit12;
QLabel* TextLabel2;
QLineEdit* LineEdit21;
QLabel* TextLabel3;
QPushButton* PushButton1;
QLineEdit* LineEdit1;
protected:
QGridLayout* MeasureGUI_1Sel6LineEdit_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* Layout1;
QGridLayout* Layout2;
};
#endif // MEASUREGUI_1SEL6LINEEDIT_QTD_H

View File

@ -0,0 +1,100 @@
/****************************************************************************
** Form implementation generated from reading ui file 'MeasureGUI_2Sel1LineEdit_QTD.ui'
**
** Created: mar oct 28 16:11:14 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "MeasureGUI_2Sel1LineEdit_QTD.h"
#include <qvariant.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a MeasureGUI_2Sel1LineEdit_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
MeasureGUI_2Sel1LineEdit_QTD::MeasureGUI_2Sel1LineEdit_QTD( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "MeasureGUI_2Sel1LineEdit_QTD" );
resize( 129, 115 );
setCaption( trUtf8( "MeasureGUI_2Sel1LineEdit_QTD" ) );
MeasureGUI_2Sel1LineEdit_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_2Sel1LineEdit_QTDLayout");
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) );
GroupBox1->setTitle( trUtf8( "" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 6 );
GroupBox1->layout()->setMargin( 11 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
QSpacerItem* spacer = new QSpacerItem( 0, 60, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 3, 2 );
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( trUtf8( "TL3" ) );
Layout1->addWidget( TextLabel3, 2, 0 );
LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" );
Layout1->addMultiCellWidget( LineEdit3, 2, 2, 1, 2 );
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
Layout1->addWidget( LineEdit2, 1, 2 );
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( trUtf8( "TL2" ) );
Layout1->addWidget( TextLabel2, 1, 0 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
TextLabel1->setText( trUtf8( "TL1" ) );
Layout1->addWidget( TextLabel1, 0, 0 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
PushButton1->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton1, 0, 1 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 );
PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
PushButton2->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton2, 1, 1 );
GroupBox1Layout->addLayout( Layout1, 0, 0 );
MeasureGUI_2Sel1LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
MeasureGUI_2Sel1LineEdit_QTD::~MeasureGUI_2Sel1LineEdit_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,47 @@
/****************************************************************************
** Form interface generated from reading ui file 'MeasureGUI_2Sel1LineEdit_QTD.ui'
**
** Created: mar oct 28 16:11:14 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef MEASUREGUI_2SEL1LINEEDIT_QTD_H
#define MEASUREGUI_2SEL1LINEEDIT_QTD_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class MeasureGUI_2Sel1LineEdit_QTD : public QWidget
{
Q_OBJECT
public:
MeasureGUI_2Sel1LineEdit_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~MeasureGUI_2Sel1LineEdit_QTD();
QGroupBox* GroupBox1;
QLabel* TextLabel3;
QLineEdit* LineEdit3;
QLineEdit* LineEdit2;
QLabel* TextLabel2;
QLabel* TextLabel1;
QPushButton* PushButton1;
QLineEdit* LineEdit1;
QPushButton* PushButton2;
protected:
QGridLayout* MeasureGUI_2Sel1LineEdit_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* Layout1;
};
#endif // MEASUREGUI_2SEL1LINEEDIT_QTD_H

View File

@ -32,19 +32,6 @@ using namespace std;
#include <BRepPrimAPI_MakeBox.hxx> #include <BRepPrimAPI_MakeBox.hxx>
#include <BRepBndLib.hxx> #include <BRepBndLib.hxx>
#include <qbuttongroup.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
//================================================================================= //=================================================================================
// class : MeasureGUI_BndBoxDlg() // class : MeasureGUI_BndBoxDlg()
// purpose : Constructs a MeasureGUI_BndBoxDlg which is a child of 'parent', with the // purpose : Constructs a MeasureGUI_BndBoxDlg which is a child of 'parent', with the
@ -53,172 +40,38 @@ using namespace std;
// TRUE to construct a modal dialog. // TRUE to construct a modal dialog.
//================================================================================= //=================================================================================
MeasureGUI_BndBoxDlg::MeasureGUI_BndBoxDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) MeasureGUI_BndBoxDlg::MeasureGUI_BndBoxDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{ {
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BOUNDING_BOX"))); QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BOUNDING_BOX")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
if ( !name )
setName( "MeasureGUI_BndBoxDlg" );
resize( 303, 275 );
setCaption(tr("GEOM_BNDBOX_TITLE")); setCaption(tr("GEOM_BNDBOX_TITLE"));
setSizeGripEnabled( TRUE );
MeasureGUI_BndBoxDlgLayout = new QGridLayout( this );
MeasureGUI_BndBoxDlgLayout->setSpacing( 6 );
MeasureGUI_BndBoxDlgLayout->setMargin( 11 );
/***************************************************************/ /***************************************************************/
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setTitle(tr("GEOM_BNDBOX")); GroupConstructors->setTitle(tr("GEOM_BNDBOX"));
GroupConstructors->setExclusive( TRUE ); RadioButton1->setPixmap(image0);
GroupConstructors->setColumnLayout(0, Qt::Vertical );
GroupConstructors->layout()->setSpacing( 0 );
GroupConstructors->layout()->setMargin( 0 );
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
GroupConstructorsLayout->setSpacing( 6 );
GroupConstructorsLayout->setMargin( 11 );
Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
Constructor1->setText( tr( "" ) );
Constructor1->setPixmap( image0 );
Constructor1->setChecked( TRUE );
Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
Constructor1->sizePolicy().hasHeightForWidth() ) );
Constructor1->setMinimumSize( QSize( 60, 0 ) );
GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupConstructorsLayout->addItem( spacer, 0, 1 );
MeasureGUI_BndBoxDlgLayout->addWidget( GroupConstructors, 0, 0 );
/***************************************************************/ GroupC1 = new MeasureGUI_1Sel6LineEdit_QTD(this, "GroupC1");
GroupConstructor1 = new QGroupBox( this, "GroupConstructor1" ); GroupC1->GroupBox1->setTitle(tr("GEOM_BNDBOX_OBJDIM"));
GroupConstructor1->setTitle( tr( "GEOM_BNDBOX_OBJDIM" ) ); GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
GroupConstructor1->setColumnLayout(0, Qt::Vertical ); GroupC1->TextLabel2->setText(tr("GEOM_MIN"));
GroupConstructor1->layout()->setSpacing( 0 ); GroupC1->TextLabel3->setText(tr("GEOM_MAX"));
GroupConstructor1->layout()->setMargin( 0 ); GroupC1->TextLabel4->setText(tr("GEOM_X"));
GroupConstructor1Layout = new QGridLayout( GroupConstructor1->layout() ); GroupC1->TextLabel5->setText(tr("GEOM_Y"));
GroupConstructor1Layout->setAlignment( Qt::AlignTop ); GroupC1->TextLabel6->setText(tr("GEOM_Z"));
GroupConstructor1Layout->setSpacing( 6 ); GroupC1->LineEdit11->setReadOnly(TRUE);
GroupConstructor1Layout->setMargin( 11 ); GroupC1->LineEdit12->setReadOnly(TRUE);
LineEditC1A1 = new QLineEdit( GroupConstructor1, "LineEditC1A1" ); GroupC1->LineEdit21->setReadOnly(TRUE);
LineEditC1A1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A1->sizePolicy().hasHeightForWidth() ) ); GroupC1->LineEdit22->setReadOnly(TRUE);
// GroupConstructor1Layout->addWidget( LineEditC1A1, 0, 2 ); GroupC1->LineEdit31->setReadOnly(TRUE);
SelectButtonC1A1 = new QPushButton( GroupConstructor1, "SelectButtonC1A1" ); GroupC1->LineEdit32->setReadOnly(TRUE);
SelectButtonC1A1->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); GroupC1->PushButton1->setPixmap(image1);
SelectButtonC1A1->setText( tr( "" ) );
SelectButtonC1A1->setPixmap( image1 );
// GroupConstructor1Layout->addWidget( SelectButtonC1A1, 0, 1 );
TextLabelC1A1 = new QLabel( GroupConstructor1, "TextLabelC1A1" ); Layout1->addWidget(GroupC1, 1, 0);
TextLabelC1A1->setText( tr( "GEOM_OBJECT" ) );
TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) );
TextLabelC1A1->setFrameShape( QLabel::NoFrame );
TextLabelC1A1->setFrameShadow( QLabel::Plain );
// GroupConstructor1Layout->addWidget( TextLabelC1A1, 0, 0 );
QHBoxLayout* bl = new QHBoxLayout;
bl->setMargin(0); bl->setSpacing(6);
bl->addWidget(TextLabelC1A1); bl->addWidget(SelectButtonC1A1); bl->addWidget(LineEditC1A1);
GroupConstructor1Layout->addMultiCellLayout(bl, 0, 0, 0, 2);
TextLabel_Min = new QLabel( GroupConstructor1, "TextLabel_Min" );
TextLabel_Min->setText( tr( "GEOM_MIN" ) );
TextLabel_Min->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Min->setFrameShape( QLabel::NoFrame );
TextLabel_Min->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Min, 1, 1 );
TextLabel_Max = new QLabel( GroupConstructor1, "TextLabel_Max" );
TextLabel_Max->setText( tr( "GEOM_MAX" ) );
TextLabel_Max->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Max->setFrameShape( QLabel::NoFrame );
TextLabel_Max->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Max, 1, 2 );
TextLabel_X = new QLabel( GroupConstructor1, "TextLabel_X" );
TextLabel_X->setText( tr( "GEOM_X" ) );
TextLabel_X->setMinimumSize( QSize( 50, 0 ) );
TextLabel_X->setFrameShape( QLabel::NoFrame );
TextLabel_X->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_X, 2, 0 );
LineEdit_MinX = new QLineEdit( GroupConstructor1, "LineEdit_MinX" );
LineEdit_MinX->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MinX->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MinX->setEnabled( FALSE );
LineEdit_MinX->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MinX, 2, 1 );
LineEdit_MaxX = new QLineEdit( GroupConstructor1, "LineEdit_MaxX" );
LineEdit_MaxX->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MaxX->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MaxX->setEnabled( FALSE );
LineEdit_MaxX->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MaxX, 2, 2 );
TextLabel_Y = new QLabel( GroupConstructor1, "TextLabel_Y" );
TextLabel_Y->setText( tr( "GEOM_Y" ) );
TextLabel_Y->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Y->setFrameShape( QLabel::NoFrame );
TextLabel_Y->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Y, 3, 0 );
LineEdit_MinY = new QLineEdit( GroupConstructor1, "LineEdit_MinY" );
LineEdit_MinY->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MinY->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MinY->setEnabled( FALSE );
LineEdit_MinY->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MinY, 3, 1 );
LineEdit_MaxY = new QLineEdit( GroupConstructor1, "LineEdit_MaxY" );
LineEdit_MaxY->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MaxY->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MaxY->setEnabled( FALSE );
LineEdit_MaxY->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MaxY, 3, 2 );
TextLabel_Z = new QLabel( GroupConstructor1, "TextLabel_Z" );
TextLabel_Z->setText( tr( "GEOM_Z" ) );
TextLabel_Z->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Z->setFrameShape( QLabel::NoFrame );
TextLabel_Z->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Z, 4, 0 );
LineEdit_MinZ = new QLineEdit( GroupConstructor1, "LineEdit_MinZ" );
LineEdit_MinZ->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MinZ->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MinZ->setEnabled( FALSE );
LineEdit_MinZ->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MinZ, 4, 1 );
LineEdit_MaxZ = new QLineEdit( GroupConstructor1, "LineEdit_MaxZ" );
LineEdit_MaxZ->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MaxZ->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MaxZ->setEnabled( FALSE );
LineEdit_MaxZ->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MaxZ, 4, 2 );
MeasureGUI_BndBoxDlgLayout->addWidget( GroupConstructor1, 1, 0 );
/***************************************************************/
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
GroupButtons->setTitle( tr( "" ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
GroupButtons->layout()->setSpacing( 0 );
GroupButtons->layout()->setMargin( 0 );
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CLOSE" ) );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 1 );
QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_8, 0, 0 );
QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_9, 0, 2 );
MeasureGUI_BndBoxDlgLayout->addWidget( GroupButtons, 2, 0 );
/***************************************************************/ /***************************************************************/
Init(Sel) ; /* Initialisations */ /* Initialisation */
Init();
} }
@ -236,66 +89,21 @@ MeasureGUI_BndBoxDlg::~MeasureGUI_BndBoxDlg()
// function : Init() // function : Init()
// purpose : // purpose :
//================================================================================= //=================================================================================
void MeasureGUI_BndBoxDlg::Init( SALOME_Selection* Sel ) void MeasureGUI_BndBoxDlg::Init()
{ {
myConstructorId = 0 ; /* init variables */
Constructor1->setChecked( TRUE ); myEditCurrentArgument = GroupC1->LineEdit1;
myEditCurrentArgument = LineEditC1A1 ;
mySelection = Sel;
myGeomBase = new GEOMBase() ;
myGeomGUI = GEOMContext::GetGeomGUI() ;
myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ;
// TODO : previous selection into argument ?
/* Filter definitions */
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
myGeom = GEOM::GEOM_Gen::_narrow(comp);
/* signals and slots connections */ /* signals and slots connections */
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ; connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) ); connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect( SelectButtonC1A1, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
connect( myGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ) ; /* displays Dialog */
/* to close dialog if study change */ GroupC1->show();
connect( myGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ; this->show();
mySimulationTopoDs.Nullify() ;
/* Move widget on the botton right corner of main widget */
int x, y ;
myGeomBase->DefineDlgPosition( this, x, y ) ;
this->move( x, y ) ;
this->show() ; /* displays Dialog */
return ;
}
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void MeasureGUI_BndBoxDlg::ConstructorsClicked(int constructorId)
{
return ;
}
//=================================================================================
// function : ClickOnCancel()
// purpose :
//=================================================================================
void MeasureGUI_BndBoxDlg::ClickOnCancel()
{
myGeomBase->EraseSimulationShape() ;
mySimulationTopoDs.Nullify() ;
disconnect( mySelection, 0, this, 0 );
myGeomGUI->ResetState() ;
reject() ;
return; return;
} }
@ -306,35 +114,30 @@ void MeasureGUI_BndBoxDlg::ClickOnCancel()
//================================================================================= //=================================================================================
void MeasureGUI_BndBoxDlg::SelectionIntoArgument() void MeasureGUI_BndBoxDlg::SelectionIntoArgument()
{ {
LineEdit_MinX->setText("") ; myGeomBase->EraseSimulationShape();
LineEdit_MinY->setText("") ;
LineEdit_MinZ->setText("") ;
LineEdit_MaxX->setText("") ;
LineEdit_MaxY->setText("") ;
LineEdit_MaxZ->setText("") ;
myEditCurrentArgument->setText("") ;
mySimulationTopoDs.Nullify(); mySimulationTopoDs.Nullify();
myEditCurrentArgument->setText("");
QString aString = "";
QString aString = ""; /* future the name of selection */ GroupC1->LineEdit11->setText("");
GroupC1->LineEdit12->setText("");
GroupC1->LineEdit21->setText("");
GroupC1->LineEdit22->setText("");
GroupC1->LineEdit31->setText("");
GroupC1->LineEdit32->setText("");
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
if ( nbSel != 1 ) { if(nbSel != 1)
return; return;
}
/* nbSel == 1 */ /* nbSel == 1 */
TopoDS_Shape S; TopoDS_Shape S;
if( !myGeomBase->GetTopoFromSelection(mySelection, S) ) if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull())
return; return;
if( S.IsNull() ) { GroupC1->LineEdit1->setText(aString);
myEditCurrentArgument->setText( "" );
return ;
}
LineEditC1A1->setText(aString) ;
this->CalculateAndDisplayBndBox(S); this->CalculateAndDisplayBndBox(S);
return; return;
} }
@ -346,21 +149,15 @@ void MeasureGUI_BndBoxDlg::SelectionIntoArgument()
void MeasureGUI_BndBoxDlg::SetEditCurrentArgument() void MeasureGUI_BndBoxDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
switch (myConstructorId)
{ if(send == GroupC1->PushButton1) {
case 0: /* default constructor */ GroupC1->LineEdit1->setFocus();
{ myEditCurrentArgument = GroupC1->LineEdit1;
if(send == SelectButtonC1A1) {
LineEditC1A1->setFocus() ;
myEditCurrentArgument = LineEditC1A1;
}
SelectionIntoArgument() ;
break;
}
}
return ;
} }
this->SelectionIntoArgument();
return;
}
//================================================================================= //=================================================================================
@ -370,36 +167,12 @@ void MeasureGUI_BndBoxDlg::SetEditCurrentArgument()
void MeasureGUI_BndBoxDlg::LineEditReturnPressed() void MeasureGUI_BndBoxDlg::LineEditReturnPressed()
{ {
QLineEdit* send = (QLineEdit*)sender(); QLineEdit* send = (QLineEdit*)sender();
if( send == LineEditC1A1 ) if(send == GroupC1->LineEdit1)
myEditCurrentArgument = LineEditC1A1 ; myEditCurrentArgument = GroupC1->LineEdit1;
else else
return; return;
/* User name of object input management */ MeasureGUI_Skeleton::LineEditReturnPressed();
/* If successfull the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text() ;
QWidget* thisWidget = (QWidget*)this ;
if( myGeomBase->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) {
myEditCurrentArgument->setText( objectUserName ) ;
}
return ;
}
//=================================================================================
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void MeasureGUI_BndBoxDlg::DeactivateActiveDialog()
{
if ( GroupConstructors->isEnabled() ) {
disconnect( mySelection, 0, this, 0 );
GroupConstructors->setEnabled(false) ;
GroupConstructor1->setEnabled(false) ;
GroupButtons->setEnabled(false) ;
}
return; return;
} }
@ -410,12 +183,10 @@ void MeasureGUI_BndBoxDlg::DeactivateActiveDialog()
//================================================================================= //=================================================================================
void MeasureGUI_BndBoxDlg::ActivateThisDialog() void MeasureGUI_BndBoxDlg::ActivateThisDialog()
{ {
/* Emit a signal to deactivate the active dialog */ MeasureGUI_Skeleton::ActivateThisDialog();
myGeomGUI->EmitSignalDeactivateDialog() ;
GroupConstructors->setEnabled(true) ;
GroupConstructor1->setEnabled(true) ;
GroupButtons->setEnabled(true) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;
} }
@ -428,19 +199,7 @@ void MeasureGUI_BndBoxDlg::enterEvent(QEvent* e)
{ {
if(GroupConstructors->isEnabled()) if(GroupConstructors->isEnabled())
return; return;
ActivateThisDialog() ; this->ActivateThisDialog();
return ;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_BndBoxDlg::closeEvent( QCloseEvent* e )
{
/* same than click on cancel button */
this->ClickOnCancel() ;
return; return;
} }
@ -451,33 +210,34 @@ void MeasureGUI_BndBoxDlg::closeEvent( QCloseEvent* e )
//================================================================================= //=================================================================================
void MeasureGUI_BndBoxDlg::CalculateAndDisplayBndBox(const TopoDS_Shape& S) void MeasureGUI_BndBoxDlg::CalculateAndDisplayBndBox(const TopoDS_Shape& S)
{ {
LineEdit_MinX->setText("") ; GroupC1->LineEdit11->setText("");
LineEdit_MinY->setText("") ; GroupC1->LineEdit12->setText("");
LineEdit_MinZ->setText("") ; GroupC1->LineEdit21->setText("");
LineEdit_MaxX->setText("") ; GroupC1->LineEdit22->setText("");
LineEdit_MaxY->setText("") ; GroupC1->LineEdit31->setText("");
LineEdit_MaxZ->setText("") ; GroupC1->LineEdit32->setText("");
if(S.IsNull()) if(S.IsNull())
return; return;
Standard_Real axmin, aymin, azmin, axmax, aymax, azmax; Standard_Real axmin, aymin, azmin, axmax, aymax, azmax;
Bnd_Box B; Bnd_Box B;
try { try {
BRepBndLib::Add(S,B); BRepBndLib::Add(S,B);
B.Get(axmin, aymin, azmin, axmax, aymax, azmax); B.Get(axmin, aymin, azmin, axmax, aymax, azmax);
LineEdit_MinX->setText( tr("%1").arg( axmin, 12, 'f', 6 ) ) ; GroupC1->LineEdit11->setText(tr("%1").arg(axmin, 12, 'f', 6));
LineEdit_MinY->setText( tr("%1").arg( aymin, 12, 'f', 6 ) ) ; GroupC1->LineEdit12->setText(tr("%1").arg(aymin, 12, 'f', 6));
LineEdit_MinZ->setText( tr("%1").arg( azmin, 12, 'f', 6 ) ) ; GroupC1->LineEdit21->setText(tr("%1").arg(azmin, 12, 'f', 6));
LineEdit_MaxX->setText( tr("%1").arg( axmax, 12, 'f', 6 ) ) ; GroupC1->LineEdit22->setText(tr("%1").arg(axmax, 12, 'f', 6));
LineEdit_MaxY->setText( tr("%1").arg( aymax, 12, 'f', 6 ) ) ; GroupC1->LineEdit31->setText(tr("%1").arg(aymax, 12, 'f', 6));
LineEdit_MaxZ->setText( tr("%1").arg( azmax, 12, 'f', 6 ) ) ; GroupC1->LineEdit32->setText(tr("%1").arg(azmax, 12, 'f', 6));
mySimulationTopoDs = BRepPrimAPI_MakeBox( gp_Pnt(axmin,aymin,azmin), mySimulationTopoDs = BRepPrimAPI_MakeBox(gp_Pnt(axmin, aymin, azmin), gp_Pnt(axmax, aymax, azmax)).Shape();
gp_Pnt(axmax,aymax,azmax) ).Shape();
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
} }
catch(Standard_Failure) { catch(Standard_Failure) {
MESSAGE("Catch intercepted in CalculateAndDisplayBndBox()" << endl ) ; MESSAGE("Catch intercepted in CalculateAndDisplayBndBox()");
} }
return; return;
} }

View File

@ -29,26 +29,16 @@
#ifndef DIALOGBOX_BNDBOX_H #ifndef DIALOGBOX_BNDBOX_H
#define DIALOGBOX_BNDBOX_H #define DIALOGBOX_BNDBOX_H
#include "MeasureGUI_Skeleton.h"
#include "MeasureGUI_1Sel6LineEdit_QTD.h"
#include "MeasureGUI.h" #include "MeasureGUI.h"
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
//================================================================================= //=================================================================================
// class : DialogBox_PROPERTIES // class : DialogBox_PROPERTIES
// purpose : // purpose :
//================================================================================= //=================================================================================
class MeasureGUI_BndBoxDlg : public QDialog class MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton
{ {
Q_OBJECT Q_OBJECT
@ -57,62 +47,18 @@ public:
~MeasureGUI_BndBoxDlg(); ~MeasureGUI_BndBoxDlg();
private: private:
void Init();
void Init( SALOME_Selection* Sel ) ; void enterEvent(QEvent* e);
void closeEvent( QCloseEvent* e ) ;
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
void CalculateAndDisplayBndBox(const TopoDS_Shape& S); void CalculateAndDisplayBndBox(const TopoDS_Shape& S);
GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */ MeasureGUI_1Sel6LineEdit_QTD* GroupC1;
GEOMContext* myGeomGUI ; /* Current GeomGUI object */
GEOMBase* myGeomBase ; /* Current GeomGUI object */
SALOME_Selection* mySelection ; /* User shape selection */
int myConstructorId ; /* Current constructor id = radio button id */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
TopoDS_Shape mySimulationTopoDs ; /* Shape used for simulation display */
QButtonGroup* GroupConstructors;
QRadioButton* Constructor1;
QGroupBox* GroupConstructor1;
QLineEdit* LineEditC1A1;
QPushButton* SelectButtonC1A1;
QLabel* TextLabelC1A1;
QLabel* TextLabel_Min;
QLabel* TextLabel_Max;
QLabel* TextLabel_X;
QLabel* TextLabel_Y;
QLabel* TextLabel_Z;
QLineEdit* LineEdit_MinX;
QLineEdit* LineEdit_MinY;
QLineEdit* LineEdit_MinZ;
QLineEdit* LineEdit_MaxX;
QLineEdit* LineEdit_MaxY;
QLineEdit* LineEdit_MaxZ;
QGroupBox* GroupButtons;
QPushButton* buttonApply;
QPushButton* buttonOk;
QPushButton* buttonCancel;
private slots: private slots:
void ConstructorsClicked(int constructorId);
void ClickOnCancel();
void SetEditCurrentArgument(); void SetEditCurrentArgument();
void LineEditReturnPressed() ;
void SelectionIntoArgument(); void SelectionIntoArgument();
void DeactivateActiveDialog() ; void LineEditReturnPressed();
void ActivateThisDialog(); void ActivateThisDialog();
protected:
QGridLayout* MeasureGUI_BndBoxDlgLayout;
QGridLayout* GroupConstructorsLayout;
QGridLayout* GroupConstructor1Layout;
QGridLayout* GroupButtonsLayout;
}; };
#endif // DIALOGBOX_BNDBOX_H #endif // DIALOGBOX_BNDBOX_H

View File

@ -30,20 +30,9 @@ using namespace std;
#include "MeasureGUI_CenterMassDlg.h" #include "MeasureGUI_CenterMassDlg.h"
#include <BRepBuilderAPI_MakeVertex.hxx> #include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepGProp.hxx>
#include <qbuttongroup.h> #include <GProp_GProps.hxx>
#include <qgroupbox.h> #include <GProp_PrincipalProps.hxx>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qvalidator.h>
#include <qpixmap.h>
//================================================================================= //=================================================================================
// class : MeasureGUI_CenterMassDlg() // class : MeasureGUI_CenterMassDlg()
@ -53,147 +42,36 @@ using namespace std;
// TRUE to construct a modal dialog. // TRUE to construct a modal dialog.
//================================================================================= //=================================================================================
MeasureGUI_CenterMassDlg::MeasureGUI_CenterMassDlg(QWidget* parent, const char* name, MeasureGUI* theMeasureGUI, SALOME_Selection* Sel, bool modal, WFlags fl) MeasureGUI_CenterMassDlg::MeasureGUI_CenterMassDlg(QWidget* parent, const char* name, MeasureGUI* theMeasureGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{ {
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CENTERMASS"))); QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CENTERMASS")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
if ( !name )
setName( "MeasureGUI_CenterMassDlg" );
resize( 398, 219 );
setCaption(tr("GEOM_CMASS_TITLE")); setCaption(tr("GEOM_CMASS_TITLE"));
setSizeGripEnabled( TRUE );
MeasureGUI_CenterMassDlgLayout = new QGridLayout( this );
MeasureGUI_CenterMassDlgLayout->setSpacing( 6 );
MeasureGUI_CenterMassDlgLayout->setMargin( 11 );
/***************************************************************/ /***************************************************************/
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
GroupButtons->setTitle( tr( "" ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
GroupButtons->layout()->setSpacing( 0 );
GroupButtons->layout()->setMargin( 0 );
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CLOSE" ) );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 3 );
buttonApply = new QPushButton( GroupButtons, "buttonApply" );
buttonApply->setText( tr( "GEOM_BUT_APPLY" ) );
buttonApply->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonApply, 0, 1 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer, 0, 2 );
buttonOk = new QPushButton( GroupButtons, "buttonOk" );
buttonOk->setText( tr( "GEOM_BUT_OK" ) );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
MeasureGUI_CenterMassDlgLayout->addWidget( GroupButtons, 2, 0 );
/***************************************************************/
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setTitle(tr("GEOM_CMASS")); GroupConstructors->setTitle(tr("GEOM_CMASS"));
GroupConstructors->setExclusive( TRUE ); RadioButton1->setPixmap(image0);
GroupConstructors->setColumnLayout(0, Qt::Vertical ); RadioButton2->close(TRUE);
GroupConstructors->layout()->setSpacing( 0 ); RadioButton3->close(TRUE);
GroupConstructors->layout()->setMargin( 0 );
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
GroupConstructorsLayout->setSpacing( 6 );
GroupConstructorsLayout->setMargin( 11 );
Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
Constructor1->setText( tr( "" ) );
Constructor1->setPixmap( image0 );
Constructor1->setChecked( TRUE );
Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, Constructor1->sizePolicy().hasHeightForWidth() ) );
Constructor1->setMinimumSize( QSize( 50, 0 ) );
GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupConstructorsLayout->addItem( spacer_2, 0, 1 );
MeasureGUI_CenterMassDlgLayout->addWidget( GroupConstructors, 0, 0 );
GroupC1 = new MeasureGUI_1Sel3LineEdit_QTD(this, "GroupC1");
GroupC1->GroupBox1->setTitle(tr("GEOM_CENTER"));
GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
GroupC1->TextLabel2->setText(tr("GEOM_X"));
GroupC1->TextLabel3->setText(tr("GEOM_Y"));
GroupC1->TextLabel4->setText(tr("GEOM_Z"));
GroupC1->LineEdit2->setReadOnly(TRUE);
GroupC1->LineEdit3->setReadOnly(TRUE);
GroupC1->LineEdit4->setReadOnly(TRUE);
GroupC1->PushButton1->setPixmap(image1);
Layout1->addWidget(GroupC1, 1, 0);
/***************************************************************/ /***************************************************************/
GroupC1 = new QGroupBox( this, "GroupC1" );
GroupC1->setTitle( tr( "GEOM_OBJECT_RESULT" ) ); /* Initialisation */
GroupC1->setMinimumSize( QSize( 0, 0 ) );
GroupC1->setFrameShape( QGroupBox::Box );
GroupC1->setFrameShadow( QGroupBox::Sunken );
GroupC1->setColumnLayout(0, Qt::Vertical );
GroupC1->layout()->setSpacing( 0 );
GroupC1->layout()->setMargin( 0 );
GroupC1Layout = new QGridLayout( GroupC1->layout() );
GroupC1Layout->setAlignment( Qt::AlignTop );
GroupC1Layout->setSpacing( 6 );
GroupC1Layout->setMargin( 11 );
SelectButtonC1A1 = new QPushButton( GroupC1, "SelectButtonC1A1" );
SelectButtonC1A1->setText( tr( "" ) );
SelectButtonC1A1->setPixmap( image1 );
SelectButtonC1A1->setToggleButton( FALSE );
GroupC1Layout->addWidget( SelectButtonC1A1, 0, 1 );
LineEdit_X = new QLineEdit( GroupC1, "LineEdit_X" );
LineEdit_X->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_X->sizePolicy().hasHeightForWidth() ) );
LineEdit_X->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_X->setEnabled( FALSE );
LineEdit_X->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_X, 1, 2 );
TextLabel_Z = new QLabel( GroupC1, "TextLabel_Z" );
TextLabel_Z->setText( tr( "GEOM_Z" ) );
TextLabel_Z->setMinimumSize( QSize( 15, 0 ) );
TextLabel_Z->setFrameShape( QLabel::NoFrame );
TextLabel_Z->setFrameShadow( QLabel::Plain );
TextLabel_Z->setMaximumSize( QSize( 15, 32767 ) );
GroupC1Layout->addWidget( TextLabel_Z, 1, 5 );
LineEdit_Z = new QLineEdit( GroupC1, "LineEdit_Z" );
LineEdit_Z->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_Z->sizePolicy().hasHeightForWidth() ) );
LineEdit_Z->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_Z->setEnabled( FALSE );
LineEdit_Z->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_Z, 1, 6 );
TextLabelC1A1 = new QLabel( GroupC1, "TextLabelC1A1" );
TextLabelC1A1->setText( tr( "GEOM_OBJECT" ) );
TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) );
TextLabelC1A1->setFrameShape( QLabel::NoFrame );
TextLabelC1A1->setFrameShadow( QLabel::Plain );
GroupC1Layout->addWidget( TextLabelC1A1, 0, 0 );
LineEdit_Y = new QLineEdit( GroupC1, "LineEdit_Y" );
LineEdit_Y->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_Y->sizePolicy().hasHeightForWidth() ) );
LineEdit_Y->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_Y->setEnabled( FALSE );
LineEdit_Y->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_Y, 1, 4 );
TextLabel_Y = new QLabel( GroupC1, "TextLabel_Y" );
TextLabel_Y->setText( tr( "GEOM_Y" ) );
TextLabel_Y->setMinimumSize( QSize( 15, 0 ) );
TextLabel_Y->setFrameShape( QLabel::NoFrame );
TextLabel_Y->setFrameShadow( QLabel::Plain );
TextLabel_Y->setMaximumSize( QSize( 15, 32767 ) );
GroupC1Layout->addWidget( TextLabel_Y, 1, 3 );
TextLabel_X = new QLabel( GroupC1, "TextLabel_X" );
TextLabel_X->setText( tr( "GEOM_X" ) );
TextLabel_X->setMinimumSize( QSize( 15, 0 ) );
TextLabel_X->setFrameShape( QLabel::NoFrame );
TextLabel_X->setFrameShadow( QLabel::Plain );
TextLabel_X->setMaximumSize( QSize( 15, 32767 ) );
GroupC1Layout->addWidget( TextLabel_X, 1, 1 );
TextLabel_Center = new QLabel( GroupC1, "TextLabel_Center" );
TextLabel_Center->setText( tr( "GEOM_CENTER" ) );
TextLabel_Center->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Center->setFrameShape( QLabel::NoFrame );
TextLabel_Center->setFrameShadow( QLabel::Plain );
GroupC1Layout->addWidget( TextLabel_Center, 1, 0 );
LineEditC1A1 = new QLineEdit( GroupC1, "LineEditC1A1" );
LineEditC1A1->setMinimumSize( QSize( 260, 0 ) );
GroupC1Layout->addMultiCellWidget( LineEditC1A1, 0, 0, 2, 6 );
MeasureGUI_CenterMassDlgLayout->addWidget( GroupC1, 1, 0 );
/***************************************************************/
myMeasureGUI = theMeasureGUI; myMeasureGUI = theMeasureGUI;
Init(Sel) ; /* Initialisations */ Init();
} }
@ -207,92 +85,34 @@ MeasureGUI_CenterMassDlg::~MeasureGUI_CenterMassDlg()
} }
//================================================================================= //=================================================================================
// function : Init() // function : Init()
// purpose : // purpose :
//================================================================================= //=================================================================================
void MeasureGUI_CenterMassDlg::Init( SALOME_Selection* Sel ) void MeasureGUI_CenterMassDlg::Init()
{ {
LineEdit_X->setMaxLength( 9 ); /* init variables */
LineEdit_Y->setMaxLength( 9 ); myEditCurrentArgument = GroupC1->LineEdit1;
LineEdit_Z->setMaxLength( 9 );
QDoubleValidator *Va = new QDoubleValidator( -999999, +999999, 3, LineEdit_X ) ;
QDoubleValidator *Vb = new QDoubleValidator( -999999, +999999, 3, LineEdit_Y ) ;
QDoubleValidator *Vc = new QDoubleValidator( -999999, +999999, 3, LineEdit_Z ) ;
LineEdit_X->setValidator( Va ) ;
LineEdit_Y->setValidator( Vb ) ;
LineEdit_Z->setValidator( Vc ) ;
myConstructorId = 0 ;
LineEdit_X->setText("") ;
LineEdit_Y->setText("") ;
LineEdit_Z->setText("") ;
Constructor1->setChecked( TRUE );
myEditCurrentArgument = LineEditC1A1 ;
mySelection = Sel;
myGeomBase = new GEOMBase() ;
myGeomGUI = GEOMContext::GetGeomGUI() ;
myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ;
mySimulationTopoDs.Nullify() ;
myShape.Nullify() ;
myOkCenterMass = false; myOkCenterMass = false;
// TODO : previous selection into argument ?
/* Filter definitions */
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
myGeom = GEOM::GEOM_Gen::_narrow(comp);
/* signals and slots connections */ /* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ;
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) );
connect( SelectButtonC1A1, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ; connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
connect( myGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ) ; /* displays Dialog */
/* to close dialog if study change */ GroupC1->show();
connect( myGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ; this->show();
/* Move widget on the botton right corner of main widget */
int x, y ;
myGeomBase->DefineDlgPosition( this, x, y ) ;
this->move( x, y ) ;
this->show() ; /* displays Dialog */
return; return;
} }
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void MeasureGUI_CenterMassDlg::ConstructorsClicked(int constructorId)
{
return ;
}
//=================================================================================
// function : ClickOnCancel()
// purpose :
//=================================================================================
void MeasureGUI_CenterMassDlg::ClickOnCancel()
{
myGeomBase->EraseSimulationShape() ;
mySimulationTopoDs.Nullify() ;
disconnect( mySelection, 0, this, 0 );
myGeomGUI->ResetState() ;
reject() ;
return ;
}
//================================================================================= //=================================================================================
// function : ClickOnOk() // function : ClickOnOk()
// purpose : // purpose :
@ -300,29 +120,29 @@ void MeasureGUI_CenterMassDlg::ClickOnCancel()
void MeasureGUI_CenterMassDlg::ClickOnOk() void MeasureGUI_CenterMassDlg::ClickOnOk()
{ {
this->ClickOnApply(); this->ClickOnApply();
this->ClickOnCancel() ; ClickOnCancel();
return; return;
} }
//================================================================================= //=================================================================================
// function : ClickOnApply() // function : ClickOnApply()
// purpose : // purpose :
//================================================================================= //=================================================================================
void MeasureGUI_CenterMassDlg::ClickOnApply() void MeasureGUI_CenterMassDlg::ClickOnApply()
{ {
myGeomGUI->GetDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;
myGeomBase->EraseSimulationShape(); myGeomBase->EraseSimulationShape();
mySimulationTopoDs.Nullify(); mySimulationTopoDs.Nullify();
myGeomGUI->GetDesktop()->putInfo( tr("") ) ;
if( myOkCenterMass) { if(myOkCenterMass)
myMeasureGUI->MakeCDGAndDisplay(myGeomShape); myMeasureGUI->MakeCDGAndDisplay(myGeomShape);
}
return; return;
} }
//================================================================================= //=================================================================================
// function : SelectionIntoArgument() // function : SelectionIntoArgument()
// purpose : Called when selection as changed or other case // purpose : Called when selection as changed or other case
@ -331,33 +151,31 @@ void MeasureGUI_CenterMassDlg::SelectionIntoArgument()
{ {
myGeomBase->EraseSimulationShape(); myGeomBase->EraseSimulationShape();
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
QString aString = "";
myOkCenterMass = false; myOkCenterMass = false;
Standard_Boolean testResult ; GroupC1->LineEdit2->setText("");
GroupC1->LineEdit3->setText("");
LineEdit_X->setText("") ; GroupC1->LineEdit4->setText("");
LineEdit_Y->setText("") ;
LineEdit_Z->setText("") ;
QString aString = ""; /* future the name of selection */
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
if ( nbSel != 1 ) { if(nbSel != 1)
return; return;
}
/* nbSel == 1 */ /* nbSel == 1 */
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
if(!myGeomBase->GetTopoFromSelection(mySelection, this->myShape)) if(!myGeomBase->GetTopoFromSelection(mySelection, this->myShape))
return; return;
Standard_Boolean testResult;
myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult) if(!testResult)
return; return;
myEditCurrentArgument->setText(aString) ;
if( this->CalculateAndDisplayCenterMass() ) {
myOkCenterMass = true ;
}
myEditCurrentArgument->setText(aString);
if(this->CalculateAndDisplayCenterMass())
myOkCenterMass = true;
return; return;
} }
@ -369,21 +187,15 @@ void MeasureGUI_CenterMassDlg::SelectionIntoArgument()
void MeasureGUI_CenterMassDlg::SetEditCurrentArgument() void MeasureGUI_CenterMassDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
switch (myConstructorId)
{ if(send == GroupC1->PushButton1) {
case 0: /* default constructor */ GroupC1->LineEdit1->setFocus();
{ myEditCurrentArgument = GroupC1->LineEdit1;
if(send == SelectButtonC1A1) {
LineEditC1A1->setFocus() ;
myEditCurrentArgument = LineEditC1A1;
}
SelectionIntoArgument() ;
break;
}
}
return ;
} }
this->SelectionIntoArgument();
return;
}
//================================================================================= //=================================================================================
@ -393,36 +205,12 @@ void MeasureGUI_CenterMassDlg::SetEditCurrentArgument()
void MeasureGUI_CenterMassDlg::LineEditReturnPressed() void MeasureGUI_CenterMassDlg::LineEditReturnPressed()
{ {
QLineEdit* send = (QLineEdit*)sender(); QLineEdit* send = (QLineEdit*)sender();
if( send == LineEditC1A1 ) if(send == GroupC1->LineEdit1)
myEditCurrentArgument = LineEditC1A1 ; myEditCurrentArgument = GroupC1->LineEdit1;
else else
return; return;
/* User name of object input management */ GEOMBase_Skeleton::LineEditReturnPressed();
/* If successfull the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text() ;
QWidget* thisWidget = (QWidget*)this ;
if( myGeomBase->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) {
myEditCurrentArgument->setText( objectUserName ) ;
}
return ;
}
//=================================================================================
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void MeasureGUI_CenterMassDlg::DeactivateActiveDialog()
{
if ( GroupConstructors->isEnabled() ) {
myGeomBase->EraseSimulationShape() ;
disconnect( mySelection, 0, this, 0 );
GroupConstructors->setEnabled(false) ;
GroupC1->setEnabled(false) ;
GroupButtons->setEnabled(false) ;
}
return; return;
} }
@ -433,11 +221,7 @@ void MeasureGUI_CenterMassDlg::DeactivateActiveDialog()
//================================================================================= //=================================================================================
void MeasureGUI_CenterMassDlg::ActivateThisDialog() void MeasureGUI_CenterMassDlg::ActivateThisDialog()
{ {
/* Emit a signal to deactivate the active dialog */ GEOMBase_Skeleton::ActivateThisDialog();
myGeomGUI->EmitSignalDeactivateDialog() ;
GroupConstructors->setEnabled(true) ;
GroupC1->setEnabled(true) ;
GroupButtons->setEnabled(true) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
@ -453,19 +237,7 @@ void MeasureGUI_CenterMassDlg::enterEvent(QEvent* e)
{ {
if(GroupConstructors->isEnabled()) if(GroupConstructors->isEnabled())
return; return;
ActivateThisDialog() ; this->ActivateThisDialog();
return ;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_CenterMassDlg::closeEvent( QCloseEvent* e )
{
/* same than click on cancel button */
this->ClickOnCancel() ;
return; return;
} }
@ -480,37 +252,35 @@ bool MeasureGUI_CenterMassDlg::CalculateAndDisplayCenterMass()
mySimulationTopoDs.Nullify(); mySimulationTopoDs.Nullify();
try { try {
QString resString; QString resString;
GProp_GProps System; GProp_GProps System;
if ( this->myShape.ShapeType() == TopAbs_VERTEX) { if(myShape.ShapeType() == TopAbs_VERTEX)
myGeomBase->VertexToPoint( this->myShape, this->myCenterMass ); myGeomBase->VertexToPoint(myShape, myCenterMass);
else if(myShape.ShapeType() == TopAbs_EDGE || myShape.ShapeType() == TopAbs_WIRE) {
BRepGProp::LinearProperties(myShape, System);
myCenterMass = System.CentreOfMass();
} }
else if ( this->myShape.ShapeType() == TopAbs_EDGE || this->myShape.ShapeType() == TopAbs_WIRE ) { else if(myShape.ShapeType() == TopAbs_FACE || myShape.ShapeType() == TopAbs_SHELL) {
BRepGProp::LinearProperties(this->myShape, System); BRepGProp::SurfaceProperties(myShape, System);
this->myCenterMass = System.CentreOfMass() ; myCenterMass = System.CentreOfMass();
}
else if ( this->myShape.ShapeType() == TopAbs_FACE || this->myShape.ShapeType() == TopAbs_SHELL ) {
BRepGProp::SurfaceProperties(this->myShape, System);
this->myCenterMass = System.CentreOfMass() ;
} }
else { else {
BRepGProp::VolumeProperties(this->myShape, System); BRepGProp::VolumeProperties(myShape, System);
this->myCenterMass = System.CentreOfMass() ; myCenterMass = System.CentreOfMass();
} }
BRepBuilderAPI_MakeVertex V(this->myCenterMass) ; BRepBuilderAPI_MakeVertex V(myCenterMass);
mySimulationTopoDs = V.Shape(); mySimulationTopoDs = V.Shape();
resString = tr("%1").arg(myCenterMass.X(), 12, 'f', 6); resString = tr("%1").arg(myCenterMass.X(), 12, 'f', 6);
LineEdit_X->setText(resString) ; GroupC1->LineEdit2->setText(resString);
resString = tr("%1").arg(myCenterMass.Y(), 12, 'f', 6); resString = tr("%1").arg(myCenterMass.Y(), 12, 'f', 6);
LineEdit_Y->setText(resString) ; GroupC1->LineEdit3->setText(resString);
resString = tr("%1").arg(myCenterMass.Z(), 12, 'f', 6); resString = tr("%1").arg(myCenterMass.Z(), 12, 'f', 6);
LineEdit_Z->setText(resString) ; GroupC1->LineEdit4->setText(resString);
if(!mySimulationTopoDs.IsNull()) { if(!mySimulationTopoDs.IsNull()) {
@ -519,7 +289,7 @@ bool MeasureGUI_CenterMassDlg::CalculateAndDisplayCenterMass()
} }
} }
catch(Standard_Failure) { catch(Standard_Failure) {
MESSAGE("Catch intercepted in CalculateAndDisplayCenterMass()" << endl ) ; MESSAGE("Catch intercepted in CalculateAndDisplayCenterMass()");
} }
return false; return false;
} }

View File

@ -28,30 +28,16 @@
#ifndef DIALOGBOX_CMASS_H #ifndef DIALOGBOX_CMASS_H
#define DIALOGBOX_CMASS_H #define DIALOGBOX_CMASS_H
#include "GEOMBase_Skeleton.h"
#include "MeasureGUI_1Sel3LineEdit_QTD.h"
#include "MeasureGUI.h" #include "MeasureGUI.h"
#include <BRepGProp.hxx>
#include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx>
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
//================================================================================= //=================================================================================
// class : MeasureGUI_CenterMassDlg // class : MeasureGUI_CenterMassDlg
// purpose : // purpose :
//================================================================================= //=================================================================================
class MeasureGUI_CenterMassDlg : public QDialog class MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton
{ {
Q_OBJECT Q_OBJECT
@ -60,61 +46,27 @@ public:
~MeasureGUI_CenterMassDlg(); ~MeasureGUI_CenterMassDlg();
private: private:
MeasureGUI* myMeasureGUI; void Init();
void Init( SALOME_Selection* Sel ) ; void enterEvent(QEvent* e);
void closeEvent( QCloseEvent* e ) ;
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
bool CalculateAndDisplayCenterMass(); bool CalculateAndDisplayCenterMass();
GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */ MeasureGUI* myMeasureGUI;
GEOMBase* myGeomBase ; /* Current GeomGUI object */
GEOMContext* myGeomGUI ; /* Current GeomGUI object */
SALOME_Selection* mySelection ; /* User shape selection */
TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */
GEOM::GEOM_Shape_var myGeomShape; /* is myBase */ GEOM::GEOM_Shape_var myGeomShape; /* is myBase */
TopoDS_Shape myShape; /* Shape argument */ TopoDS_Shape myShape; /* Shape argument */
gp_Pnt myCenterMass; gp_Pnt myCenterMass;
bool myOkCenterMass; /* true after center of mass simulation calculation */ bool myOkCenterMass; /* true after center of mass simulation calculation */
int myConstructorId ; /* Current constructor id = radio button id */ MeasureGUI_1Sel3LineEdit_QTD* GroupC1;
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
QGroupBox* GroupButtons;
QPushButton* buttonOk;
QPushButton* buttonCancel;
QPushButton* buttonApply;
QButtonGroup* GroupConstructors;
QRadioButton* Constructor1;
QGroupBox* GroupC1;
QPushButton* SelectButtonC1A1;
QLineEdit* LineEdit_X;
QLabel* TextLabel_Z;
QLineEdit* LineEdit_Z;
QLabel* TextLabelC1A1;
QLineEdit* LineEdit_Y;
QLabel* TextLabel_Y;
QLabel* TextLabel_X;
QLabel* TextLabel_Center;
QLineEdit* LineEditC1A1;
private slots: private slots:
void ConstructorsClicked(int constructorId);
void ClickOnCancel();
void ClickOnOk(); void ClickOnOk();
void ClickOnApply(); void ClickOnApply();
void SetEditCurrentArgument(); void SetEditCurrentArgument();
void LineEditReturnPressed() ;
void SelectionIntoArgument(); void SelectionIntoArgument();
void DeactivateActiveDialog() ; void LineEditReturnPressed();
void ActivateThisDialog(); void ActivateThisDialog();
protected:
QGridLayout* MeasureGUI_CenterMassDlgLayout;
QGridLayout* GroupButtonsLayout;
QGridLayout* GroupConstructorsLayout;
QGridLayout* GroupC1Layout;
}; };
#endif // DIALOGBOX_CMASS_H #endif // DIALOGBOX_CMASS_H

View File

@ -1,398 +0,0 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : MeasureGUI_CheckShape.cxx
// Author : Nicolas REJNERI
// Module : GEOM
// $Header$
using namespace std;
#include "MeasureGUI_CheckShape.h"
// Open Cascade Include
#include <BRepCheck_Analyzer.hxx>
// QT Includes
#include <qtextview.h>
#include <qbuttongroup.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
//=================================================================================
// class : MeasureGUI_CheckShape()
// purpose : Constructs a MeasureGUI_CheckShape which is a child of 'parent', with the
// name 'name' and widget flags set to 'f'.
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
//=================================================================================
MeasureGUI_CheckShape::MeasureGUI_CheckShape( QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl )
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
{
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap( "GEOM",tr("ICON_DLG_CHECKSHAPE")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap( "GEOM",tr("ICON_SELECT")));
if ( !name )
setName( "DialogBox_CHECKSHAPE" );
resize( 303, 275 );
setCaption( tr( "GEOM_CHECK_TITLE" ) );
setSizeGripEnabled( TRUE );
MeasureGUI_CheckShapeLayout = new QGridLayout( this );
MeasureGUI_CheckShapeLayout->setSpacing( 6 );
MeasureGUI_CheckShapeLayout->setMargin( 11 );
/***************************************************************/
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setTitle( tr( "GEOM_CHECK_SHAPE" ) );
GroupConstructors->setExclusive( TRUE );
GroupConstructors->setColumnLayout(0, Qt::Vertical );
GroupConstructors->layout()->setSpacing( 0 );
GroupConstructors->layout()->setMargin( 0 );
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
GroupConstructorsLayout->setSpacing( 6 );
GroupConstructorsLayout->setMargin( 11 );
Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
Constructor1->setText( tr( "" ) );
Constructor1->setPixmap( image0 );
Constructor1->setChecked( TRUE );
Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
Constructor1->sizePolicy().hasHeightForWidth() ) );
Constructor1->setMinimumSize( QSize( 60, 0 ) );
GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupConstructorsLayout->addItem( spacer, 0, 1 );
MeasureGUI_CheckShapeLayout->addWidget( GroupConstructors, 0, 0 );
/***************************************************************/
GroupConstructor1 = new QGroupBox( this, "GroupConstructor1" );
GroupConstructor1->setTitle( tr( "GEOM_CHECK_INFOS") );
GroupConstructor1->setColumnLayout(0, Qt::Vertical );
GroupConstructor1->layout()->setSpacing( 0 );
GroupConstructor1->layout()->setMargin( 0 );
GroupConstructor1Layout = new QGridLayout( GroupConstructor1->layout() );
GroupConstructor1Layout->setAlignment( Qt::AlignTop );
GroupConstructor1Layout->setSpacing( 6 );
GroupConstructor1Layout->setMargin( 11 );
LineEditC1A1 = new QLineEdit( GroupConstructor1, "LineEditC1A1" );
LineEditC1A1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A1->sizePolicy().hasHeightForWidth() ) );
GroupConstructor1Layout->addWidget( LineEditC1A1, 0, 2 );
SelectButtonC1A1 = new QPushButton( GroupConstructor1, "SelectButtonC1A1" );
SelectButtonC1A1->setText( tr( "" ) );
SelectButtonC1A1->setPixmap( image1 );
GroupConstructor1Layout->addWidget( SelectButtonC1A1, 0, 1 );
TextLabelC1A1 = new QLabel( GroupConstructor1, "TextLabelC1A1" );
TextLabelC1A1->setText( tr( "GEOM_OBJECTS" ) );
TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) );
TextLabelC1A1->setFrameShape( QLabel::NoFrame );
TextLabelC1A1->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabelC1A1, 0, 0 );
Text = new QTextView(GroupConstructor1);
Text->setTextFormat( Qt::PlainText );
GroupConstructor1Layout->addMultiCellWidget( Text, 1, 1, 0, 2 );
MeasureGUI_CheckShapeLayout->addWidget( GroupConstructor1, 1, 0 );
/***************************************************************/
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
GroupButtons->setTitle( tr( "" ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
GroupButtons->layout()->setSpacing( 0 );
GroupButtons->layout()->setMargin( 0 );
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CLOSE" ) );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 1 );
// buttonApply = new QPushButton( GroupButtons, "buttonApply" );
// buttonApply->setText( tr( "GEOM_BUT_APPLY" ) );
// buttonApply->setAutoDefault( TRUE );
// GroupButtonsLayout->addWidget( buttonApply, 0, 1 );
QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_8, 0, 0 );
QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_9, 0, 2 );
// buttonOk = new QPushButton( GroupButtons, "buttonOk" );
// buttonOk->setText( tr( "GEOM_BUT_OK" ) );
// buttonOk->setAutoDefault( TRUE );
// buttonOk->setDefault( TRUE );
// GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
MeasureGUI_CheckShapeLayout->addWidget( GroupButtons, 2, 0 );
/***************************************************************/
Init(Sel) ; /* Initialisations */
}
//=================================================================================
// function : ~MeasureGUI_CheckShape()
// purpose : Destroys the object and frees any allocated resources
//=================================================================================
MeasureGUI_CheckShape::~MeasureGUI_CheckShape()
{
// no need to delete child widgets, Qt does it all for us
}
//=================================================================================
// function : Init()
// purpose :
//=================================================================================
void MeasureGUI_CheckShape::Init( SALOME_Selection* Sel )
{
myConstructorId = 0 ;
Constructor1->setChecked( TRUE );
myEditCurrentArgument = LineEditC1A1 ;
mySelection = Sel;
myGeomBase = new GEOMBase() ;
myGeomGUI = GEOMContext::GetGeomGUI() ;
myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ;
// TODO : previous selection into argument ?
/* Filter definitions */
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
myGeom = GEOM::GEOM_Gen::_narrow(comp);
/* signals and slots connections */
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ;
connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) );
connect( SelectButtonC1A1, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
connect( LineEditC1A1, SIGNAL ( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ;
connect( myGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ) ;
/* to close dialog if study change */
connect( myGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ;
SelectedName = "";
/* Move widget on the botton right corner of main widget */
int x, y ;
myGeomBase->DefineDlgPosition( this, x, y ) ;
this->move( x, y ) ;
this->show() ; /* displays Dialog */
return ;
}
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void MeasureGUI_CheckShape::ConstructorsClicked(int constructorId)
{
return ;
}
//=================================================================================
// function : ClickOnCancel()
// purpose :
//=================================================================================
void MeasureGUI_CheckShape::ClickOnCancel()
{
disconnect( mySelection, 0, this, 0 );
myGeomGUI->ResetState() ;
reject() ;
return ;
}
//=================================================================================
// function : SelectionIntoArgument()
// purpose : Called when selection as changed or other case
//=================================================================================
void MeasureGUI_CheckShape::SelectionIntoArgument()
{
Text->setText("") ;
myEditCurrentArgument->setText("") ;
SelectedName = ""; /* future the name of selection */
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, SelectedName) ;
if ( nbSel != 1 ) {
return ;
}
/* nbSel == 1 */
TopoDS_Shape S;
if( !myGeomBase->GetTopoFromSelection(mySelection, S) )
return ;
if( S.IsNull() ) {
myEditCurrentArgument->setText( "" );
return ;
}
LineEditC1A1->setText(SelectedName) ;
this->Check(S) ;
return ;
}
//=================================================================================
// function : SetEditCurrentArgument()
// purpose :
//=================================================================================
void MeasureGUI_CheckShape::SetEditCurrentArgument()
{
QPushButton* send = (QPushButton*)sender();
switch (myConstructorId)
{
case 0: /* default constructor */
{
if(send == SelectButtonC1A1) {
LineEditC1A1->setFocus() ;
myEditCurrentArgument = LineEditC1A1;
}
SelectionIntoArgument() ;
break;
}
}
return ;
}
//=================================================================================
// function : LineEditReturnPressed()
// purpose :
//=================================================================================
void MeasureGUI_CheckShape::LineEditReturnPressed()
{
QLineEdit* send = (QLineEdit*)sender();
if( send == LineEditC1A1 )
myEditCurrentArgument = LineEditC1A1 ;
else
return ;
/* User name of object input management */
/* If successfull the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text() ;
QWidget* thisWidget = (QWidget*)this ;
if( myGeomBase->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) {
myEditCurrentArgument->setText( objectUserName ) ;
}
return ;
}
//=================================================================================
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void MeasureGUI_CheckShape::DeactivateActiveDialog()
{
if ( GroupConstructors->isEnabled() ) {
disconnect( mySelection, 0, this, 0 );
GroupConstructors->setEnabled(false) ;
GroupConstructor1->setEnabled(false) ;
GroupButtons->setEnabled(false) ;
}
return ;
}
//=================================================================================
// function : ActivateThisDialog()
// purpose :
//=================================================================================
void MeasureGUI_CheckShape::ActivateThisDialog()
{
/* Emit a signal to deactivate the active dialog */
myGeomGUI->EmitSignalDeactivateDialog() ;
GroupConstructors->setEnabled(true) ;
GroupConstructor1->setEnabled(true) ;
GroupButtons->setEnabled(true) ;
connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
return ;
}
//=================================================================================
// function : enterEvent()
// purpose :
//=================================================================================
void MeasureGUI_CheckShape::enterEvent(QEvent* e)
{
if ( GroupConstructors->isEnabled() )
return ;
ActivateThisDialog() ;
return ;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_CheckShape::closeEvent( QCloseEvent* e )
{
/* same than click on cancel button */
this->ClickOnCancel() ;
return ;
}
//=================================================================================
// function : Check()
// purpose :
//=================================================================================
void MeasureGUI_CheckShape::Check(const TopoDS_Shape S)
{
if( S.IsNull() )
return ;
try {
BRepCheck_Analyzer ana(S,false);
if (ana.IsValid())
Text->setText( "This Shape seems to be valid." );
else
Text->setText( "This Shape is not valid." );
}
catch(Standard_Failure) {
MESSAGE("Catch intercepted in Check()" << endl ) ;
}
return ;
}

View File

@ -1,107 +0,0 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : MeasureGUI_CheckShape.h
// Author : Nicolas REJNERI
// Module : GEOM
// $Header$
#ifndef DIALOGBOX_CHECKSHAPE_H
#define DIALOGBOX_CHECKSHAPE_H
#include "MeasureGUI.h"
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QTextView;
//=================================================================================
// class : MeasureGUI_CheckShape
// purpose :
//=================================================================================
class MeasureGUI_CheckShape : public QDialog
{
Q_OBJECT
public:
MeasureGUI_CheckShape( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
~MeasureGUI_CheckShape();
private:
void Init( SALOME_Selection* Sel ) ;
void closeEvent( QCloseEvent* e ) ;
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
void Check(const TopoDS_Shape S) ;
GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */
GEOMBase* myGeomBase ; /* Current GeomGUI object */
GEOMContext* myGeomGUI ; /* Current GeomGUI object */
SALOME_Selection* mySelection ; /* User shape selection */
int myConstructorId ; /* Current constructor id = radio button id */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
QButtonGroup* GroupConstructors;
QRadioButton* Constructor1;
QGroupBox* GroupConstructor1;
QLineEdit* LineEditC1A1;
QPushButton* SelectButtonC1A1;
QLabel* TextLabelC1A1;
QTextView* Text;
QString SelectedName;
QGroupBox* GroupButtons;
QPushButton* buttonApply;
QPushButton* buttonOk;
QPushButton* buttonCancel;
private slots:
void ConstructorsClicked(int constructorId);
void ClickOnCancel();
void SetEditCurrentArgument() ;
void LineEditReturnPressed() ;
void SelectionIntoArgument() ;
void DeactivateActiveDialog() ;
void ActivateThisDialog() ;
protected:
QGridLayout* MeasureGUI_CheckShapeLayout;
QGridLayout* GroupConstructorsLayout;
QGridLayout* GroupConstructor1Layout;
QGridLayout* GroupButtonsLayout;
};
#endif // DIALOGBOX_CHECKSHAPE_H

View File

@ -0,0 +1,209 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : MeasureGUI_CheckShapeDlg.cxx
// Author : Nicolas REJNERI
// Module : GEOM
// $Header$
using namespace std;
#include "MeasureGUI_CheckShapeDlg.h"
#include <BRepCheck_Analyzer.hxx>
//=================================================================================
// class : MeasureGUI_CheckShapeDlg()
// purpose : Constructs a MeasureGUI_CheckShapeDlg which is a child of 'parent', with the
// name 'name' and widget flags set to 'f'.
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
//=================================================================================
MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
:MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CHECKSHAPE")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_CHECK_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_CHECK_SHAPE"));
RadioButton1->setPixmap(image0);
GroupC1 = new MeasureGUI_1Sel1TextView_QTD(this, "GroupC1");
GroupC1->GroupBox1->setTitle(tr("GEOM_CHECK_INFOS"));
GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
GroupC1->TextEdit1->setReadOnly(TRUE);
GroupC1->PushButton1->setPixmap(image1);
Layout1->addWidget(GroupC1, 1, 0);
/***************************************************************/
/* Initialisation */
Init();
}
//=================================================================================
// function : ~MeasureGUI_CheckShapeDlg()
// purpose : Destroys the object and frees any allocated resources
//=================================================================================
MeasureGUI_CheckShapeDlg::~MeasureGUI_CheckShapeDlg()
{
// no need to delete child widgets, Qt does it all for us
}
//=================================================================================
// function : Init()
// purpose :
//=================================================================================
void MeasureGUI_CheckShapeDlg::Init()
{
/* init variables */
myEditCurrentArgument = GroupC1->LineEdit1;
/* signals and slots connections */
connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* displays Dialog */
GroupC1->show();
this->show();
return;
}
//=================================================================================
// function : SelectionIntoArgument()
// purpose : Called when selection as changed or other case
//=================================================================================
void MeasureGUI_CheckShapeDlg::SelectionIntoArgument()
{
myEditCurrentArgument->setText("");
SelectedName = ""; /* future the name of selection */
GroupC1->TextEdit1->setText("");
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, SelectedName);
if(nbSel != 1)
return;
/* nbSel == 1 */
TopoDS_Shape S;
if(!myGeomBase->GetTopoFromSelection(mySelection, S))
return;
if(S.IsNull())
return;
myEditCurrentArgument->setText(SelectedName);
this->Check(S);
return;
}
//=================================================================================
// function : SetEditCurrentArgument()
// purpose :
//=================================================================================
void MeasureGUI_CheckShapeDlg::SetEditCurrentArgument()
{
QPushButton* send = (QPushButton*)sender();
if(send == GroupC1->PushButton1) {
GroupC1->LineEdit1->setFocus();
myEditCurrentArgument = GroupC1->LineEdit1;
}
this->SelectionIntoArgument();
return;
}
//=================================================================================
// function : LineEditReturnPressed()
// purpose :
//=================================================================================
void MeasureGUI_CheckShapeDlg::LineEditReturnPressed()
{
QLineEdit* send = (QLineEdit*)sender();
if(send == GroupC1->LineEdit1)
myEditCurrentArgument = GroupC1->LineEdit1;
else
return;
MeasureGUI_Skeleton::LineEditReturnPressed();
return;
}
//=================================================================================
// function : ActivateThisDialog()
// purpose :
//=================================================================================
void MeasureGUI_CheckShapeDlg::ActivateThisDialog()
{
MeasureGUI_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
return;
}
//=================================================================================
// function : enterEvent()
// purpose :
//=================================================================================
void MeasureGUI_CheckShapeDlg::enterEvent(QEvent* e)
{
if(GroupConstructors->isEnabled())
return;
this->ActivateThisDialog();
return;
}
//=================================================================================
// function : Check()
// purpose :
//=================================================================================
void MeasureGUI_CheckShapeDlg::Check(const TopoDS_Shape S)
{
if(S.IsNull())
return;
try {
BRepCheck_Analyzer ana(S,false);
if(ana.IsValid())
GroupC1->TextEdit1->setText("This Shape seems to be valid.");
else
GroupC1->TextEdit1->setText("This Shape is not valid.");
}
catch(Standard_Failure) {
MESSAGE("Catch intercepted in Check()");
}
return;
}

View File

@ -0,0 +1,65 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : MeasureGUI_CheckShapeDlg.h
// Author : Nicolas REJNERI
// Module : GEOM
// $Header$
#ifndef DIALOGBOX_CHECKSHAPEDLG_H
#define DIALOGBOX_CHECKSHAPEDLG_H
#include "MeasureGUI_Skeleton.h"
#include "MeasureGUI_1Sel1TextView_QTD.h"
#include "MeasureGUI.h"
//=================================================================================
// class : MeasureGUI_CheckShapeDlg
// purpose :
//=================================================================================
class MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton
{
Q_OBJECT
public:
MeasureGUI_CheckShapeDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
~MeasureGUI_CheckShapeDlg();
private:
void Init();
void enterEvent(QEvent* e);
void Check(const TopoDS_Shape S);
QString SelectedName;
MeasureGUI_1Sel1TextView_QTD* GroupC1;
private slots:
void SetEditCurrentArgument();
void SelectionIntoArgument();
void LineEditReturnPressed();
void ActivateThisDialog();
};
#endif // DIALOGBOX_CHECKSHAPEDLG_H

View File

@ -30,32 +30,15 @@ using namespace std;
#include "MeasureGUI_DistanceDlg.h" #include "MeasureGUI_DistanceDlg.h"
#include "QAD_RightFrame.h" #include "QAD_RightFrame.h"
#include "OCCViewer_Viewer3d.h" #include "OCCViewer_Viewer3d.h"
#include "OCCViewer_ViewFrame.h"
// Open CASCADE Includes #include <BRepExtrema_DistShapeShape.hxx>
#include <AIS_LengthDimension.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx> #include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx> #include <BRepBuilderAPI_MakeVertex.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx> #include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <gce_MakePln.hxx>
// QT Includes #include <Precision.hxx>
#include <qmessagebox.h>
#include <qbuttongroup.h>
#include <qframe.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
#include <qevent.h>
//================================================================================= //=================================================================================
// class : MeasureGUI_DistanceDlg() // class : MeasureGUI_DistanceDlg()
@ -65,122 +48,31 @@ using namespace std;
// TRUE to construct a modal dialog. // TRUE to construct a modal dialog.
//================================================================================= //=================================================================================
MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{ {
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MINDIST"))); QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MINDIST")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
if ( !name )
setName( "MeasureGUI_DistanceDlg" );
resize( 322, 220 );
setCaption(tr("GEOM_MINDIST_TITLE")); setCaption(tr("GEOM_MINDIST_TITLE"));
setSizeGripEnabled( TRUE );
MeasureGUI_DistanceDlgLayout = new QGridLayout( this );
MeasureGUI_DistanceDlgLayout->setSpacing( 6 );
MeasureGUI_DistanceDlgLayout->setMargin( 11 );
/***************************************************************/ /***************************************************************/
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setTitle(tr("GEOM_DISTANCE")); GroupConstructors->setTitle(tr("GEOM_DISTANCE"));
GroupConstructors->setExclusive( TRUE ); RadioButton1->setPixmap(image0);
GroupConstructors->setColumnLayout(0, Qt::Vertical );
GroupConstructors->layout()->setSpacing( 0 );
GroupConstructors->layout()->setMargin( 0 );
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
GroupConstructorsLayout->setSpacing( 6 );
GroupConstructorsLayout->setMargin( 11 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupConstructorsLayout->addItem( spacer, 0, 1 );
Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
Constructor1->setText( tr( "" ) );
Constructor1->setPixmap( image0 );
Constructor1->setChecked( TRUE );
Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, Constructor1->sizePolicy().hasHeightForWidth() ) );
GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
MeasureGUI_DistanceDlgLayout->addWidget( GroupConstructors, 0, 0 );
GroupC1 = new MeasureGUI_2Sel1LineEdit_QTD(this, "GroupC1");
GroupC1->GroupBox1->setTitle(tr("GEOM_MINDIST_OBJ"));
GroupC1->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1"));
GroupC1->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2"));
GroupC1->TextLabel3->setText(tr("GEOM_LENGTH"));
GroupC1->LineEdit3->setReadOnly(TRUE);
GroupC1->PushButton1->setPixmap(image1);
GroupC1->PushButton2->setPixmap(image1);
Layout1->addWidget(GroupC1, 1, 0);
/***************************************************************/ /***************************************************************/
GroupConstructor1 = new QGroupBox( this, "GroupConstructor1" );
GroupConstructor1->setTitle( tr( "GEOM_MINDIST_OBJ" ) );
GroupConstructor1->setColumnLayout(0, Qt::Vertical );
GroupConstructor1->layout()->setSpacing( 0 );
GroupConstructor1->layout()->setMargin( 0 );
GroupConstructor1Layout = new QGridLayout( GroupConstructor1->layout() );
GroupConstructor1Layout->setAlignment( Qt::AlignTop );
GroupConstructor1Layout->setSpacing( 6 );
GroupConstructor1Layout->setMargin( 11 );
LineEditC1A2Shape = new QLineEdit( GroupConstructor1, "LineEditC1A2Shape" );
LineEditC1A2Shape->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A2Shape->sizePolicy().hasHeightForWidth() ) );
GroupConstructor1Layout->addWidget( LineEditC1A2Shape, 1, 2 );
LineEditC1A1Shape = new QLineEdit( GroupConstructor1, "LineEditC1A1Shape" );
LineEditC1A1Shape->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A1Shape->sizePolicy().hasHeightForWidth() ) );
GroupConstructor1Layout->addWidget( LineEditC1A1Shape, 0, 2 );
SelectButtonC1A1Shape = new QPushButton( GroupConstructor1, "SelectButtonC1A1Shape" );
SelectButtonC1A1Shape->setText( tr( "" ) );
SelectButtonC1A1Shape->setPixmap( image1 );
GroupConstructor1Layout->addWidget( SelectButtonC1A1Shape, 0, 1 );
SelectButtonC1A2Shape = new QPushButton( GroupConstructor1, "SelectButtonC1A2Shape" );
SelectButtonC1A2Shape->setText( tr( "" ) );
SelectButtonC1A2Shape->setPixmap( image1 );
GroupConstructor1Layout->addWidget( SelectButtonC1A2Shape, 1, 1 );
TextLabelC1A2Shape = new QLabel( GroupConstructor1, "TextLabelC1A2Shape" );
TextLabelC1A2Shape->setText( tr( "GEOM_OBJECT_I" ).arg("2") );
TextLabelC1A2Shape->setMinimumSize( QSize( 50, 0 ) );
TextLabelC1A2Shape->setFrameShape( QLabel::NoFrame );
TextLabelC1A2Shape->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabelC1A2Shape, 1, 0 );
TextLabelC1A1Shape = new QLabel( GroupConstructor1, "TextLabelC1A1Shape" );
TextLabelC1A1Shape->setText( tr( "GEOM_OBJECT_I" ).arg("1") );
TextLabelC1A1Shape->setMinimumSize( QSize( 50, 0 ) );
TextLabelC1A1Shape->setFrameShape( QLabel::NoFrame );
TextLabelC1A1Shape->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabelC1A1Shape, 0, 0 );
MeasureGUI_DistanceDlgLayout->addWidget( GroupConstructor1, 1, 0 );
TextLabel_Length = new QLabel( GroupConstructor1, "TextLabel_Length" );
TextLabel_Length->setText( tr( "GEOM_LENGTH" ) );
TextLabel_Length->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Length->setFrameShape( QLabel::NoFrame );
TextLabel_Length->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Length, 2, 0 );
LineEdit_Length = new QLineEdit( GroupConstructor1, "LineEdit_Length" );
LineEdit_Length->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_Length->sizePolicy().hasHeightForWidth() ) );
// LineEdit_Length->setEnabled( FALSE );
LineEdit_Length->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_Length, 2, 2 );
/***************************************************************/
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
GroupButtons->setTitle( tr( "" ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
GroupButtons->layout()->setSpacing( 0 );
GroupButtons->layout()->setMargin( 0 );
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CLOSE" ) );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 3 );
buttonApply = new QPushButton( GroupButtons, "buttonApply" );
buttonApply->setText( tr( "GEOM_BUT_APPLY" ) );
buttonApply->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonApply, 0, 1 );
QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_9, 0, 2 );
buttonOk = new QPushButton( GroupButtons, "buttonOk" );
buttonOk->setText( tr( "GEOM_BUT_OK" ) );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
MeasureGUI_DistanceDlgLayout->addWidget( GroupButtons, 2, 0 );
/* Initialisation */ /* Initialisation */
Init( Sel ) ; Init();
} }
@ -191,124 +83,37 @@ MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg( QWidget* parent, const char* nam
MeasureGUI_DistanceDlg::~MeasureGUI_DistanceDlg() MeasureGUI_DistanceDlg::~MeasureGUI_DistanceDlg()
{ {
/* no need to delete child widgets, Qt does it all for us */ /* no need to delete child widgets, Qt does it all for us */
this->destroy(TRUE, TRUE) ;
} }
//================================================================================= //=================================================================================
// function : Init() // function : Init()
// purpose : // purpose :
//================================================================================= //=================================================================================
void MeasureGUI_DistanceDlg::Init( SALOME_Selection* Sel ) void MeasureGUI_DistanceDlg::Init()
{ {
mySelection = Sel ; /* init variables */
myShape1.Nullify() ; myEditCurrentArgument = GroupC1->LineEdit1;
myShape2.Nullify() ;
myConstructorId = 0 ;
myGeomGUI = GEOMContext::GetGeomGUI() ;
myGeomBase = new GEOMBase() ;
GroupConstructor1->show();
myConstructorId = 0 ;
myEditCurrentArgument = LineEditC1A1Shape ;
Constructor1->setChecked( TRUE );
myOkShape1 = myOkShape2 = false; myOkShape1 = myOkShape2 = false;
myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ;
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
myGeom = GEOM::GEOM_Gen::_narrow(comp);
// TODO previous selection into argument ?
/* signals and slots connections */ /* signals and slots connections */
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ;
connect( buttonApply, SIGNAL( clicked() ), this, SLOT(ClickOnApply() ) );
connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) );
connect( SelectButtonC1A1Shape, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
connect( SelectButtonC1A2Shape, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
connect( LineEditC1A1Shape, SIGNAL ( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ;
connect( LineEditC1A2Shape, SIGNAL ( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ;
connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
/* to close dialog if study change */
connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
/* Move widget on the botton right corner of main widget */ connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
int x, y ; connect(GroupC1->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
myGeomBase->DefineDlgPosition( this, x, y ) ;
this->move( x, y ) ;
this->show() ; /* Displays Dialog */
return ; connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
} connect(GroupC1->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* displays Dialog */
GroupC1->show();
this->show();
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void MeasureGUI_DistanceDlg::ConstructorsClicked(int constructorId)
{
EraseDistance();
myGeomBase->EraseSimulationShape() ;
switch (constructorId)
{
case 0:
{
GroupConstructor1->show();
myConstructorId = constructorId ;
myEditCurrentArgument = LineEditC1A1Shape ;
LineEditC1A2Shape->setText(tr("")) ;
Constructor1->setChecked( TRUE );
myOkShape1 = myOkShape2 = false ;
break;
}
}
return ;
}
//=================================================================================
// function : ClickOnOk()
// purpose :
//=================================================================================
void MeasureGUI_DistanceDlg::ClickOnOk()
{
this->ClickOnApply() ;
this->ClickOnCancel() ;
return ;
}
//=================================================================================
// function : ClickOnApply()
// purpose :
//=================================================================================
void MeasureGUI_DistanceDlg::ClickOnApply()
{
EraseDistance() ;
myGeomBase->EraseSimulationShape() ;
mySimulationTopoDs.Nullify() ;
myGeomGUI->GetDesktop()->putInfo( tr("") ) ;
switch(myConstructorId)
{
case 0 :
{
if(myOkShape1 && myOkShape2) {
this->MakeDistanceSimulationAndDisplay(myShape1 ,myShape2) ;
}
break ;
}
}
// accept();
return; return;
} }
@ -319,17 +124,12 @@ void MeasureGUI_DistanceDlg::ClickOnApply()
//================================================================================= //=================================================================================
void MeasureGUI_DistanceDlg::ClickOnCancel() void MeasureGUI_DistanceDlg::ClickOnCancel()
{ {
EraseDistance() ; this->EraseDistance();
myGeomBase->EraseSimulationShape() ; MeasureGUI_Skeleton::ClickOnCancel();
mySimulationTopoDs.Nullify() ;
disconnect( mySelection, 0, this, 0 );
myGeomGUI->ResetState() ;
reject() ;
return; return;
} }
//================================================================================= //=================================================================================
// function : SelectionIntoArgument() // function : SelectionIntoArgument()
// purpose : Called when selection has changed // purpose : Called when selection has changed
@ -338,54 +138,48 @@ void MeasureGUI_DistanceDlg::SelectionIntoArgument()
{ {
myGeomBase->EraseSimulationShape(); myGeomBase->EraseSimulationShape();
mySimulationTopoDs.Nullify(); mySimulationTopoDs.Nullify();
this->EraseDistance();
myEditCurrentArgument->setText("");
QString aString = "";
LineEdit_Length->setText("") ; GroupC1->LineEdit3->setText("");
myEditCurrentArgument->setText("") ; /* by default */
QString aString = ""; /* the name of selection */
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
if(nbSel != 1) { if(nbSel != 1) {
switch (myConstructorId) if(myEditCurrentArgument == GroupC1->LineEdit1)
{
case 0:
{
if ( myEditCurrentArgument == LineEditC1A1Shape ) {
myOkShape1 = false; myOkShape1 = false;
} else if(myEditCurrentArgument == GroupC1->LineEdit2)
else if ( myEditCurrentArgument == LineEditC1A2Shape ) {
myOkShape2 = false; myOkShape2 = false;
}
break ;
}
}
return; return;
} }
/* nbSel == 1 */ /* nbSel == 1 */
TopoDS_Shape S; TopoDS_Shape S;
Standard_Boolean testResult ;
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject() ;
if(!myGeomBase->GetTopoFromSelection(mySelection, S)) if(!myGeomBase->GetTopoFromSelection(mySelection, S))
return; return;
if ( myEditCurrentArgument == LineEditC1A1Shape ) { Standard_Boolean testResult;
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
if(myEditCurrentArgument == GroupC1->LineEdit1) {
myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult) if(!testResult)
return; return;
myShape1 = S; myShape1 = S;
LineEditC1A1Shape->setText(aString) ; myEditCurrentArgument->setText(aString);
myOkShape1 = true; myOkShape1 = true;
} }
else if ( myEditCurrentArgument == LineEditC1A2Shape ) { else if(myEditCurrentArgument == GroupC1->LineEdit2) {
myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult) if(!testResult)
return; return;
myShape2 = S; myShape2 = S;
LineEditC1A2Shape->setText(aString) ; myEditCurrentArgument->setText(aString);
myOkShape2 = true; myOkShape2 = true;
} }
if(myOkShape1 && myOkShape2)
this->MakeDistanceSimulationAndDisplay(myShape1 ,myShape2);
return; return;
} }
@ -398,25 +192,18 @@ void MeasureGUI_DistanceDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
switch (myConstructorId) if(send == GroupC1->PushButton1) {
{ GroupC1->LineEdit1->setFocus();
case 0: /* default constructor */ myEditCurrentArgument = GroupC1->LineEdit1;
{
if( send == SelectButtonC1A1Shape ) {
LineEditC1A1Shape->setFocus() ;
myEditCurrentArgument = LineEditC1A1Shape ;
} }
else if(send == SelectButtonC1A2Shape) { else if(send == GroupC1->PushButton2) {
LineEditC1A2Shape->setFocus() ; GroupC1->LineEdit2->setFocus();
myEditCurrentArgument = LineEditC1A2Shape; myEditCurrentArgument = GroupC1->LineEdit2;
}
SelectionIntoArgument() ;
break;
}
}
return ;
} }
this->SelectionIntoArgument();
return;
}
//================================================================================= //=================================================================================
@ -426,88 +213,56 @@ void MeasureGUI_DistanceDlg::SetEditCurrentArgument()
void MeasureGUI_DistanceDlg::LineEditReturnPressed() void MeasureGUI_DistanceDlg::LineEditReturnPressed()
{ {
QLineEdit* send = (QLineEdit*)sender(); QLineEdit* send = (QLineEdit*)sender();
if( send == LineEditC1A1Shape ) if(send == GroupC1->LineEdit1)
myEditCurrentArgument = LineEditC1A1Shape ; myEditCurrentArgument = GroupC1->LineEdit1;
else if ( send == LineEditC1A2Shape ) else if(send == GroupC1->LineEdit2)
myEditCurrentArgument = LineEditC1A2Shape ; myEditCurrentArgument = GroupC1->LineEdit2;
else else
return; return;
/* User name of object input management */ MeasureGUI_Skeleton::LineEditReturnPressed();
/* If successfull the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text() ;
QWidget* thisWidget = (QWidget*)this ;
if( myGeomBase->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) {
myEditCurrentArgument->setText( objectUserName ) ;
}
return; return;
} }
//=================================================================================
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void MeasureGUI_DistanceDlg::DeactivateActiveDialog()
{
if ( GroupConstructors->isEnabled() ) {
GroupConstructors->setEnabled(false) ;
GroupConstructor1->setEnabled(false) ;
GroupButtons->setEnabled(false) ;
disconnect( mySelection, 0, this, 0 );
}
return ;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_DistanceDlg::closeEvent( QCloseEvent* e )
{
this->ClickOnCancel() ; /* same than click on cancel button */
}
//=================================================================================
// function : enterEvent()
// purpose : when mouse enter onto the QWidget
//=================================================================================
void MeasureGUI_DistanceDlg::enterEvent( QEvent * )
{
if ( GroupConstructors->isEnabled() )
return ;
ActivateThisDialog() ;
}
//================================================================================= //=================================================================================
// function : ActivateThisDialog() // function : ActivateThisDialog()
// purpose : // purpose :
//================================================================================= //=================================================================================
void MeasureGUI_DistanceDlg::ActivateThisDialog() void MeasureGUI_DistanceDlg::ActivateThisDialog()
{ {
/* Emit a signal to deactivate any active dialog */ MeasureGUI_Skeleton::ActivateThisDialog();
myGeomGUI->EmitSignalDeactivateDialog() ;
GroupConstructors->setEnabled(true) ;
GroupConstructor1->setEnabled(true) ;
GroupButtons->setEnabled(true) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;
} }
//=================================================================================
// function : enterEvent()
// purpose : when mouse enter onto the QWidget
//=================================================================================
void MeasureGUI_DistanceDlg::enterEvent(QEvent* e)
{
if(GroupConstructors->isEnabled())
return;
this->ActivateThisDialog();
return;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_DistanceDlg::closeEvent(QCloseEvent* e)
{
/* same than click on cancel button */
this->ClickOnCancel();
return;
}
//================================================================================= //=================================================================================
// function : MakeDistanceSimulationAndDisplay() // function : MakeDistanceSimulationAndDisplay()
@ -515,26 +270,33 @@ void MeasureGUI_DistanceDlg::ActivateThisDialog()
//================================================================================= //=================================================================================
void MeasureGUI_DistanceDlg::MakeDistanceSimulationAndDisplay(const TopoDS_Shape& S1, const TopoDS_Shape& S2) void MeasureGUI_DistanceDlg::MakeDistanceSimulationAndDisplay(const TopoDS_Shape& S1, const TopoDS_Shape& S2)
{ {
LineEdit_Length->setText("") ;
EraseDistance() ;
myGeomBase->EraseSimulationShape(); myGeomBase->EraseSimulationShape();
mySimulationTopoDs.Nullify();
GroupC1->LineEdit3->setText("");
BRepExtrema_DistShapeShape dst(S1, S2); BRepExtrema_DistShapeShape dst(S1, S2);
try {
if(dst.IsDone()) { if(dst.IsDone()) {
int i;
for (i=1; i<= dst.NbSolution(); i++) {
gp_Pnt P1, P2; gp_Pnt P1, P2;
Standard_Real Dist = 1.e9;
for(int i = 1; i <= dst.NbSolution(); i++) {
P1 = (dst.PointOnShape1(i)); P1 = (dst.PointOnShape1(i));
P2 = (dst.PointOnShape2(i)); P2 = (dst.PointOnShape2(i));
Standard_Real Dist = P1.Distance(P2); Standard_Real MinDist = P1.Distance(P2);
if(Dist > MinDist)
Dist = MinDist;
}
if(Dist <= 1.e-9) { if(Dist <= 1.e-9) {
BRepBuilderAPI_MakeVertex MakeVertex(P1); BRepBuilderAPI_MakeVertex MakeVertex(P1);
mySimulationTopoDs = MakeVertex.Vertex(); mySimulationTopoDs = MakeVertex.Vertex();
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
LineEdit_Length->setText("0.0") ; GroupC1->LineEdit3->setText("0.0");
} else { }
else {
BRepBuilderAPI_MakeEdge MakeEdge(P1, P2); BRepBuilderAPI_MakeEdge MakeEdge(P1, P2);
mySimulationTopoDs = MakeEdge.Edge(); mySimulationTopoDs = MakeEdge.Edge();
@ -543,22 +305,38 @@ void MeasureGUI_DistanceDlg::MakeDistanceSimulationAndDisplay(const TopoDS_Shape
QString S; QString S;
S.sprintf("%.1f", Dist); S.sprintf("%.1f", Dist);
Handle(AIS_LengthDimension) Distance = new AIS_LengthDimension (V1,V2, new Geom_Plane (0.,0.,1.,0.),
Dist, TCollection_ExtendedString(strdup(S)));
LineEdit_Length->setText(S) ; gp_Pnt P3;
P3.SetX((P1.X() + P2.X()) / 2);
P3.SetY((P1.Y() + P2.Y()) / 2);
P3.SetZ(((P1.Z() + P2.Z()) / 2) + 100);
gp_Vec va(P3, P1);
gp_Vec vb(P3, P2);
if(va.IsParallel(vb, Precision::Angular())) {
P3.SetY(((P1.Y() + P2.Y()) / 2) + 100);
P3.SetZ(((P1.Z() + P2.Z()) / 2));
}
gce_MakePln gce_MP(P1, P2, P3);
gp_Pln gp_P = gce_MP.Value();
Handle(Geom_Plane) P = new Geom_Plane(gp_P);
if ( myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC ) Handle(AIS_LengthDimension) Distance = new AIS_LengthDimension(V1, V2, P, Dist, TCollection_ExtendedString(strdup(S)));
return ;
GroupC1->LineEdit3->setText(S);
if(myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
ic->Display(Distance); ic->Display(Distance);
ic->UpdateCurrentViewer(); ic->UpdateCurrentViewer();
} }
} }
} else }
myGeomGUI->GetDesktop()->putInfo( tr( "GEOM_PRP_MIN_DIST" ) ); }
catch(Standard_Failure) {
MESSAGE("Catch intercepted in MakeDistanceSimulationAndDisplay()");
}
return;
} }
@ -569,7 +347,7 @@ void MeasureGUI_DistanceDlg::MakeDistanceSimulationAndDisplay(const TopoDS_Shape
void MeasureGUI_DistanceDlg::EraseDistance() void MeasureGUI_DistanceDlg::EraseDistance()
{ {
int count = myGeomGUI->GetActiveStudy()->getStudyFramesCount(); int count = myGeomGUI->GetActiveStudy()->getStudyFramesCount();
for ( int i = 0; i < count; i++ ) for(int i = 0; i < count; i++) {
if (myGeomGUI->GetActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC ) { if (myGeomGUI->GetActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC ) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer(); OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myGeomGUI->GetActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer();
Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
@ -584,3 +362,5 @@ void MeasureGUI_DistanceDlg::EraseDistance()
} }
} }
} }
return;
}

View File

@ -29,31 +29,16 @@
#ifndef DIALOGBOX_DISTANCE_H #ifndef DIALOGBOX_DISTANCE_H
#define DIALOGBOX_DISTANCE_H #define DIALOGBOX_DISTANCE_H
#include "MeasureGUI_Skeleton.h"
#include "MeasureGUI_2Sel1LineEdit_QTD.h"
#include "MeasureGUI.h" #include "MeasureGUI.h"
#include <BRepExtrema_DistShapeShape.hxx>
#include <AIS_LengthDimension.hxx>
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QFrame;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
//================================================================================= //=================================================================================
// class : MeasureGUI_DistanceDlg // class : MeasureGUI_DistanceDlg
// purpose : // purpose :
//================================================================================= //=================================================================================
class MeasureGUI_DistanceDlg : public QDialog class MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton
{ {
Q_OBJECT Q_OBJECT
@ -62,63 +47,28 @@ public:
~MeasureGUI_DistanceDlg(); ~MeasureGUI_DistanceDlg();
private: private:
void Init();
void Init( SALOME_Selection* Sel ) ; void enterEvent(QEvent* e);
void closeEvent(QCloseEvent* e); void closeEvent(QCloseEvent* e);
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
void MakeDistanceSimulationAndDisplay(const TopoDS_Shape& S1, const TopoDS_Shape& S2); void MakeDistanceSimulationAndDisplay(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
void EraseDistance(); void EraseDistance();
GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */
GEOMContext* myGeomGUI ; /* Current GeomGUI object */
GEOMBase* myGeomBase ; /* Current GeomGUI object */
SALOME_Selection* mySelection ; /* User shape selection */
TopoDS_Shape myShape1; TopoDS_Shape myShape1;
TopoDS_Shape myShape2; TopoDS_Shape myShape2;
GEOM::GEOM_Shape_var myGeomShape1; GEOM::GEOM_Shape_var myGeomShape1;
GEOM::GEOM_Shape_var myGeomShape2; GEOM::GEOM_Shape_var myGeomShape2;
bool myOkShape1; bool myOkShape1;
bool myOkShape2; /* to check when arguments are defined */ bool myOkShape2; /* to check when arguments are defined */
int myConstructorId ; /* Current constructor id = radio button id */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */
QButtonGroup* GroupConstructors; MeasureGUI_2Sel1LineEdit_QTD* GroupC1;
QRadioButton* Constructor1;
QGroupBox* GroupConstructor1;
QLineEdit* LineEditC1A1Shape;
QLineEdit* LineEditC1A2Shape;
QPushButton* SelectButtonC1A1Shape;
QPushButton* SelectButtonC1A2Shape;
QLabel* TextLabelC1A2Shape;
QLabel* TextLabelC1A1Shape;
QLabel* TextLabel_Length;
QLineEdit* LineEdit_Length;
QGroupBox* GroupButtons;
QPushButton* buttonApply;
QPushButton* buttonOk;
QPushButton* buttonCancel;
private slots: private slots:
void ConstructorsClicked(int constructorId);
void ClickOnOk();
void ClickOnCancel(); void ClickOnCancel();
void ClickOnApply();
void SetEditCurrentArgument(); void SetEditCurrentArgument();
void SelectionIntoArgument(); void SelectionIntoArgument();
void LineEditReturnPressed(); void LineEditReturnPressed();
void DeactivateActiveDialog() ;
void ActivateThisDialog(); void ActivateThisDialog();
protected:
QGridLayout* MeasureGUI_DistanceDlgLayout;
QGridLayout* GroupConstructorsLayout;
QGridLayout* GroupButtonsLayout;
QGridLayout* GroupConstructor1Layout;
}; };
#endif // DIALOGBOX_DISTANCE_H #endif // DIALOGBOX_DISTANCE_H

View File

@ -28,18 +28,9 @@
using namespace std; using namespace std;
#include "MeasureGUI_InertiaDlg.h" #include "MeasureGUI_InertiaDlg.h"
#include <qbuttongroup.h> #include <BRepGProp.hxx>
#include <qgroupbox.h> #include <GProp_GProps.hxx>
#include <qlabel.h> #include <GProp_PrincipalProps.hxx>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
//================================================================================= //=================================================================================
// class : MeasureGUI_InertiaDlg() // class : MeasureGUI_InertiaDlg()
@ -49,199 +40,43 @@ using namespace std;
// TRUE to construct a modal dialog. // TRUE to construct a modal dialog.
//================================================================================= //=================================================================================
MeasureGUI_InertiaDlg::MeasureGUI_InertiaDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) MeasureGUI_InertiaDlg::MeasureGUI_InertiaDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{ {
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_INERTIA"))); QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_INERTIA")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
if ( !name )
setName( "MeasureGUI_InertiaDlg" );
resize( 356, 303 );
setCaption(tr("GEOM_INERTIA_TITLE")); setCaption(tr("GEOM_INERTIA_TITLE"));
setSizeGripEnabled( TRUE );
MeasureGUI_InertiaDlgLayout = new QGridLayout( this );
MeasureGUI_InertiaDlgLayout->setSpacing( 6 );
MeasureGUI_InertiaDlgLayout->setMargin( 11 );
/***************************************************************/ /***************************************************************/
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setTitle(tr("GEOM_INERTIA_CONSTR")); GroupConstructors->setTitle(tr("GEOM_INERTIA_CONSTR"));
GroupConstructors->setExclusive( TRUE ); RadioButton1->setPixmap(image0);
GroupConstructors->setColumnLayout(0, Qt::Vertical );
GroupConstructors->layout()->setSpacing( 0 );
GroupConstructors->layout()->setMargin( 0 );
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
GroupConstructorsLayout->setSpacing( 6 );
GroupConstructorsLayout->setMargin( 11 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupConstructorsLayout->addItem( spacer, 0, 1 );
Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
Constructor1->setText( tr( "" ) );
Constructor1->setPixmap( image0 );
Constructor1->setChecked( TRUE );
Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, Constructor1->sizePolicy().hasHeightForWidth() ) );
GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
MeasureGUI_InertiaDlgLayout->addWidget( GroupConstructors, 0, 0 );
/***************************************************************/ GroupC1 = new MeasureGUI_1Sel12LineEdit_QTD(this, "GroupC1");
GroupC1 = new QGroupBox( this, "GroupC1" ); GroupC1->GroupBox1->setTitle(tr("GEOM_MATRIX"));
GroupC1->setTitle( tr( "GEOM_OBJECT_RESULT" ) ); GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
GroupC1->setColumnLayout(0, Qt::Vertical ); GroupC1->TextLabel2->setText(tr("GEOM_INERTIA_I").arg("1"));
GroupC1->layout()->setSpacing( 0 ); GroupC1->TextLabel3->setText(tr("GEOM_INERTIA_I").arg("2"));
GroupC1->layout()->setMargin( 0 ); GroupC1->TextLabel4->setText(tr("GEOM_INERTIA_I").arg("3"));
GroupC1Layout = new QGridLayout( GroupC1->layout() ); GroupC1->TextLabel5->setText(tr("GEOM_INERTIA_IXYZ"));
GroupC1Layout->setAlignment( Qt::AlignTop ); GroupC1->LineEdit11->setReadOnly(TRUE);
GroupC1Layout->setSpacing( 6 ); GroupC1->LineEdit12->setReadOnly(TRUE);
GroupC1Layout->setMargin( 11 ); GroupC1->LineEdit13->setReadOnly(TRUE);
TextLabelC1A1 = new QLabel( GroupC1, "TextLabelC1A1" ); GroupC1->LineEdit21->setReadOnly(TRUE);
TextLabelC1A1->setText( tr( "GEOM_OBJECT" ) ); GroupC1->LineEdit22->setReadOnly(TRUE);
TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) ); GroupC1->LineEdit23->setReadOnly(TRUE);
TextLabelC1A1->setFrameShape( QLabel::NoFrame ); GroupC1->LineEdit31->setReadOnly(TRUE);
TextLabelC1A1->setFrameShadow( QLabel::Plain ); GroupC1->LineEdit32->setReadOnly(TRUE);
GroupC1Layout->addWidget( TextLabelC1A1, 0, 0 ); GroupC1->LineEdit33->setReadOnly(TRUE);
SelectButtonC1A1 = new QPushButton( GroupC1, "SelectButtonC1A1" ); GroupC1->LineEdit41->setReadOnly(TRUE);
SelectButtonC1A1->setText( tr( "" ) ); GroupC1->LineEdit42->setReadOnly(TRUE);
SelectButtonC1A1->setPixmap( image1 ); GroupC1->LineEdit43->setReadOnly(TRUE);
GroupC1Layout->addWidget( SelectButtonC1A1, 0, 1 ); GroupC1->PushButton1->setPixmap(image1);
LineEditC1A1 = new QLineEdit( GroupC1, "LineEditC1A1" );
LineEditC1A1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A1->sizePolicy().hasHeightForWidth() ) );
LineEditC1A1->setMinimumSize( QSize( 220, 0 ) );
GroupC1Layout->addMultiCellWidget( LineEditC1A1, 0, 0, 2, 4 );
TextLabel_Matrix = new QLabel( GroupC1, "TextLabel_Matrix" );
TextLabel_Matrix->setText( tr( "GEOM_MATRIX" ) );
TextLabel_Matrix->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Matrix->setFrameShape( QLabel::NoFrame );
TextLabel_Matrix->setFrameShadow( QLabel::Plain );
GroupC1Layout->addWidget( TextLabel_Matrix, 1, 0 );
TextLabelMatrix_11 = new QLabel( GroupC1, "TextLabelMatrix_11" );
TextLabelMatrix_11->setText( tr( "GEOM_INERTIA_I" ).arg("1") );
TextLabelMatrix_11->setMinimumSize( QSize( 0, 0 ) );
TextLabelMatrix_11->setFrameShape( QLabel::NoFrame );
TextLabelMatrix_11->setFrameShadow( QLabel::Plain );
TextLabelMatrix_11->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
GroupC1Layout->addWidget( TextLabelMatrix_11, 1, 1 );
TextLabelMatrix_21 = new QLabel( GroupC1, "TextLabelMatrix_21" );
TextLabelMatrix_21->setText( tr( "GEOM_INERTIA_I" ).arg("2") );
TextLabelMatrix_21->setMinimumSize( QSize( 0, 0 ) );
TextLabelMatrix_21->setFrameShape( QLabel::NoFrame );
TextLabelMatrix_21->setFrameShadow( QLabel::Plain );
TextLabelMatrix_21->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
GroupC1Layout->addWidget( TextLabelMatrix_21, 2, 1 );
TextLabelMatrix_31 = new QLabel( GroupC1, "TextLabelMatrix_31" );
TextLabelMatrix_31->setText( tr( "GEOM_INERTIA_I" ).arg("3") );
TextLabelMatrix_31->setMinimumSize( QSize( 0, 0 ) );
TextLabelMatrix_31->setFrameShape( QLabel::NoFrame );
TextLabelMatrix_31->setFrameShadow( QLabel::Plain );
TextLabelMatrix_31->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
GroupC1Layout->addWidget( TextLabelMatrix_31, 3, 1 );
LineEdit_L1C1 = new QLineEdit( GroupC1, "LineEdit_L1C1" );
LineEdit_L1C1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_L1C1->sizePolicy().hasHeightForWidth() ) );
LineEdit_L1C1->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_L1C1->setEnabled( FALSE );
LineEdit_L1C1->setReadOnly( TRUE );
LineEdit_L1C1->setText( tr( "" ) );
GroupC1Layout->addWidget( LineEdit_L1C1, 1, 2 );
LineEdit_L1C2 = new QLineEdit( GroupC1, "LineEdit_L1C2" );
LineEdit_L1C2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_L1C2->sizePolicy().hasHeightForWidth() ) );
LineEdit_L1C2->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_L1C2->setEnabled( FALSE );
LineEdit_L1C2->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_L1C2, 1, 3 );
LineEdit_L1C3 = new QLineEdit( GroupC1, "LineEdit_L1C3" );
LineEdit_L1C3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_L1C3->sizePolicy().hasHeightForWidth() ) );
LineEdit_L1C3->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_L1C3->setEnabled( FALSE );
LineEdit_L1C3->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_L1C3, 1, 4 );
LineEdit_L2C1 = new QLineEdit( GroupC1, "LineEdit_L2C1" );
LineEdit_L2C1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_L2C1->sizePolicy().hasHeightForWidth() ) );
LineEdit_L2C1->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_L2C1->setEnabled( FALSE );
LineEdit_L2C1->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_L2C1, 2, 2 );
LineEdit_L2C2 = new QLineEdit( GroupC1, "LineEdit_L2C2" );
LineEdit_L2C2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_L2C2->sizePolicy().hasHeightForWidth() ) );
LineEdit_L2C2->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_L2C2->setEnabled( FALSE );
LineEdit_L2C2->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_L2C2, 2, 3 );
LineEdit_L2C3 = new QLineEdit( GroupC1, "LineEdit_L2C3" );
LineEdit_L2C3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_L2C3->sizePolicy().hasHeightForWidth() ) );
LineEdit_L2C3->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_L2C3->setEnabled( FALSE );
LineEdit_L2C3->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_L2C3, 2, 4 );
LineEdit_L3C1 = new QLineEdit( GroupC1, "LineEdit_L3C1" );
LineEdit_L3C1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_L3C1->sizePolicy().hasHeightForWidth() ) );
LineEdit_L3C1->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_L3C1->setEnabled( FALSE );
LineEdit_L3C1->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_L3C1, 3, 2 );
LineEdit_L3C2 = new QLineEdit( GroupC1, "LineEdit_L3C2" );
LineEdit_L3C2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_L3C2->sizePolicy().hasHeightForWidth() ) );
LineEdit_L3C2->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_L3C2->setEnabled( FALSE );
LineEdit_L3C2->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_L3C2, 3, 3 );
LineEdit_L3C3 = new QLineEdit( GroupC1, "LineEdit_L3C3" );
LineEdit_L3C3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_L3C3->sizePolicy().hasHeightForWidth() ) );
LineEdit_L3C3->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_L3C3->setEnabled( FALSE );
LineEdit_L3C3->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_L3C3, 3, 4 );
LineEdit_IX = new QLineEdit( GroupC1, "LineEdit_IX" );
LineEdit_IX->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_IX->sizePolicy().hasHeightForWidth() ) );
LineEdit_IX->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_IX->setEnabled( FALSE );
LineEdit_IX->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_IX, 4, 2 );
LineEdit_IY = new QLineEdit( GroupC1, "LineEdit_IY" );
LineEdit_IY->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_IY->sizePolicy().hasHeightForWidth() ) );
LineEdit_IY->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_IY->setEnabled( FALSE );
LineEdit_IY->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_IY, 4, 3 );
LineEdit_IZ = new QLineEdit( GroupC1, "LineEdit_IZ" );
LineEdit_IZ->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_IZ->sizePolicy().hasHeightForWidth() ) );
LineEdit_IZ->setMinimumSize( QSize( 70, 0 ) );
//LineEdit_IZ->setEnabled( FALSE );
LineEdit_IZ->setReadOnly( TRUE );
GroupC1Layout->addWidget( LineEdit_IZ, 4, 4 );
TextLabel_IXIYIZ = new QLabel( GroupC1, "TextLabel_IXIYIZ" );
TextLabel_IXIYIZ->setText( tr( "GEOM_INERTIA_IXYZ" ) );
TextLabel_IXIYIZ->setMinimumSize( QSize( 50, 0 ) );
TextLabel_IXIYIZ->setFrameShape( QLabel::NoFrame );
TextLabel_IXIYIZ->setFrameShadow( QLabel::Plain );
TextLabel_IXIYIZ->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
GroupC1Layout->addMultiCellWidget( TextLabel_IXIYIZ, 4, 4, 0, 1 );
MeasureGUI_InertiaDlgLayout->addWidget( GroupC1, 1, 0 );
/***************************************************************/ Layout1->addWidget(GroupC1, 1, 0);
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
GroupButtons->setTitle( tr( "" ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
GroupButtons->layout()->setSpacing( 0 );
GroupButtons->layout()->setMargin( 0 );
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CLOSE" ) );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 1 );
QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_8, 0, 0 );
QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_9, 0, 2 );
MeasureGUI_InertiaDlgLayout->addWidget( GroupButtons, 2, 0 );
/***************************************************************/ /***************************************************************/
Init(Sel) ; /* Initialisations */ /* Initialisation */
Init();
} }
@ -259,79 +94,21 @@ MeasureGUI_InertiaDlg::~MeasureGUI_InertiaDlg()
// function : Init() // function : Init()
// purpose : // purpose :
//================================================================================= //=================================================================================
void MeasureGUI_InertiaDlg::Init( SALOME_Selection* Sel ) void MeasureGUI_InertiaDlg::Init()
{ {
/* init variables */
LineEdit_L1C1->setMaxLength( 10 ); myEditCurrentArgument = GroupC1->LineEdit1;
LineEdit_L1C2->setMaxLength( 10 );
LineEdit_L1C3->setMaxLength( 10 );
LineEdit_L2C1->setMaxLength( 10 );
LineEdit_L2C2->setMaxLength( 10 );
LineEdit_L2C3->setMaxLength( 10 );
LineEdit_L3C1->setMaxLength( 10 );
LineEdit_L3C2->setMaxLength( 10 );
LineEdit_L3C3->setMaxLength( 10 );
LineEdit_IX->setMaxLength( 10 );
LineEdit_IY->setMaxLength( 10 );
LineEdit_IZ->setMaxLength( 10 );
myConstructorId = 0 ;
Constructor1->setChecked( TRUE );
myEditCurrentArgument = LineEditC1A1 ;
mySelection = Sel;
myGeomBase = new GEOMBase() ;
myGeomGUI = GEOMContext::GetGeomGUI() ;
myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ;
// TODO : previous selection into argument ?
/* Filter definitions */
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
myGeom = GEOM::GEOM_Gen::_narrow(comp);
/* signals and slots connections */ /* signals and slots connections */
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ; connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect( GroupConstructors, SIGNAL(clicked(int) ), this, SLOT( ConstructorsClicked(int) ) ); connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect( SelectButtonC1A1, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
connect( LineEditC1A1, SIGNAL ( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
connect( myGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ) ;
/* to close dialog if study change */ /* displays Dialog */
connect( myGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ; GroupC1->show();
this->show();
/* Move widget on the botton right corner of main widget */
int x, y ;
myGeomBase->DefineDlgPosition( this, x, y ) ;
this->move( x, y ) ;
this->show() ; /* displays Dialog */
return ;
}
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void MeasureGUI_InertiaDlg::ConstructorsClicked(int constructorId)
{
return ;
}
//=================================================================================
// function : ClickOnCancel()
// purpose :
//=================================================================================
void MeasureGUI_InertiaDlg::ClickOnCancel()
{
disconnect( mySelection, 0, this, 0 );
myGeomGUI->ResetState() ;
reject() ;
return; return;
} }
@ -342,34 +119,33 @@ void MeasureGUI_InertiaDlg::ClickOnCancel()
//================================================================================= //=================================================================================
void MeasureGUI_InertiaDlg::SelectionIntoArgument() void MeasureGUI_InertiaDlg::SelectionIntoArgument()
{ {
LineEdit_L1C1->setText("") ;
LineEdit_L1C2->setText("") ;
LineEdit_L1C3->setText("") ;
LineEdit_L2C1->setText("") ;
LineEdit_L2C2->setText("") ;
LineEdit_L2C3->setText("") ;
LineEdit_L3C1->setText("") ;
LineEdit_L3C2->setText("") ;
LineEdit_L3C3->setText("") ;
LineEdit_IX->setText("") ;
LineEdit_IY->setText("") ;
LineEdit_IZ->setText("") ;
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
QString aString = ""; /* future the name of selection */ QString aString = "";
GroupC1->LineEdit11->setText("");
GroupC1->LineEdit12->setText("");
GroupC1->LineEdit13->setText("");
GroupC1->LineEdit21->setText("");
GroupC1->LineEdit22->setText("");
GroupC1->LineEdit23->setText("");
GroupC1->LineEdit31->setText("");
GroupC1->LineEdit32->setText("");
GroupC1->LineEdit33->setText("");
GroupC1->LineEdit41->setText("");
GroupC1->LineEdit42->setText("");
GroupC1->LineEdit43->setText("");
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
if ( nbSel != 1 ) { if(nbSel != 1)
return; return;
}
/* nbSel == 1 */ /* nbSel == 1 */
TopoDS_Shape S; TopoDS_Shape S;
if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull()) if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull())
return; return;
LineEditC1A1->setText(aString) ; GroupC1->LineEdit1->setText(aString);
this->CalculateAndDisplayInertia(S); this->CalculateAndDisplayInertia(S);
return; return;
} }
@ -382,21 +158,15 @@ void MeasureGUI_InertiaDlg::SelectionIntoArgument()
void MeasureGUI_InertiaDlg::SetEditCurrentArgument() void MeasureGUI_InertiaDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
switch (myConstructorId)
{ if(send == GroupC1->PushButton1) {
case 0: /* default constructor */ GroupC1->LineEdit1->setFocus();
{ myEditCurrentArgument = GroupC1->LineEdit1;
if(send == SelectButtonC1A1) {
LineEditC1A1->setFocus() ;
myEditCurrentArgument = LineEditC1A1;
}
SelectionIntoArgument() ;
break;
}
}
return ;
} }
this->SelectionIntoArgument();
return;
}
//================================================================================= //=================================================================================
@ -406,36 +176,12 @@ void MeasureGUI_InertiaDlg::SetEditCurrentArgument()
void MeasureGUI_InertiaDlg::LineEditReturnPressed() void MeasureGUI_InertiaDlg::LineEditReturnPressed()
{ {
QLineEdit* send = (QLineEdit*)sender(); QLineEdit* send = (QLineEdit*)sender();
if( send == LineEditC1A1 ) if(send == GroupC1->LineEdit1)
myEditCurrentArgument = LineEditC1A1 ; myEditCurrentArgument = GroupC1->LineEdit1;
else else
return; return;
/* User name of object input management */ MeasureGUI_Skeleton::LineEditReturnPressed();
/* If successfull the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text() ;
QWidget* thisWidget = (QWidget*)this ;
if( myGeomBase->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) {
myEditCurrentArgument->setText( objectUserName ) ;
}
return ;
return ;
}
//=================================================================================
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void MeasureGUI_InertiaDlg::DeactivateActiveDialog()
{
if ( GroupConstructors->isEnabled() ) {
disconnect( mySelection, 0, this, 0 );
GroupConstructors->setEnabled(false) ;
GroupC1->setEnabled(false) ;
GroupButtons->setEnabled(false) ;
}
return; return;
} }
@ -446,11 +192,7 @@ void MeasureGUI_InertiaDlg::DeactivateActiveDialog()
//================================================================================= //=================================================================================
void MeasureGUI_InertiaDlg::ActivateThisDialog() void MeasureGUI_InertiaDlg::ActivateThisDialog()
{ {
/* Emit a signal to deactivate the active dialog */ MeasureGUI_Skeleton::ActivateThisDialog();
myGeomGUI->EmitSignalDeactivateDialog() ;
GroupConstructors->setEnabled(true) ;
GroupC1->setEnabled(true) ;
GroupButtons->setEnabled(true) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
return; return;
} }
@ -464,19 +206,7 @@ void MeasureGUI_InertiaDlg::enterEvent(QEvent* e)
{ {
if(GroupConstructors->isEnabled()) if(GroupConstructors->isEnabled())
return; return;
ActivateThisDialog() ; this->ActivateThisDialog();
return ;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_InertiaDlg::closeEvent( QCloseEvent* e )
{
/* same than click on cancel button */
this->ClickOnCancel() ;
return; return;
} }
@ -487,38 +217,32 @@ void MeasureGUI_InertiaDlg::closeEvent( QCloseEvent* e )
//================================================================================= //=================================================================================
void MeasureGUI_InertiaDlg::CalculateAndDisplayInertia(const TopoDS_Shape& S) void MeasureGUI_InertiaDlg::CalculateAndDisplayInertia(const TopoDS_Shape& S)
{ {
LineEdit_L1C1->setText("") ; GroupC1->LineEdit11->setText("");
LineEdit_L1C2->setText("") ; GroupC1->LineEdit12->setText("");
LineEdit_L1C3->setText("") ; GroupC1->LineEdit13->setText("");
LineEdit_L2C1->setText("") ; GroupC1->LineEdit21->setText("");
LineEdit_L2C2->setText("") ; GroupC1->LineEdit22->setText("");
LineEdit_L2C3->setText("") ; GroupC1->LineEdit23->setText("");
LineEdit_L3C1->setText("") ; GroupC1->LineEdit31->setText("");
LineEdit_L3C2->setText("") ; GroupC1->LineEdit32->setText("");
LineEdit_L3C3->setText("") ; GroupC1->LineEdit33->setText("");
GroupC1->LineEdit41->setText("");
LineEdit_IX->setText("") ; GroupC1->LineEdit42->setText("");
LineEdit_IY->setText("") ; GroupC1->LineEdit43->setText("");
LineEdit_IZ->setText("") ;
if(S.IsNull()) if(S.IsNull())
return; return;
try {
QString resString; QString resString;
GProp_GProps System; GProp_GProps System;
if ( S.ShapeType() == TopAbs_VERTEX || S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE ) { try {
if(S.ShapeType() == TopAbs_VERTEX || S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE)
BRepGProp::LinearProperties(S, System); BRepGProp::LinearProperties(S, System);
} else if(S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL)
else if ( S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL ) {
BRepGProp::SurfaceProperties(S, System); BRepGProp::SurfaceProperties(S, System);
} else
else {
BRepGProp::VolumeProperties(S, System); BRepGProp::VolumeProperties(S, System);
}
gp_Mat I = System.MatrixOfInertia() ; gp_Mat I = System.MatrixOfInertia() ;
GProp_PrincipalProps Pr = System.PrincipalProperties(); GProp_PrincipalProps Pr = System.PrincipalProperties();
@ -527,39 +251,36 @@ void MeasureGUI_InertiaDlg::CalculateAndDisplayInertia(const TopoDS_Shape& S)
/* matrix 3x3 */ /* matrix 3x3 */
resString = tr("%1").arg(I(1,1), 12, 'f', 6); resString = tr("%1").arg(I(1,1), 12, 'f', 6);
LineEdit_L1C1->setText(resString) ; GroupC1->LineEdit11->setText(resString);
resString = tr("%1").arg(I(1,2), 12, 'f', 6); resString = tr("%1").arg(I(1,2), 12, 'f', 6);
LineEdit_L1C2->setText(resString) ; GroupC1->LineEdit12->setText(resString);
resString = tr("%1").arg(I(1,3), 12, 'f', 6); resString = tr("%1").arg(I(1,3), 12, 'f', 6);
LineEdit_L1C3->setText(resString) ; GroupC1->LineEdit13->setText(resString);
resString = tr("%1").arg(I(2,1), 12, 'f', 6); resString = tr("%1").arg(I(2,1), 12, 'f', 6);
LineEdit_L2C1->setText(resString) ; GroupC1->LineEdit21->setText(resString);
resString = tr("%1").arg(I(2,2), 12, 'f', 6); resString = tr("%1").arg(I(2,2), 12, 'f', 6);
LineEdit_L2C2->setText(resString) ; GroupC1->LineEdit22->setText(resString);
resString = tr("%1").arg(I(2,3), 12, 'f', 6); resString = tr("%1").arg(I(2,3), 12, 'f', 6);
LineEdit_L2C3->setText(resString) ; GroupC1->LineEdit23->setText(resString);
resString = tr("%1").arg(I(3,1), 12, 'f', 6); resString = tr("%1").arg(I(3,1), 12, 'f', 6);
LineEdit_L3C1->setText(resString) ; GroupC1->LineEdit31->setText(resString);
resString = tr("%1").arg(I(3,2), 12, 'f', 6); resString = tr("%1").arg(I(3,2), 12, 'f', 6);
LineEdit_L3C2->setText(resString) ; GroupC1->LineEdit32->setText(resString);
resString = tr("%1").arg(I(3,3), 12, 'f', 6); resString = tr("%1").arg(I(3,3), 12, 'f', 6);
LineEdit_L3C3->setText(resString) ; GroupC1->LineEdit33->setText(resString);
/* moments */ /* moments */
resString = tr("%1").arg(Ix, 12, 'f', 6); resString = tr("%1").arg(Ix, 12, 'f', 6);
LineEdit_IX->setText(resString) ; GroupC1->LineEdit41->setText(resString);
resString = tr("%1").arg(Ix, 12, 'f', 6); resString = tr("%1").arg(Ix, 12, 'f', 6);
LineEdit_IY->setText(resString) ; GroupC1->LineEdit42->setText(resString);
resString = tr("%1").arg(Iz, 12, 'f', 6); resString = tr("%1").arg(Iz, 12, 'f', 6);
LineEdit_IZ->setText(resString) ; GroupC1->LineEdit43->setText(resString);
} }
catch(Standard_Failure) { catch(Standard_Failure) {
MESSAGE("Catch intercepted in CalculateAndDisplayInertia()" << endl ) ; MESSAGE("Catch intercepted in CalculateAndDisplayInertia()");
} }
return; return;
} }

View File

@ -29,31 +29,16 @@
#ifndef DIALOGBOX_INERTIA_H #ifndef DIALOGBOX_INERTIA_H
#define DIALOGBOX_INERTIA_H #define DIALOGBOX_INERTIA_H
#include "MeasureGUI_Skeleton.h"
#include "MeasureGUI_1Sel12LineEdit_QTD.h"
#include "MeasureGUI.h" #include "MeasureGUI.h"
#include <BRepGProp.hxx>
#include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx>
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
//================================================================================= //=================================================================================
// class : MeasureGUI_InertiaDlg // class : MeasureGUI_InertiaDlg
// purpose : // purpose :
//================================================================================= //=================================================================================
class MeasureGUI_InertiaDlg : public QDialog class MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton
{ {
Q_OBJECT Q_OBJECT
@ -61,63 +46,19 @@ public:
MeasureGUI_InertiaDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); MeasureGUI_InertiaDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
~MeasureGUI_InertiaDlg(); ~MeasureGUI_InertiaDlg();
void Init( SALOME_Selection* Sel ) ; private:
void closeEvent( QCloseEvent* e ) ; void Init();
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */ void enterEvent(QEvent* e);
void CalculateAndDisplayInertia(const TopoDS_Shape& S); void CalculateAndDisplayInertia(const TopoDS_Shape& S);
GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */ MeasureGUI_1Sel12LineEdit_QTD* GroupC1;
GEOMBase* myGeomBase ; /* Current GeomGUI object */
GEOMContext* myGeomGUI ; /* Current GeomGUI object */
SALOME_Selection* mySelection ;
int myConstructorId ; /* Current constructor id = radio button id */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
QButtonGroup* GroupConstructors;
QRadioButton* Constructor1;
QGroupBox* GroupC1;
QLabel* TextLabelC1A1;
QPushButton* SelectButtonC1A1;
QLineEdit* LineEditC1A1;
QLabel* TextLabel_Matrix;
QLabel* TextLabelMatrix_11;
QLabel* TextLabelMatrix_21;
QLabel* TextLabelMatrix_31;
QLineEdit* LineEdit_L1C1;
QLineEdit* LineEdit_L1C2;
QLineEdit* LineEdit_L1C3;
QLineEdit* LineEdit_L2C1;
QLineEdit* LineEdit_L2C2;
QLineEdit* LineEdit_L2C3;
QLineEdit* LineEdit_L3C1;
QLineEdit* LineEdit_L3C2;
QLineEdit* LineEdit_L3C3;
QLineEdit* LineEdit_IX;
QLineEdit* LineEdit_IY;
QLineEdit* LineEdit_IZ;
QLabel* TextLabel_IXIYIZ;
QGroupBox* GroupButtons;
QPushButton* buttonApply;
QPushButton* buttonOk;
QPushButton* buttonCancel;
private slots: private slots:
void ConstructorsClicked(int constructorId);
void ClickOnCancel();
void SetEditCurrentArgument(); void SetEditCurrentArgument();
void LineEditReturnPressed() ;
void SelectionIntoArgument(); void SelectionIntoArgument();
void DeactivateActiveDialog() ; void LineEditReturnPressed();
void ActivateThisDialog(); void ActivateThisDialog();
protected:
QGridLayout* MeasureGUI_InertiaDlgLayout;
QGridLayout* GroupConstructorsLayout;
QGridLayout* GroupC1Layout;
QGridLayout* GroupButtonsLayout;
}; };
#endif // DIALOGBOX_INERTIA_H #endif // DIALOGBOX_INERTIA_H

View File

@ -29,26 +29,9 @@
using namespace std; using namespace std;
#include "MeasureGUI_MaxToleranceDlg.h" #include "MeasureGUI_MaxToleranceDlg.h"
// Open CASCADE Includes
#include <TopExp_Explorer.hxx> #include <TopExp_Explorer.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
// QT Includes
#include <qbuttongroup.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
//================================================================================= //=================================================================================
// class : MeasureGUI_MaxToleranceDlg() // class : MeasureGUI_MaxToleranceDlg()
// purpose : Constructs a MeasureGUI_MaxToleranceDlg which is a child of 'parent', with the // purpose : Constructs a MeasureGUI_MaxToleranceDlg which is a child of 'parent', with the
@ -57,178 +40,38 @@ using namespace std;
// TRUE to construct a modal dialog. // TRUE to construct a modal dialog.
//================================================================================= //=================================================================================
MeasureGUI_MaxToleranceDlg::MeasureGUI_MaxToleranceDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) MeasureGUI_MaxToleranceDlg::MeasureGUI_MaxToleranceDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{ {
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_TOLERANCE"))); QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_TOLERANCE")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
if ( !name )
setName( "MeasureGUI_MaxToleranceDlg" );
resize( 303, 275 );
setCaption(tr("GEOM_TOLERANCE_TITLE")); setCaption(tr("GEOM_TOLERANCE_TITLE"));
setSizeGripEnabled( TRUE );
MeasureGUI_MaxToleranceDlgLayout = new QGridLayout( this );
MeasureGUI_MaxToleranceDlgLayout->setSpacing( 6 );
MeasureGUI_MaxToleranceDlgLayout->setMargin( 11 );
/***************************************************************/ /***************************************************************/
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setTitle(tr("GEOM_TOLERANCE")); GroupConstructors->setTitle(tr("GEOM_TOLERANCE"));
GroupConstructors->setExclusive( TRUE ); RadioButton1->setPixmap(image0);
GroupConstructors->setColumnLayout(0, Qt::Vertical );
GroupConstructors->layout()->setSpacing( 0 );
GroupConstructors->layout()->setMargin( 0 );
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
GroupConstructorsLayout->setSpacing( 6 );
GroupConstructorsLayout->setMargin( 11 );
Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
Constructor1->setText( tr( "" ) );
Constructor1->setPixmap( image0 );
Constructor1->setChecked( TRUE );
Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
Constructor1->sizePolicy().hasHeightForWidth() ) );
Constructor1->setMinimumSize( QSize( 60, 0 ) );
GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupConstructorsLayout->addItem( spacer, 0, 1 );
MeasureGUI_MaxToleranceDlgLayout->addWidget( GroupConstructors, 0, 0 );
/***************************************************************/ GroupC1 = new MeasureGUI_1Sel6LineEdit_QTD(this, "GroupC1");
GroupConstructor1 = new QGroupBox( this, "GroupConstructor1" ); GroupC1->GroupBox1->setTitle(tr("GEOM_TOLERANCE_CONSTR"));
GroupConstructor1->setTitle( tr( "GEOM_TOLERANCE_CONSTR" ) ); GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
GroupConstructor1->setColumnLayout(0, Qt::Vertical ); GroupC1->TextLabel2->setText(tr("GEOM_MIN"));
GroupConstructor1->layout()->setSpacing( 0 ); GroupC1->TextLabel3->setText(tr("GEOM_MAX"));
GroupConstructor1->layout()->setMargin( 0 ); GroupC1->TextLabel4->setText(tr("GEOM_TOLERANCE_FACE"));
GroupConstructor1Layout = new QGridLayout( GroupConstructor1->layout() ); GroupC1->TextLabel5->setText(tr("GEOM_TOLERANCE_EDGE"));
GroupConstructor1Layout->setAlignment( Qt::AlignTop ); GroupC1->TextLabel6->setText(tr("GEOM_TOLERANCE_VERTEX"));
GroupConstructor1Layout->setSpacing( 6 ); GroupC1->LineEdit11->setReadOnly(TRUE);
GroupConstructor1Layout->setMargin( 11 ); GroupC1->LineEdit12->setReadOnly(TRUE);
GroupC1->LineEdit21->setReadOnly(TRUE);
GroupC1->LineEdit22->setReadOnly(TRUE);
GroupC1->LineEdit31->setReadOnly(TRUE);
GroupC1->LineEdit32->setReadOnly(TRUE);
GroupC1->PushButton1->setPixmap(image1);
LineEditC1A1 = new QLineEdit( GroupConstructor1, "LineEditC1A1" ); Layout1->addWidget(GroupC1, 1, 0);
LineEditC1A1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A1->sizePolicy().hasHeightForWidth() ) );
// GroupConstructor1Layout->addWidget( LineEditC1A1, 0, 2 );
SelectButtonC1A1 = new QPushButton( GroupConstructor1, "SelectButtonC1A1" );
SelectButtonC1A1->setText( tr( "" ) );
SelectButtonC1A1->setPixmap( image1 );
// GroupConstructor1Layout->addWidget( SelectButtonC1A1, 0, 1 );
TextLabelC1A1 = new QLabel( GroupConstructor1, "TextLabelC1A1" );
TextLabelC1A1->setText( tr( "GEOM_OBJECT" ) );
TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) );
TextLabelC1A1->setFrameShape( QLabel::NoFrame );
TextLabelC1A1->setFrameShadow( QLabel::Plain );
// GroupConstructor1Layout->addWidget( TextLabelC1A1, 0, 0 );
QHBoxLayout* bl = new QHBoxLayout;
bl->setMargin(0); bl->setSpacing(6);
bl->addWidget(TextLabelC1A1); bl->addWidget(SelectButtonC1A1); bl->addWidget(LineEditC1A1);
GroupConstructor1Layout->addMultiCellLayout(bl, 0, 0, 0, 2);
TextLabel_Min = new QLabel( GroupConstructor1, "TextLabel_Min" );
TextLabel_Min->setText( tr( "GEOM_MIN" ) );
TextLabel_Min->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Min->setFrameShape( QLabel::NoFrame );
TextLabel_Min->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Min, 1, 1 );
TextLabel_Max = new QLabel( GroupConstructor1, "TextLabel_Max" );
TextLabel_Max->setText( tr( "GEOM_MAX" ) );
TextLabel_Max->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Max->setFrameShape( QLabel::NoFrame );
TextLabel_Max->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Max, 1, 2 );
TextLabel_Face = new QLabel( GroupConstructor1, "TextLabel_Face" );
TextLabel_Face->setText( tr( "GEOM_TOLERANCE_FACE" ) );
TextLabel_Face->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Face->setFrameShape( QLabel::NoFrame );
TextLabel_Face->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Face, 2, 0 );
LineEdit_MinFace = new QLineEdit( GroupConstructor1, "LineEdit_MinFace" );
LineEdit_MinFace->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MinFace->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MinFace->setEnabled( FALSE );
LineEdit_MinFace->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MinFace, 2, 1 );
LineEdit_MaxFace = new QLineEdit( GroupConstructor1, "LineEdit_MaxFace" );
LineEdit_MaxFace->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MaxFace->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MaxFace->setEnabled( FALSE );
LineEdit_MaxFace->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MaxFace, 2, 2 );
TextLabel_Edge = new QLabel( GroupConstructor1, "TextLabel_Edge" );
TextLabel_Edge->setText( tr( "GEOM_TOLERANCE_EDGE" ) );
TextLabel_Edge->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Edge->setFrameShape( QLabel::NoFrame );
TextLabel_Edge->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Edge, 3, 0 );
LineEdit_MinEdge = new QLineEdit( GroupConstructor1, "LineEdit_MinEdge" );
LineEdit_MinEdge->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MinEdge->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MinEdge->setEnabled( FALSE );
LineEdit_MinEdge->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MinEdge, 3, 1 );
LineEdit_MaxEdge = new QLineEdit( GroupConstructor1, "LineEdit_MaxEdge" );
LineEdit_MaxEdge->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MaxEdge->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MaxEdge->setEnabled( FALSE );
LineEdit_MaxEdge->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MaxEdge, 3, 2 );
TextLabel_Vertex = new QLabel( GroupConstructor1, "TextLabel_Vertex" );
TextLabel_Vertex->setText( tr( "GEOM_TOLERANCE_VERTEX" ) );
TextLabel_Vertex->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Vertex->setFrameShape( QLabel::NoFrame );
TextLabel_Vertex->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Vertex, 4, 0 );
LineEdit_MinVertex = new QLineEdit( GroupConstructor1, "LineEdit_MinVertex" );
LineEdit_MinVertex->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MinVertex->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MinVertex->setEnabled( FALSE );
LineEdit_MinVertex->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MinVertex, 4, 1 );
LineEdit_MaxVertex = new QLineEdit( GroupConstructor1, "LineEdit_MaxVertex" );
LineEdit_MaxVertex->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
LineEdit_MaxVertex->sizePolicy().hasHeightForWidth() ) );
//LineEdit_MaxVertex->setEnabled( FALSE );
LineEdit_MaxVertex->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_MaxVertex, 4, 2 );
MeasureGUI_MaxToleranceDlgLayout->addWidget( GroupConstructor1, 1, 0 );
/***************************************************************/
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
GroupButtons->setTitle( tr( "" ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
GroupButtons->layout()->setSpacing( 0 );
GroupButtons->layout()->setMargin( 0 );
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CLOSE" ) );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 1 );
// buttonApply = new QPushButton( GroupButtons, "buttonApply" );
// buttonApply->setText( tr( "GEOM_BUT_APPLY" ) );
// buttonApply->setAutoDefault( TRUE );
// GroupButtonsLayout->addWidget( buttonApply, 0, 1 );
QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_8, 0, 0 );
QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_9, 0, 2 );
// buttonOk = new QPushButton( GroupButtons, "buttonOk" );
// buttonOk->setText( tr( "GEOM_BUT_OK" ) );
// buttonOk->setAutoDefault( TRUE );
// buttonOk->setDefault( TRUE );
// GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
MeasureGUI_MaxToleranceDlgLayout->addWidget( GroupButtons, 2, 0 );
/***************************************************************/ /***************************************************************/
Init(Sel) ; /* Initialisations */ /* Initialisation */
Init();
} }
@ -246,63 +89,21 @@ MeasureGUI_MaxToleranceDlg::~MeasureGUI_MaxToleranceDlg()
// function : Init() // function : Init()
// purpose : // purpose :
//================================================================================= //=================================================================================
void MeasureGUI_MaxToleranceDlg::Init( SALOME_Selection* Sel ) void MeasureGUI_MaxToleranceDlg::Init()
{ {
myConstructorId = 0 ; /* init variables */
Constructor1->setChecked( TRUE ); myEditCurrentArgument = GroupC1->LineEdit1;
myEditCurrentArgument = LineEditC1A1 ;
mySelection = Sel;
myGeomGUI = GEOMContext::GetGeomGUI() ;
myGeomBase = new GEOMBase() ;
myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ;
// TODO : previous selection into argument ?
/* Filter definitions */
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
myGeom = GEOM::GEOM_Gen::_narrow(comp);
/* signals and slots connections */ /* signals and slots connections */
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ; connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) ); connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect( SelectButtonC1A1, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
connect( LineEditC1A1, SIGNAL ( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ; /* displays Dialog */
GroupC1->show();
this->show();
connect( myGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ) ;
/* to close dialog if study change */
connect( myGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ;
/* Move widget on the botton right corner of main widget */
int x, y ;
myGeomBase->DefineDlgPosition( this, x, y ) ;
this->move( x, y ) ;
this->show() ; /* displays Dialog */
return ;
}
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void MeasureGUI_MaxToleranceDlg::ConstructorsClicked(int constructorId)
{
return ;
}
//=================================================================================
// function : ClickOnCancel()
// purpose :
//=================================================================================
void MeasureGUI_MaxToleranceDlg::ClickOnCancel()
{
disconnect( mySelection, 0, this, 0 );
myGeomGUI->ResetState() ;
reject() ;
return; return;
} }
@ -313,34 +114,31 @@ void MeasureGUI_MaxToleranceDlg::ClickOnCancel()
//================================================================================= //=================================================================================
void MeasureGUI_MaxToleranceDlg::SelectionIntoArgument() void MeasureGUI_MaxToleranceDlg::SelectionIntoArgument()
{ {
LineEdit_MinFace->setText("") ;
LineEdit_MinEdge->setText("") ;
LineEdit_MinVertex->setText("") ;
LineEdit_MaxFace->setText("") ;
LineEdit_MaxEdge->setText("") ;
LineEdit_MaxVertex->setText("") ;
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
QString aString = "";
QString aString = ""; /* future the name of selection */ GroupC1->LineEdit11->setText("");
GroupC1->LineEdit12->setText("");
GroupC1->LineEdit21->setText("");
GroupC1->LineEdit22->setText("");
GroupC1->LineEdit31->setText("");
GroupC1->LineEdit32->setText("");
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
if ( nbSel != 1 ) { if(nbSel != 1)
return; return;
}
/* nbSel == 1 */ /* nbSel == 1 */
TopoDS_Shape S; TopoDS_Shape S;
if( !myGeomBase->GetTopoFromSelection(mySelection, S) ) if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull())
return; return;
if( S.IsNull() ) { if(S.IsNull())
myEditCurrentArgument->setText( "" );
return; return;
}
LineEditC1A1->setText(aString) ; GroupC1->LineEdit1->setText(aString);
this->CalculateMaxTolerance(S); this->CalculateMaxTolerance(S);
return; return;
} }
@ -352,21 +150,15 @@ void MeasureGUI_MaxToleranceDlg::SelectionIntoArgument()
void MeasureGUI_MaxToleranceDlg::SetEditCurrentArgument() void MeasureGUI_MaxToleranceDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
switch (myConstructorId)
{ if(send == GroupC1->PushButton1) {
case 0: /* default constructor */ GroupC1->LineEdit1->setFocus();
{ myEditCurrentArgument = GroupC1->LineEdit1;
if(send == SelectButtonC1A1) {
LineEditC1A1->setFocus() ;
myEditCurrentArgument = LineEditC1A1;
}
SelectionIntoArgument() ;
break;
}
}
return ;
} }
this->SelectionIntoArgument();
return;
}
//================================================================================= //=================================================================================
@ -376,36 +168,12 @@ void MeasureGUI_MaxToleranceDlg::SetEditCurrentArgument()
void MeasureGUI_MaxToleranceDlg::LineEditReturnPressed() void MeasureGUI_MaxToleranceDlg::LineEditReturnPressed()
{ {
QLineEdit* send = (QLineEdit*)sender(); QLineEdit* send = (QLineEdit*)sender();
if( send == LineEditC1A1 ) if(send == GroupC1->LineEdit1)
myEditCurrentArgument = LineEditC1A1 ; myEditCurrentArgument = GroupC1->LineEdit1;
else else
return; return;
/* User name of object input management */ MeasureGUI_Skeleton::LineEditReturnPressed();
/* If successfull the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text() ;
QWidget* thisWidget = (QWidget*)this ;
if( myGeomBase->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) {
myEditCurrentArgument->setText( objectUserName ) ;
}
return ;
}
//=================================================================================
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void MeasureGUI_MaxToleranceDlg::DeactivateActiveDialog()
{
if ( GroupConstructors->isEnabled() ) {
disconnect( mySelection, 0, this, 0 );
GroupConstructors->setEnabled(false) ;
GroupConstructor1->setEnabled(false) ;
GroupButtons->setEnabled(false) ;
}
return; return;
} }
@ -416,11 +184,7 @@ void MeasureGUI_MaxToleranceDlg::DeactivateActiveDialog()
//================================================================================= //=================================================================================
void MeasureGUI_MaxToleranceDlg::ActivateThisDialog() void MeasureGUI_MaxToleranceDlg::ActivateThisDialog()
{ {
/* Emit a signal to deactivate the active dialog */ MeasureGUI_Skeleton::ActivateThisDialog();
myGeomGUI->EmitSignalDeactivateDialog() ;
GroupConstructors->setEnabled(true) ;
GroupConstructor1->setEnabled(true) ;
GroupButtons->setEnabled(true) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
return; return;
} }
@ -434,19 +198,7 @@ void MeasureGUI_MaxToleranceDlg::enterEvent(QEvent* e)
{ {
if(GroupConstructors->isEnabled()) if(GroupConstructors->isEnabled())
return; return;
ActivateThisDialog() ; this->ActivateThisDialog();
return ;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_MaxToleranceDlg::closeEvent( QCloseEvent* e )
{
/* same than click on cancel button */
this->ClickOnCancel() ;
return; return;
} }
@ -457,87 +209,73 @@ void MeasureGUI_MaxToleranceDlg::closeEvent( QCloseEvent* e )
//================================================================================= //=================================================================================
void MeasureGUI_MaxToleranceDlg::CalculateMaxTolerance(const TopoDS_Shape& S) void MeasureGUI_MaxToleranceDlg::CalculateMaxTolerance(const TopoDS_Shape& S)
{ {
LineEdit_MinFace->setText("") ; GroupC1->LineEdit11->setText("");
LineEdit_MinEdge->setText("") ; GroupC1->LineEdit12->setText("");
LineEdit_MinVertex->setText("") ; GroupC1->LineEdit21->setText("");
LineEdit_MaxFace->setText("") ; GroupC1->LineEdit22->setText("");
LineEdit_MaxEdge->setText("") ; GroupC1->LineEdit31->setText("");
LineEdit_MaxVertex->setText("") ; GroupC1->LineEdit32->setText("");
if(S.IsNull()) if(S.IsNull())
return; return;
Standard_Real T, TMF, TME, TMV, TmF, TmE, TmV; Standard_Real T, TMF, TME, TMV, TmF, TmE, TmV;
Standard_Integer nbF, nbE, nbV; Standard_Integer nbF, nbE, nbV;
bool m_isFace, m_isEdge, m_isVertex;
TMF = TME = TMV = -RealLast(); TMF = TME = TMV = -RealLast();
TmF = TmE = TmV = RealLast(); TmF = TmE = TmV = RealLast();
nbF = nbE = nbV = 0; nbF = nbE = nbV = 0;
m_isFace = m_isEdge = m_isVertex = false;
bool m_isFace = false; try {
bool m_isEdge = false; for(TopExp_Explorer ExF(S,TopAbs_FACE); ExF.More(); ExF.Next()) {
bool m_isVertex = false;
try
{
for( TopExp_Explorer ExF(S,TopAbs_FACE); ExF.More(); ExF.Next() )
{
m_isFace = true; m_isFace = true;
TopoDS_Face Face=TopoDS::Face(ExF.Current()); TopoDS_Face Face=TopoDS::Face(ExF.Current());
T=BRep_Tool::Tolerance(Face); T=BRep_Tool::Tolerance(Face);
if(T>TMF) TMF=T; if(T>TMF)
if(T<TmF) TmF=T; TMF=T;
if(T<TmF)
TmF=T;
nbF++; nbF++;
} }
for( TopExp_Explorer ExE(S,TopAbs_EDGE); ExE.More(); ExE.Next() ) for(TopExp_Explorer ExE(S,TopAbs_EDGE); ExE.More(); ExE.Next()) {
{
m_isEdge = true; m_isEdge = true;
TopoDS_Edge Edge=TopoDS::Edge(ExE.Current()); TopoDS_Edge Edge=TopoDS::Edge(ExE.Current());
T=BRep_Tool::Tolerance(Edge); T=BRep_Tool::Tolerance(Edge);
if(T>TME) TME=T; if(T>TME)
if(T<TmE) TmE=T; TME=T;
if(T<TmE)
TmE=T;
nbE++; nbE++;
} }
for( TopExp_Explorer ExV(S,TopAbs_VERTEX); ExV.More(); ExV.Next() ) for(TopExp_Explorer ExV(S,TopAbs_VERTEX); ExV.More(); ExV.Next()) {
{
m_isVertex = true; m_isVertex = true;
TopoDS_Vertex Vertex=TopoDS::Vertex(ExV.Current()); TopoDS_Vertex Vertex=TopoDS::Vertex(ExV.Current());
T=BRep_Tool::Tolerance(Vertex); T=BRep_Tool::Tolerance(Vertex);
if(T>TMV) TMV=T; if(T>TMV)
if(T<TmV) TmV=T; TMV=T;
if(T<TmV)
TmV=T;
nbV++; nbV++;
} }
if (m_isFace)
{ if(m_isFace) {
LineEdit_MinFace->setText( tr("%1").arg( TmF, 5, 'e', 8 ) ) ; GroupC1->LineEdit11->setText(tr("%1").arg(TmF, 5, 'e', 8));
LineEdit_MaxFace->setText( tr("%1").arg( TMF, 5, 'e', 8 ) ) ; GroupC1->LineEdit12->setText(tr("%1").arg(TMF, 5, 'e', 8));
} }
else if(m_isEdge) {
{ GroupC1->LineEdit21->setText(tr("%1").arg(TmE, 5, 'e', 8));
LineEdit_MinFace->setText( "" ) ; GroupC1->LineEdit22->setText(tr("%1").arg(TME, 5, 'e', 8));
LineEdit_MaxFace->setText( "" ) ;
} }
if (m_isEdge) if(m_isVertex) {
{ GroupC1->LineEdit31->setText(tr("%1").arg(TmV, 5, 'e', 8));
LineEdit_MinEdge->setText( tr("%1").arg( TmE, 5, 'e', 8 ) ) ; GroupC1->LineEdit32->setText(tr("%1").arg(TMV, 5, 'e', 8));
LineEdit_MaxEdge->setText( tr("%1").arg( TME, 5, 'e', 8 ) ) ;
}
else
{
LineEdit_MinEdge->setText( "" ) ;
LineEdit_MaxEdge->setText( "" ) ;
}
if (m_isVertex)
{
LineEdit_MinVertex->setText( tr("%1").arg( TmV, 5, 'e', 8 ) ) ;
LineEdit_MaxVertex->setText( tr("%1").arg( TMV, 5, 'e', 8 ) ) ;
}
else
{
LineEdit_MinVertex->setText( "" ) ;
LineEdit_MaxVertex->setText( "" ) ;
} }
} }
catch(Standard_Failure) catch(Standard_Failure)
{ {
MESSAGE("Catch intercepted in CalculateMaxTolerance()" << endl ) ; MESSAGE("Catch intercepted in CalculateMaxTolerance()");
} }
return; return;
} }

View File

@ -29,26 +29,16 @@
#ifndef DIALOGBOX_MAXTOLERANCE_H #ifndef DIALOGBOX_MAXTOLERANCE_H
#define DIALOGBOX_MAXTOLERANCE_H #define DIALOGBOX_MAXTOLERANCE_H
#include "MeasureGUI_Skeleton.h"
#include "MeasureGUI_1Sel6LineEdit_QTD.h"
#include "MeasureGUI.h" #include "MeasureGUI.h"
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
//================================================================================= //=================================================================================
// class : DialogBox_PROPERTIES // class : DialogBox_PROPERTIES
// purpose : // purpose :
//================================================================================= //=================================================================================
class MeasureGUI_MaxToleranceDlg : public QDialog class MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton
{ {
Q_OBJECT Q_OBJECT
@ -57,62 +47,18 @@ public:
~MeasureGUI_MaxToleranceDlg(); ~MeasureGUI_MaxToleranceDlg();
private: private:
void Init();
void Init( SALOME_Selection* Sel ) ; void enterEvent(QEvent* e);
void closeEvent( QCloseEvent* e ) ;
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
void CalculateMaxTolerance(const TopoDS_Shape& S); void CalculateMaxTolerance(const TopoDS_Shape& S);
GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */ MeasureGUI_1Sel6LineEdit_QTD* GroupC1;
GEOMContext* myGeomGUI ; /* Current GeomGUI object */
GEOMBase* myGeomBase ; /* Current GeomGUI object */
SALOME_Selection* mySelection ; /* User shape selection */
int myConstructorId ; /* Current constructor id = radio button id */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
QButtonGroup* GroupConstructors;
QRadioButton* Constructor1;
QGroupBox* GroupConstructor1;
QLineEdit* LineEditC1A1;
QPushButton* SelectButtonC1A1;
QLabel* TextLabelC1A1;
QLabel* TextLabel_Min;
QLabel* TextLabel_Max;
QLabel* TextLabel_Face;
QLabel* TextLabel_Edge;
QLabel* TextLabel_Vertex;
QLineEdit* LineEdit_MinFace;
QLineEdit* LineEdit_MinEdge;
QLineEdit* LineEdit_MinVertex;
QLineEdit* LineEdit_MaxFace;
QLineEdit* LineEdit_MaxEdge;
QLineEdit* LineEdit_MaxVertex;
QGroupBox* GroupButtons;
QPushButton* buttonApply;
QPushButton* buttonOk;
QPushButton* buttonCancel;
private slots: private slots:
void ConstructorsClicked(int constructorId);
void ClickOnCancel();
void SetEditCurrentArgument(); void SetEditCurrentArgument();
void LineEditReturnPressed() ;
void SelectionIntoArgument(); void SelectionIntoArgument();
void DeactivateActiveDialog() ; void LineEditReturnPressed();
void ActivateThisDialog(); void ActivateThisDialog();
protected:
QGridLayout* MeasureGUI_MaxToleranceDlgLayout;
QGridLayout* GroupConstructorsLayout;
QGridLayout* GroupConstructor1Layout;
QGridLayout* GroupButtonsLayout;
}; };
#endif // DIALOGBOX_MAXTOLERANCE_H #endif // DIALOGBOX_MAXTOLERANCE_H

View File

@ -29,21 +29,10 @@
using namespace std; using namespace std;
#include "MeasureGUI_PropertiesDlg.h" #include "MeasureGUI_PropertiesDlg.h"
#include <qbuttongroup.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
#include <TopExp_Explorer.hxx> #include <TopExp_Explorer.hxx>
#include <BRepGProp.hxx>
#include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx>
//================================================================================= //=================================================================================
// class : MeasureGUI_PropertiesDlg() // class : MeasureGUI_PropertiesDlg()
@ -53,125 +42,33 @@ using namespace std;
// TRUE to construct a modal dialog. // TRUE to construct a modal dialog.
//================================================================================= //=================================================================================
MeasureGUI_PropertiesDlg::MeasureGUI_PropertiesDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) MeasureGUI_PropertiesDlg::MeasureGUI_PropertiesDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{ {
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BASICPROPERTIES"))); QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BASICPROPERTIES")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
if ( !name )
setName( "MeasureGUI_PropertiesDlg" );
resize( 303, 275 );
setCaption(tr("GEOM_PROPERTIES_TITLE")); setCaption(tr("GEOM_PROPERTIES_TITLE"));
setSizeGripEnabled( TRUE );
MeasureGUI_PropertiesDlgLayout = new QGridLayout( this );
MeasureGUI_PropertiesDlgLayout->setSpacing( 6 );
MeasureGUI_PropertiesDlgLayout->setMargin( 11 );
/***************************************************************/ /***************************************************************/
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setTitle(tr("GEOM_PROPERTIES")); GroupConstructors->setTitle(tr("GEOM_PROPERTIES"));
GroupConstructors->setExclusive( TRUE ); RadioButton1->setPixmap(image0);
GroupConstructors->setColumnLayout(0, Qt::Vertical );
GroupConstructors->layout()->setSpacing( 0 );
GroupConstructors->layout()->setMargin( 0 );
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
GroupConstructorsLayout->setSpacing( 6 );
GroupConstructorsLayout->setMargin( 11 );
Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
Constructor1->setText( tr( "" ) );
Constructor1->setPixmap( image0 );
Constructor1->setChecked( TRUE );
Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, Constructor1->sizePolicy().hasHeightForWidth() ) );
Constructor1->setMinimumSize( QSize( 60, 0 ) );
GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupConstructorsLayout->addItem( spacer, 0, 1 );
MeasureGUI_PropertiesDlgLayout->addWidget( GroupConstructors, 0, 0 );
/***************************************************************/ GroupC1 = new MeasureGUI_1Sel3LineEdit_QTD(this, "GroupC1");
GroupConstructor1 = new QGroupBox( this, "GroupConstructor1" ); GroupC1->GroupBox1->setTitle(tr("GEOM_PROPERTIES_CONSTR"));
GroupConstructor1->setTitle( tr( "GEOM_PROPERTIES_CONSTR" ) ); GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
GroupConstructor1->setColumnLayout(0, Qt::Vertical ); GroupC1->TextLabel2->setText(tr("GEOM_LENGTH"));
GroupConstructor1->layout()->setSpacing( 0 ); GroupC1->TextLabel3->setText(tr("GEOM_PROPERTIES_SURFACE"));
GroupConstructor1->layout()->setMargin( 0 ); GroupC1->TextLabel4->setText(tr("GEOM_PROPERTIES_VOLUME"));
GroupConstructor1Layout = new QGridLayout( GroupConstructor1->layout() ); GroupC1->LineEdit2->setReadOnly(TRUE);
GroupConstructor1Layout->setAlignment( Qt::AlignTop ); GroupC1->LineEdit3->setReadOnly(TRUE);
GroupConstructor1Layout->setSpacing( 6 ); GroupC1->LineEdit4->setReadOnly(TRUE);
GroupConstructor1Layout->setMargin( 11 ); GroupC1->PushButton1->setPixmap(image1);
LineEditC1A1 = new QLineEdit( GroupConstructor1, "LineEditC1A1" );
LineEditC1A1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A1->sizePolicy().hasHeightForWidth() ) );
GroupConstructor1Layout->addWidget( LineEditC1A1, 0, 2 );
SelectButtonC1A1 = new QPushButton( GroupConstructor1, "SelectButtonC1A1" );
SelectButtonC1A1->setText( tr( "" ) );
SelectButtonC1A1->setPixmap( image1 );
GroupConstructor1Layout->addWidget( SelectButtonC1A1, 0, 1 );
TextLabelC1A1 = new QLabel( GroupConstructor1, "TextLabelC1A1" );
TextLabelC1A1->setText( tr( "GEOM_OBJECT" ) );
TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) );
TextLabelC1A1->setFrameShape( QLabel::NoFrame );
TextLabelC1A1->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabelC1A1, 0, 0 );
TextLabel_Length = new QLabel( GroupConstructor1, "TextLabel_Length" );
TextLabel_Length->setText( tr( "GEOM_LENGTH" ) );
TextLabel_Length->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Length->setFrameShape( QLabel::NoFrame );
TextLabel_Length->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Length, 1, 0 );
LineEdit_Length = new QLineEdit( GroupConstructor1, "LineEdit_Length" );
LineEdit_Length->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_Length->sizePolicy().hasHeightForWidth() ) );
// LineEdit_Length->setEnabled( FALSE );
LineEdit_Length->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_Length, 1, 2 );
LineEdit_Surface = new QLineEdit( GroupConstructor1, "LineEdit_Surface" );
LineEdit_Surface->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_Surface->sizePolicy().hasHeightForWidth() ) );
//LineEdit_Surface->setEnabled( FALSE );
LineEdit_Surface->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_Surface, 2, 2 );
TextLabel_Surface = new QLabel( GroupConstructor1, "TextLabel_Surface" );
TextLabel_Surface->setText( tr( "GEOM_PROPERTIES_SURFACE" ) );
TextLabel_Surface->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Surface->setFrameShape( QLabel::NoFrame );
TextLabel_Surface->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Surface, 2, 0 );
TextLabel_Volume = new QLabel( GroupConstructor1, "TextLabel_Volume" );
TextLabel_Volume->setText( tr( "GEOM_PROPERTIES_VOLUME" ) );
TextLabel_Volume->setMinimumSize( QSize( 50, 0 ) );
TextLabel_Volume->setFrameShape( QLabel::NoFrame );
TextLabel_Volume->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabel_Volume, 3, 0 );
LineEdit_Volume = new QLineEdit( GroupConstructor1, "LineEdit_Volume" );
LineEdit_Volume->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEdit_Volume->sizePolicy().hasHeightForWidth() ) );
//LineEdit_Volume->setEnabled( FALSE );
LineEdit_Volume->setReadOnly( TRUE );
GroupConstructor1Layout->addWidget( LineEdit_Volume, 3, 2 );
MeasureGUI_PropertiesDlgLayout->addWidget( GroupConstructor1, 1, 0 );
/***************************************************************/ Layout1->addWidget(GroupC1, 1, 0);
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
GroupButtons->setTitle( tr( "" ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
GroupButtons->layout()->setSpacing( 0 );
GroupButtons->layout()->setMargin( 0 );
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CLOSE" ) );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 1 );
QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_8, 0, 0 );
QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_9, 0, 2 );
MeasureGUI_PropertiesDlgLayout->addWidget( GroupButtons, 2, 0 );
/***************************************************************/ /***************************************************************/
Init(Sel) ; /* Initialisations */ /* Initialisation */
Init();
} }
@ -189,64 +86,21 @@ MeasureGUI_PropertiesDlg::~MeasureGUI_PropertiesDlg()
// function : Init() // function : Init()
// purpose : // purpose :
//================================================================================= //=================================================================================
void MeasureGUI_PropertiesDlg::Init( SALOME_Selection* Sel ) void MeasureGUI_PropertiesDlg::Init()
{ {
myConstructorId = 0 ; /* init variables */
Constructor1->setChecked( TRUE ); myEditCurrentArgument = GroupC1->LineEdit1;
myEditCurrentArgument = LineEditC1A1 ;
mySelection = Sel;
myGeomBase = new GEOMBase() ;
myGeomGUI = GEOMContext::GetGeomGUI() ;
myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ;
// TODO : previous selection into argument ?
/* Filter definitions */
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
myGeom = GEOM::GEOM_Gen::_narrow(comp);
/* signals and slots connections */ /* signals and slots connections */
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ; connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) ); connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect( SelectButtonC1A1, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
connect( LineEditC1A1, SIGNAL ( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ;
connect( myGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ) ; /* displays Dialog */
/* to close dialog if study change */ GroupC1->show();
connect( myGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ; this->show();
/* Move widget on the botton right corner of main widget */
int x, y ;
myGeomBase->DefineDlgPosition( this, x, y ) ;
this->move( x, y ) ;
this->show() ; /* displays Dialog */
return ;
}
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void MeasureGUI_PropertiesDlg::ConstructorsClicked(int constructorId)
{
return ;
}
//=================================================================================
// function : ClickOnCancel()
// purpose :
//=================================================================================
void MeasureGUI_PropertiesDlg::ClickOnCancel()
{
myGeomBase->EraseSimulationShape() ;
disconnect( mySelection, 0, this, 0 );
myGeomBase->EraseSimulationShape() ;
myGeomGUI->ResetState() ;
reject() ;
return; return;
} }
@ -259,37 +113,33 @@ void MeasureGUI_PropertiesDlg::SelectionIntoArgument()
{ {
myGeomBase->EraseSimulationShape(); myGeomBase->EraseSimulationShape();
mySimulationTopoDs.Nullify(); mySimulationTopoDs.Nullify();
LineEdit_Length->setText("") ;
LineEdit_Surface->setText("") ;
LineEdit_Volume->setText("") ;
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
QString aString = "";
QString aString = ""; /* future the name of selection */ GroupC1->LineEdit2->setText("");
GroupC1->LineEdit3->setText("");
GroupC1->LineEdit4->setText("");
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
if ( nbSel != 1 ) { if(nbSel != 1)
return; return;
}
/* nbSel == 1 */ /* nbSel == 1 */
TopoDS_Shape S; TopoDS_Shape S;
if(!myGeomBase->GetTopoFromSelection(mySelection, S)) if(!myGeomBase->GetTopoFromSelection(mySelection, S))
return; return;
if( S.IsNull() || S.ShapeType() == TopAbs_VERTEX ) {
myEditCurrentArgument->setText( "" );
return ;
}
LineEditC1A1->setText(aString) ; if(S.IsNull() || S.ShapeType() == TopAbs_VERTEX)
return;
GroupC1->LineEdit1->setText(aString);
/* Try to display of a cone simulation shape to show direction of a linear edge only in OCC viewer */ /* Try to display of a cone simulation shape to show direction of a linear edge only in OCC viewer */
if( myGeomBase->CreateArrowForLinearEdge( S, mySimulationTopoDs ) ) { if(myGeomBase->CreateArrowForLinearEdge(S, mySimulationTopoDs))
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
}
this->CalculateAndDisplayProperties(S) ;
this->CalculateAndDisplayProperties(S);
return; return;
} }
@ -301,21 +151,15 @@ void MeasureGUI_PropertiesDlg::SelectionIntoArgument()
void MeasureGUI_PropertiesDlg::SetEditCurrentArgument() void MeasureGUI_PropertiesDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
switch (myConstructorId)
{ if(send == GroupC1->PushButton1) {
case 0: /* default constructor */ GroupC1->LineEdit1->setFocus();
{ myEditCurrentArgument = GroupC1->LineEdit1;
if(send == SelectButtonC1A1) {
LineEditC1A1->setFocus() ;
myEditCurrentArgument = LineEditC1A1;
}
SelectionIntoArgument() ;
break;
}
}
return ;
} }
this->SelectionIntoArgument();
return;
}
//================================================================================= //=================================================================================
@ -325,36 +169,12 @@ void MeasureGUI_PropertiesDlg::SetEditCurrentArgument()
void MeasureGUI_PropertiesDlg::LineEditReturnPressed() void MeasureGUI_PropertiesDlg::LineEditReturnPressed()
{ {
QLineEdit* send = (QLineEdit*)sender(); QLineEdit* send = (QLineEdit*)sender();
if( send == LineEditC1A1 ) if(send == GroupC1->LineEdit1)
myEditCurrentArgument = LineEditC1A1 ; myEditCurrentArgument = GroupC1->LineEdit1;
else else
return; return;
/* User name of object input management */ MeasureGUI_Skeleton::LineEditReturnPressed();
/* If successfull the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text() ;
QWidget* thisWidget = (QWidget*)this ;
if( myGeomBase->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) {
myEditCurrentArgument->setText( objectUserName ) ;
}
return ;
}
//=================================================================================
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void MeasureGUI_PropertiesDlg::DeactivateActiveDialog()
{
if ( GroupConstructors->isEnabled() ) {
disconnect( mySelection, 0, this, 0 );
GroupConstructors->setEnabled(false) ;
GroupConstructor1->setEnabled(false) ;
myGeomBase->EraseSimulationShape() ;
GroupButtons->setEnabled(false) ;
}
return; return;
} }
@ -365,16 +185,10 @@ void MeasureGUI_PropertiesDlg::DeactivateActiveDialog()
//================================================================================= //=================================================================================
void MeasureGUI_PropertiesDlg::ActivateThisDialog() void MeasureGUI_PropertiesDlg::ActivateThisDialog()
{ {
/* Emit a signal to deactivate the active dialog */ MeasureGUI_Skeleton::ActivateThisDialog();
myGeomGUI->EmitSignalDeactivateDialog() ;
GroupConstructors->setEnabled(true) ;
GroupConstructor1->setEnabled(true) ;
GroupButtons->setEnabled(true) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
return; return;
} }
@ -387,19 +201,7 @@ void MeasureGUI_PropertiesDlg::enterEvent(QEvent* e)
{ {
if(GroupConstructors->isEnabled()) if(GroupConstructors->isEnabled())
return; return;
ActivateThisDialog() ; this->ActivateThisDialog();
return ;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_PropertiesDlg::closeEvent( QCloseEvent* e )
{
/* same than click on cancel button */
this->ClickOnCancel() ;
return; return;
} }
@ -410,54 +212,47 @@ void MeasureGUI_PropertiesDlg::closeEvent( QCloseEvent* e )
//================================================================================= //=================================================================================
void MeasureGUI_PropertiesDlg::CalculateAndDisplayProperties(const TopoDS_Shape& S) void MeasureGUI_PropertiesDlg::CalculateAndDisplayProperties(const TopoDS_Shape& S)
{ {
LineEdit_Length->setText("") ; GroupC1->LineEdit2->setText("");
LineEdit_Surface->setText("") ; GroupC1->LineEdit3->setText("");
LineEdit_Volume->setText("") ; GroupC1->LineEdit4->setText("");
if(S.IsNull()) if(S.IsNull())
return; return;
Standard_Real result; Standard_Real result;
GProp_GProps LProps; GProp_GProps LProps, SProps;
GProp_GProps SProps;
QString resString; QString resString;
try try {
{
BRepGProp::LinearProperties(S,LProps); BRepGProp::LinearProperties(S,LProps);
result = LProps.Mass(); result = LProps.Mass();
if (!IsEqual( result, 0.0)) if(!IsEqual(result, 0.0)) {
{
resString = tr("%1").arg(result, 12, 'f', 6); resString = tr("%1").arg(result, 12, 'f', 6);
LineEdit_Length->setText(resString) ; GroupC1->LineEdit2->setText(resString);
} }
BRepGProp::SurfaceProperties(S, SProps); BRepGProp::SurfaceProperties(S, SProps);
result = SProps.Mass(); result = SProps.Mass();
if (!IsEqual( result, 0.0)) if(!IsEqual(result, 0.0)) {
{
resString = tr("%1").arg(result, 12, 'f', 6); resString = tr("%1").arg(result, 12, 'f', 6);
LineEdit_Surface->setText(resString) ; GroupC1->LineEdit3->setText(resString);
} }
result = 0.0; result = 0.0;
if (S.ShapeType() < TopAbs_SHELL) if(S.ShapeType() < TopAbs_SHELL) {
{ for(TopExp_Explorer Exp(S,TopAbs_SOLID); Exp.More(); Exp.Next()) {
for( TopExp_Explorer Exp(S,TopAbs_SOLID); Exp.More(); Exp.Next() )
{
GProp_GProps VProps; GProp_GProps VProps;
BRepGProp::VolumeProperties(Exp.Current(), VProps); BRepGProp::VolumeProperties(Exp.Current(), VProps);
result += VProps.Mass(); result += VProps.Mass();
} }
} }
if (!IsEqual( result, 0.0 )) if (!IsEqual(result, 0.0)) {
{
resString = tr("%1").arg(result, 12, 'f', 6); resString = tr("%1").arg(result, 12, 'f', 6);
LineEdit_Volume->setText(resString) ; GroupC1->LineEdit4->setText(resString);
} }
} }
catch(Standard_Failure) catch(Standard_Failure) {
{ MESSAGE("Catch intercepted in CalculateAndDisplayProperties()");
MESSAGE("Catch intercepted in CalculateAndDisplayProperties()" << endl ) ;
} }
return; return;
} }

View File

@ -28,31 +28,16 @@
#ifndef DIALOGBOX_PROPERTIES_H #ifndef DIALOGBOX_PROPERTIES_H
#define DIALOGBOX_PROPERTIES_H #define DIALOGBOX_PROPERTIES_H
#include "MeasureGUI_Skeleton.h"
#include "MeasureGUI_1Sel3LineEdit_QTD.h"
#include "MeasureGUI.h" #include "MeasureGUI.h"
#include <BRepGProp.hxx>
#include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx>
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class MeasureGUI;
//================================================================================= //=================================================================================
// class : MeasureGUI_PropertiesDlg // class : MeasureGUI_PropertiesDlg
// purpose : // purpose :
//================================================================================= //=================================================================================
class MeasureGUI_PropertiesDlg : public QDialog class MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton
{ {
Q_OBJECT Q_OBJECT
@ -61,56 +46,18 @@ public:
~MeasureGUI_PropertiesDlg(); ~MeasureGUI_PropertiesDlg();
private: private:
void Init();
void Init( SALOME_Selection* Sel ) ; void enterEvent(QEvent* e);
void closeEvent( QCloseEvent* e ) ;
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
void CalculateAndDisplayProperties(const TopoDS_Shape& S); void CalculateAndDisplayProperties(const TopoDS_Shape& S);
GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */ MeasureGUI_1Sel3LineEdit_QTD* GroupC1;
GEOMContext* myGeomGUI ; /* Current GeomGUI object */
GEOMBase* myGeomBase ; /* Current GeomGUI object */
SALOME_Selection* mySelection ; /* User shape selection */
TopoDS_Shape mySimulationTopoDs ; /* Shape used for simulation display */
int myConstructorId ; /* Current constructor id = radio button id */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
QButtonGroup* GroupConstructors;
QRadioButton* Constructor1;
QGroupBox* GroupConstructor1;
QLineEdit* LineEditC1A1;
QPushButton* SelectButtonC1A1;
QLabel* TextLabelC1A1;
QLabel* TextLabel_Length;
QLabel* TextLabel_Surface;
QLabel* TextLabel_Volume;
QLineEdit* LineEdit_Length;
QLineEdit* LineEdit_Surface;
QLineEdit* LineEdit_Volume;
QGroupBox* GroupButtons;
QPushButton* buttonApply;
QPushButton* buttonOk;
QPushButton* buttonCancel;
private slots: private slots:
void ConstructorsClicked(int constructorId);
void ClickOnCancel();
void SetEditCurrentArgument(); void SetEditCurrentArgument();
void LineEditReturnPressed() ;
void SelectionIntoArgument(); void SelectionIntoArgument();
void DeactivateActiveDialog() ; void LineEditReturnPressed();
void ActivateThisDialog(); void ActivateThisDialog();
protected:
QGridLayout* MeasureGUI_PropertiesDlgLayout;
QGridLayout* GroupConstructorsLayout;
QGridLayout* GroupConstructor1Layout;
QGridLayout* GroupButtonsLayout;
}; };
#endif // DIALOGBOX_PROPERTIES_H #endif // DIALOGBOX_PROPERTIES_H

View File

@ -0,0 +1,169 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : MeasureGUI_Skeleton.cxx
// Author : Damien COQUERET
// Module : GEOM
// $Header:
using namespace std;
#include "MeasureGUI_Skeleton.h"
//=================================================================================
// class : MeasureGUI_Skeleton()
// purpose : Constructs a MeasureGUI_Skeleton which is a child of 'parent', with the
// name 'name' and widget flags set to 'f'.
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
//=================================================================================
MeasureGUI_Skeleton::MeasureGUI_Skeleton(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
:MeasureGUI_Skeleton_QTD(parent, name, modal, fl)
{
if (!name)
setName("MeasureGUI_Skeleton");
buttonClose->setText(tr("GEOM_BUT_CLOSE"));
GroupMedium->close(TRUE);
resize(350, 0);
Init(Sel);
}
//=================================================================================
// function : ~MeasureGUI_Skeleton()
// purpose : Destroys the object and frees any allocated resources
//=================================================================================
MeasureGUI_Skeleton::~MeasureGUI_Skeleton()
{
// no need to delete child widgets, Qt does it all for us
this->destroy(TRUE, TRUE);
}
//=================================================================================
// function : Init()
// purpose :
//=================================================================================
void MeasureGUI_Skeleton::Init(SALOME_Selection* Sel)
{
/* init variables */
mySelection = Sel;
mySimulationTopoDs.Nullify();
myGeomBase = new GEOMBase();
myGeomGUI = GEOMContext::GetGeomGUI();
myGeomGUI->SetActiveDialogBox((QDialog*)this);
myGeom = myGeomGUI->myComponentGeom;
/* signals and slots connections */
connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
/* Move widget on the botton right corner of main widget */
// int x, y;
// myGeomBase->DefineDlgPosition( this, x, y );
/* displays Dialog */
RadioButton1->setChecked(TRUE);
return;
}
//=================================================================================
// function : ClickOnCancel()
// purpose :
//=================================================================================
void MeasureGUI_Skeleton::ClickOnCancel()
{
myGeomBase->EraseSimulationShape();
mySimulationTopoDs.Nullify();
disconnect(mySelection, 0, this, 0);
myGeomGUI->ResetState();
reject();
return;
}
//=================================================================================
// function : LineEditReturnPressed()
// purpose :
//=================================================================================
void MeasureGUI_Skeleton::LineEditReturnPressed()
{
/* User name of object input management */
/* If successfull the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text();
QWidget* thisWidget = (QWidget*)this;
if(myGeomBase->SelectionByNameInDialogs(thisWidget, objectUserName, mySelection))
myEditCurrentArgument->setText(objectUserName);
return;
}
//=================================================================================
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void MeasureGUI_Skeleton::DeactivateActiveDialog()
{
this->setEnabled(false);
myGeomGUI->ResetState();
disconnect(mySelection, 0, this, 0);
myGeomBase->EraseSimulationShape();
myGeomGUI->SetActiveDialogBox(0);
return;
}
//=================================================================================
// function : ActivateThisDialog()
// purpose :
//=================================================================================
void MeasureGUI_Skeleton::ActivateThisDialog()
{
/* Emit a signal to deactivate the active dialog */
myGeomGUI->EmitSignalDeactivateDialog();
this->setEnabled(true);
myGeomGUI->SetActiveDialogBox((QDialog*)this);
return;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_Skeleton::closeEvent(QCloseEvent* e)
{
/* same than click on cancel button */
this->ClickOnCancel();
return;
}

View File

@ -0,0 +1,72 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : MeasureGUI_Skeleton.h
// Author : Damine COQUERET
// Module : GEOM
// $Header:
#ifndef MEASUREGUI_SKELETON_H
#define MEASUREGUI_SKELETON_H
#include "MeasureGUI_Skeleton_QTD.h"
#include "GEOMBase.h"
#include <qwidget.h>
#include <qgroupbox.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qradiobutton.h>
#include <qbuttongroup.h>
class MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD
{
Q_OBJECT
public:
MeasureGUI_Skeleton(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
~MeasureGUI_Skeleton();
private :
void Init(SALOME_Selection* Sel);
protected:
void closeEvent(QCloseEvent* e);
TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
SALOME_Selection* mySelection; /* User shape selection */
GEOM::GEOM_Gen_var myGeom; /* Current GeomI object */
GEOMBase* myGeomBase;
GEOMContext* myGeomGUI; /* Current GeomGUI object */
protected slots:
void ClickOnCancel();
void LineEditReturnPressed();
void DeactivateActiveDialog();
void ActivateThisDialog();
};
#endif // MEASUREGUI_SKELETON_H

View File

@ -0,0 +1,99 @@
/****************************************************************************
** Form implementation generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui'
**
** Created: lun oct 27 11:23:09 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "MeasureGUI_Skeleton_QTD.h"
#include <qvariant.h>
#include <qbuttongroup.h>
#include <qgroupbox.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a MeasureGUI_Skeleton_QTD which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "MeasureGUI_Skeleton_QTD" );
resize( 228, 266 );
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
setCaption( trUtf8( "MeasureGUI_Skeleton_QTD" ) );
setSizeGripEnabled( TRUE );
MeasureGUI_Skeleton_QTDLayout = new QGridLayout( this, 1, 1, 11, 6, "MeasureGUI_Skeleton_QTDLayout");
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) );
GroupButtons->setTitle( trUtf8( "" ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
GroupButtons->layout()->setSpacing( 6 );
GroupButtons->layout()->setMargin( 11 );
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3");
QSpacerItem* spacer = new QSpacerItem( 120, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout3->addItem( spacer, 0, 2 );
QSpacerItem* spacer_2 = new QSpacerItem( 120, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout3->addItem( spacer_2, 0, 0 );
buttonClose = new QPushButton( GroupButtons, "buttonClose" );
buttonClose->setText( trUtf8( "&Close" ) );
Layout3->addWidget( buttonClose, 0, 1 );
GroupButtonsLayout->addLayout( Layout3, 0, 0 );
Layout1->addWidget( GroupButtons, 2, 0 );
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) );
GroupConstructors->setTitle( trUtf8( "" ) );
GroupConstructors->setColumnLayout(0, Qt::Vertical );
GroupConstructors->layout()->setSpacing( 6 );
GroupConstructors->layout()->setMargin( 11 );
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2");
RadioButton1 = new QRadioButton( GroupConstructors, "RadioButton1" );
RadioButton1->setText( trUtf8( "" ) );
Layout2->addWidget( RadioButton1 );
GroupConstructorsLayout->addLayout( Layout2, 0, 0 );
Layout1->addWidget( GroupConstructors, 0, 0 );
GroupMedium = new QGroupBox( this, "GroupMedium" );
GroupMedium->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupMedium->sizePolicy().hasHeightForWidth() ) );
GroupMedium->setTitle( trUtf8( "" ) );
Layout1->addWidget( GroupMedium, 1, 0 );
MeasureGUI_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
MeasureGUI_Skeleton_QTD::~MeasureGUI_Skeleton_QTD()
{
// no need to delete child widgets, Qt does it all for us
}

View File

@ -0,0 +1,46 @@
/****************************************************************************
** Form interface generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui'
**
** Created: lun oct 27 11:23:09 2003
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef MEASUREGUI_SKELETON_QTD_H
#define MEASUREGUI_SKELETON_QTD_H
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QGroupBox;
class QPushButton;
class QRadioButton;
class MeasureGUI_Skeleton_QTD : public QDialog
{
Q_OBJECT
public:
MeasureGUI_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~MeasureGUI_Skeleton_QTD();
QGroupBox* GroupButtons;
QPushButton* buttonClose;
QButtonGroup* GroupConstructors;
QRadioButton* RadioButton1;
QGroupBox* GroupMedium;
protected:
QGridLayout* MeasureGUI_Skeleton_QTDLayout;
QGridLayout* Layout1;
QGridLayout* GroupButtonsLayout;
QGridLayout* Layout3;
QGridLayout* GroupConstructorsLayout;
QHBoxLayout* Layout2;
};
#endif // MEASUREGUI_SKELETON_QTD_H

View File

@ -29,30 +29,9 @@
using namespace std; using namespace std;
#include "MeasureGUI_WhatisDlg.h" #include "MeasureGUI_WhatisDlg.h"
// Open CASCADE Includes
//#include <BRepTools_ShapeSet.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx> #include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopoDS_Iterator.hxx> #include <TopoDS_Iterator.hxx>
// QT Includes
#include <qtextview.h>
#include <qbuttongroup.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
//================================================================================= //=================================================================================
// class : MeasureGUI_WhatisDlg() // class : MeasureGUI_WhatisDlg()
// purpose : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the // purpose : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the
@ -61,98 +40,28 @@ using namespace std;
// TRUE to construct a modal dialog. // TRUE to construct a modal dialog.
//================================================================================= //=================================================================================
MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{ {
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_WHATIS"))); QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_WHATIS")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
if ( !name )
setName( "MeasureGUI_WhatisDlg" );
resize( 303, 275 );
setCaption(tr("GEOM_WHATIS_TITLE")); setCaption(tr("GEOM_WHATIS_TITLE"));
setSizeGripEnabled( TRUE );
MeasureGUI_WhatisDlgLayout = new QGridLayout( this );
MeasureGUI_WhatisDlgLayout->setSpacing( 6 );
MeasureGUI_WhatisDlgLayout->setMargin( 11 );
/***************************************************************/ /***************************************************************/
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setTitle(tr("GEOM_WHATIS")); GroupConstructors->setTitle(tr("GEOM_WHATIS"));
GroupConstructors->setExclusive( TRUE ); RadioButton1->setPixmap(image0);
GroupConstructors->setColumnLayout(0, Qt::Vertical );
GroupConstructors->layout()->setSpacing( 0 );
GroupConstructors->layout()->setMargin( 0 );
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
GroupConstructorsLayout->setSpacing( 6 );
GroupConstructorsLayout->setMargin( 11 );
Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
Constructor1->setText( tr( "" ) );
Constructor1->setPixmap( image0 );
Constructor1->setChecked( TRUE );
Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0,
Constructor1->sizePolicy().hasHeightForWidth() ) );
Constructor1->setMinimumSize( QSize( 60, 0 ) );
GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupConstructorsLayout->addItem( spacer, 0, 1 );
MeasureGUI_WhatisDlgLayout->addWidget( GroupConstructors, 0, 0 );
/***************************************************************/ GroupC1 = new MeasureGUI_1Sel1TextView_QTD(this, "GroupC1");
GroupConstructor1 = new QGroupBox( this, "GroupConstructor1" ); GroupC1->GroupBox1->setTitle(tr("GEOM_WHATIS_OBJECT"));
GroupConstructor1->setTitle( tr( "GEOM_WHATIS_OBJECT" ) ); GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
GroupConstructor1->setColumnLayout(0, Qt::Vertical ); GroupC1->TextEdit1->setReadOnly(TRUE);
GroupConstructor1->layout()->setSpacing( 0 ); GroupC1->PushButton1->setPixmap(image1);
GroupConstructor1->layout()->setMargin( 0 );
GroupConstructor1Layout = new QGridLayout( GroupConstructor1->layout() );
GroupConstructor1Layout->setAlignment( Qt::AlignTop );
GroupConstructor1Layout->setSpacing( 6 );
GroupConstructor1Layout->setMargin( 11 );
LineEditC1A1 = new QLineEdit( GroupConstructor1, "LineEditC1A1" );
LineEditC1A1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A1->sizePolicy().hasHeightForWidth() ) );
GroupConstructor1Layout->addWidget( LineEditC1A1, 0, 2 );
SelectButtonC1A1 = new QPushButton( GroupConstructor1, "SelectButtonC1A1" );
SelectButtonC1A1->setText( tr( "" ) );
SelectButtonC1A1->setPixmap( image1 );
GroupConstructor1Layout->addWidget( SelectButtonC1A1, 0, 1 );
TextLabelC1A1 = new QLabel( GroupConstructor1, "TextLabelC1A1" );
TextLabelC1A1->setText( tr( "GEOM_OBJECT" ) );
TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) );
TextLabelC1A1->setFrameShape( QLabel::NoFrame );
TextLabelC1A1->setFrameShadow( QLabel::Plain );
GroupConstructor1Layout->addWidget( TextLabelC1A1, 0, 0 );
Text = new QTextView(GroupConstructor1); Layout1->addWidget(GroupC1, 1, 0);
Text->setTextFormat( Qt::PlainText );
GroupConstructor1Layout->addMultiCellWidget( Text, 1, 1, 0, 2 );
MeasureGUI_WhatisDlgLayout->addWidget( GroupConstructor1, 1, 0 );
/***************************************************************/
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
GroupButtons->setTitle( tr( "" ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
GroupButtons->layout()->setSpacing( 0 );
GroupButtons->layout()->setMargin( 0 );
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CLOSE" ) );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 1 );
QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_8, 0, 0 );
QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
GroupButtonsLayout->addItem( spacer_9, 0, 2 );
MeasureGUI_WhatisDlgLayout->addWidget( GroupButtons, 2, 0 );
/***************************************************************/ /***************************************************************/
Init(Sel) ; /* Initialisations */ /* Initialisation */
Init();
} }
@ -170,67 +79,21 @@ MeasureGUI_WhatisDlg::~MeasureGUI_WhatisDlg()
// function : Init() // function : Init()
// purpose : // purpose :
//================================================================================= //=================================================================================
void MeasureGUI_WhatisDlg::Init( SALOME_Selection* Sel ) void MeasureGUI_WhatisDlg::Init()
{ {
myConstructorId = 0 ; /* init variables */
Constructor1->setChecked( TRUE ); myEditCurrentArgument = GroupC1->LineEdit1;
myEditCurrentArgument = LineEditC1A1 ;
mySelection = Sel;
myGeomBase = new GEOMBase() ;
myGeomGUI = GEOMContext::GetGeomGUI() ;
myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ;
// TODO : previous selection into argument ?
/* Filter definitions */
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
myGeom = GEOM::GEOM_Gen::_narrow(comp);
/* signals and slots connections */ /* signals and slots connections */
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ; connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) ); connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect( SelectButtonC1A1, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
connect( LineEditC1A1, SIGNAL ( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ; /* displays Dialog */
GroupC1->show();
this->show();
connect( myGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ) ;
/* to close dialog if study change */
connect( myGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ;
SelectedName = "";
/* Move widget on the botton right corner of main widget */
int x, y ;
myGeomBase->DefineDlgPosition( this, x, y ) ;
this->move( x, y ) ;
this->show() ; /* displays Dialog */
return ;
}
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void MeasureGUI_WhatisDlg::ConstructorsClicked(int constructorId)
{
return ;
}
//=================================================================================
// function : ClickOnCancel()
// purpose :
//=================================================================================
void MeasureGUI_WhatisDlg::ClickOnCancel()
{
myGeomBase->EraseSimulationShape() ;
disconnect( mySelection, 0, this, 0 );
myGeomGUI->ResetState() ;
reject() ;
return; return;
} }
@ -244,31 +107,27 @@ void MeasureGUI_WhatisDlg::SelectionIntoArgument()
myGeomBase->EraseSimulationShape(); myGeomBase->EraseSimulationShape();
mySimulationTopoDs.Nullify(); mySimulationTopoDs.Nullify();
Text->setText("") ;
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
SelectedName = ""; /* future the name of selection */ SelectedName = ""; /* future the name of selection */
GroupC1->TextEdit1->setText("");
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, SelectedName); int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, SelectedName);
if ( nbSel != 1 ) { if(nbSel != 1)
return; return;
}
/* nbSel == 1 */ /* nbSel == 1 */
TopoDS_Shape S; TopoDS_Shape S;
if(!myGeomBase->GetTopoFromSelection(mySelection, S)) if(!myGeomBase->GetTopoFromSelection(mySelection, S))
return; return;
if( S.IsNull() ) { if(S.IsNull())
myEditCurrentArgument->setText( "" );
return; return;
}
/* Try to display of a cone simulation shape to show direction of a linear edge only in OCC viewer */ /* Try to display of a cone simulation shape to show direction of a linear edge only in OCC viewer */
if( myGeomBase->CreateArrowForLinearEdge( S, mySimulationTopoDs ) ) { if(myGeomBase->CreateArrowForLinearEdge(S, mySimulationTopoDs))
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
}
LineEditC1A1->setText(SelectedName) ; GroupC1->LineEdit1->setText(SelectedName);
this->CalculateWhatis(S); this->CalculateWhatis(S);
return; return;
@ -282,21 +141,15 @@ void MeasureGUI_WhatisDlg::SelectionIntoArgument()
void MeasureGUI_WhatisDlg::SetEditCurrentArgument() void MeasureGUI_WhatisDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
switch (myConstructorId)
{ if(send == GroupC1->PushButton1) {
case 0: /* default constructor */ GroupC1->LineEdit1->setFocus();
{ myEditCurrentArgument = GroupC1->LineEdit1;
if(send == SelectButtonC1A1) {
LineEditC1A1->setFocus() ;
myEditCurrentArgument = LineEditC1A1;
}
SelectionIntoArgument() ;
break;
}
}
return ;
} }
this->SelectionIntoArgument();
return;
}
//================================================================================= //=================================================================================
@ -306,36 +159,12 @@ void MeasureGUI_WhatisDlg::SetEditCurrentArgument()
void MeasureGUI_WhatisDlg::LineEditReturnPressed() void MeasureGUI_WhatisDlg::LineEditReturnPressed()
{ {
QLineEdit* send = (QLineEdit*)sender(); QLineEdit* send = (QLineEdit*)sender();
if( send == LineEditC1A1 ) if(send == GroupC1->LineEdit1)
myEditCurrentArgument = LineEditC1A1 ; myEditCurrentArgument = GroupC1->LineEdit1;
else else
return; return;
/* User name of object input management */ MeasureGUI_Skeleton::LineEditReturnPressed();
/* If successfull the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text() ;
QWidget* thisWidget = (QWidget*)this ;
if( myGeomBase->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) {
myEditCurrentArgument->setText( objectUserName ) ;
}
return ;
}
//=================================================================================
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void MeasureGUI_WhatisDlg::DeactivateActiveDialog()
{
if ( GroupConstructors->isEnabled() ) {
disconnect( mySelection, 0, this, 0 );
GroupConstructors->setEnabled(false) ;
GroupConstructor1->setEnabled(false) ;
myGeomBase->EraseSimulationShape() ;
GroupButtons->setEnabled(false) ;
}
return; return;
} }
@ -346,11 +175,7 @@ void MeasureGUI_WhatisDlg::DeactivateActiveDialog()
//================================================================================= //=================================================================================
void MeasureGUI_WhatisDlg::ActivateThisDialog() void MeasureGUI_WhatisDlg::ActivateThisDialog()
{ {
/* Emit a signal to deactivate the active dialog */ MeasureGUI_Skeleton::ActivateThisDialog();
myGeomGUI->EmitSignalDeactivateDialog() ;
GroupConstructors->setEnabled(true) ;
GroupConstructor1->setEnabled(true) ;
GroupButtons->setEnabled(true) ;
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
if(!mySimulationTopoDs.IsNull()) if(!mySimulationTopoDs.IsNull())
myGeomBase->DisplaySimulationShape(mySimulationTopoDs); myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
@ -366,19 +191,7 @@ void MeasureGUI_WhatisDlg::enterEvent(QEvent* e)
{ {
if(GroupConstructors->isEnabled()) if(GroupConstructors->isEnabled())
return; return;
ActivateThisDialog() ; this->ActivateThisDialog();
return ;
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void MeasureGUI_WhatisDlg::closeEvent( QCloseEvent* e )
{
/* same than click on cancel button */
this->ClickOnCancel() ;
return; return;
} }
@ -389,7 +202,6 @@ void MeasureGUI_WhatisDlg::closeEvent( QCloseEvent* e )
//================================================================================= //=================================================================================
void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S) void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S)
{ {
if(S.IsNull()) if(S.IsNull())
return; return;
@ -397,10 +209,6 @@ void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S)
Astr = Astr + " Number of shapes in " + strdup(SelectedName.latin1()) + " : \n"; Astr = Astr + " Number of shapes in " + strdup(SelectedName.latin1()) + " : \n";
try { try {
// BRepTools_ShapeSet BS;
// BS.Add(S);
// BS.DumpExtent(Astr);
int iType, nbTypes [TopAbs_SHAPE]; int iType, nbTypes [TopAbs_SHAPE];
for(iType = 0; iType < TopAbs_SHAPE; ++iType) for(iType = 0; iType < TopAbs_SHAPE; ++iType)
nbTypes[iType] = 0; nbTypes[iType] = 0;
@ -412,14 +220,11 @@ void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S)
aListOfShape.Append(S); aListOfShape.Append(S);
TopTools_ListIteratorOfListOfShape itL(aListOfShape); TopTools_ListIteratorOfListOfShape itL(aListOfShape);
for (; itL.More(); itL.Next()) for(; itL.More(); itL.Next()) {
{
TopoDS_Iterator it(itL.Value()); TopoDS_Iterator it(itL.Value());
for (; it.More(); it.Next()) for(; it.More(); it.Next()) {
{
TopoDS_Shape s = it.Value(); TopoDS_Shape s = it.Value();
if (aMapOfShape.Add( s )) if(aMapOfShape.Add(s)) {
{
aListOfShape.Append(s); aListOfShape.Append(s);
nbTypes[s.ShapeType()]++; nbTypes[s.ShapeType()]++;
} }
@ -434,12 +239,12 @@ void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S)
Astr = Astr + " SOLID : " + TCollection_AsciiString(nbTypes[TopAbs_SOLID]) + "\n"; Astr = Astr + " SOLID : " + TCollection_AsciiString(nbTypes[TopAbs_SOLID]) + "\n";
Astr = Astr + " COMPSOLID : " + TCollection_AsciiString(nbTypes[TopAbs_COMPSOLID]) + "\n"; Astr = Astr + " COMPSOLID : " + TCollection_AsciiString(nbTypes[TopAbs_COMPSOLID]) + "\n";
Astr = Astr + " COMPOUND : " + TCollection_AsciiString(nbTypes[TopAbs_COMPOUND]) + "\n"; Astr = Astr + " COMPOUND : " + TCollection_AsciiString(nbTypes[TopAbs_COMPOUND]) + "\n";
Astr = Astr + " SHAPE : " + TCollection_AsciiString(aMapOfShape.Extent()) + "\n"; Astr = Astr + " SHAPE : " + TCollection_AsciiString(aMapOfShape.Extent());
Text->setText( Astr.ToCString() ); GroupC1->TextEdit1->setText(Astr.ToCString());
} }
catch(Standard_Failure) { catch(Standard_Failure) {
MESSAGE("Catch intercepted in CalculateWhatis()" << endl ) ; MESSAGE("Catch intercepted in CalculateWhatis()");
} }
return; return;
} }

View File

@ -29,30 +29,16 @@
#ifndef DIALOGBOX_WHATIS_H #ifndef DIALOGBOX_WHATIS_H
#define DIALOGBOX_WHATIS_H #define DIALOGBOX_WHATIS_H
#include "MeasureGUI_Skeleton.h"
#include "MeasureGUI_1Sel1TextView_QTD.h"
#include "MeasureGUI.h" #include "MeasureGUI.h"
#include <TopoDS_Shape.hxx>
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QTextView;
class MeasureGUI;
//================================================================================= //=================================================================================
// class : DialogBox_PROPERTIES // class : DialogBox_PROPERTIES
// purpose : // purpose :
//================================================================================= //=================================================================================
class MeasureGUI_WhatisDlg : public QDialog class MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton
{ {
Q_OBJECT Q_OBJECT
@ -61,51 +47,19 @@ public:
~MeasureGUI_WhatisDlg(); ~MeasureGUI_WhatisDlg();
private: private:
void Init();
void Init( SALOME_Selection* Sel ) ; void enterEvent(QEvent* e);
void closeEvent( QCloseEvent* e ) ;
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
void CalculateWhatis(const TopoDS_Shape& S); void CalculateWhatis(const TopoDS_Shape& S);
GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */
GEOMContext* myGeomGUI ; /* Current GeomGUI object */
GEOMBase* myGeomBase ; /* Current GeomGUI object */
SALOME_Selection* mySelection ; /* User shape selection */
TopoDS_Shape mySimulationTopoDs ; /* Shape used for simulation display */
int myConstructorId ; /* Current constructor id = radio button id */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
QButtonGroup* GroupConstructors;
QRadioButton* Constructor1;
QGroupBox* GroupConstructor1;
QLineEdit* LineEditC1A1;
QPushButton* SelectButtonC1A1;
QLabel* TextLabelC1A1;
QTextView* Text;
QString SelectedName; QString SelectedName;
MeasureGUI_1Sel1TextView_QTD* GroupC1;
QGroupBox* GroupButtons;
QPushButton* buttonApply;
QPushButton* buttonOk;
QPushButton* buttonCancel;
private slots: private slots:
void ConstructorsClicked(int constructorId);
void ClickOnCancel();
void SetEditCurrentArgument(); void SetEditCurrentArgument();
void LineEditReturnPressed() ;
void SelectionIntoArgument(); void SelectionIntoArgument();
void DeactivateActiveDialog() ; void LineEditReturnPressed();
void ActivateThisDialog(); void ActivateThisDialog();
protected:
QGridLayout* MeasureGUI_WhatisDlgLayout;
QGridLayout* GroupConstructorsLayout;
QGridLayout* GroupConstructor1Layout;
QGridLayout* GroupButtonsLayout;
}; };
#endif // DIALOGBOX_WHATIS_H #endif // DIALOGBOX_WHATIS_H

View File

@ -0,0 +1,268 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>MeasureGUI_1Sel12LineEdit_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>MeasureGUI_1Sel12LineEdit_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>131</width>
<height>171</height>
</rect>
</property>
<property name="caption">
<string>MeasureGUI_1Sel12LineEdit_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit12</cstring>
</property>
</widget>
<widget class="QLineEdit" row="0" column="1">
<property name="name">
<cstring>LineEdit11</cstring>
</property>
</widget>
<widget class="QLineEdit" row="3" column="2">
<property name="name">
<cstring>LineEdit42</cstring>
</property>
</widget>
<widget class="QLabel" row="3" column="0">
<property name="name">
<cstring>TextLabel5</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL5</string>
</property>
</widget>
<widget class="QLineEdit" row="2" column="1">
<property name="name">
<cstring>LineEdit31</cstring>
</property>
</widget>
<widget class="QLineEdit" row="3" column="1">
<property name="name">
<cstring>LineEdit41</cstring>
</property>
</widget>
<widget class="QLineEdit" row="1" column="3">
<property name="name">
<cstring>LineEdit23</cstring>
</property>
</widget>
<widget class="QLineEdit" row="2" column="3">
<property name="name">
<cstring>LineEdit33</cstring>
</property>
</widget>
<widget class="QLineEdit" row="3" column="3">
<property name="name">
<cstring>LineEdit43</cstring>
</property>
</widget>
<widget class="QLineEdit" row="1" column="2">
<property name="name">
<cstring>LineEdit22</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL4</string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="3">
<property name="name">
<cstring>LineEdit13</cstring>
</property>
</widget>
<widget class="QLineEdit" row="2" column="2">
<property name="name">
<cstring>LineEdit32</cstring>
</property>
</widget>
<widget class="QLineEdit" row="1" column="1">
<property name="name">
<cstring>LineEdit21</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
</grid>
</widget>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
<spacer row="2" column="2">
<property name="name">
<cstring>Spacer8</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
</spacer>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,116 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>MeasureGUI_1Sel1TextView_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>MeasureGUI_1Sel1TextView_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>130</width>
<height>160</height>
</rect>
</property>
<property name="caption">
<string>MeasureGUI_1Sel1TextView_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QTextEdit" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>TextEdit1</cstring>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,191 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>MeasureGUI_1Sel3LineEdit_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>MeasureGUI_1Sel3LineEdit_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>129</width>
<height>141</height>
</rect>
</property>
<property name="caption">
<string>MeasureGUI_1Sel3LineEdit_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QLineEdit" row="3" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>LineEdit4</cstring>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
<widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>LineEdit2</cstring>
</property>
</widget>
<spacer row="4" column="2">
<property name="name">
<cstring>Spacer8</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
</spacer>
<widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>LineEdit3</cstring>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
<widget class="QLabel" row="3" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL4</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,254 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>MeasureGUI_1Sel6LineEdit_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>MeasureGUI_1Sel6LineEdit_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>129</width>
<height>163</height>
</rect>
</property>
<property name="caption">
<string>MeasureGUI_1Sel6LineEdit_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<spacer row="2" column="2">
<property name="name">
<cstring>Spacer8</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLineEdit" row="2" column="2">
<property name="name">
<cstring>LineEdit22</cstring>
</property>
</widget>
<widget class="QLineEdit" row="3" column="2">
<property name="name">
<cstring>LineEdit32</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL4</string>
</property>
</widget>
<widget class="QLineEdit" row="3" column="1">
<property name="name">
<cstring>LineEdit31</cstring>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel5</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL5</string>
</property>
</widget>
<widget class="QLineEdit" row="1" column="1">
<property name="name">
<cstring>LineEdit11</cstring>
</property>
</widget>
<widget class="QLabel" row="3" column="0">
<property name="name">
<cstring>TextLabel6</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL6</string>
</property>
</widget>
<widget class="QLineEdit" row="1" column="2">
<property name="name">
<cstring>LineEdit12</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="1">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QLineEdit" row="2" column="1">
<property name="name">
<cstring>LineEdit21</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="2">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
</grid>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,186 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>MeasureGUI_2Sel1LineEdit_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>MeasureGUI_2Sel1LineEdit_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>129</width>
<height>115</height>
</rect>
</property>
<property name="caption">
<string>MeasureGUI_2Sel1LineEdit_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<spacer row="3" column="2">
<property name="name">
<cstring>Spacer8</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
<widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>LineEdit3</cstring>
</property>
</widget>
<widget class="QLineEdit" row="1" column="2">
<property name="name">
<cstring>LineEdit2</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
<widget class="QPushButton" row="1" column="1">
<property name="name">
<cstring>PushButton2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,210 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>MeasureGUI_Skeleton_QTD</class>
<widget class="QDialog">
<property name="name">
<cstring>MeasureGUI_Skeleton_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>228</width>
<height>266</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="caption">
<string>MeasureGUI_Skeleton_QTD</string>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="2" column="0">
<property name="name">
<cstring>GroupButtons</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<spacer row="0" column="2">
<property name="name">
<cstring>Spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
</spacer>
<spacer row="0" column="0">
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
</spacer>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>buttonClose</cstring>
</property>
<property name="text">
<string>&amp;Close</string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
<widget class="QButtonGroup" row="0" column="0">
<property name="name">
<cstring>GroupConstructors</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QRadioButton">
<property name="name">
<cstring>RadioButton1</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
</hbox>
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="1" column="0">
<property name="name">
<cstring>GroupMedium</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,19 @@
#!/bin/sh
#uic -o MeasureGUI_Skeleton_QTD.h MeasureGUI_Skeleton_QTD.ui
#uic -o MeasureGUI_Skeleton_QTD.cxx -impl MeasureGUI_Skeleton_QTD.h MeasureGUI_Skeleton_QTD.ui
uic -o MeasureGUI_1Sel3LineEdit_QTD.h MeasureGUI_1Sel3LineEdit_QTD.ui
uic -o MeasureGUI_1Sel3LineEdit_QTD.cxx -impl MeasureGUI_1Sel3LineEdit_QTD.h MeasureGUI_1Sel3LineEdit_QTD.ui
uic -o MeasureGUI_1Sel6LineEdit_QTD.h MeasureGUI_1Sel6LineEdit_QTD.ui
uic -o MeasureGUI_1Sel6LineEdit_QTD.cxx -impl MeasureGUI_1Sel6LineEdit_QTD.h MeasureGUI_1Sel6LineEdit_QTD.ui
uic -o MeasureGUI_1Sel12LineEdit_QTD.h MeasureGUI_1Sel12LineEdit_QTD.ui
uic -o MeasureGUI_1Sel12LineEdit_QTD.cxx -impl MeasureGUI_1Sel12LineEdit_QTD.h MeasureGUI_1Sel12LineEdit_QTD.ui
uic -o MeasureGUI_2Sel1LineEdit_QTD.h MeasureGUI_2Sel1LineEdit_QTD.ui
uic -o MeasureGUI_2Sel1LineEdit_QTD.cxx -impl MeasureGUI_2Sel1LineEdit_QTD.h MeasureGUI_2Sel1LineEdit_QTD.ui
#uic -o MeasureGUI_1Sel1TextView_QTD.h MeasureGUI_1Sel1TextView_QTD.ui
#uic -o MeasureGUI_1Sel1TextView_QTD.cxx -impl MeasureGUI_1Sel1TextView_QTD.h MeasureGUI_1Sel1TextView_QTD.ui

View File

@ -53,8 +53,6 @@ OperationGUI::OperationGUI() :
{ {
myGeomBase = new GEOMBase(); myGeomBase = new GEOMBase();
myGeomGUI = GEOMContext::GetGeomGUI(); myGeomGUI = GEOMContext::GetGeomGUI();
// Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
// myGeom = GEOM::GEOM_Gen::_narrow(comp);
myGeom = myGeomGUI->myComponentGeom; myGeom = myGeomGUI->myComponentGeom;
} }

Some files were not shown because too many files have changed in this diff Show More