mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 02:00:35 +05:00
DCQ : new Sketcher
This commit is contained in:
parent
2c6f7ae083
commit
ddd9c82610
@ -26,7 +26,6 @@
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
using namespace std;
|
||||
#include "EntityGUI.h"
|
||||
|
||||
#include "QAD_RightFrame.h"
|
||||
@ -36,18 +35,18 @@ using namespace std;
|
||||
#include "SALOMEGUI_ImportOperation.h"
|
||||
#include "SALOMEGUI_QtCatchCorbaException.hxx"
|
||||
|
||||
#include <BRepTools_WireExplorer.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopoDS_Compound.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include "DisplayGUI.h"
|
||||
#include "EntityGUI_SubShapeDlg.h" // Method SUBSHAPE
|
||||
|
||||
#include "EntityGUI_SketcherDlg.h" // Sketcher
|
||||
#include "EntityGUI_SubShapeDlg.h" // Method SUBSHAPE
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=======================================================================
|
||||
// function : EntityGUI()
|
||||
@ -59,6 +58,9 @@ EntityGUI::EntityGUI() :
|
||||
myGeomBase = new GEOMBase();
|
||||
myGeomGUI = GEOMContext::GetGeomGUI();
|
||||
myGeom = myGeomGUI->myComponentGeom;
|
||||
|
||||
mySimulationShape1 = new AIS_Shape(TopoDS_Shape());
|
||||
mySimulationShape2 = new AIS_Shape(TopoDS_Shape());
|
||||
}
|
||||
|
||||
|
||||
@ -81,126 +83,12 @@ bool EntityGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||
myEntityGUI->myGeomGUI->EmitSignalDeactivateDialog();
|
||||
SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection());
|
||||
|
||||
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
||||
|
||||
switch (theCommandID)
|
||||
{
|
||||
case 404: // SKETCHER
|
||||
{
|
||||
((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->onViewTop(); // DCQ : 28/02/2002
|
||||
|
||||
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
|
||||
|
||||
myEntityGUI->myGeomGUI->GetSketcher() = Sketch(v3d->getViewer3d());
|
||||
myEntityGUI->myGeomGUI->myState = 2;
|
||||
|
||||
Mb->setItemChecked(4052, false);
|
||||
Mb->setItemChecked(4053, false);
|
||||
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(LENGTH_PARAMETER, Mb->isItemChecked(4061));
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(ANGLE_PARAMETER, Mb->isItemChecked(4062));
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(RADIUS_PARAMETER, Mb->isItemChecked(4063));
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(XVALUE_PARAMETER, Mb->isItemChecked(4064));
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(YVALUE_PARAMETER, Mb->isItemChecked(4065));
|
||||
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
|
||||
break;
|
||||
}
|
||||
case 4041: // SKETCH Segment
|
||||
{
|
||||
myEntityGUI->myGeomGUI->GetSketcher().ChangeMode(SEGMENT);
|
||||
break;
|
||||
}
|
||||
case 4042: // SKETCH Arc
|
||||
{
|
||||
myEntityGUI->myGeomGUI->GetSketcher().ChangeMode(ARC_CHORD);
|
||||
break;
|
||||
}
|
||||
case 4043: // SKETCH Set Angle
|
||||
{
|
||||
myEntityGUI->OnSketchSetAngle();
|
||||
break;
|
||||
}
|
||||
case 4044: // SKETCH Set X
|
||||
{
|
||||
myEntityGUI->OnSketchSetx();
|
||||
break;
|
||||
}
|
||||
case 4045: // SKETCH Set Y
|
||||
{
|
||||
myEntityGUI->OnSketchSety();
|
||||
break;
|
||||
}
|
||||
case 4046: // SKETCH Delete
|
||||
{
|
||||
myEntityGUI->OnSketchDelete();
|
||||
break;
|
||||
}
|
||||
case 4047: // SKETCH End
|
||||
{
|
||||
myEntityGUI->OnSketchEnd();
|
||||
break;
|
||||
}
|
||||
case 4048: // SKETCH Close
|
||||
{
|
||||
myEntityGUI->OnSketchClose();
|
||||
break;
|
||||
}
|
||||
case 4051: // sketcher Set Plane
|
||||
{
|
||||
//TO DO
|
||||
break;
|
||||
}
|
||||
case 4052: // sketcher TANGENT
|
||||
{
|
||||
Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
|
||||
if(Mb->isItemChecked(theCommandID) == true)
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(TANGENT);
|
||||
else
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
|
||||
|
||||
Mb->setItemChecked(4053, false);
|
||||
break;
|
||||
}
|
||||
case 4053: // sketcher PERPENDICULAR
|
||||
{
|
||||
Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
|
||||
if(Mb->isItemChecked(theCommandID) == true)
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(PERPENDICULAR);
|
||||
else
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
|
||||
|
||||
Mb->setItemChecked(4052, false);
|
||||
break;
|
||||
}
|
||||
case 4061: // SKETCH OptionsOnofflengthdimension
|
||||
{
|
||||
Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(LENGTH_PARAMETER, Mb->isItemChecked(theCommandID));
|
||||
break;
|
||||
}
|
||||
case 4062: // SKETCH OptionsOnoffangledimension
|
||||
{
|
||||
Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(ANGLE_PARAMETER, Mb->isItemChecked(theCommandID));
|
||||
break;
|
||||
}
|
||||
case 4063: // SKETCH OptionsOnoffradiusdimension
|
||||
{
|
||||
Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(RADIUS_PARAMETER, Mb->isItemChecked(theCommandID));
|
||||
break;
|
||||
}
|
||||
case 4064: // SKETCH OptionsOnoffxdimension
|
||||
{
|
||||
Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(XVALUE_PARAMETER, Mb->isItemChecked(theCommandID));
|
||||
break;
|
||||
}
|
||||
case 4065: // SKETCH OptionsOnoffydimension
|
||||
{
|
||||
Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
|
||||
myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(YVALUE_PARAMETER, Mb->isItemChecked(theCommandID));
|
||||
EntityGUI_SketcherDlg* aDlg = new EntityGUI_SketcherDlg(parent, "", myEntityGUI, Sel);
|
||||
break;
|
||||
}
|
||||
case 407: // EXPLODE : use ic
|
||||
@ -223,258 +111,97 @@ bool EntityGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : OnSketchSetAngle()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void EntityGUI::OnSketchSetAngle()
|
||||
{
|
||||
Standard_Real anAngle = myGeomGUI->GetSketcher().GetSegmentAngle()/PI180;
|
||||
Sketch::fitInResol(anAngle);
|
||||
Standard_Boolean res = false;
|
||||
QString Value = QString("%1").arg(anAngle);
|
||||
anAngle = myGeomBase->Parameter(res, Value, tr("GEOM_MEN_ANGLE"), tr("GEOM_MEN_ENTER_ANGLE"),
|
||||
-180.0, +180.0, 6) * PI180;
|
||||
|
||||
if(res) {
|
||||
myGeomGUI->GetSketcher().SetSegmentAngle(anAngle);
|
||||
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
||||
Mb->setItemChecked(4052, false);
|
||||
Mb->setItemChecked(4053, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : OnSketchSetx()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void EntityGUI::OnSketchSetx()
|
||||
{
|
||||
Standard_Boolean res = false;
|
||||
double X = myGeomBase->Parameter(res, "0.", tr("GEOM_MEN_X"), tr("GEOM_MEN_SKETCHER_X"),
|
||||
2.0 * Precision::Confusion(), 1E6, 6);
|
||||
if(res)
|
||||
myGeomGUI->GetSketcher().SetXDimension(X);
|
||||
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
||||
Mb->setItemChecked(4052, false);
|
||||
Mb->setItemChecked(4053, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : OnSketchSety()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void EntityGUI::OnSketchSety()
|
||||
{
|
||||
Standard_Boolean res = false;
|
||||
double Y = myGeomBase->Parameter(res, "0.", tr("GEOM_MEN_Y"), tr("GEOM_MEN_SKETCHER_Y"), 2.0 * Precision::Confusion(), 1E6, 6);
|
||||
if(res)
|
||||
myGeomGUI->GetSketcher().SetYDimension(Y);
|
||||
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
||||
Mb->setItemChecked(4052, false);
|
||||
Mb->setItemChecked(4053, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : OnSketchDelete()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void EntityGUI::OnSketchDelete()
|
||||
{
|
||||
if(myGeomGUI->GetSketcher().GetmyEdgesNumber() == 1) {
|
||||
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
||||
Mb->setItemEnabled(405, false); // SKETCH CONTRAINTS
|
||||
myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
|
||||
}
|
||||
|
||||
if(myGeomGUI->GetSketcher().Delete())
|
||||
myGeomGUI->myState = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : OnSketchClose()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void EntityGUI::OnSketchClose()
|
||||
{
|
||||
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
|
||||
Handle(AIS_InteractiveContext) myContext = v3d->getAISContext();
|
||||
|
||||
TopoDS_Wire W = myGeomGUI->GetSketcher().Close();
|
||||
if(!W.IsNull()) {
|
||||
GEOM::GEOM_Gen::ListOfIOR_var listShapes = new GEOM::GEOM_Gen::ListOfIOR;
|
||||
listShapes->length(0);
|
||||
unsigned int i = 0;
|
||||
|
||||
BRepTools_WireExplorer Ex(W);
|
||||
while(Ex.More()) {
|
||||
TopoDS_Edge E = Ex.Current();
|
||||
gp_Pnt pt1, pt2;
|
||||
|
||||
pt1 = BRep_Tool::Pnt(TopExp::FirstVertex(E));
|
||||
pt2 = BRep_Tool::Pnt(TopExp::LastVertex(E));
|
||||
|
||||
gp_Pnt CenterPoint;
|
||||
Handle(Geom_Curve) Curve;
|
||||
Handle(Geom_Circle) Circle;
|
||||
gp_Circ Circ;
|
||||
Standard_Real First,Last;
|
||||
|
||||
Curve = BRep_Tool::Curve(E,First,Last);
|
||||
if(Curve->IsKind(STANDARD_TYPE(Geom_Circle))) {
|
||||
Circle = Handle(Geom_Circle)::DownCast(Curve); // pointer on geom_circ
|
||||
Circ = Circle->Circ(); // gp_Circ
|
||||
|
||||
Curve->D0((First + Last) / 2., CenterPoint);
|
||||
|
||||
GEOM::PointStruct pI = myGeom->MakePointStruct(pt1.X(), pt1.Y(), pt1.Z());
|
||||
GEOM::PointStruct pC = myGeom->MakePointStruct(CenterPoint.X(), CenterPoint.Y(), CenterPoint.Z());
|
||||
GEOM::PointStruct pE = myGeom->MakePointStruct(pt2.X(), pt2.Y(), pt2.Z());
|
||||
|
||||
GEOM::GEOM_Shape_var arc;
|
||||
|
||||
try {
|
||||
arc = myGeom->MakeArc(pI, pC, pE);
|
||||
}
|
||||
catch (const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
|
||||
listShapes->length(i+1);
|
||||
listShapes[i] = strdup(arc->Name());
|
||||
i++;
|
||||
}
|
||||
else {
|
||||
GEOM::PointStruct pI = myGeom->MakePointStruct(pt1.X(), pt1.Y(), pt1.Z());
|
||||
GEOM::PointStruct pE = myGeom->MakePointStruct(pt2.X(), pt2.Y(), pt2.Z());
|
||||
GEOM::GEOM_Shape_var segment;
|
||||
|
||||
try {
|
||||
segment = myGeom->MakeEdge(pI,pE);
|
||||
}
|
||||
catch (const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
|
||||
listShapes->length(i+1);
|
||||
listShapes[i] = strdup(segment->Name());
|
||||
i++;
|
||||
}
|
||||
Ex.Next();
|
||||
}
|
||||
GEOM::GEOM_Shape_var Wire = myGeom->MakeWire(listShapes);
|
||||
TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, Wire);
|
||||
Standard_CString type;
|
||||
myGeomBase->GetShapeTypeString(S,type);
|
||||
Wire->NameType(type);
|
||||
|
||||
if(myGeomBase->Display(Wire))
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
|
||||
}
|
||||
myGeomGUI->myState = -1;
|
||||
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
||||
Mb->setItemEnabled(405, false); // SKETCH CONTRAINTS
|
||||
myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : OnSketchEnd()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void EntityGUI::OnSketchEnd()
|
||||
void EntityGUI::OnSketchEnd(const char *Cmd)
|
||||
{
|
||||
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
|
||||
Handle (AIS_InteractiveContext) myContext = v3d->getAISContext();
|
||||
|
||||
TopoDS_Wire W = myGeomGUI->GetSketcher().End();
|
||||
if(!W.IsNull()) {
|
||||
GEOM::GEOM_Gen::ListOfIOR_var listShapes = new GEOM::GEOM_Gen::ListOfIOR;
|
||||
listShapes->length(0);
|
||||
unsigned int i = 0;
|
||||
|
||||
BRepTools_WireExplorer Ex(W);
|
||||
while(Ex.More()) {
|
||||
TopoDS_Edge E = TopoDS::Edge(Ex.Current());
|
||||
|
||||
gp_Pnt pt1, pt2;
|
||||
pt1 = BRep_Tool::Pnt(TopExp::FirstVertex(E));
|
||||
pt2 = BRep_Tool::Pnt(TopExp::LastVertex(E));
|
||||
|
||||
gp_Pnt CenterPoint;
|
||||
Handle(Geom_Curve) Curve;
|
||||
Handle(Geom_Circle) Circle;
|
||||
gp_Circ Circ;
|
||||
Standard_Real First,Last;
|
||||
|
||||
Curve = BRep_Tool::Curve(E,First,Last);
|
||||
if(Curve->IsKind(STANDARD_TYPE(Geom_Circle))) {
|
||||
Circle = Handle(Geom_Circle)::DownCast(Curve); // pointer on geom_circ
|
||||
Circ = Circle->Circ(); // gp_Circ
|
||||
|
||||
Curve->D0((First + Last) / 2., CenterPoint);
|
||||
|
||||
GEOM::PointStruct pI = myGeom->MakePointStruct(pt1.X(), pt1.Y(), pt1.Z());
|
||||
GEOM::PointStruct pC = myGeom->MakePointStruct(CenterPoint.X(), CenterPoint.Y(), CenterPoint.Z());
|
||||
GEOM::PointStruct pE = myGeom->MakePointStruct(pt2.X(), pt2.Y(), pt2.Z());
|
||||
|
||||
GEOM::GEOM_Shape_var arc;
|
||||
|
||||
try {
|
||||
arc = myGeom->MakeArc(pI, pC, pE);
|
||||
}
|
||||
catch (const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
|
||||
listShapes->length(i+1);
|
||||
listShapes[i] = strdup(arc->Name());
|
||||
i++;
|
||||
} else {
|
||||
GEOM::PointStruct pI = myGeom->MakePointStruct(pt1.X(), pt1.Y(), pt1.Z());
|
||||
GEOM::PointStruct pE = myGeom->MakePointStruct(pt2.X(), pt2.Y(), pt2.Z());
|
||||
GEOM::GEOM_Shape_var segment;
|
||||
|
||||
try {
|
||||
segment = myGeom->MakeEdge(pI,pE);
|
||||
}
|
||||
catch (const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
|
||||
listShapes->length(i+1);
|
||||
listShapes[i] = strdup(segment->Name());
|
||||
i++;
|
||||
}
|
||||
Ex.Next();
|
||||
try {
|
||||
GEOM::GEOM_Shape_var result = myGeom->MakeSketcher(Cmd);
|
||||
if(result->_is_nil()) {
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
|
||||
return;
|
||||
}
|
||||
|
||||
GEOM::GEOM_Shape_var Wire = myGeom->MakeWire(listShapes);
|
||||
TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, Wire);
|
||||
Standard_CString type;
|
||||
myGeomBase->GetShapeTypeString(S,type);
|
||||
Wire->NameType(type);
|
||||
|
||||
if(myGeomBase->Display(Wire))
|
||||
result->NameType(tr("GEOM_WIRE"));
|
||||
if(myGeomBase->Display(result))
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
|
||||
}
|
||||
myGeomGUI->myState = -1;
|
||||
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
||||
Mb->setItemEnabled(405, false); // SKETCH CONTRAINTS
|
||||
myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
|
||||
catch(const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================================
|
||||
// function : DisplaySimulationShape()
|
||||
// purpose : Displays 'this->mySimulationShape' a pure graphical shape from a TopoDS_Shape
|
||||
//=====================================================================================
|
||||
void EntityGUI::DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shape& S2)
|
||||
{
|
||||
//NRI DEBUG : 14/02/2002
|
||||
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
|
||||
return;
|
||||
|
||||
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
|
||||
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
|
||||
try {
|
||||
if(!S1.IsNull()) {
|
||||
/* erase any previous */
|
||||
ic->Erase(mySimulationShape1, Standard_True, Standard_False);
|
||||
ic->ClearPrs(mySimulationShape1);
|
||||
|
||||
mySimulationShape1 = new AIS_Shape(TopoDS_Shape());
|
||||
mySimulationShape1->Set(S1);
|
||||
mySimulationShape1->SetColor(Quantity_NOC_RED);
|
||||
|
||||
ic->Deactivate(mySimulationShape1);
|
||||
ic->Display(mySimulationShape1, Standard_False);
|
||||
mySimulationShape1->UnsetColor();
|
||||
}
|
||||
if(!S2.IsNull()) {
|
||||
ic->Erase(mySimulationShape2, Standard_True, Standard_False);
|
||||
ic->ClearPrs(mySimulationShape2);
|
||||
|
||||
mySimulationShape2 = new AIS_Shape(TopoDS_Shape());
|
||||
mySimulationShape2->Set(S2);
|
||||
mySimulationShape2->SetColor(Quantity_NOC_VIOLET);
|
||||
|
||||
ic->Deactivate(mySimulationShape2);
|
||||
ic->Display(mySimulationShape2, Standard_False);
|
||||
mySimulationShape2->UnsetColor();
|
||||
}
|
||||
ic->UpdateCurrentViewer();
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
MESSAGE("Exception catched in EntityGUI::DisplaySimulationShape ");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//==================================================================================
|
||||
// function : EraseSimulationShape()
|
||||
// purpose : Clears the display of 'mySimulationShape' a pure graphical shape
|
||||
//==================================================================================
|
||||
void EntityGUI::EraseSimulationShape()
|
||||
{
|
||||
int count = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount();
|
||||
for(int i = 0; i < count; i++) {
|
||||
if(QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC) {
|
||||
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer();
|
||||
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
|
||||
ic->Erase(mySimulationShape1, Standard_True, Standard_False);
|
||||
ic->ClearPrs(mySimulationShape1);
|
||||
ic->Erase(mySimulationShape2, Standard_True, Standard_False);
|
||||
ic->ClearPrs(mySimulationShape2);
|
||||
ic->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================================
|
||||
// function : SObjectExist()
|
||||
// purpose :
|
||||
|
@ -45,14 +45,10 @@ public :
|
||||
|
||||
static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
|
||||
|
||||
/* Sketcher management */
|
||||
void OnSketchSetAngle();
|
||||
void OnSketchSetx();
|
||||
void OnSketchSety();
|
||||
|
||||
void OnSketchDelete();
|
||||
void OnSketchClose();
|
||||
void OnSketchEnd();
|
||||
void OnSketchEnd(const char *Cmd);
|
||||
|
||||
void DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||
void EraseSimulationShape();
|
||||
|
||||
/* Methods for sub shapes explode */
|
||||
bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR);
|
||||
@ -60,6 +56,10 @@ public :
|
||||
bool OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType,
|
||||
Standard_Integer& aLocalContextId, bool& myUseLocalContext);
|
||||
|
||||
/* AIS shape used only during topo/geom simulations */
|
||||
Handle(AIS_Shape) mySimulationShape1;
|
||||
Handle(AIS_Shape) mySimulationShape2;
|
||||
|
||||
GEOMBase* myGeomBase;
|
||||
GEOMContext* myGeomGUI;
|
||||
GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */
|
||||
|
94
src/EntityGUI/EntityGUI_1Sel_QTD.cxx
Normal file
94
src/EntityGUI/EntityGUI_1Sel_QTD.cxx
Normal file
@ -0,0 +1,94 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'EntityGUI_1Sel_QTD.ui'
|
||||
**
|
||||
** Created: Fri Apr 30 11:23:36 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "EntityGUI_1Sel_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 EntityGUI_1Sel_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
EntityGUI_1Sel_QTD::EntityGUI_1Sel_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "EntityGUI_1Sel_QTD" );
|
||||
resize( 245, 110 );
|
||||
setCaption( trUtf8( "EntityGUI_1Sel_QTD" ) );
|
||||
EntityGUI_1Sel_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_1Sel_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "Values" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3");
|
||||
|
||||
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
|
||||
|
||||
buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
|
||||
buttonUndo->setText( trUtf8( "Undo" ) );
|
||||
|
||||
Layout2->addWidget( buttonUndo, 1, 0 );
|
||||
|
||||
buttonApply = new QPushButton( GroupBox1, "buttonApply" );
|
||||
buttonApply->setText( trUtf8( "Create" ) );
|
||||
|
||||
Layout2->addWidget( buttonApply, 0, 0 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout2->addItem( spacer, 2, 0 );
|
||||
|
||||
Layout3->addLayout( Layout2, 0, 1 );
|
||||
|
||||
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 );
|
||||
QSpacerItem* spacer_2 = new QSpacerItem( 0, 180, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer_2, 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 );
|
||||
|
||||
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
|
||||
LineEdit1->setFocusPolicy( QLineEdit::NoFocus );
|
||||
|
||||
Layout1->addWidget( LineEdit1, 0, 2 );
|
||||
|
||||
Layout3->addLayout( Layout1, 0, 0 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout3, 0, 0 );
|
||||
|
||||
EntityGUI_1Sel_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_1Sel_QTD::~EntityGUI_1Sel_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
46
src/EntityGUI/EntityGUI_1Sel_QTD.h
Normal file
46
src/EntityGUI/EntityGUI_1Sel_QTD.h
Normal file
@ -0,0 +1,46 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'EntityGUI_1Sel_QTD.ui'
|
||||
**
|
||||
** Created: Fri Apr 30 11:23:32 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef ENTITYGUI_1SEL_QTD_H
|
||||
#define ENTITYGUI_1SEL_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
|
||||
class EntityGUI_1Sel_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_1Sel_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_1Sel_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QPushButton* buttonUndo;
|
||||
QPushButton* buttonApply;
|
||||
QLabel* TextLabel1;
|
||||
QPushButton* PushButton1;
|
||||
QLineEdit* LineEdit1;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* EntityGUI_1Sel_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout3;
|
||||
QGridLayout* Layout2;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_1SEL_QTD_H
|
56
src/EntityGUI/EntityGUI_1Spin.cxx
Normal file
56
src/EntityGUI/EntityGUI_1Spin.cxx
Normal file
@ -0,0 +1,56 @@
|
||||
// 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 : EntityGUI_1Spin.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#include "EntityGUI_1Spin.h"
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qgroupbox.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_1Spin which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*/
|
||||
EntityGUI_1Spin::EntityGUI_1Spin(QWidget* parent, const char* name, WFlags fl)
|
||||
:EntityGUI_1Spin_QTD(parent, name, fl)
|
||||
{
|
||||
SpinBox1->close(TRUE);
|
||||
|
||||
SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
|
||||
Layout1->addWidget(SpinBox_DX, 0, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_1Spin::~EntityGUI_1Spin()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
47
src/EntityGUI/EntityGUI_1Spin.h
Normal file
47
src/EntityGUI/EntityGUI_1Spin.h
Normal file
@ -0,0 +1,47 @@
|
||||
// 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 : EntityGUI_1Spin.h
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef ENTITYGUI_1SPIN_H
|
||||
#define ENTITYGUI_1SPIN_H
|
||||
|
||||
#include "EntityGUI_1Spin_QTD.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
class EntityGUI_1Spin : public EntityGUI_1Spin_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_1Spin(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
|
||||
~EntityGUI_1Spin();
|
||||
|
||||
DlgRef_SpinBox* SpinBox_DX;
|
||||
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_1SPIN_H
|
88
src/EntityGUI/EntityGUI_1Spin_QTD.cxx
Normal file
88
src/EntityGUI/EntityGUI_1Spin_QTD.cxx
Normal file
@ -0,0 +1,88 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'EntityGUI_1Spin_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:10 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "EntityGUI_1Spin_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_1Spin_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
EntityGUI_1Spin_QTD::EntityGUI_1Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "EntityGUI_1Spin_QTD" );
|
||||
resize( 154, 96 );
|
||||
setCaption( trUtf8( "EntityGUI_1Spin_QTD" ) );
|
||||
EntityGUI_1Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_1Spin_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "Values" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3");
|
||||
|
||||
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
|
||||
|
||||
buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
|
||||
buttonUndo->setText( trUtf8( "Undo" ) );
|
||||
|
||||
Layout2->addWidget( buttonUndo, 1, 0 );
|
||||
|
||||
buttonApply = new QPushButton( GroupBox1, "buttonApply" );
|
||||
buttonApply->setText( trUtf8( "Create" ) );
|
||||
|
||||
Layout2->addWidget( buttonApply, 0, 0 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout2->addItem( spacer, 2, 0 );
|
||||
|
||||
Layout3->addLayout( Layout2, 0, 1 );
|
||||
|
||||
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 );
|
||||
|
||||
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
|
||||
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox1, 0, 1 );
|
||||
QSpacerItem* spacer_2 = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer_2, 3, 1 );
|
||||
|
||||
Layout3->addLayout( Layout1, 0, 0 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout3, 0, 0 );
|
||||
|
||||
EntityGUI_1Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_1Spin_QTD::~EntityGUI_1Spin_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
45
src/EntityGUI/EntityGUI_1Spin_QTD.h
Normal file
45
src/EntityGUI/EntityGUI_1Spin_QTD.h
Normal file
@ -0,0 +1,45 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'EntityGUI_1Spin_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:10 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef ENTITYGUI_1SPIN_QTD_H
|
||||
#define ENTITYGUI_1SPIN_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
class QSpinBox;
|
||||
|
||||
class EntityGUI_1Spin_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_1Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_1Spin_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QPushButton* buttonUndo;
|
||||
QPushButton* buttonApply;
|
||||
QLabel* TextLabel1;
|
||||
QSpinBox* SpinBox1;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* EntityGUI_1Spin_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout3;
|
||||
QGridLayout* Layout2;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_1SPIN_QTD_H
|
60
src/EntityGUI/EntityGUI_2Spin.cxx
Normal file
60
src/EntityGUI/EntityGUI_2Spin.cxx
Normal file
@ -0,0 +1,60 @@
|
||||
// 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 : EntityGUI_2Spin.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#include "EntityGUI_2Spin.h"
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qgroupbox.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_2Spin which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*/
|
||||
EntityGUI_2Spin::EntityGUI_2Spin(QWidget* parent, const char* name, WFlags fl)
|
||||
:EntityGUI_2Spin_QTD(parent, name, fl)
|
||||
{
|
||||
SpinBox1->close(TRUE);
|
||||
SpinBox2->close(TRUE);
|
||||
|
||||
SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
|
||||
Layout1->addWidget(SpinBox_DX, 0, 1);
|
||||
|
||||
SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
|
||||
Layout1->addWidget(SpinBox_DY, 1, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_2Spin::~EntityGUI_2Spin()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
48
src/EntityGUI/EntityGUI_2Spin.h
Normal file
48
src/EntityGUI/EntityGUI_2Spin.h
Normal 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 : EntityGUI_2Spin.h
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef ENTITYGUI_2SPIN_H
|
||||
#define ENTITYGUI_2SPIN_H
|
||||
|
||||
#include "EntityGUI_2Spin_QTD.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
class EntityGUI_2Spin : public EntityGUI_2Spin_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_2Spin(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
|
||||
~EntityGUI_2Spin();
|
||||
|
||||
DlgRef_SpinBox* SpinBox_DX;
|
||||
DlgRef_SpinBox* SpinBox_DY;
|
||||
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_2SPIN_H
|
99
src/EntityGUI/EntityGUI_2Spin_QTD.cxx
Normal file
99
src/EntityGUI/EntityGUI_2Spin_QTD.cxx
Normal file
@ -0,0 +1,99 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'EntityGUI_2Spin_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:11 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "EntityGUI_2Spin_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_2Spin_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
EntityGUI_2Spin_QTD::EntityGUI_2Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "EntityGUI_2Spin_QTD" );
|
||||
resize( 154, 96 );
|
||||
setCaption( trUtf8( "EntityGUI_2Spin_QTD" ) );
|
||||
EntityGUI_2Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_2Spin_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "Values" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3");
|
||||
|
||||
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
|
||||
|
||||
buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
|
||||
buttonUndo->setText( trUtf8( "Undo" ) );
|
||||
|
||||
Layout2->addWidget( buttonUndo, 1, 0 );
|
||||
|
||||
buttonApply = new QPushButton( GroupBox1, "buttonApply" );
|
||||
buttonApply->setText( trUtf8( "Create" ) );
|
||||
|
||||
Layout2->addWidget( buttonApply, 0, 0 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout2->addItem( spacer, 2, 0 );
|
||||
|
||||
Layout3->addLayout( Layout2, 0, 1 );
|
||||
|
||||
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 );
|
||||
|
||||
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 );
|
||||
|
||||
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
|
||||
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox1, 0, 1 );
|
||||
|
||||
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
|
||||
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox2, 1, 1 );
|
||||
QSpacerItem* spacer_2 = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer_2, 3, 1 );
|
||||
|
||||
Layout3->addLayout( Layout1, 0, 0 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout3, 0, 0 );
|
||||
|
||||
EntityGUI_2Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_2Spin_QTD::~EntityGUI_2Spin_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
47
src/EntityGUI/EntityGUI_2Spin_QTD.h
Normal file
47
src/EntityGUI/EntityGUI_2Spin_QTD.h
Normal file
@ -0,0 +1,47 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'EntityGUI_2Spin_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:10 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef ENTITYGUI_2SPIN_QTD_H
|
||||
#define ENTITYGUI_2SPIN_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
class QSpinBox;
|
||||
|
||||
class EntityGUI_2Spin_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_2Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_2Spin_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QPushButton* buttonUndo;
|
||||
QPushButton* buttonApply;
|
||||
QLabel* TextLabel2;
|
||||
QLabel* TextLabel1;
|
||||
QSpinBox* SpinBox1;
|
||||
QSpinBox* SpinBox2;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* EntityGUI_2Spin_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout3;
|
||||
QGridLayout* Layout2;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_2SPIN_QTD_H
|
63
src/EntityGUI/EntityGUI_3Spin.cxx
Normal file
63
src/EntityGUI/EntityGUI_3Spin.cxx
Normal 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 : EntityGUI_3Spin.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#include "EntityGUI_3Spin.h"
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qgroupbox.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_3Spin which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*/
|
||||
EntityGUI_3Spin::EntityGUI_3Spin(QWidget* parent, const char* name, WFlags fl)
|
||||
:EntityGUI_3Spin_QTD(parent, name, fl)
|
||||
{
|
||||
SpinBox1->close(TRUE);
|
||||
SpinBox2->close(TRUE);
|
||||
SpinBox3->close(TRUE);
|
||||
|
||||
SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
|
||||
Layout1->addWidget(SpinBox_DX, 0, 1);
|
||||
|
||||
SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
|
||||
Layout1->addWidget(SpinBox_DY, 1, 1);
|
||||
|
||||
SpinBox_DZ = new DlgRef_SpinBox(GroupBox1, "SpinBox_DZ");
|
||||
Layout1->addWidget(SpinBox_DZ, 2, 1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_3Spin::~EntityGUI_3Spin()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
49
src/EntityGUI/EntityGUI_3Spin.h
Normal file
49
src/EntityGUI/EntityGUI_3Spin.h
Normal file
@ -0,0 +1,49 @@
|
||||
// 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 : EntityGUI_3Spin.h
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef ENTITYGUI_3SPIN_H
|
||||
#define ENTITYGUI_3SPIN_H
|
||||
|
||||
#include "EntityGUI_3Spin_QTD.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
class EntityGUI_3Spin : public EntityGUI_3Spin_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_3Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_3Spin();
|
||||
|
||||
DlgRef_SpinBox* SpinBox_DX;
|
||||
DlgRef_SpinBox* SpinBox_DY;
|
||||
DlgRef_SpinBox* SpinBox_DZ;
|
||||
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_3SPIN_H
|
110
src/EntityGUI/EntityGUI_3Spin_QTD.cxx
Normal file
110
src/EntityGUI/EntityGUI_3Spin_QTD.cxx
Normal file
@ -0,0 +1,110 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'EntityGUI_3Spin_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:11 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "EntityGUI_3Spin_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_3Spin_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
EntityGUI_3Spin_QTD::EntityGUI_3Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "EntityGUI_3Spin_QTD" );
|
||||
resize( 154, 120 );
|
||||
setCaption( trUtf8( "EntityGUI_3Spin_QTD" ) );
|
||||
EntityGUI_3Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_3Spin_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "Values" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3");
|
||||
|
||||
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
|
||||
|
||||
buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
|
||||
buttonUndo->setText( trUtf8( "Undo" ) );
|
||||
|
||||
Layout2->addWidget( buttonUndo, 1, 0 );
|
||||
|
||||
buttonApply = new QPushButton( GroupBox1, "buttonApply" );
|
||||
buttonApply->setText( trUtf8( "Create" ) );
|
||||
|
||||
Layout2->addWidget( buttonApply, 0, 0 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout2->addItem( spacer, 2, 0 );
|
||||
|
||||
Layout3->addLayout( Layout2, 0, 1 );
|
||||
|
||||
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 );
|
||||
|
||||
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 );
|
||||
|
||||
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
|
||||
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox1, 0, 1 );
|
||||
|
||||
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
|
||||
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox2, 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" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel3, 2, 0 );
|
||||
QSpacerItem* spacer_2 = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer_2, 3, 1 );
|
||||
|
||||
SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
|
||||
SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox3, 2, 1 );
|
||||
|
||||
Layout3->addLayout( Layout1, 0, 0 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout3, 0, 0 );
|
||||
|
||||
EntityGUI_3Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_3Spin_QTD::~EntityGUI_3Spin_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
49
src/EntityGUI/EntityGUI_3Spin_QTD.h
Normal file
49
src/EntityGUI/EntityGUI_3Spin_QTD.h
Normal file
@ -0,0 +1,49 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'EntityGUI_3Spin_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:11 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef ENTITYGUI_3SPIN_QTD_H
|
||||
#define ENTITYGUI_3SPIN_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
class QSpinBox;
|
||||
|
||||
class EntityGUI_3Spin_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_3Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_3Spin_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QPushButton* buttonUndo;
|
||||
QPushButton* buttonApply;
|
||||
QLabel* TextLabel2;
|
||||
QLabel* TextLabel1;
|
||||
QSpinBox* SpinBox1;
|
||||
QSpinBox* SpinBox2;
|
||||
QLabel* TextLabel3;
|
||||
QSpinBox* SpinBox3;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* EntityGUI_3Spin_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout3;
|
||||
QGridLayout* Layout2;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_3SPIN_QTD_H
|
67
src/EntityGUI/EntityGUI_4Spin.cxx
Normal file
67
src/EntityGUI/EntityGUI_4Spin.cxx
Normal file
@ -0,0 +1,67 @@
|
||||
// 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 : EntityGUI_4Spin.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#include "EntityGUI_4Spin.h"
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qgroupbox.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_4Spin which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*/
|
||||
EntityGUI_4Spin::EntityGUI_4Spin(QWidget* parent, const char* name, WFlags fl)
|
||||
:EntityGUI_4Spin_QTD(parent, name, fl)
|
||||
{
|
||||
SpinBox1->close(TRUE);
|
||||
SpinBox2->close(TRUE);
|
||||
SpinBox3->close(TRUE);
|
||||
SpinBox4->close(TRUE);
|
||||
|
||||
SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
|
||||
Layout1->addWidget(SpinBox_DX, 0, 1);
|
||||
|
||||
SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
|
||||
Layout1->addWidget(SpinBox_DY, 1, 1);
|
||||
|
||||
SpinBox_DZ = new DlgRef_SpinBox(GroupBox1, "SpinBox_DZ");
|
||||
Layout1->addWidget(SpinBox_DZ, 2, 1);
|
||||
|
||||
SpinBox_DS = new DlgRef_SpinBox(GroupBox1, "SpinBox_DS");
|
||||
Layout1->addWidget(SpinBox_DS, 3, 1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_4Spin::~EntityGUI_4Spin()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
50
src/EntityGUI/EntityGUI_4Spin.h
Normal file
50
src/EntityGUI/EntityGUI_4Spin.h
Normal 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 : EntityGUI_4Spin.h
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef ENTITYGUI_4SPIN_H
|
||||
#define ENTITYGUI_4SPIN_H
|
||||
|
||||
#include "EntityGUI_4Spin_QTD.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
class EntityGUI_4Spin : public EntityGUI_4Spin_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_4Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_4Spin();
|
||||
|
||||
DlgRef_SpinBox* SpinBox_DX;
|
||||
DlgRef_SpinBox* SpinBox_DY;
|
||||
DlgRef_SpinBox* SpinBox_DZ;
|
||||
DlgRef_SpinBox* SpinBox_DS;
|
||||
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_4SPIN_H
|
128
src/EntityGUI/EntityGUI_4Spin_QTD.cxx
Normal file
128
src/EntityGUI/EntityGUI_4Spin_QTD.cxx
Normal file
@ -0,0 +1,128 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'EntityGUI_4Spin_QTD.ui'
|
||||
**
|
||||
** Created: Fri Apr 30 10:56:21 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "EntityGUI_4Spin_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_4Spin_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
EntityGUI_4Spin_QTD::EntityGUI_4Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "EntityGUI_4Spin_QTD" );
|
||||
resize( 176, 154 );
|
||||
setCaption( trUtf8( "EntityGUI_4Spin_QTD" ) );
|
||||
EntityGUI_4Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_4Spin_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "Values" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3");
|
||||
|
||||
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
|
||||
|
||||
buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
|
||||
buttonUndo->setText( trUtf8( "Undo" ) );
|
||||
|
||||
Layout2->addWidget( buttonUndo, 1, 0 );
|
||||
|
||||
buttonApply = new QPushButton( GroupBox1, "buttonApply" );
|
||||
buttonApply->setText( trUtf8( "Create" ) );
|
||||
|
||||
Layout2->addWidget( buttonApply, 0, 0 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout2->addItem( spacer, 2, 0 );
|
||||
|
||||
Layout3->addLayout( Layout2, 0, 1 );
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
|
||||
SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
|
||||
SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox3, 2, 1 );
|
||||
|
||||
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
|
||||
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->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" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel2, 1, 0 );
|
||||
QSpacerItem* spacer_2 = new QSpacerItem( 0, 70, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer_2, 4, 1 );
|
||||
|
||||
SpinBox4 = new QSpinBox( GroupBox1, "SpinBox4" );
|
||||
SpinBox4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox4->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox4, 3, 1 );
|
||||
|
||||
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 );
|
||||
|
||||
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
|
||||
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox1, 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 );
|
||||
|
||||
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 );
|
||||
|
||||
Layout3->addLayout( Layout1, 0, 0 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout3, 0, 0 );
|
||||
|
||||
EntityGUI_4Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
|
||||
// tab order
|
||||
setTabOrder( buttonUndo, buttonApply );
|
||||
setTabOrder( buttonApply, SpinBox1 );
|
||||
setTabOrder( SpinBox1, SpinBox2 );
|
||||
setTabOrder( SpinBox2, SpinBox3 );
|
||||
setTabOrder( SpinBox3, SpinBox4 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_4Spin_QTD::~EntityGUI_4Spin_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
51
src/EntityGUI/EntityGUI_4Spin_QTD.h
Normal file
51
src/EntityGUI/EntityGUI_4Spin_QTD.h
Normal file
@ -0,0 +1,51 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'EntityGUI_4Spin_QTD.ui'
|
||||
**
|
||||
** Created: Fri Apr 30 10:56:17 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef ENTITYGUI_4SPIN_QTD_H
|
||||
#define ENTITYGUI_4SPIN_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
class QSpinBox;
|
||||
|
||||
class EntityGUI_4Spin_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_4Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_4Spin_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QPushButton* buttonUndo;
|
||||
QPushButton* buttonApply;
|
||||
QSpinBox* SpinBox3;
|
||||
QSpinBox* SpinBox2;
|
||||
QLabel* TextLabel2;
|
||||
QSpinBox* SpinBox4;
|
||||
QLabel* TextLabel3;
|
||||
QSpinBox* SpinBox1;
|
||||
QLabel* TextLabel1;
|
||||
QLabel* TextLabel4;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* EntityGUI_4Spin_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout3;
|
||||
QGridLayout* Layout2;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_4SPIN_QTD_H
|
80
src/EntityGUI/EntityGUI_Dir1_QTD.cxx
Normal file
80
src/EntityGUI/EntityGUI_Dir1_QTD.cxx
Normal file
@ -0,0 +1,80 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'EntityGUI_Dir1_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:09 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "EntityGUI_Dir1_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_Dir1_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
EntityGUI_Dir1_QTD::EntityGUI_Dir1_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "EntityGUI_Dir1_QTD" );
|
||||
resize( 131, 123 );
|
||||
setCaption( trUtf8( "EntityGUI_Dir1_QTD" ) );
|
||||
EntityGUI_Dir1_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_Dir1_QTDLayout");
|
||||
|
||||
GroupDir1 = new QButtonGroup( this, "GroupDir1" );
|
||||
GroupDir1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupDir1->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupDir1->setTitle( trUtf8( "Direction" ) );
|
||||
GroupDir1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupDir1->layout()->setSpacing( 6 );
|
||||
GroupDir1->layout()->setMargin( 11 );
|
||||
GroupDir1Layout = new QGridLayout( GroupDir1->layout() );
|
||||
GroupDir1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
|
||||
RB_Dir12 = new QRadioButton( GroupDir1, "RB_Dir12" );
|
||||
RB_Dir12->setText( trUtf8( "Perpendicular" ) );
|
||||
|
||||
Layout1->addWidget( RB_Dir12, 1, 0 );
|
||||
|
||||
RB_Dir13 = new QRadioButton( GroupDir1, "RB_Dir13" );
|
||||
RB_Dir13->setText( trUtf8( "Tangent" ) );
|
||||
|
||||
Layout1->addWidget( RB_Dir13, 2, 0 );
|
||||
|
||||
RB_Dir11 = new QRadioButton( GroupDir1, "RB_Dir11" );
|
||||
RB_Dir11->setText( trUtf8( "Angle" ) );
|
||||
|
||||
Layout1->addWidget( RB_Dir11, 0, 0 );
|
||||
|
||||
RB_Dir14 = new QRadioButton( GroupDir1, "RB_Dir14" );
|
||||
RB_Dir14->setText( trUtf8( "VX-VY" ) );
|
||||
|
||||
Layout1->addWidget( RB_Dir14, 3, 0 );
|
||||
|
||||
GroupDir1Layout->addLayout( Layout1, 0, 0 );
|
||||
|
||||
EntityGUI_Dir1_QTDLayout->addWidget( GroupDir1, 0, 0 );
|
||||
|
||||
// tab order
|
||||
setTabOrder( RB_Dir11, RB_Dir12 );
|
||||
setTabOrder( RB_Dir12, RB_Dir13 );
|
||||
setTabOrder( RB_Dir13, RB_Dir14 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_Dir1_QTD::~EntityGUI_Dir1_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
41
src/EntityGUI/EntityGUI_Dir1_QTD.h
Normal file
41
src/EntityGUI/EntityGUI_Dir1_QTD.h
Normal file
@ -0,0 +1,41 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'EntityGUI_Dir1_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:09 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef ENTITYGUI_DIR1_QTD_H
|
||||
#define ENTITYGUI_DIR1_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QButtonGroup;
|
||||
class QRadioButton;
|
||||
|
||||
class EntityGUI_Dir1_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_Dir1_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_Dir1_QTD();
|
||||
|
||||
QButtonGroup* GroupDir1;
|
||||
QRadioButton* RB_Dir12;
|
||||
QRadioButton* RB_Dir13;
|
||||
QRadioButton* RB_Dir11;
|
||||
QRadioButton* RB_Dir14;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* EntityGUI_Dir1_QTDLayout;
|
||||
QGridLayout* GroupDir1Layout;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_DIR1_QTD_H
|
76
src/EntityGUI/EntityGUI_Dir2_QTD.cxx
Normal file
76
src/EntityGUI/EntityGUI_Dir2_QTD.cxx
Normal file
@ -0,0 +1,76 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'EntityGUI_Dir2_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:10 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "EntityGUI_Dir2_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_Dir2_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
EntityGUI_Dir2_QTD::EntityGUI_Dir2_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "EntityGUI_Dir2_QTD" );
|
||||
resize( 124, 106 );
|
||||
setCaption( trUtf8( "EntityGUI_Dir2_QTD" ) );
|
||||
EntityGUI_Dir2_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_Dir2_QTDLayout");
|
||||
|
||||
GroupDir2 = new QButtonGroup( this, "GroupDir2" );
|
||||
GroupDir2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDir2->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupDir2->setTitle( trUtf8( "Direction" ) );
|
||||
GroupDir2->setColumnLayout(0, Qt::Vertical );
|
||||
GroupDir2->layout()->setSpacing( 6 );
|
||||
GroupDir2->layout()->setMargin( 11 );
|
||||
GroupDir2Layout = new QGridLayout( GroupDir2->layout() );
|
||||
GroupDir2Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
|
||||
RB_Dir22 = new QRadioButton( GroupDir2, "RB_Dir22" );
|
||||
RB_Dir22->setText( trUtf8( "X" ) );
|
||||
|
||||
Layout1->addWidget( RB_Dir22, 1, 0 );
|
||||
|
||||
RB_Dir23 = new QRadioButton( GroupDir2, "RB_Dir23" );
|
||||
RB_Dir23->setText( trUtf8( "Y" ) );
|
||||
|
||||
Layout1->addWidget( RB_Dir23, 2, 0 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer, 3, 0 );
|
||||
|
||||
RB_Dir21 = new QRadioButton( GroupDir2, "RB_Dir21" );
|
||||
RB_Dir21->setText( trUtf8( "Length" ) );
|
||||
|
||||
Layout1->addWidget( RB_Dir21, 0, 0 );
|
||||
|
||||
GroupDir2Layout->addLayout( Layout1, 0, 0 );
|
||||
|
||||
EntityGUI_Dir2_QTDLayout->addWidget( GroupDir2, 0, 0 );
|
||||
|
||||
// tab order
|
||||
setTabOrder( RB_Dir21, RB_Dir22 );
|
||||
setTabOrder( RB_Dir22, RB_Dir23 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_Dir2_QTD::~EntityGUI_Dir2_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
40
src/EntityGUI/EntityGUI_Dir2_QTD.h
Normal file
40
src/EntityGUI/EntityGUI_Dir2_QTD.h
Normal file
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'EntityGUI_Dir2_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:09 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef ENTITYGUI_DIR2_QTD_H
|
||||
#define ENTITYGUI_DIR2_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QButtonGroup;
|
||||
class QRadioButton;
|
||||
|
||||
class EntityGUI_Dir2_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_Dir2_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_Dir2_QTD();
|
||||
|
||||
QButtonGroup* GroupDir2;
|
||||
QRadioButton* RB_Dir22;
|
||||
QRadioButton* RB_Dir23;
|
||||
QRadioButton* RB_Dir21;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* EntityGUI_Dir2_QTDLayout;
|
||||
QGridLayout* GroupDir2Layout;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_DIR2_QTD_H
|
74
src/EntityGUI/EntityGUI_Point_QTD.cxx
Normal file
74
src/EntityGUI/EntityGUI_Point_QTD.cxx
Normal file
@ -0,0 +1,74 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'EntityGUI_Point_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:08 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "EntityGUI_Point_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a EntityGUI_Point_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
EntityGUI_Point_QTD::EntityGUI_Point_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "EntityGUI_Point_QTD" );
|
||||
resize( 124, 106 );
|
||||
setCaption( trUtf8( "EntityGUI_Point_QTD" ) );
|
||||
EntityGUI_Point_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_Point_QTDLayout");
|
||||
|
||||
GroupPoint = new QButtonGroup( this, "GroupPoint" );
|
||||
GroupPoint->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupPoint->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupPoint->setTitle( trUtf8( "Point" ) );
|
||||
GroupPoint->setColumnLayout(0, Qt::Vertical );
|
||||
GroupPoint->layout()->setSpacing( 6 );
|
||||
GroupPoint->layout()->setMargin( 11 );
|
||||
GroupPointLayout = new QGridLayout( GroupPoint->layout() );
|
||||
GroupPointLayout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
|
||||
RB_Point2 = new QRadioButton( GroupPoint, "RB_Point2" );
|
||||
RB_Point2->setText( trUtf8( "Relative" ) );
|
||||
|
||||
Layout1->addWidget( RB_Point2, 1, 0 );
|
||||
|
||||
RB_Point1 = new QRadioButton( GroupPoint, "RB_Point1" );
|
||||
RB_Point1->setText( trUtf8( "Absolute" ) );
|
||||
|
||||
Layout1->addWidget( RB_Point1, 0, 0 );
|
||||
|
||||
RB_Point3 = new QRadioButton( GroupPoint, "RB_Point3" );
|
||||
RB_Point3->setText( trUtf8( "Selection" ) );
|
||||
|
||||
Layout1->addWidget( RB_Point3, 2, 0 );
|
||||
|
||||
GroupPointLayout->addLayout( Layout1, 0, 0 );
|
||||
|
||||
EntityGUI_Point_QTDLayout->addWidget( GroupPoint, 0, 0 );
|
||||
|
||||
// tab order
|
||||
setTabOrder( RB_Point1, RB_Point2 );
|
||||
setTabOrder( RB_Point2, RB_Point3 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_Point_QTD::~EntityGUI_Point_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
40
src/EntityGUI/EntityGUI_Point_QTD.h
Normal file
40
src/EntityGUI/EntityGUI_Point_QTD.h
Normal file
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'EntityGUI_Point_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:08 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef ENTITYGUI_POINT_QTD_H
|
||||
#define ENTITYGUI_POINT_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QButtonGroup;
|
||||
class QRadioButton;
|
||||
|
||||
class EntityGUI_Point_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_Point_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~EntityGUI_Point_QTD();
|
||||
|
||||
QButtonGroup* GroupPoint;
|
||||
QRadioButton* RB_Point2;
|
||||
QRadioButton* RB_Point1;
|
||||
QRadioButton* RB_Point3;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* EntityGUI_Point_QTDLayout;
|
||||
QGridLayout* GroupPointLayout;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_POINT_QTD_H
|
176
src/EntityGUI/EntityGUI_Skeleton_QTD.cxx
Normal file
176
src/EntityGUI/EntityGUI_Skeleton_QTD.cxx
Normal file
@ -0,0 +1,176 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'EntityGUI_Skeleton_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:08 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "EntityGUI_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 EntityGUI_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.
|
||||
*/
|
||||
EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl )
|
||||
: QDialog( parent, name, modal, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "EntityGUI_Skeleton_QTD" );
|
||||
resize( 317, 276 );
|
||||
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
|
||||
setCaption( trUtf8( "EntityGUI_Skeleton_QTD" ) );
|
||||
EntityGUI_Skeleton_QTDLayout = new QGridLayout( this, 1, 1, 11, 6, "EntityGUI_Skeleton_QTDLayout");
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
|
||||
GroupVal = new QGroupBox( this, "GroupVal" );
|
||||
GroupVal->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupVal->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupVal->setTitle( trUtf8( "" ) );
|
||||
|
||||
Layout1->addWidget( GroupVal, 2, 0 );
|
||||
|
||||
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
|
||||
GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupConstructors->setTitle( trUtf8( "Element Type" ) );
|
||||
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( "Segment" ) );
|
||||
Layout2->addWidget( RadioButton1 );
|
||||
|
||||
RadioButton2 = new QRadioButton( GroupConstructors, "RadioButton2" );
|
||||
RadioButton2->setText( trUtf8( "Arc" ) );
|
||||
Layout2->addWidget( RadioButton2 );
|
||||
|
||||
GroupConstructorsLayout->addLayout( Layout2, 0, 0 );
|
||||
|
||||
Layout1->addWidget( GroupConstructors, 0, 0 );
|
||||
|
||||
GroupDest = new QGroupBox( this, "GroupDest" );
|
||||
GroupDest->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupDest->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupDest->setTitle( trUtf8( "Destination" ) );
|
||||
GroupDest->setColumnLayout(0, Qt::Vertical );
|
||||
GroupDest->layout()->setSpacing( 6 );
|
||||
GroupDest->layout()->setMargin( 11 );
|
||||
GroupDestLayout = new QGridLayout( GroupDest->layout() );
|
||||
GroupDestLayout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout5 = new QGridLayout( 0, 1, 1, 0, 6, "Layout5");
|
||||
|
||||
GroupDest1 = new QButtonGroup( GroupDest, "GroupDest1" );
|
||||
GroupDest1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupDest1->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupDest1->setTitle( trUtf8( "Type" ) );
|
||||
GroupDest1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupDest1->layout()->setSpacing( 6 );
|
||||
GroupDest1->layout()->setMargin( 11 );
|
||||
GroupDest1Layout = new QGridLayout( GroupDest1->layout() );
|
||||
GroupDest1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout4 = new QGridLayout( 0, 1, 1, 0, 6, "Layout4");
|
||||
|
||||
RB_Dest2 = new QRadioButton( GroupDest1, "RB_Dest2" );
|
||||
RB_Dest2->setText( trUtf8( "Direction" ) );
|
||||
|
||||
Layout4->addWidget( RB_Dest2, 0, 1 );
|
||||
|
||||
RB_Dest1 = new QRadioButton( GroupDest1, "RB_Dest1" );
|
||||
RB_Dest1->setText( trUtf8( "Point" ) );
|
||||
|
||||
Layout4->addWidget( RB_Dest1, 0, 0 );
|
||||
|
||||
GroupDest1Layout->addLayout( Layout4, 0, 0 );
|
||||
|
||||
Layout5->addMultiCellWidget( GroupDest1, 0, 0, 0, 1 );
|
||||
|
||||
GroupDest2 = new QButtonGroup( GroupDest, "GroupDest2" );
|
||||
GroupDest2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest2->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupDest2->setTitle( trUtf8( "" ) );
|
||||
GroupDest2->setColumnLayout(0, Qt::Vertical );
|
||||
GroupDest2->layout()->setSpacing( 6 );
|
||||
GroupDest2->layout()->setMargin( 11 );
|
||||
GroupDest2Layout = new QGridLayout( GroupDest2->layout() );
|
||||
GroupDest2Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout5->addWidget( GroupDest2, 1, 0 );
|
||||
|
||||
GroupDest3 = new QButtonGroup( GroupDest, "GroupDest3" );
|
||||
GroupDest3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest3->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupDest3->setTitle( trUtf8( "" ) );
|
||||
GroupDest3->setColumnLayout(0, Qt::Vertical );
|
||||
GroupDest3->layout()->setSpacing( 6 );
|
||||
GroupDest3->layout()->setMargin( 11 );
|
||||
GroupDest3Layout = new QGridLayout( GroupDest3->layout() );
|
||||
GroupDest3Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout5->addWidget( GroupDest3, 1, 1 );
|
||||
|
||||
GroupDestLayout->addLayout( Layout5, 0, 0 );
|
||||
|
||||
Layout1->addWidget( GroupDest, 1, 0 );
|
||||
|
||||
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 QHBoxLayout( GroupButtons->layout() );
|
||||
GroupButtonsLayout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout3 = new QHBoxLayout( 0, 0, 6, "Layout3");
|
||||
|
||||
buttonEnd = new QPushButton( GroupButtons, "buttonEnd" );
|
||||
buttonEnd->setText( trUtf8( "End Sketch" ) );
|
||||
Layout3->addWidget( buttonEnd );
|
||||
|
||||
buttonClose = new QPushButton( GroupButtons, "buttonClose" );
|
||||
buttonClose->setText( trUtf8( "Close Sketch" ) );
|
||||
Layout3->addWidget( buttonClose );
|
||||
QSpacerItem* spacer = new QSpacerItem( 91, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
|
||||
Layout3->addItem( spacer );
|
||||
|
||||
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
|
||||
buttonCancel->setText( trUtf8( "&Cancel" ) );
|
||||
Layout3->addWidget( buttonCancel );
|
||||
GroupButtonsLayout->addLayout( Layout3 );
|
||||
|
||||
Layout1->addWidget( GroupButtons, 3, 0 );
|
||||
|
||||
EntityGUI_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 );
|
||||
|
||||
// tab order
|
||||
setTabOrder( RadioButton1, RadioButton2 );
|
||||
setTabOrder( RadioButton2, RB_Dest1 );
|
||||
setTabOrder( RB_Dest1, RB_Dest2 );
|
||||
setTabOrder( RB_Dest2, buttonEnd );
|
||||
setTabOrder( buttonEnd, buttonClose );
|
||||
setTabOrder( buttonClose, buttonCancel );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
EntityGUI_Skeleton_QTD::~EntityGUI_Skeleton_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
61
src/EntityGUI/EntityGUI_Skeleton_QTD.h
Normal file
61
src/EntityGUI/EntityGUI_Skeleton_QTD.h
Normal file
@ -0,0 +1,61 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'EntityGUI_Skeleton_QTD.ui'
|
||||
**
|
||||
** Created: ven déc 12 11:17:07 2003
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef ENTITYGUI_SKELETON_QTD_H
|
||||
#define ENTITYGUI_SKELETON_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qdialog.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QButtonGroup;
|
||||
class QGroupBox;
|
||||
class QPushButton;
|
||||
class QRadioButton;
|
||||
|
||||
class EntityGUI_Skeleton_QTD : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~EntityGUI_Skeleton_QTD();
|
||||
|
||||
QGroupBox* GroupVal;
|
||||
QButtonGroup* GroupConstructors;
|
||||
QRadioButton* RadioButton1;
|
||||
QRadioButton* RadioButton2;
|
||||
QGroupBox* GroupDest;
|
||||
QButtonGroup* GroupDest1;
|
||||
QRadioButton* RB_Dest2;
|
||||
QRadioButton* RB_Dest1;
|
||||
QButtonGroup* GroupDest2;
|
||||
QButtonGroup* GroupDest3;
|
||||
QGroupBox* GroupButtons;
|
||||
QPushButton* buttonEnd;
|
||||
QPushButton* buttonClose;
|
||||
QPushButton* buttonCancel;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* EntityGUI_Skeleton_QTDLayout;
|
||||
QGridLayout* Layout1;
|
||||
QGridLayout* GroupConstructorsLayout;
|
||||
QHBoxLayout* Layout2;
|
||||
QGridLayout* GroupDestLayout;
|
||||
QGridLayout* Layout5;
|
||||
QGridLayout* GroupDest1Layout;
|
||||
QGridLayout* Layout4;
|
||||
QGridLayout* GroupDest2Layout;
|
||||
QGridLayout* GroupDest3Layout;
|
||||
QHBoxLayout* GroupButtonsLayout;
|
||||
QHBoxLayout* Layout3;
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_SKELETON_QTD_H
|
1172
src/EntityGUI/EntityGUI_SketcherDlg.cxx
Normal file
1172
src/EntityGUI/EntityGUI_SketcherDlg.cxx
Normal file
File diff suppressed because it is too large
Load Diff
149
src/EntityGUI/EntityGUI_SketcherDlg.h
Normal file
149
src/EntityGUI/EntityGUI_SketcherDlg.h
Normal file
@ -0,0 +1,149 @@
|
||||
// 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 : EntityGUI_SketcherDlg.h
|
||||
// Author : Damine COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef ENTITYGUI_SKETCHERDLG_H
|
||||
#define ENTITYGUI_SKETCHERDLG_H
|
||||
|
||||
#include "EntityGUI_Skeleton_QTD.h"
|
||||
#include "EntityGUI_Point_QTD.h"
|
||||
#include "EntityGUI_Dir1_QTD.h"
|
||||
#include "EntityGUI_Dir2_QTD.h"
|
||||
|
||||
#include "EntityGUI_1Sel_QTD.h"
|
||||
#include "EntityGUI_1Spin.h"
|
||||
#include "EntityGUI_2Spin.h"
|
||||
#include "EntityGUI_3Spin.h"
|
||||
#include "EntityGUI_4Spin.h"
|
||||
|
||||
#include "EntityGUI.h"
|
||||
|
||||
#include "GEOM_ShapeTypeFilter.hxx"
|
||||
|
||||
#include <gp_Dir.hxx>
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qlayout.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qbuttongroup.h>
|
||||
|
||||
//=================================================================================
|
||||
// class : EntityGUI_Dlg
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
class EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EntityGUI_SketcherDlg(QWidget* parent = 0, const char* name = 0, EntityGUI* theEntityGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
|
||||
~EntityGUI_SketcherDlg();
|
||||
|
||||
private :
|
||||
void Init();
|
||||
void enterEvent(QEvent* e);
|
||||
void closeEvent(QCloseEvent* e);
|
||||
void InitClick();
|
||||
void MakeSimulationAndDisplay();
|
||||
QString GetNewCommand();
|
||||
|
||||
EntityGUI* myEntityGUI;
|
||||
|
||||
double step;
|
||||
int myConstructorId;
|
||||
int myConstructorDirId;
|
||||
int mySketchType;
|
||||
int mySketchState;
|
||||
Handle(GEOM_ShapeTypeFilter) myVertexFilter;
|
||||
|
||||
TopoDS_Shape mySimulationTopoDs1; /* Shape used for simulation display */
|
||||
TopoDS_Shape mySimulationTopoDs2; /* 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 */
|
||||
|
||||
int myLastOp;
|
||||
QString myCommand;
|
||||
QString myLastCommand;
|
||||
TopoDS_Shape myShape;
|
||||
gp_Dir myLastDir;
|
||||
|
||||
Standard_Real myX;
|
||||
Standard_Real myY;
|
||||
Standard_Real myDX;
|
||||
Standard_Real myDY;
|
||||
Standard_Real myLastX1;
|
||||
Standard_Real myLastY1;
|
||||
Standard_Real myLastX2;
|
||||
Standard_Real myLastY2;
|
||||
Standard_Real myLength;
|
||||
Standard_Real myAngle;
|
||||
Standard_Real myRadius;
|
||||
|
||||
EntityGUI_Point_QTD* GroupPt;
|
||||
EntityGUI_Dir1_QTD* GroupD1;
|
||||
EntityGUI_Dir2_QTD* GroupD2;
|
||||
|
||||
EntityGUI_1Sel_QTD* Group1Sel;
|
||||
EntityGUI_1Spin* Group1Spin;
|
||||
EntityGUI_2Spin* Group2Spin;
|
||||
EntityGUI_3Spin* Group3Spin;
|
||||
EntityGUI_4Spin* Group4Spin;
|
||||
|
||||
enum SketchState {FIRST_POINT, SECOND_POINT, NEXT_POINT};
|
||||
|
||||
enum SketchType {PT_ABS, PT_RELATIVE, PT_SEL,
|
||||
DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y,
|
||||
DIR_PER_LENGTH, DIR_PER_X, DIR_PER_Y,
|
||||
DIR_TAN_LENGTH, DIR_TAN_X, DIR_TAN_Y,
|
||||
DIR_DXDY_LENGTH, DIR_DXDY_X, DIR_DXDY_Y};
|
||||
|
||||
private slots:
|
||||
void ClickOnEnd();
|
||||
void ClickOnClose();
|
||||
void ClickOnCancel();
|
||||
void ClickOnApply();
|
||||
void ClickOnUndo();
|
||||
void LineEditReturnPressed();
|
||||
void SelectionIntoArgument();
|
||||
void SetEditCurrentArgument();
|
||||
void DeactivateActiveDialog();
|
||||
void ActivateThisDialog();
|
||||
void TypeClicked(int constructorId);
|
||||
void DestClicked(int constructorId);
|
||||
void PointClicked(int constructorId);
|
||||
void Dir1Clicked(int constructorId);
|
||||
void Dir2Clicked(int constructorId);
|
||||
void ValueChangedInSpinBox(double newValue);
|
||||
|
||||
};
|
||||
|
||||
#endif // ENTITYGUI_SKETCHERDLG_H
|
@ -41,10 +41,38 @@ LIB = libEntityGUI.la
|
||||
EXPORT_HEADERS=
|
||||
|
||||
LIB_SRC = EntityGUI.cxx \
|
||||
EntityGUI_Skeleton_QTD.cxx \
|
||||
EntityGUI_Point_QTD.cxx \
|
||||
EntityGUI_Dir1_QTD.cxx \
|
||||
EntityGUI_Dir2_QTD.cxx \
|
||||
EntityGUI_1Sel_QTD.cxx \
|
||||
EntityGUI_1Spin_QTD.cxx \
|
||||
EntityGUI_2Spin_QTD.cxx \
|
||||
EntityGUI_3Spin_QTD.cxx \
|
||||
EntityGUI_4Spin_QTD.cxx \
|
||||
EntityGUI_1Spin.cxx \
|
||||
EntityGUI_2Spin.cxx \
|
||||
EntityGUI_3Spin.cxx \
|
||||
EntityGUI_4Spin.cxx \
|
||||
EntityGUI_SketcherDlg.cxx \
|
||||
EntityGUI_SubShapeDlg.cxx
|
||||
|
||||
LIB_MOC = \
|
||||
EntityGUI.h \
|
||||
EntityGUI_Skeleton_QTD.h \
|
||||
EntityGUI_Point_QTD.h \
|
||||
EntityGUI_Dir1_QTD.h \
|
||||
EntityGUI_Dir2_QTD.h \
|
||||
EntityGUI_1Sel_QTD.h \
|
||||
EntityGUI_1Spin_QTD.h \
|
||||
EntityGUI_2Spin_QTD.h \
|
||||
EntityGUI_3Spin_QTD.h \
|
||||
EntityGUI_4Spin_QTD.h \
|
||||
EntityGUI_1Spin.h \
|
||||
EntityGUI_2Spin.h \
|
||||
EntityGUI_3Spin.h \
|
||||
EntityGUI_4Spin.h \
|
||||
EntityGUI_SketcherDlg.h \
|
||||
EntityGUI_SubShapeDlg.h
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
@ -56,6 +84,6 @@ LIB_SERVER_IDL =
|
||||
CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
|
||||
|
||||
LDFLAGS += -lGEOMFiltersSelection -lDisplayGUI
|
||||
LDFLAGS += -lGEOMFiltersSelection -lDisplayGUI -lGEOMSketcher
|
||||
|
||||
@CONCLUDE@
|
||||
|
Loading…
Reference in New Issue
Block a user