DCQ : Sketcher

This commit is contained in:
dcq 2003-12-15 16:09:35 +00:00
parent f017703b76
commit 84f8423a0d
61 changed files with 6429 additions and 2268 deletions

View File

@ -233,7 +233,12 @@ module GEOM
// Splines //
//-----------------------------------------------------------//
GEOM_Shape MakeBezier (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
GEOM_Shape MakeBSpline(in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
GEOM_Shape MakeInterpol(in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
//-----------------------------------------------------------//
// Sketcher //
//-----------------------------------------------------------//
GEOM_Shape MakeSketcher (in string Cmd) raises (SALOME::SALOME_Exception) ;
//-----------------------------------------------------------//
// Build //

View File

@ -29,21 +29,8 @@
using namespace std;
#include "BuildGUI.h"
#include "DisplayGUI.h"
#include "OCCViewer_Viewer3d.h"
#include "VTKViewer_ViewFrame.h"
#include "QAD_RightFrame.h"
#include "GEOM_AssemblyBuilder.h"
#include "SALOMEGUI_ImportOperation.h"
#include "SALOMEGUI_QtCatchCorbaException.hxx"
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <BRep_Builder.hxx>
#include "BuildGUI_SubShapeDlg.h" // Method SUBSHAPE
#include "BuildGUI_SplineDlg.h" // Method SPLINE
#include "BuildGUI_EdgeDlg.h" // Method EDGE
#include "BuildGUI_WireDlg.h" // Method WIRE
#include "BuildGUI_FaceDlg.h" // Method FACE
@ -85,21 +72,6 @@ bool BuildGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
switch (theCommandID)
{
case 406: // GEOM::SPLINE
{
BuildGUI_SplineDlg *aDlg = new BuildGUI_SplineDlg(parent, "", myBuildGUI, Sel);
break;
}
case 407: // EXPLODE : use ic
{
Handle(AIS_InteractiveContext) ic;
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
ic = v3d->getAISContext();
}
BuildGUI_SubShapeDlg *aDlg = new BuildGUI_SubShapeDlg(parent, "", myBuildGUI, Sel, ic);
break ;
}
case 4081: // GEOM::EDGE
{
BuildGUI_EdgeDlg *aDlg = new BuildGUI_EdgeDlg(parent, "", myBuildGUI, Sel);
@ -140,52 +112,6 @@ bool BuildGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
}
//=====================================================================================
// function : MakeBSplineAndDisplay()
// purpose :
//=====================================================================================
void BuildGUI::MakeBSplineAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR)
{
try {
GEOM::GEOM_Shape_var result = myGeom->MakeBSpline(listShapesIOR);
if(result->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
return;
}
result->NameType(tr("GEOM_WIRE"));
if(myGeomBase->Display(result))
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
}
catch(const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
}
return;
}
//=====================================================================================
// function : MakeBSplineAndDisplay()
// purpose :
//=====================================================================================
void BuildGUI::MakeBezierAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR)
{
try {
GEOM::GEOM_Shape_var result = myGeom->MakeBezier(listShapesIOR);
if(result->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
return;
}
result->NameType(tr("GEOM_WIRE"));
if(myGeomBase->Display(result))
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
}
catch(const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
}
return;
}
//=====================================================================================
// function : MakeLinearEdgeAndDisplay()
// purpose :
@ -329,443 +255,6 @@ void BuildGUI::MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR)
}
//=====================================================================================
// function : SObjectExist()
// purpose :
//=====================================================================================
bool BuildGUI::SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR)
{
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(theFatherObject);
SALOMEDS::SObject_var RefSO;
SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributeIOR_var anIOR;
for(; it->More();it->Next()) {
SALOMEDS::SObject_var SO= it->Value();
if(SO->FindAttribute(anAttr, "AttributeIOR")) {
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
if(strcmp( anIOR->Value(), IOR ) == 0)
return true;
}
if(SO->ReferencedObject(RefSO)) {
if(RefSO->FindAttribute(anAttr, "AttributeIOR")) {
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
if(strcmp(anIOR->Value(), IOR) == 0)
return true;
}
}
}
return false;
}
//=====================================================================================
// function : OnSubShapeGetAll()
// purpose : Explode a shape in all sub shapes with a SubShapeType
//=====================================================================================
bool BuildGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType)
{
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR);
if(theObj->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY"));
return false;
}
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry());
SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributeName_var aName;
SALOMEDS::AttributeIOR_var anIOR;
SALOMEDS::AttributePixMap_var aPixmap;
/* We create a sub object for each sub shape as attribute of the main object */
/* Each sub object contains list (length=1) containing its index in the main shape */
GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR);
GEOM::GEOM_Gen::ListOfGeomShapes_var listGeomShapes = new GEOM::GEOM_Gen::ListOfGeomShapes;
GEOM::GEOM_Shape_var aResult;
try {
listGeomShapes = myGeom->SubShapeAll(aShape, SubShapeType);
if(listGeomShapes->length() < 1) {
QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_ABORT"));
return false;
}
}
catch(const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
}
/* open transaction */
QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy());
op->start();
TopoDS_Shape mainTopo = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape);
TopoDS_Shape mainShape;
bool main = false;
while(!main) {
if(aShape->IsMainShape()) {
mainShape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape);
main = true;
}
else
aShape = myGeom->GetIORFromString(aShape->MainName());
}
/* Loop on each sub shape created */
/* int i = 1 ; /* index for the nameType */
for(int j=0; j<listGeomShapes->length(); j++) {
/* Get each sub shape extracted CORBA and OCC */
aResult = listGeomShapes[j] ;
TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, aResult);
if (S.IsNull()) {
QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_ABORT"));
return false;
}
/* Set the nameType of sub shape */
char* nameG = (char *)malloc(20);
Standard_CString Type;
if(myGeomBase->GetShapeTypeString(S, Type)) {
aResult->NameType(Type);
sprintf(nameG, "%s_%d", Type, myGeomBase->GetIndex(S, mainShape, SubShapeType));
}
else {
aResult->NameType(tr("GEOM_SHAPE"));
sprintf(nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
}
SALOMEDS::SObject_var SO = aStudy->FindObjectIOR(aResult->Name());
bool allreadyexist = false;
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
Handle(GEOM_AISShape) result = new GEOM_AISShape(S, nameG);
Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
MESSAGE ("SO->_is_nil() " << SO->_is_nil())
if(SO->_is_nil()) {
SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(theObj);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName");
aName = SALOMEDS::AttributeName::_narrow(anAttr);
aName->SetValue(nameG);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
anIOR->SetValue(aResult->Name());
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
MESSAGE(" Type " << S.ShapeType())
if (S.ShapeType() == TopAbs_COMPOUND)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPOUND");
else if(S.ShapeType() == TopAbs_COMPSOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPSOLID");
else if(S.ShapeType() == TopAbs_SOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_SOLID");
else if(S.ShapeType() == TopAbs_SHELL)
aPixmap->SetPixMap("ICON_OBJBROWSER_SHELL");
else if(S.ShapeType() == TopAbs_FACE)
aPixmap->SetPixMap("ICON_OBJBROWSER_FACE");
else if(S.ShapeType() == TopAbs_WIRE)
aPixmap->SetPixMap("ICON_OBJBROWSER_WIRE");
else if(S.ShapeType() == TopAbs_EDGE)
aPixmap->SetPixMap("ICON_OBJBROWSER_EDGE");
else if(S.ShapeType() == TopAbs_VERTEX)
aPixmap->SetPixMap("ICON_OBJBROWSER_VERTEX");
MESSAGE(" aPixmap->GetPixMap " << aPixmap->GetPixMap())
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF);
aStudyBuilder->Addreference(newObj1, newObj);
IO->setEntry(newObj->GetID());
aResult->StudyShapeId(newObj->GetID());
}
else {
allreadyexist = true;
if(!this->SObjectExist(theObj, aResult->Name())) {
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj);
aStudyBuilder->Addreference(newObj1, SO);
IO->setEntry(SO->GetID());
aResult->StudyShapeId(SO->GetID());
}
}
result->setIO(IO);
result->setName(nameG);
if(!allreadyexist)
ic->Display(result);
}
else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor();
int themode = myRenderInter->GetDisplayMode();
vtkRenderer *theRenderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer();
vtkRenderWindow *renWin = theRenderer->GetRenderWindow();
Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
if(SO->_is_nil()) {
SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(theObj);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
anIOR->SetValue(aResult->Name());
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName");
aName = SALOMEDS::AttributeName::_narrow(anAttr);
aName->SetValue(nameG);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
if(S.ShapeType() == TopAbs_COMPOUND)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPOUND");
else if(S.ShapeType() == TopAbs_COMPSOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPSOLID");
else if(S.ShapeType() == TopAbs_SOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_SOLID");
else if(S.ShapeType() == TopAbs_SHELL)
aPixmap->SetPixMap("ICON_OBJBROWSER_SHELL");
else if(S.ShapeType() == TopAbs_FACE)
aPixmap->SetPixMap("ICON_OBJBROWSER_FACE");
else if(S.ShapeType() == TopAbs_WIRE)
aPixmap->SetPixMap("ICON_OBJBROWSER_WIRE");
else if(S.ShapeType() == TopAbs_EDGE)
aPixmap->SetPixMap("ICON_OBJBROWSER_EDGE");
else if(S.ShapeType() == TopAbs_VERTEX)
aPixmap->SetPixMap("ICON_OBJBROWSER_VERTEX");
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF);
aStudyBuilder->Addreference(newObj1, newObj);
IO->setEntry(newObj->GetID());
}
else {
allreadyexist = true;
if(!this->SObjectExist(theObj, aResult->Name())) {
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj);
aStudyBuilder->Addreference(newObj1, SO);
IO->setEntry(SO->GetID());
}
}
if(!allreadyexist) {
vtkActorCollection* theActors = GEOM_AssemblyBuilder::BuildActors(S,0,themode,Standard_True);
theActors->InitTraversal();
vtkActor* anActor = (vtkActor*)theActors->GetNextActor();
while(!(anActor==NULL)) {
GEOM_Actor* GActor = GEOM_Actor::SafeDownCast(anActor);
GActor->setIO(IO);
GActor->setName(nameG);
theRenderer->AddActor(GActor);
renWin->Render();
anActor = (vtkActor*)theActors->GetNextActor();
}
}
}
}
/* commit transaction */
op->finish();
QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser();
QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_READY"));
return true;
}
//=====================================================================================
// function : OnSubShapeGetSelected()
// purpose :
//=====================================================================================
bool BuildGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType, Standard_Integer& aLocalContextId, bool& myUseLocalContext)
{
//* Test the type of viewer */
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
return false;
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR);
if(theObj->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY"));
return false;
}
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
if( myUseLocalContext == false ) {
/* local context is from DialogBox */
MESSAGE("Error : No local context opened for sub shapes method" << endl ) ;
return false ;
}
GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString( ShapeTopoIOR );
TopoDS_Shape mainTopo = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape);
TopoDS_Shape mainShape;
bool main = false;
while(!main) {
if(aShape->IsMainShape()) {
mainShape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape);
main = true;
}
else
aShape = myGeom->GetIORFromString(aShape->MainName());
}
GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
ic->InitSelected();
int nbSelected = ic->NbSelected();
ListOfID->length(nbSelected);
TopoDS_Compound compound;
ic->InitSelected(); /* to init again */
BRep_Builder B;
B.MakeCompound(compound);
int i = 0;
/* We create a unique compound containing all the sub shapes selected by user as attribute of the main shape */
/* the compound is homogenous by selection */
while(ic->MoreSelected()) {
int index = myGeomBase->GetIndex(ic->SelectedShape(), mainShape, SubShapeType);
ListOfID[i] = index;
B.Add(compound, ic->SelectedShape());
i++;
ic->NextSelected();
}
/* Test if user has selected sub shapes */
if(ListOfID->length() < 1)
return false;
GEOM::GEOM_Shape_var aResult;
try {
aResult = myGeom->SubShape(aShape, SubShapeType, ListOfID);
}
catch (const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
}
/* local context from DialogBox */
ic->CloseLocalContext(aLocalContextId);
myUseLocalContext = false ;
char* nameG = (char *)malloc(20);
Standard_CString Type;
Handle(GEOM_AISShape) result;
Handle(GEOM_InteractiveObject) IO;
if(nbSelected == 1) {
TopExp_Explorer Exp (compound, TopAbs_ShapeEnum(SubShapeType));
if(Exp.More()) {
if(myGeomBase->GetShapeTypeString(Exp.Current(),Type)) {
aResult->NameType(Type);
sprintf (nameG, "%s_%d", Type, myGeomBase->GetIndex( Exp.Current(), mainTopo, SubShapeType));
}
else {
aResult->NameType(tr("GEOM_SHAPE"));
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
}
result = new GEOM_AISShape(Exp.Current(), nameG);
IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
}
}
else {
if ( myGeomBase->GetShapeTypeString(compound,Type)) {
aResult->NameType(Type);
sprintf (nameG, "%s_%d", Type, myGeomGUI->GetNbGeom()++);
} else {
aResult->NameType(tr("GEOM_SHAPE"));
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
}
result = new GEOM_AISShape(compound, nameG);
IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
}
SALOMEDS::SObject_var SO = aStudy->FindObjectIOR(aResult->Name());
/* open transaction */
QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy());
op->start();
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry());
SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributeName_var aName;
SALOMEDS::AttributeIOR_var anIOR;
SALOMEDS::AttributePixMap_var aPixmap;
bool allreadyexist = false;
if(SO->_is_nil()) {
SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(theObj);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
anIOR->SetValue(aResult->Name());
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName");
aName = SALOMEDS::AttributeName::_narrow(anAttr);
aName->SetValue(result->getName());
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
if(result->Shape().ShapeType() == TopAbs_COMPOUND)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPOUND");
else if(result->Shape().ShapeType() == TopAbs_COMPSOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPSOLID");
else if(result->Shape().ShapeType() == TopAbs_SOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_SOLID");
else if(result->Shape().ShapeType() == TopAbs_SHELL)
aPixmap->SetPixMap("ICON_OBJBROWSER_SHELL");
else if(result->Shape().ShapeType() == TopAbs_FACE)
aPixmap->SetPixMap("ICON_OBJBROWSER_FACE");
else if(result->Shape().ShapeType() == TopAbs_WIRE)
aPixmap->SetPixMap("ICON_OBJBROWSER_WIRE");
else if(result->Shape().ShapeType() == TopAbs_EDGE)
aPixmap->SetPixMap("ICON_OBJBROWSER_EDGE");
else if(result->Shape().ShapeType() == TopAbs_VERTEX)
aPixmap->SetPixMap("ICON_OBJBROWSER_VERTEX");
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF);
aStudyBuilder->Addreference(newObj1, newObj);
IO->setEntry(newObj->GetID());
aResult->StudyShapeId(newObj->GetID());
}
else {
allreadyexist = true;
if(!this->SObjectExist(theObj, aResult->Name())) {
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj);
aStudyBuilder->Addreference(newObj1, SO);
IO->setEntry(SO->GetID());
aResult->StudyShapeId(SO->GetID());
}
}
/* commit transaction */
op->finish();
result->setIO(IO);
result->setName(nameG);
if(!allreadyexist)
ic->Display(result);
DisplayGUI* myDisplayGUI = new DisplayGUI();
myDisplayGUI->OnDisplayAll(true);
QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser();
QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_READY"));
return true;
}
//=====================================================================================
// EXPORTED METHODS
//=====================================================================================

View File

@ -53,15 +53,6 @@ public :
void MakeSolidAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
void MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
void MakeBSplineAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
void MakeBezierAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
/* Methods for sub shapes explode */
bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR);
bool OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType);
bool OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType,
Standard_Integer& aLocalContextId, bool& myUseLocalContext);
GEOMBase* myGeomBase;
GEOMContext* myGeomGUI;
GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */

View File

@ -41,8 +41,6 @@ EXPORT_HEADERS=
LIB = libBuildGUI.la
LIB_SRC = BuildGUI.cxx \
BuildGUI_SubShapeDlg.cxx \
BuildGUI_SplineDlg.cxx \
BuildGUI_EdgeDlg.cxx \
BuildGUI_WireDlg.cxx \
BuildGUI_FaceDlg.cxx \
@ -52,8 +50,6 @@ LIB_SRC = BuildGUI.cxx \
LIB_MOC = \
BuildGUI.h \
BuildGUI_SubShapeDlg.h \
BuildGUI_SplineDlg.h \
BuildGUI_EdgeDlg.h \
BuildGUI_WireDlg.h \
BuildGUI_FaceDlg.h \
@ -70,6 +66,6 @@ LIB_SERVER_IDL =
CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
LDFLAGS += -lGEOMFiltersSelection -lDisplayGUI
LDFLAGS += -lGEOMFiltersSelection -lGEOMBase
@CONCLUDE@

View File

@ -125,9 +125,6 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
}
case 212: // MENU VIEW - DISPLAY ALL
{
// if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK)
// ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor()->DisplayAll();
// else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC)
myDisplayGUI->OnDisplayAll();
break;
}
@ -189,10 +186,8 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
if(mode == -1)
mode = (AIS_DisplayMode)ic->DisplayMode();
QApplication::setOverrideCursor(Qt::waitCursor);
ic->SetDisplayMode(Shape, mode == AIS_WireFrame ? AIS_Shaded : AIS_WireFrame, false);
}
QApplication::restoreOverrideCursor();
}
ic->UpdateCurrentViewer();
}
@ -517,22 +512,6 @@ void DisplayGUI::OnDisplayAll(bool onlyPreviousDisplayedObject)
}
}
}
// AIS_ListOfInteractive List1;
// myContext->ObjectsInCollector(List1);
// AIS_ListIteratorOfListOfInteractive ite1(List1);
// while(ite1.More()) {
// cout<<"DCQ 1"<<endl;
// if(ite1.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) {
// Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite1.Value());
// if(aSh->hasIO()) {
// Handle(GEOM_InteractiveObject) GIO = Handle(GEOM_InteractiveObject)::DownCast(aSh->getIO());
// if(v3d->isInViewer(GIO, true)) {
// myContext->Display(aSh);
// }
// }
// }
// ite1.Next();
// }
}
else {
AIS_ListOfInteractive aListDisplayedObject;
@ -565,9 +544,7 @@ void DisplayGUI::OnDisplayAll(bool onlyPreviousDisplayedObject)
GEOM_Actor* aSh = myGeomBase->ConvertIORinGEOMActor(anIOR->Value(), testResult);
if(testResult) {
Handle(SALOME_InteractiveObject) IObject = aSh->getIO();
// if(myRenderInter->isInViewer(IObject)) {
((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor()->Display(IObject);
//}
}
else {
GEOM::GEOM_Shape_ptr aShape = myGeom->GetIORFromString(anIOR->Value());
@ -578,7 +555,6 @@ void DisplayGUI::OnDisplayAll(bool onlyPreviousDisplayedObject)
}
}
}
// ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor()->DisplayAll();
}
return;
}

763
src/EntityGUI/EntityGUI.cxx Normal file
View File

@ -0,0 +1,763 @@
// 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.cxx
// Author : Damien COQUERET
// Module : GEOM
// $Header:
using namespace std;
#include "EntityGUI.h"
#include "QAD_RightFrame.h"
#include "OCCViewer_Viewer3d.h"
#include "VTKViewer_ViewFrame.h"
#include "GEOM_AssemblyBuilder.h"
#include "SALOMEGUI_ImportOperation.h"
#include "SALOMEGUI_QtCatchCorbaException.hxx"
#include <BRepTools_WireExplorer.hxx>
#include <TopoDS_Edge.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 <gp_Circ.hxx>
#include <Geom_Circle.hxx>
#include <Geom_Curve.hxx>
#include "DisplayGUI.h"
#include "EntityGUI_SketcherDlg.h" // Sketcher
#include "EntityGUI_SplineDlg.h" // Method SPLINE
#include "EntityGUI_SubShapeDlg.h" // Method SUBSHAPE
//=======================================================================
// function : EntityGUI()
// purpose : Constructor
//=======================================================================
EntityGUI::EntityGUI() :
QObject()
{
myGeomBase = new GEOMBase();
myGeomGUI = GEOMContext::GetGeomGUI();
myGeom = myGeomGUI->myComponentGeom;
mySimulationShape1 = new AIS_Shape(TopoDS_Shape());
mySimulationShape2 = new AIS_Shape(TopoDS_Shape());
}
//=======================================================================
// function : ~EntityGUI()
// purpose : Destructor
//=======================================================================
EntityGUI::~EntityGUI()
{
}
//=======================================================================
// function : OnGUIEvent()
// purpose :
//=======================================================================
bool EntityGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
{
EntityGUI* myEntityGUI = new EntityGUI();
myEntityGUI->myGeomGUI->EmitSignalDeactivateDialog();
SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection());
switch (theCommandID)
{
case 404: // SKETCHER
{
((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->onViewTop(); // DCQ : 28/02/2002
EntityGUI_SketcherDlg* aDlg = new EntityGUI_SketcherDlg(parent, "", myEntityGUI, Sel);
break;
}
case 406: // GEOM::SPLINE
{
EntityGUI_SplineDlg *aDlg = new EntityGUI_SplineDlg(parent, "", myEntityGUI, Sel);
break;
}
case 407: // EXPLODE : use ic
{
Handle(AIS_InteractiveContext) ic;
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
ic = v3d->getAISContext();
}
EntityGUI_SubShapeDlg *aDlg = new EntityGUI_SubShapeDlg(parent, "", myEntityGUI, Sel, ic);
break ;
}
default:
{
parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
break;
}
}
return true;
}
//=======================================================================
// function : OnSketchEnd()
// purpose :
//=======================================================================
void EntityGUI::OnSketchEnd(TopoDS_Shape myShape)
{
TopoDS_Wire W = TopoDS::Wire(myShape);
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();
}
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"));
}
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 : MakeBSplineAndDisplay()
// purpose :
//=====================================================================================
void EntityGUI::MakeBezierAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR)
{
try {
GEOM::GEOM_Shape_var result = myGeom->MakeBezier(listShapesIOR);
if(result->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
return;
}
result->NameType(tr("GEOM_WIRE"));
if(myGeomBase->Display(result))
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
}
catch(const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
}
return;
}
//=====================================================================================
// function : MakeInterpolAndDisplay()
// purpose :
//=====================================================================================
void EntityGUI::MakeInterpolAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR)
{
try {
GEOM::GEOM_Shape_var result = myGeom->MakeInterpol(listShapesIOR);
if(result->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
return;
}
result->NameType(tr("GEOM_WIRE"));
if(myGeomBase->Display(result))
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
}
catch(const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
}
return;
}
//=====================================================================================
// function : SObjectExist()
// purpose :
//=====================================================================================
bool EntityGUI::SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR)
{
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(theFatherObject);
SALOMEDS::SObject_var RefSO;
SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributeIOR_var anIOR;
for(; it->More();it->Next()) {
SALOMEDS::SObject_var SO= it->Value();
if(SO->FindAttribute(anAttr, "AttributeIOR")) {
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
if(strcmp( anIOR->Value(), IOR ) == 0)
return true;
}
if(SO->ReferencedObject(RefSO)) {
if(RefSO->FindAttribute(anAttr, "AttributeIOR")) {
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
if(strcmp(anIOR->Value(), IOR) == 0)
return true;
}
}
}
return false;
}
//=====================================================================================
// function : OnSubShapeGetAll()
// purpose : Explode a shape in all sub shapes with a SubShapeType
//=====================================================================================
bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType)
{
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR);
if(theObj->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY"));
return false;
}
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry());
SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributeName_var aName;
SALOMEDS::AttributeIOR_var anIOR;
SALOMEDS::AttributePixMap_var aPixmap;
/* We create a sub object for each sub shape as attribute of the main object */
/* Each sub object contains list (length=1) containing its index in the main shape */
GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR);
GEOM::GEOM_Gen::ListOfGeomShapes_var listGeomShapes = new GEOM::GEOM_Gen::ListOfGeomShapes;
GEOM::GEOM_Shape_var aResult;
try {
listGeomShapes = myGeom->SubShapeAll(aShape, SubShapeType);
if(listGeomShapes->length() < 1) {
QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_ABORT"));
return false;
}
}
catch(const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
}
/* open transaction */
QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy());
op->start();
TopoDS_Shape mainTopo = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape);
TopoDS_Shape mainShape;
bool main = false;
while(!main) {
if(aShape->IsMainShape()) {
mainShape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape);
main = true;
}
else
aShape = myGeom->GetIORFromString(aShape->MainName());
}
/* Loop on each sub shape created */
/* int i = 1 ; /* index for the nameType */
for(int j=0; j<listGeomShapes->length(); j++) {
/* Get each sub shape extracted CORBA and OCC */
aResult = listGeomShapes[j] ;
TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, aResult);
if (S.IsNull()) {
QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_ABORT"));
return false;
}
/* Set the nameType of sub shape */
char* nameG = (char *)malloc(20);
Standard_CString Type;
if(myGeomBase->GetShapeTypeString(S, Type)) {
aResult->NameType(Type);
sprintf(nameG, "%s_%d", Type, myGeomBase->GetIndex(S, mainShape, SubShapeType));
}
else {
aResult->NameType(tr("GEOM_SHAPE"));
sprintf(nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
}
SALOMEDS::SObject_var SO = aStudy->FindObjectIOR(aResult->Name());
bool allreadyexist = false;
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
Handle(GEOM_AISShape) result = new GEOM_AISShape(S, nameG);
Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
MESSAGE ("SO->_is_nil() " << SO->_is_nil())
if(SO->_is_nil()) {
SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(theObj);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName");
aName = SALOMEDS::AttributeName::_narrow(anAttr);
aName->SetValue(nameG);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
anIOR->SetValue(aResult->Name());
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
MESSAGE(" Type " << S.ShapeType())
if (S.ShapeType() == TopAbs_COMPOUND)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPOUND");
else if(S.ShapeType() == TopAbs_COMPSOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPSOLID");
else if(S.ShapeType() == TopAbs_SOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_SOLID");
else if(S.ShapeType() == TopAbs_SHELL)
aPixmap->SetPixMap("ICON_OBJBROWSER_SHELL");
else if(S.ShapeType() == TopAbs_FACE)
aPixmap->SetPixMap("ICON_OBJBROWSER_FACE");
else if(S.ShapeType() == TopAbs_WIRE)
aPixmap->SetPixMap("ICON_OBJBROWSER_WIRE");
else if(S.ShapeType() == TopAbs_EDGE)
aPixmap->SetPixMap("ICON_OBJBROWSER_EDGE");
else if(S.ShapeType() == TopAbs_VERTEX)
aPixmap->SetPixMap("ICON_OBJBROWSER_VERTEX");
MESSAGE(" aPixmap->GetPixMap " << aPixmap->GetPixMap())
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF);
aStudyBuilder->Addreference(newObj1, newObj);
IO->setEntry(newObj->GetID());
aResult->StudyShapeId(newObj->GetID());
}
else {
allreadyexist = true;
if(!this->SObjectExist(theObj, aResult->Name())) {
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj);
aStudyBuilder->Addreference(newObj1, SO);
IO->setEntry(SO->GetID());
aResult->StudyShapeId(SO->GetID());
}
}
result->setIO(IO);
result->setName(nameG);
if(!allreadyexist)
ic->Display(result);
}
else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor();
int themode = myRenderInter->GetDisplayMode();
vtkRenderer *theRenderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer();
vtkRenderWindow *renWin = theRenderer->GetRenderWindow();
Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
if(SO->_is_nil()) {
SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(theObj);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
anIOR->SetValue(aResult->Name());
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName");
aName = SALOMEDS::AttributeName::_narrow(anAttr);
aName->SetValue(nameG);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
if(S.ShapeType() == TopAbs_COMPOUND)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPOUND");
else if(S.ShapeType() == TopAbs_COMPSOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPSOLID");
else if(S.ShapeType() == TopAbs_SOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_SOLID");
else if(S.ShapeType() == TopAbs_SHELL)
aPixmap->SetPixMap("ICON_OBJBROWSER_SHELL");
else if(S.ShapeType() == TopAbs_FACE)
aPixmap->SetPixMap("ICON_OBJBROWSER_FACE");
else if(S.ShapeType() == TopAbs_WIRE)
aPixmap->SetPixMap("ICON_OBJBROWSER_WIRE");
else if(S.ShapeType() == TopAbs_EDGE)
aPixmap->SetPixMap("ICON_OBJBROWSER_EDGE");
else if(S.ShapeType() == TopAbs_VERTEX)
aPixmap->SetPixMap("ICON_OBJBROWSER_VERTEX");
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF);
aStudyBuilder->Addreference(newObj1, newObj);
IO->setEntry(newObj->GetID());
}
else {
allreadyexist = true;
if(!this->SObjectExist(theObj, aResult->Name())) {
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj);
aStudyBuilder->Addreference(newObj1, SO);
IO->setEntry(SO->GetID());
}
}
if(!allreadyexist) {
vtkActorCollection* theActors = GEOM_AssemblyBuilder::BuildActors(S,0,themode,Standard_True);
theActors->InitTraversal();
vtkActor* anActor = (vtkActor*)theActors->GetNextActor();
while(!(anActor==NULL)) {
GEOM_Actor* GActor = GEOM_Actor::SafeDownCast(anActor);
GActor->setIO(IO);
GActor->setName(nameG);
theRenderer->AddActor(GActor);
renWin->Render();
anActor = (vtkActor*)theActors->GetNextActor();
}
}
}
}
/* commit transaction */
op->finish();
QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser();
QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_READY"));
return true;
}
//=====================================================================================
// function : OnSubShapeGetSelected()
// purpose :
//=====================================================================================
bool EntityGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType, Standard_Integer& aLocalContextId, bool& myUseLocalContext)
{
//* Test the type of viewer */
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
return false;
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR);
if(theObj->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY"));
return false;
}
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
if( myUseLocalContext == false ) {
/* local context is from DialogBox */
MESSAGE("Error : No local context opened for sub shapes method" << endl ) ;
return false ;
}
GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString( ShapeTopoIOR );
TopoDS_Shape mainTopo = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape);
TopoDS_Shape mainShape;
bool main = false;
while(!main) {
if(aShape->IsMainShape()) {
mainShape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape);
main = true;
}
else
aShape = myGeom->GetIORFromString(aShape->MainName());
}
GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
ic->InitSelected();
int nbSelected = ic->NbSelected();
ListOfID->length(nbSelected);
TopoDS_Compound compound;
ic->InitSelected(); /* to init again */
BRep_Builder B;
B.MakeCompound(compound);
int i = 0;
/* We create a unique compound containing all the sub shapes selected by user as attribute of the main shape */
/* the compound is homogenous by selection */
while(ic->MoreSelected()) {
int index = myGeomBase->GetIndex(ic->SelectedShape(), mainShape, SubShapeType);
ListOfID[i] = index;
B.Add(compound, ic->SelectedShape());
i++;
ic->NextSelected();
}
/* Test if user has selected sub shapes */
if(ListOfID->length() < 1)
return false;
GEOM::GEOM_Shape_var aResult;
try {
aResult = myGeom->SubShape(aShape, SubShapeType, ListOfID);
}
catch (const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
}
/* local context from DialogBox */
ic->CloseLocalContext(aLocalContextId);
myUseLocalContext = false ;
char* nameG = (char *)malloc(20);
Standard_CString Type;
Handle(GEOM_AISShape) result;
Handle(GEOM_InteractiveObject) IO;
if(nbSelected == 1) {
TopExp_Explorer Exp (compound, TopAbs_ShapeEnum(SubShapeType));
if(Exp.More()) {
if(myGeomBase->GetShapeTypeString(Exp.Current(),Type)) {
aResult->NameType(Type);
sprintf (nameG, "%s_%d", Type, myGeomBase->GetIndex( Exp.Current(), mainTopo, SubShapeType));
}
else {
aResult->NameType(tr("GEOM_SHAPE"));
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
}
result = new GEOM_AISShape(Exp.Current(), nameG);
IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
}
}
else {
if ( myGeomBase->GetShapeTypeString(compound,Type)) {
aResult->NameType(Type);
sprintf (nameG, "%s_%d", Type, myGeomGUI->GetNbGeom()++);
} else {
aResult->NameType(tr("GEOM_SHAPE"));
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
}
result = new GEOM_AISShape(compound, nameG);
IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
}
SALOMEDS::SObject_var SO = aStudy->FindObjectIOR(aResult->Name());
/* open transaction */
QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy());
op->start();
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry());
SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributeName_var aName;
SALOMEDS::AttributeIOR_var anIOR;
SALOMEDS::AttributePixMap_var aPixmap;
bool allreadyexist = false;
if(SO->_is_nil()) {
SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(theObj);
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
anIOR->SetValue(aResult->Name());
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName");
aName = SALOMEDS::AttributeName::_narrow(anAttr);
aName->SetValue(result->getName());
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
if(result->Shape().ShapeType() == TopAbs_COMPOUND)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPOUND");
else if(result->Shape().ShapeType() == TopAbs_COMPSOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_COMPSOLID");
else if(result->Shape().ShapeType() == TopAbs_SOLID)
aPixmap->SetPixMap("ICON_OBJBROWSER_SOLID");
else if(result->Shape().ShapeType() == TopAbs_SHELL)
aPixmap->SetPixMap("ICON_OBJBROWSER_SHELL");
else if(result->Shape().ShapeType() == TopAbs_FACE)
aPixmap->SetPixMap("ICON_OBJBROWSER_FACE");
else if(result->Shape().ShapeType() == TopAbs_WIRE)
aPixmap->SetPixMap("ICON_OBJBROWSER_WIRE");
else if(result->Shape().ShapeType() == TopAbs_EDGE)
aPixmap->SetPixMap("ICON_OBJBROWSER_EDGE");
else if(result->Shape().ShapeType() == TopAbs_VERTEX)
aPixmap->SetPixMap("ICON_OBJBROWSER_VERTEX");
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF);
aStudyBuilder->Addreference(newObj1, newObj);
IO->setEntry(newObj->GetID());
aResult->StudyShapeId(newObj->GetID());
}
else {
allreadyexist = true;
if(!this->SObjectExist(theObj, aResult->Name())) {
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj);
aStudyBuilder->Addreference(newObj1, SO);
IO->setEntry(SO->GetID());
aResult->StudyShapeId(SO->GetID());
}
}
/* commit transaction */
op->finish();
result->setIO(IO);
result->setName(nameG);
if(!allreadyexist)
ic->Display(result);
DisplayGUI* myDisplayGUI = new DisplayGUI();
myDisplayGUI->OnDisplayAll(true);
QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser();
QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_READY"));
return true;
}
//=====================================================================================
// EXPORTED METHODS
//=====================================================================================
extern "C"
{
bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
{return EntityGUI::OnGUIEvent(theCommandID, parent);}
}

72
src/EntityGUI/EntityGUI.h Normal file
View File

@ -0,0 +1,72 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : EntityGUI.h
// Author : Damien COQUERET
// Module : GEOM
// $Header:
#ifndef ENTITYGUI_H
#define ENTITYGUI_H
#include "GEOMBase.h"
//=================================================================================
// class : EntityGUI
// purpose :
//=================================================================================
class EntityGUI : public QObject
{
Q_OBJECT /* for QT compatibility */
public :
EntityGUI();
~EntityGUI();
static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
void OnSketchEnd(TopoDS_Shape myShape);
void DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
void EraseSimulationShape();
void MakeInterpolAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
void MakeBezierAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
/* Methods for sub shapes explode */
bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR);
bool OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType);
bool 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 */
};
#endif

View File

@ -0,0 +1,93 @@
/****************************************************************************
** Form implementation generated from reading ui file 'EntityGUI_1Sel_QTD.ui'
**
** Created: ven déc 12 11:17:12 2003
** 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( 186, 96 );
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" );
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
}

View File

@ -0,0 +1,46 @@
/****************************************************************************
** Form interface generated from reading ui file 'EntityGUI_1Sel_QTD.ui'
**
** Created: ven déc 12 11:17:12 2003
** 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

View 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
}

View 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

View 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
}

View 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

View 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
}

View File

@ -0,0 +1,48 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : 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

View 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
}

View 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

View File

@ -0,0 +1,63 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : 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
}

View 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

View 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
}

View 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

View 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
}

View File

@ -0,0 +1,50 @@
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : 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

View File

@ -0,0 +1,121 @@
/****************************************************************************
** Form implementation generated from reading ui file 'EntityGUI_4Spin_QTD.ui'
**
** Created: ven déc 12 11:17:12 2003
** 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( 154, 148 );
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 );
}
/*
* 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
}

View File

@ -0,0 +1,51 @@
/****************************************************************************
** Form interface generated from reading ui file 'EntityGUI_4Spin_QTD.ui'
**
** Created: ven déc 12 11:17:12 2003
** 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

View 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
}

View 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

View 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
}

View 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

View 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
}

View 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

View 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
}

View 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

File diff suppressed because it is too large Load Diff

View 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

View File

@ -21,13 +21,13 @@
//
//
//
// File : BuildGUI_SplineDlg.cxx
// File : EntityGUI_SplineDlg.cxx
// Author : Lucien PIGNOLONI
// Module : GEOM
// $Header$
using namespace std;
#include "BuildGUI_SplineDlg.h"
#include "EntityGUI_SplineDlg.h"
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <TColgp_Array1OfPnt.hxx>
@ -37,17 +37,17 @@ using namespace std;
#include <SALOME_ListIteratorOfListIO.hxx>
//=================================================================================
// class : BuildGUI_SplineDlg()
// purpose : Constructs a BuildGUI_SplineDlg which is a child of 'parent', with the
// class : EntityGUI_SplineDlg()
// purpose : Constructs a EntityGUI_SplineDlg 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.
//=================================================================================
BuildGUI_SplineDlg::BuildGUI_SplineDlg(QWidget* parent, const char* name, BuildGUI* theBuildGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
EntityGUI_SplineDlg::EntityGUI_SplineDlg(QWidget* parent, const char* name, EntityGUI* theEntityGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
:GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BEZIER")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BSPLINE")));
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_INTERPOL")));
QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_SPLINE_TITLE"));
@ -63,26 +63,26 @@ BuildGUI_SplineDlg::BuildGUI_SplineDlg(QWidget* parent, const char* name, BuildG
GroupBezier->TextLabel1->setText(tr("GEOM_POINTS"));
GroupBezier->PushButton1->setPixmap(image2);
GroupBSpline = new DlgRef_1Sel_QTD(this, "GroupBSpline");
GroupBSpline->GroupBox1->setTitle(tr("GEOM_BSPLINE"));
GroupBSpline->TextLabel1->setText(tr("GEOM_POINTS"));
GroupBSpline->PushButton1->setPixmap(image2);
GroupInterpol = new DlgRef_1Sel_QTD(this, "GroupInterpol");
GroupInterpol->GroupBox1->setTitle(tr("GEOM_INTERPOL"));
GroupInterpol->TextLabel1->setText(tr("GEOM_POINTS"));
GroupInterpol->PushButton1->setPixmap(image2);
Layout1->addWidget(GroupBezier, 1, 0);
Layout1->addWidget(GroupBSpline, 1, 0);
Layout1->addWidget(GroupInterpol, 1, 0);
/***************************************************************/
/* Initialisations */
myBuildGUI = theBuildGUI;
myEntityGUI = theEntityGUI;
Init();
}
//=================================================================================
// function : ~BuildGUI_SplineDlg()
// function : ~EntityGUI_SplineDlg()
// purpose : Destroys the object and frees any allocated resources
//=================================================================================
BuildGUI_SplineDlg::~BuildGUI_SplineDlg()
EntityGUI_SplineDlg::~EntityGUI_SplineDlg()
{
// no need to delete child widgets, Qt does it all for us
}
@ -92,7 +92,7 @@ BuildGUI_SplineDlg::~BuildGUI_SplineDlg()
// function : Init()
// purpose :
//=================================================================================
void BuildGUI_SplineDlg::Init()
void EntityGUI_SplineDlg::Init()
{
/* init variables */
myConstructorId = 0;
@ -109,12 +109,12 @@ void BuildGUI_SplineDlg::Init()
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
connect(GroupBezier->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupBSpline->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupInterpol->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* displays Dialog */
GroupBSpline->hide();
GroupInterpol->hide();
GroupBezier->show();
this->show();
@ -126,7 +126,7 @@ void BuildGUI_SplineDlg::Init()
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void BuildGUI_SplineDlg::ConstructorsClicked(int constructorId)
void EntityGUI_SplineDlg::ConstructorsClicked(int constructorId)
{
myConstructorId = constructorId;
mySelection->ClearFilters();
@ -139,7 +139,7 @@ void BuildGUI_SplineDlg::ConstructorsClicked(int constructorId)
{
case 0:
{
GroupBSpline->hide();
GroupInterpol->hide();
resize(0, 0);
GroupBezier->show();
@ -151,10 +151,10 @@ void BuildGUI_SplineDlg::ConstructorsClicked(int constructorId)
{
GroupBezier->hide();
resize(0, 0);
GroupBSpline->show();
GroupInterpol->show();
myEditCurrentArgument = GroupBSpline->LineEdit1;
GroupBSpline->LineEdit1->setText("");
myEditCurrentArgument = GroupInterpol->LineEdit1;
GroupInterpol->LineEdit1->setText("");
break;
}
}
@ -169,7 +169,7 @@ void BuildGUI_SplineDlg::ConstructorsClicked(int constructorId)
// function : ClickOnOk()
// purpose :
//=================================================================================
void BuildGUI_SplineDlg::ClickOnOk()
void EntityGUI_SplineDlg::ClickOnOk()
{
this->ClickOnApply();
ClickOnCancel();
@ -181,7 +181,7 @@ void BuildGUI_SplineDlg::ClickOnOk()
// function : ClickOnApply()
// purpose :
//=================================================================================
void BuildGUI_SplineDlg::ClickOnApply()
void EntityGUI_SplineDlg::ClickOnApply()
{
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
@ -194,13 +194,13 @@ void BuildGUI_SplineDlg::ClickOnApply()
case 0 :
{
if(myOkListShapes)
myBuildGUI->MakeBezierAndDisplay(myListShapes);
myEntityGUI->MakeBezierAndDisplay(myListShapes);
break;
}
case 1 :
{
if(myOkListShapes)
myBuildGUI->MakeBSplineAndDisplay(myListShapes);
myEntityGUI->MakeInterpolAndDisplay(myListShapes);
break;
}
}
@ -212,7 +212,7 @@ void BuildGUI_SplineDlg::ClickOnApply()
// function : SelectionIntoArgument()
// purpose : Called when selection as changed or other case
//=================================================================================
void BuildGUI_SplineDlg::SelectionIntoArgument()
void EntityGUI_SplineDlg::SelectionIntoArgument()
{
myGeomBase->EraseSimulationShape();
myEditCurrentArgument->setText("");
@ -237,7 +237,7 @@ void BuildGUI_SplineDlg::SelectionIntoArgument()
// function : SetEditCurrentArgument()
// purpose :
//=================================================================================
void BuildGUI_SplineDlg::SetEditCurrentArgument()
void EntityGUI_SplineDlg::SetEditCurrentArgument()
{
QPushButton* send = (QPushButton*)sender();
@ -245,9 +245,9 @@ void BuildGUI_SplineDlg::SetEditCurrentArgument()
GroupBezier->LineEdit1->setFocus();
myEditCurrentArgument = GroupBezier->LineEdit1;
}
else if(send == GroupBSpline->PushButton1) {
GroupBSpline->LineEdit1->setFocus();
myEditCurrentArgument = GroupBSpline->LineEdit1;
else if(send == GroupInterpol->PushButton1) {
GroupInterpol->LineEdit1->setFocus();
myEditCurrentArgument = GroupInterpol->LineEdit1;
}
mySelection->AddFilter(myVertexFilter);
this->SelectionIntoArgument();
@ -260,7 +260,7 @@ void BuildGUI_SplineDlg::SetEditCurrentArgument()
// function : ActivateThisDialog()
// purpose :
//=================================================================================
void BuildGUI_SplineDlg::ActivateThisDialog()
void EntityGUI_SplineDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
@ -275,7 +275,7 @@ void BuildGUI_SplineDlg::ActivateThisDialog()
// function : enterEvent()
// purpose :
//=================================================================================
void BuildGUI_SplineDlg::enterEvent(QEvent* e)
void EntityGUI_SplineDlg::enterEvent(QEvent* e)
{
if (GroupConstructors->isEnabled())
return;
@ -288,7 +288,7 @@ void BuildGUI_SplineDlg::enterEvent(QEvent* e)
// function : MakeSplineSimulationAndDisplay()
// purpose :
//=================================================================================
void BuildGUI_SplineDlg::MakeSplineSimulationAndDisplay()
void EntityGUI_SplineDlg::MakeSplineSimulationAndDisplay()
{
myGeomBase->EraseSimulationShape();
mySimulationTopoDs.Nullify();

View File

@ -21,7 +21,7 @@
//
//
//
// File : BuildGUI_SplineDlg.h
// File : EntityGUI_SplineDlg.h
// Author : Damien COQUERET
// Module : GEOM
// $Header:
@ -32,28 +32,28 @@
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel_QTD.h"
#include "BuildGUI.h"
#include "EntityGUI.h"
#include "GEOM_ShapeTypeFilter.hxx"
//=================================================================================
// class : BuildGUI_WireDlg
// class : EntityGUI_WireDlg
// purpose :
//=================================================================================
class BuildGUI_SplineDlg : public GEOMBase_Skeleton
class EntityGUI_SplineDlg : public GEOMBase_Skeleton
{
Q_OBJECT
public:
BuildGUI_SplineDlg(QWidget* parent = 0, const char* name = 0, BuildGUI* theBuildGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
~BuildGUI_SplineDlg();
EntityGUI_SplineDlg(QWidget* parent = 0, const char* name = 0, EntityGUI* theEntityGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
~EntityGUI_SplineDlg();
private:
void Init();
void enterEvent(QEvent* e);
void MakeSplineSimulationAndDisplay();
BuildGUI* myBuildGUI;
EntityGUI* myEntityGUI;
int myConstructorId;
Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* filter for selection */
@ -62,7 +62,7 @@ private:
bool myOkListShapes; /* to check when arguments is defined */
DlgRef_1Sel_QTD* GroupBezier;
DlgRef_1Sel_QTD* GroupBSpline;
DlgRef_1Sel_QTD* GroupInterpol;
private slots:
void ClickOnOk();

View File

@ -21,13 +21,13 @@
//
//
//
// File : BuildGUI_SubShapeDlg.cxx
// File : EntityGUI_SubShapeDlg.cxx
// Author : Lucien PIGNOLONI
// Module : GEOM
// $Header$
using namespace std;
#include "BuildGUI_SubShapeDlg.h"
#include "EntityGUI_SubShapeDlg.h"
#include "DisplayGUI.h"
#include "QAD_RightFrame.h"
@ -39,13 +39,13 @@ using namespace std;
#include <qmessagebox.h>
//=================================================================================
// class : BuildGUI_SubShapeDlg()
// purpose : Constructs a BuildGUI_SubShapeDlg which is a child of 'parent', with the
// class : EntityGUI_SubShapeDlg()
// purpose : Constructs a EntityGUI_SubShapeDlg 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.
//=================================================================================
BuildGUI_SubShapeDlg::BuildGUI_SubShapeDlg(QWidget* parent, const char* name, BuildGUI* theBuildGUI, SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic, bool modal, WFlags fl)
EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(QWidget* parent, const char* name, EntityGUI* theEntityGUI, SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic, bool modal, WFlags fl)
:GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SUBSHAPE")));
@ -70,16 +70,16 @@ BuildGUI_SubShapeDlg::BuildGUI_SubShapeDlg(QWidget* parent, const char* name, Bu
/***************************************************************/
/* Initialisations */
myBuildGUI = theBuildGUI;
myEntityGUI = theEntityGUI;
Init(ic);
}
//=================================================================================
// function : ~BuildGUI_SubShapeDlg()
// function : ~EntityGUI_SubShapeDlg()
// purpose : Destroys the object and frees any allocated resources
//=================================================================================
BuildGUI_SubShapeDlg::~BuildGUI_SubShapeDlg()
EntityGUI_SubShapeDlg::~EntityGUI_SubShapeDlg()
{
// no need to delete child widgets, Qt does it all for us
}
@ -89,7 +89,7 @@ BuildGUI_SubShapeDlg::~BuildGUI_SubShapeDlg()
// function : Init()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::Init(Handle(AIS_InteractiveContext) ic)
void EntityGUI_SubShapeDlg::Init(Handle(AIS_InteractiveContext) ic)
{
/* init variables */
myEditCurrentArgument = GroupPoints->LineEdit1;
@ -144,7 +144,7 @@ void BuildGUI_SubShapeDlg::Init(Handle(AIS_InteractiveContext) ic)
// function : ClickOnOk()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::ClickOnOk()
void EntityGUI_SubShapeDlg::ClickOnOk()
{
this->ClickOnApply();
@ -162,7 +162,7 @@ void BuildGUI_SubShapeDlg::ClickOnOk()
// function : ClickOnApply()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::ClickOnApply()
void EntityGUI_SubShapeDlg::ClickOnApply()
{
QAD_Application::getDesktop()->putInfo(tr(""));
bool testResult = false;
@ -179,16 +179,16 @@ void BuildGUI_SubShapeDlg::ClickOnApply()
const QString button1 = tr("GEOM_BUT_CANCEL");
if(QMessageBox::warning(this, caption, text, button0, button1) == 0)
testResult = myBuildGUI->OnSubShapeGetAll(myShape, myShapeIOR, myShapeType);
testResult = myEntityGUI->OnSubShapeGetAll(myShape, myShapeIOR, myShapeType);
else
myAbort = true; /* aborted */
}
else
testResult = myBuildGUI->OnSubShapeGetAll(myShape, myShapeIOR, myShapeType);
testResult = myEntityGUI->OnSubShapeGetAll(myShape, myShapeIOR, myShapeType);
}
/* explode only selected sub shapes */
else if(myOkShape && myOkSelectSubMode)
testResult = myBuildGUI->OnSubShapeGetSelected(myShape, myShapeIOR, myShapeType, myLocalContextId, myUseLocalContext);
testResult = myEntityGUI->OnSubShapeGetSelected(myShape, myShapeIOR, myShapeType, myLocalContextId, myUseLocalContext);
if(!testResult) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT"));
@ -207,7 +207,7 @@ void BuildGUI_SubShapeDlg::ClickOnApply()
// function : ClickOnCancel()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::ClickOnCancel()
void EntityGUI_SubShapeDlg::ClickOnCancel()
{
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
@ -229,7 +229,7 @@ void BuildGUI_SubShapeDlg::ClickOnCancel()
// purpose : Called when selection as changed or other case
// : used only by SelectButtonC1A1 (LineEditC1A1)
//=================================================================================
void BuildGUI_SubShapeDlg::SelectionIntoArgument()
void EntityGUI_SubShapeDlg::SelectionIntoArgument()
{
myEditCurrentArgument->setText("");
this->ResetStateOfDialog();
@ -330,7 +330,7 @@ void BuildGUI_SubShapeDlg::SelectionIntoArgument()
// function : SetEditCurrentArgument()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::SetEditCurrentArgument()
void EntityGUI_SubShapeDlg::SetEditCurrentArgument()
{
QPushButton* send = (QPushButton*)sender();
@ -348,7 +348,7 @@ void BuildGUI_SubShapeDlg::SetEditCurrentArgument()
// function : LineEditReturnPressed()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::LineEditReturnPressed()
void EntityGUI_SubShapeDlg::LineEditReturnPressed()
{
QLineEdit* send = (QLineEdit*)sender();
if(send == GroupPoints->LineEdit1)
@ -365,7 +365,7 @@ void BuildGUI_SubShapeDlg::LineEditReturnPressed()
// function : DeactivateActiveDialog()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::DeactivateActiveDialog()
void EntityGUI_SubShapeDlg::DeactivateActiveDialog()
{
if(GroupConstructors->isEnabled()) {
this->ResetStateOfDialog();
@ -379,7 +379,7 @@ void BuildGUI_SubShapeDlg::DeactivateActiveDialog()
// function : ActivateThisDialog()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::ActivateThisDialog()
void EntityGUI_SubShapeDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
@ -395,7 +395,7 @@ void BuildGUI_SubShapeDlg::ActivateThisDialog()
// function : enterEvent()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::enterEvent(QEvent* e)
void EntityGUI_SubShapeDlg::enterEvent(QEvent* e)
{
if(GroupConstructors->isEnabled())
return;
@ -408,7 +408,7 @@ void BuildGUI_SubShapeDlg::enterEvent(QEvent* e)
// function : closeEvent()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::closeEvent(QCloseEvent* e)
void EntityGUI_SubShapeDlg::closeEvent(QCloseEvent* e)
{
/* same than click on cancel button */
this->ClickOnCancel();
@ -420,7 +420,7 @@ void BuildGUI_SubShapeDlg::closeEvent(QCloseEvent* e)
// function : ResetStateOfDialog()
// purpose : Completely reset the state of method including local context
//=================================================================================
void BuildGUI_SubShapeDlg::ResetStateOfDialog()
void EntityGUI_SubShapeDlg::ResetStateOfDialog()
{
if(myAbort == true) {
myOkShape = false;
@ -472,7 +472,7 @@ void BuildGUI_SubShapeDlg::ResetStateOfDialog()
// purpose : Allow user selection of all or only selected sub shapes
// : Called when 'CheckButton1' state change
//=================================================================================
void BuildGUI_SubShapeDlg::AllOrNotAll()
void EntityGUI_SubShapeDlg::AllOrNotAll()
{
/* No sub shape selection if main shape not selected */
if(!myOkShape) {
@ -524,7 +524,7 @@ void BuildGUI_SubShapeDlg::AllOrNotAll()
// function : ComboTextChanged()
// purpose :
//=================================================================================
void BuildGUI_SubShapeDlg::ComboTextChanged()
void EntityGUI_SubShapeDlg::ComboTextChanged()
{
if(myOkShape)
myShapeType = GroupPoints->ComboBox1->currentItem() + myShape.ShapeType() + 1;
@ -554,7 +554,7 @@ void BuildGUI_SubShapeDlg::ComboTextChanged()
// function : NumberOfSubShapes()
// purpose :
//=================================================================================
unsigned int BuildGUI_SubShapeDlg::NumberOfSubShapes(const TopoDS_Shape& S, const int shapeType)
unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes(const TopoDS_Shape& S, const int shapeType)
{
if(S.IsNull())
return 0;

View File

@ -21,7 +21,7 @@
//
//
//
// File : BuildGUI_SubShapeDlg.h
// File : EntityGUI_SubShapeDlg.h
// Author : Lucien PIGNOLONI
// Module : GEOM
// $Header$
@ -32,19 +32,19 @@
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel1Check1List_QTD.h"
#include "BuildGUI.h"
#include "EntityGUI.h"
//=================================================================================
// class : BuildGUI_SubShapeDlg
// class : EntityGUI_SubShapeDlg
// purpose :
//=================================================================================
class BuildGUI_SubShapeDlg : public GEOMBase_Skeleton
class EntityGUI_SubShapeDlg : public GEOMBase_Skeleton
{
Q_OBJECT
public:
BuildGUI_SubShapeDlg(QWidget* parent = 0, const char* name = 0, BuildGUI* theBuildGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0);
~BuildGUI_SubShapeDlg();
EntityGUI_SubShapeDlg(QWidget* parent = 0, const char* name = 0, EntityGUI* theEntityGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0);
~EntityGUI_SubShapeDlg();
private :
void Init(Handle(AIS_InteractiveContext) ic);
@ -54,7 +54,7 @@ private :
void ResetStateOfDialog();
unsigned int NumberOfSubShapes(const TopoDS_Shape& S, const int shapeType);
BuildGUI* myBuildGUI;
EntityGUI* myEntityGUI;
/* Interactive and local context management see also : bool myUseLocalContext() */
Handle(AIS_InteractiveContext) myIC; /* Interactive context */

91
src/EntityGUI/Makefile.in Normal file
View File

@ -0,0 +1,91 @@
# GEOM ENTITYGUI :
#
# 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 : Makefile.in
# Author : Damien COQUERET (OCC)
# Module : GEOM
# $Header:
top_srcdir=@top_srcdir@
top_builddir=../..
srcdir=@srcdir@
VPATH=.:@srcdir@:@top_srcdir@/idl
@COMMENCE@
# Libraries targets
LIB = libEntityGUI.la
# header files
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_SplineDlg.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_SplineDlg.h \
EntityGUI_SubShapeDlg.h
LIB_CLIENT_IDL =
LIB_SERVER_IDL =
# additionnal information to compil and link file
CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
LDFLAGS += -lGEOMSketcher -lGEOMFiltersSelection -lDisplayGUI
@CONCLUDE@

View File

@ -0,0 +1,185 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>EntityGUI_1Sel_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>EntityGUI_1Sel_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>186</width>
<height>96</height>
</rect>
</property>
<property name="caption">
<string>EntityGUI_1Sel_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string>Values</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="1">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QPushButton" row="1" column="0">
<property name="name">
<cstring>buttonUndo</cstring>
</property>
<property name="text">
<string>Undo</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="0">
<property name="name">
<cstring>buttonApply</cstring>
</property>
<property name="text">
<string>Create</string>
</property>
</widget>
<spacer row="2" column="0">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>51</height>
</size>
</property>
</spacer>
</grid>
</widget>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<spacer row="1" column="2">
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>180</height>
</size>
</property>
</spacer>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="2">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,177 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>EntityGUI_1Spin_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>EntityGUI_1Spin_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>154</width>
<height>96</height>
</rect>
</property>
<property name="caption">
<string>EntityGUI_1Spin_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string>Values</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="1">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QPushButton" row="1" column="0">
<property name="name">
<cstring>buttonUndo</cstring>
</property>
<property name="text">
<string>Undo</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="0">
<property name="name">
<cstring>buttonApply</cstring>
</property>
<property name="text">
<string>Create</string>
</property>
</widget>
<spacer row="2" column="0">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>51</height>
</size>
</property>
</spacer>
</grid>
</widget>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QSpinBox" row="0" column="1">
<property name="name">
<cstring>SpinBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<spacer row="3" column="1">
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>82</height>
</size>
</property>
</spacer>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,206 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>EntityGUI_2Spin_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>EntityGUI_2Spin_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>154</width>
<height>96</height>
</rect>
</property>
<property name="caption">
<string>EntityGUI_2Spin_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string>Values</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="1">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QPushButton" row="1" column="0">
<property name="name">
<cstring>buttonUndo</cstring>
</property>
<property name="text">
<string>Undo</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="0">
<property name="name">
<cstring>buttonApply</cstring>
</property>
<property name="text">
<string>Create</string>
</property>
</widget>
<spacer row="2" column="0">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>51</height>
</size>
</property>
</spacer>
</grid>
</widget>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QSpinBox" row="0" column="1">
<property name="name">
<cstring>SpinBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QSpinBox" row="1" column="1">
<property name="name">
<cstring>SpinBox2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<spacer row="3" column="1">
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>82</height>
</size>
</property>
</spacer>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,235 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>EntityGUI_3Spin_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>EntityGUI_3Spin_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>154</width>
<height>120</height>
</rect>
</property>
<property name="caption">
<string>EntityGUI_3Spin_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string>Values</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="1">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QPushButton" row="1" column="0">
<property name="name">
<cstring>buttonUndo</cstring>
</property>
<property name="text">
<string>Undo</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="0">
<property name="name">
<cstring>buttonApply</cstring>
</property>
<property name="text">
<string>Create</string>
</property>
</widget>
<spacer row="2" column="0">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>51</height>
</size>
</property>
</spacer>
</grid>
</widget>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QSpinBox" row="0" column="1">
<property name="name">
<cstring>SpinBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QSpinBox" row="1" column="1">
<property name="name">
<cstring>SpinBox2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
<spacer row="3" column="1">
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>82</height>
</size>
</property>
</spacer>
<widget class="QSpinBox" row="2" column="1">
<property name="name">
<cstring>SpinBox3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,264 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>EntityGUI_4Spin_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>EntityGUI_4Spin_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>154</width>
<height>148</height>
</rect>
</property>
<property name="caption">
<string>EntityGUI_4Spin_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="title">
<string>Values</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="1">
<property name="name">
<cstring>Layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QPushButton" row="1" column="0">
<property name="name">
<cstring>buttonUndo</cstring>
</property>
<property name="text">
<string>Undo</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="0">
<property name="name">
<cstring>buttonApply</cstring>
</property>
<property name="text">
<string>Create</string>
</property>
</widget>
<spacer row="2" column="0">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>51</height>
</size>
</property>
</spacer>
</grid>
</widget>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QSpinBox" row="2" column="1">
<property name="name">
<cstring>SpinBox3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QSpinBox" row="1" column="1">
<property name="name">
<cstring>SpinBox2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
</widget>
<spacer row="4" column="1">
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>70</height>
</size>
</property>
</spacer>
<widget class="QSpinBox" row="3" column="1">
<property name="name">
<cstring>SpinBox4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
</widget>
<widget class="QSpinBox" row="0" column="1">
<property name="name">
<cstring>SpinBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
</widget>
<widget class="QLabel" row="3" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL4</string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,112 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>EntityGUI_Dir1_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>EntityGUI_Dir1_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>131</width>
<height>123</height>
</rect>
</property>
<property name="caption">
<string>EntityGUI_Dir1_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QButtonGroup" row="0" column="0">
<property name="name">
<cstring>GroupDir1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Direction</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QRadioButton" row="1" column="0">
<property name="name">
<cstring>RB_Dir12</cstring>
</property>
<property name="text">
<string>Perpendicular</string>
</property>
</widget>
<widget class="QRadioButton" row="2" column="0">
<property name="name">
<cstring>RB_Dir13</cstring>
</property>
<property name="text">
<string>Tangent</string>
</property>
</widget>
<widget class="QRadioButton" row="0" column="0">
<property name="name">
<cstring>RB_Dir11</cstring>
</property>
<property name="text">
<string>Angle</string>
</property>
</widget>
<widget class="QRadioButton" row="3" column="0">
<property name="name">
<cstring>RB_Dir14</cstring>
</property>
<property name="text">
<string>VX-VY</string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<tabstops>
<tabstop>RB_Dir11</tabstop>
<tabstop>RB_Dir12</tabstop>
<tabstop>RB_Dir13</tabstop>
<tabstop>RB_Dir14</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,120 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>EntityGUI_Dir2_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>EntityGUI_Dir2_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>124</width>
<height>106</height>
</rect>
</property>
<property name="caption">
<string>EntityGUI_Dir2_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QButtonGroup" row="0" column="0">
<property name="name">
<cstring>GroupDir2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Direction</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QRadioButton" row="1" column="0">
<property name="name">
<cstring>RB_Dir22</cstring>
</property>
<property name="text">
<string>X</string>
</property>
</widget>
<widget class="QRadioButton" row="2" column="0">
<property name="name">
<cstring>RB_Dir23</cstring>
</property>
<property name="text">
<string>Y</string>
</property>
</widget>
<spacer row="3" column="0">
<property name="name">
<cstring>Spacer4</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QRadioButton" row="0" column="0">
<property name="name">
<cstring>RB_Dir21</cstring>
</property>
<property name="text">
<string>Length</string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<tabstops>
<tabstop>RB_Dir21</tabstop>
<tabstop>RB_Dir22</tabstop>
<tabstop>RB_Dir23</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,103 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>EntityGUI_Point_QTD</class>
<widget class="QWidget">
<property name="name">
<cstring>EntityGUI_Point_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>124</width>
<height>106</height>
</rect>
</property>
<property name="caption">
<string>EntityGUI_Point_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QButtonGroup" row="0" column="0">
<property name="name">
<cstring>GroupPoint</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Point</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QRadioButton" row="1" column="0">
<property name="name">
<cstring>RB_Point2</cstring>
</property>
<property name="text">
<string>Relative</string>
</property>
</widget>
<widget class="QRadioButton" row="0" column="0">
<property name="name">
<cstring>RB_Point1</cstring>
</property>
<property name="text">
<string>Absolute</string>
</property>
</widget>
<widget class="QRadioButton" row="2" column="0">
<property name="name">
<cstring>RB_Point3</cstring>
</property>
<property name="text">
<string>Selection</string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<tabstops>
<tabstop>RB_Point1</tabstop>
<tabstop>RB_Point2</tabstop>
<tabstop>RB_Point3</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -0,0 +1,379 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>EntityGUI_Skeleton_QTD</class>
<widget class="QDialog">
<property name="name">
<cstring>EntityGUI_Skeleton_QTD</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>317</width>
<height>276</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="caption">
<string>EntityGUI_Skeleton_QTD</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QGroupBox" row="2" column="0">
<property name="name">
<cstring>GroupVal</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
</widget>
<widget class="QButtonGroup" row="0" column="0">
<property name="name">
<cstring>GroupConstructors</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Element Type</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QRadioButton">
<property name="name">
<cstring>RadioButton1</cstring>
</property>
<property name="text">
<string>Segment</string>
</property>
</widget>
<widget class="QRadioButton">
<property name="name">
<cstring>RadioButton2</cstring>
</property>
<property name="text">
<string>Arc</string>
</property>
</widget>
</hbox>
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="1" column="0">
<property name="name">
<cstring>GroupDest</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Destination</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout5</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QButtonGroup" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>GroupDest1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Type</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout4</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QRadioButton" row="0" column="1">
<property name="name">
<cstring>RB_Dest2</cstring>
</property>
<property name="text">
<string>Direction</string>
</property>
</widget>
<widget class="QRadioButton" row="0" column="0">
<property name="name">
<cstring>RB_Dest1</cstring>
</property>
<property name="text">
<string>Point</string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
<widget class="QButtonGroup" row="1" column="0">
<property name="name">
<cstring>GroupDest2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
</grid>
</widget>
<widget class="QButtonGroup" row="1" column="1">
<property name="name">
<cstring>GroupDest3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
</grid>
</widget>
</grid>
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="3" column="0">
<property name="name">
<cstring>GroupButtons</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>Layout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>buttonEnd</cstring>
</property>
<property name="text">
<string>End Sketch</string>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>buttonClose</cstring>
</property>
<property name="text">
<string>Close Sketch</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>91</width>
<height>0</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
<property name="text">
<string>&amp;Cancel</string>
</property>
</widget>
</hbox>
</widget>
</hbox>
</widget>
</grid>
</widget>
</grid>
</widget>
<tabstops>
<tabstop>RadioButton1</tabstop>
<tabstop>RadioButton2</tabstop>
<tabstop>RB_Dest1</tabstop>
<tabstop>RB_Dest2</tabstop>
<tabstop>buttonEnd</tabstop>
<tabstop>buttonClose</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>

28
src/EntityGUI/UIFiles/ui_to_cxx Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh
uic -o EntityGUI_Skeleton_QTD.h EntityGUI_Skeleton_QTD.ui
uic -o EntityGUI_Skeleton_QTD.cxx -impl EntityGUI_Skeleton_QTD.h EntityGUI_Skeleton_QTD.ui
uic -o EntityGUI_Point_QTD.h EntityGUI_Point_QTD.ui
uic -o EntityGUI_Point_QTD.cxx -impl EntityGUI_Point_QTD.h EntityGUI_Point_QTD.ui
uic -o EntityGUI_Dir1_QTD.h EntityGUI_Dir1_QTD.ui
uic -o EntityGUI_Dir1_QTD.cxx -impl EntityGUI_Dir1_QTD.h EntityGUI_Dir1_QTD.ui
uic -o EntityGUI_Dir2_QTD.h EntityGUI_Dir2_QTD.ui
uic -o EntityGUI_Dir2_QTD.cxx -impl EntityGUI_Dir2_QTD.h EntityGUI_Dir2_QTD.ui
uic -o EntityGUI_1Spin_QTD.h EntityGUI_1Spin_QTD.ui
uic -o EntityGUI_1Spin_QTD.cxx -impl EntityGUI_1Spin_QTD.h EntityGUI_1Spin_QTD.ui
uic -o EntityGUI_2Spin_QTD.h EntityGUI_2Spin_QTD.ui
uic -o EntityGUI_2Spin_QTD.cxx -impl EntityGUI_2Spin_QTD.h EntityGUI_2Spin_QTD.ui
uic -o EntityGUI_3Spin_QTD.h EntityGUI_3Spin_QTD.ui
uic -o EntityGUI_3Spin_QTD.cxx -impl EntityGUI_3Spin_QTD.h EntityGUI_3Spin_QTD.ui
uic -o EntityGUI_4Spin_QTD.h EntityGUI_4Spin_QTD.ui
uic -o EntityGUI_4Spin_QTD.cxx -impl EntityGUI_4Spin_QTD.h EntityGUI_4Spin_QTD.ui
uic -o EntityGUI_1Sel_QTD.h EntityGUI_1Sel_QTD.ui
uic -o EntityGUI_1Sel_QTD.cxx -impl EntityGUI_1Sel_QTD.h EntityGUI_1Sel_QTD.ui

View File

@ -31,6 +31,7 @@ using namespace std;
#include "Partition_Spliter.hxx"
#include "Archimede_VolumeSection.hxx"
#include "Sketcher_Profile.hxx"
#include "Utils_CorbaException.hxx"
#include "utilities.h"
@ -4424,6 +4425,36 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeWire( const GEOM::GEOM_Gen::ListOfIOR& List
}
//=================================================================================
// function : MakeSketcher()
// purpose : Make a wire from a list containing many points
//=================================================================================
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSketcher( const char *Cmd )
throw (SALOME::SALOME_Exception)
{
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
try {
Sketcher_Profile aProfile (Cmd);
if(aProfile.IsDone())
tds = aProfile.GetShape();
}
catch(Standard_Failure) {
THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::MakeBox", SALOME::BAD_PARAM);
}
if (tds.IsNull()) {
THROW_SALOME_CORBA_EXCEPTION("Make Box aborted : null shape", SALOME::BAD_PARAM);
}
else {
result = CreateObject(tds);
const char *entry = InsertInLabel(tds, result->Name(), myCurrentOCAFDoc) ;
result->ShapeId(entry) ;
}
return result;
}
//=================================================================================
// function : MakeBezier()
// purpose : Make a wire from a list containing many points
@ -4466,10 +4497,10 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeBezier( const GEOM::GEOM_Gen::ListOfIOR& Li
//=================================================================================
// function : MakeBSpline()
// function : MakeInterpol()
// purpose : Make a wire from a list containing many points
//=================================================================================
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeBSpline( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeInterpol( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
throw (SALOME::SALOME_Exception)
{
GEOM::GEOM_Shape_var result;

View File

@ -591,9 +591,20 @@ class GEOM_Gen_i: public POA_GEOM::GEOM_Gen,
GEOM::GEOM_Shape_ptr MakeSolid (const GEOM::GEOM_Gen::ListOfIOR& ListShapes)
throw (SALOME::SALOME_Exception) ;
//-------------------------------------------------------------------//
// Speciic method Sketcher //
//-------------------------------------------------------------------//
GEOM::GEOM_Shape_ptr MakeSketcher (const char* Cmd)
throw (SALOME::SALOME_Exception) ;
//-------------------------------------------------------------------//
// Speciic method Spline //
//-------------------------------------------------------------------//
GEOM::GEOM_Shape_ptr MakeBezier (const GEOM::GEOM_Gen::ListOfIOR& ListShapes)
throw (SALOME::SALOME_Exception) ;
GEOM::GEOM_Shape_ptr MakeBSpline (const GEOM::GEOM_Gen::ListOfIOR& ListShapes)
GEOM::GEOM_Shape_ptr MakeInterpol (const GEOM::GEOM_Gen::ListOfIOR& ListShapes)
throw (SALOME::SALOME_Exception) ;

View File

@ -355,8 +355,8 @@ msgid "ICON_DLG_BEZIER"
msgstr "bezier.png"
#SplineDlg
msgid "ICON_DLG_BSPLINE"
msgstr "bspline.png"
msgid "ICON_DLG_INTERPOL"
msgstr "interpol.png"

View File

@ -1188,5 +1188,114 @@ msgid "GEOM_SPLINE"
msgstr "Spline"
msgid "GEOM_BEZIER"
msgstr "Bezier"
msgid "GEOM_BSPLINE"
msgstr "BSpline"
msgid "GEOM_INTERPOL"
msgstr "Interpolation"
#
#==============================================================================
#
msgid "GEOM_SKETCHER_EL"
msgstr "Element Type"
msgid "GEOM_BUT_CLOSE_SKETCH"
msgstr "Close Sketcher"
msgid "GEOM_BUT_END_SKETCH"
msgstr "End Sketcher"
msgid "GEOM_SKETCHER_TITLE"
msgstr "Spline Construction"
msgid "GEOM_SKETCHER_POINT"
msgstr "Point"
msgid "GEOM_SKETCHER_SEGMENT"
msgstr "Segment"
msgid "GEOM_SKETCHER_ARC"
msgstr "Arc"
msgid "GEOM_SKETCHER_DIR"
msgstr "Direction"
msgid "GEOM_SKETCHER_POINT2"
msgstr "Point :"
msgid "GEOM_SKETCHER_DEST"
msgstr "Destination"
msgid "GEOM_SKETCHER_ABS"
msgstr "Absolute"
msgid "GEOM_SKETCHER_REL"
msgstr "Relative"
msgid "GEOM_SKETCHER_SEL"
msgstr "Selection"
msgid "GEOM_SKETCHER_ANGLE"
msgstr "Angle"
msgid "GEOM_SKETCHER_PER"
msgstr "Perpendicular"
msgid "GEOM_SKETCHER_TAN"
msgstr "Tangent"
msgid "GEOM_SKETCHER_VXVY"
msgstr "VX-VY"
msgid "GEOM_SKETCHER_LENGTH"
msgstr "Length"
msgid "GEOM_SKETCHER_X"
msgstr "X"
msgid "GEOM_SKETCHER_Y"
msgstr "Y"
msgid "GEOM_SKETCHER_X2"
msgstr "X :"
msgid "GEOM_SKETCHER_Y2"
msgstr "Y :"
msgid "GEOM_SKETCHER_X3"
msgstr "Abs. X :"
msgid "GEOM_SKETCHER_Y3"
msgstr "Abs. Y :"
msgid "GEOM_SKETCHER_DX2"
msgstr "DX :"
msgid "GEOM_SKETCHER_DY2"
msgstr "DY :"
msgid "GEOM_SKETCHER_VX2"
msgstr "VX :"
msgid "GEOM_SKETCHER_VY2"
msgstr "VY :"
msgid "GEOM_SKETCHER_LENGTH2"
msgstr "Length :"
msgid "GEOM_SKETCHER_ANGLE2"
msgstr "Angle :"
msgid "GEOM_SKETCHER_RADIUS2"
msgstr "Radius :"
msgid "GEOM_SKETCHER_UNDO"
msgstr "Undo"
msgid "GEOM_SKETCHER_APPLY"
msgstr "Apply"
msgid "GEOM_SKETCHER_VALUES"
msgstr "Values"
msgid "GEOM_SKETCHER_TYPE"
msgstr "Type"

View File

@ -166,13 +166,13 @@ bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
if(!GeomGUI->LoadLibrary("libGenerationGUI.so"))
return false;
}
else if(theCommandID == 404) { // SKETCHER
if(!GeomGUI->LoadLibrary("libSketcherGUI.so"))
else if(theCommandID == 404 || // MENU ENTITY - SKETCHER
theCommandID == 406 || // MENU ENTITY - SPLINE
theCommandID == 407) { // MENU ENTITY - EXPLODE
if(!GeomGUI->LoadLibrary("libEntityGUI.so"))
return false;
}
else if(theCommandID == 406 || // MENU BUILD - SPLINE
theCommandID == 407 || // MENU BUILD - EXPLODE
theCommandID == 4081 || // MENU BUILD - EDGE
else if(theCommandID == 4081 || // MENU BUILD - EDGE
theCommandID == 4082 || // MENU BUILD - WIRE
theCommandID == 4083 || // MENU BUILD - FACE
theCommandID == 4084 || // MENU BUILD - SHELL

View File

@ -32,6 +32,6 @@ VPATH=.:@srcdir@
@COMMENCE@
SUBDIRS = OBJECT ARCHIMEDE PARTITION GEOMDS GEOM GEOMClient GEOMFiltersSelection DlgRef GEOMContext GEOMBase DisplayGUI GEOMToolsGUI SketcherGUI BasicGUI PrimitiveGUI GenerationGUI BuildGUI BooleanGUI TransformationGUI OperationGUI RepairGUI MeasureGUI GEOMGUI GEOM_SWIG
SUBDIRS = OBJECT ARCHIMEDE PARTITION SKETCHER GEOMDS GEOM GEOMClient GEOMFiltersSelection DlgRef GEOMContext GEOMBase DisplayGUI GEOMToolsGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI RepairGUI MeasureGUI GEOMGUI GEOM_SWIG
@MODULE@

File diff suppressed because it is too large Load Diff

View File

@ -1,201 +0,0 @@
// GEOM SKETCHER : basic sketcher
//
// 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 : GEOM_Sketcher.h
// Author : Nicolas REJNERI
// Module : GEOM
// $Header$
#include "GEOM_SketcherStatus.h"
#include <V3d_Viewer.hxx>
#include <V3d_View.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <Geom_Plane.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>
#include <AIS_Axis.hxx>
#include <TopoDS_Edge.hxx>
#include <AIS_LengthDimension.hxx>
#include <AIS_RadiusDimension.hxx>
#include <AIS_AngleDimension.hxx>
#include <Geom2d_Line.hxx>
#include <TColStd_SequenceOfInteger.hxx>
#include <TColgp_SequenceOfPnt2d.hxx>
#include <gp_Vec2d.hxx>
class Sketch
{
public:
Sketch();
~Sketch();
Sketch(const Handle(V3d_Viewer)& aViewer);
Sketch(const Handle(V3d_Viewer)& aViewer,
const Quantity_Color& anAxisColor,
const Quantity_Color& aCurrentColor,
const Quantity_Color& aWireColor);
static void fitInResol(Standard_Real &toFit,
Standard_Boolean minIsResol = Standard_False);
void MakeCurrentEdge(const Standard_Integer Xp ,
const Standard_Integer Yp ,
const Handle(V3d_View)& aView );
void MakeCurrentEdge(const Standard_Real X, const Standard_Real Y);
Standard_Boolean SetDimension(Standard_Real& aValue);
void SetDimension(Standard_Real& deltaX,Standard_Real& deltaY);
void SetXDimension(Standard_Real& deltaX);
void SetYDimension(Standard_Real& deltaY);
void SetSegmentAngle(Standard_Real& aValue);
Standard_Real GetSegmentAngle();
void ValidateEdge();
TopoDS_Wire Close();
TopoDS_Wire End();
void Clear();
Standard_Boolean Delete();
void SetPlane(const Handle(Geom_Plane)& aPlane);
void SetWireColor(const Quantity_Color& aColor);
void SetCurrentColor(const Quantity_Color& aColor);
void SetAxisColor(const Quantity_Color& aColor);
void SetParameterVisibility(const TypeOfParameter atype,
const Standard_Boolean OnOff);
void HiligthWithColor(const TypeOfParameter atype,
const Quantity_NameOfColor acolor);
void Unhiligth(const TypeOfParameter atype);
Standard_Boolean IsValidCurrentParameter(const TypeOfParameter atype);
void SetParameterValue(const TypeOfParameter atype, Standard_Real aValue);
void ChangeMode(const SketchStatus aMode);
void SetTransitionStatus(const TransitionStatus aStatus);
SketchStatus GetCurrentStatus();
Standard_Integer GetmyEdgesNumber();
private :
void Init();
void MakeCurrentSegment(Standard_Real X, Standard_Real Y);
void MakeCurrentArc(Standard_Real X, Standard_Real Y);
void DisplayCurrentEdge();
void DisplayLengthDimension(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2);
void DisplayXDimension(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2);
void DisplayYDimension(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2);
void DisplayAngleDimension();
void DisplayRadiusDimension();
void AddEdgeToWire();
void RemoveLastEdge();
void CreateConstraints();
private:
// Current status of construction
SketchStatus myCurrentStatus;
// Transition status between arcs and segments
TransitionStatus myTransitionStatus;
// Current wire
BRepBuilderAPI_MakeWire myCurrentWire;
// Current presentable wire
Handle_AIS_Shape myPresentableWire;
// Number of edges into the current wire
Standard_Integer myEdgesNumber;
// Store for each edge how it has been built i.d the value of myCurrentStatus
TColStd_SequenceOfInteger myConstructionMode;
// Store for each edge how it has been built i.d the value of myTransitionStatus
TColStd_SequenceOfInteger myConstraintMode;
// Current edge
TopoDS_Shape myCurrentEdge;
// Previous edge
TopoDS_Edge myPreviousEdge;
// List of points to interpolate when computing a curve by interpolation
TColgp_SequenceOfPnt2d myPointsToInterpolate;
// Tangent vector at beginning of curve
gp_Vec2d myTangentVector;
// Tangent flag at beginning og curve
Standard_Boolean myTangentFlag;
// Origin of sketch
TopoDS_Vertex myFirstPointSketch;
// Last x coordinate of end point of previous edge or picked point
Standard_Real myLastX;
// Last y coordinate of end point of previous edge or picked point
Standard_Real myLastY;
// angle between 2 segments when an ANGLE TransitionStatus is set.
Standard_Real mySegmentAngle;
// Length of segment when the length of the segment is fixed before the angle
Standard_Real mySegmentLength;
// Value of X fixed coordinate
Standard_Real mySegmentX;
// Value of Y fixed Coordinate
Standard_Real mySegmentY;
Handle_AIS_Shape myPresentableEdge; // Current presentable edge
Handle_AIS_LengthDimension myLengthDimension;// For display of current length segment dimension
Handle_AIS_LengthDimension myXDimension; // For display of current X segment dimension
Handle_AIS_LengthDimension myYDimension; // For display of current Y segment dimension
Handle_AIS_LengthDimension myRadiusDimension;// For display of current radius dimension
Handle_AIS_AngleDimension myAngleDimension; // For display of current angle dimension
Standard_Boolean myIsLengthDimensionVisible; // Visibility flag for LengthDimension
Standard_Boolean myIsXDimensionVisible; // Visibility flag for X Dimension
Standard_Boolean myIsYDimensionVisible; // Visibility flag for Y Dimension
Standard_Boolean myIsRadiusDimensionVisible; // Visibility flag for RadiusDimension
Standard_Boolean myIsAngleDimensionVisible; // Visibility flag for AngleDimension
Handle_AIS_Axis myPresentableMediatrice; // Chord mediatrice of current circle as a presentable object
Handle_Geom2d_Line myMediatrice; // Chord mediatrice of current circle as a 2d line
Handle_AIS_Shape myCenterCircle; // to visualise center of current arc
Handle_AIS_Axis myHAxis; // Horizontal axis
Handle_AIS_Axis myVAxis; // Vertical axis
Handle_AIS_Axis myAngularAxis; // Axis making a predefined angle with the previous edge
Quantity_Color myWireColor; // Color of wire and of build edges
Quantity_Color myCurrentColor; // Color of edge under construction
Quantity_Color myAxisColor; // Color for axis
Handle_AIS_InteractiveContext myInteractiveContext; // Interactive context for display management
Handle_Geom_Plane myPlane; // Plane of sketch
BRepBuilderAPI_MakeWire myPasteWire;
Standard_Integer myPasteEdgesNumber;
TColStd_SequenceOfInteger myPasteConstructionMode;
TColStd_SequenceOfInteger myPasteConstraintMode;
};

View File

@ -1,4 +1,4 @@
# GEOM SKETCHER : basic sketcher
# GEOM GEOMBASE :
#
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@ -22,9 +22,9 @@
#
#
# File : Makefile.in
# Author : Patrick GOLDBRONN (CEA)
# Author : Damien COQUERET (OCC)
# Module : GEOM
# $Header$
# $Header:
top_srcdir=@top_srcdir@
top_builddir=../..
@ -36,22 +36,18 @@ VPATH=.:@srcdir@:@top_srcdir@/idl
# Libraries targets
LIB = libGEOMSketcher.la
LIB_SRC = GEOM_Sketcher.cxx
LIB_CLIENT_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl
LIB_SRC = Sketcher_Profile.cxx
LIB_CLIENT_IDL = SALOME_Exception.idl \
SALOMEDS.idl \
SALOMEDS_Attributes.idl
# header files
EXPORT_HEADERS= GEOM_Sketcher.h \
GEOM_SketcherStatus.h
EXPORT_HEADERS = Sketcher_Profile.hxx
# additionnal information to compil and link file
CPPFLAGS += $(OCC_INCLUDES) $(QT_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
LDFLAGS += $(OCC_KERNEL_LIBS) $(OCC_MODELER_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
# additional file to be cleaned
MOSTLYCLEAN =
CLEAN =
DISTCLEAN =
LDFLAGS += $(OCC_KERNEL_LIBS) $(OCC_MODELER_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome
@CONCLUDE@

View File

@ -0,0 +1,382 @@
// GEOM SKETCHER : basic sketcher
//
// 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 : Sketcher_Profile.cxx
// Author : Damien COQUERET
// Module : GEOM
// $Header:
using namespace std;
#include "Sketcher_Profile.hxx"
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Face.hxx>
#include <gp_Pln.hxx>
#include <gp_Ax2.hxx>
#include <BRepLib.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom_Surface.hxx>
#include <Precision.hxx>
#include <GeomAPI.hxx>
#include <TCollection_AsciiString.hxx>
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
//=======================================================================
// profile
// command to build a profile
//=======================================================================
Sketcher_Profile::Sketcher_Profile()
{
}
//=======================================================================
// profile
// command to build a profile
//=======================================================================
Sketcher_Profile::Sketcher_Profile(const char* aCmd)
{
enum {line, circle, point, none} move;
Standard_Integer i = 1;
Standard_Real x0, y0, x, y, dx, dy;
x0 = y0 = x = y = dy = 0;
dx = 1;
Standard_Boolean first, stayfirst, face, close;
first = Standard_True;
stayfirst = face = close = Standard_False;
TopoDS_Shape S;
TopoDS_Vertex MP;
BRepBuilderAPI_MakeWire MW;
gp_Ax3 DummyHP(gp::XOY());
gp_Pln P(DummyHP);
TopLoc_Location TheLocation;
Handle(Geom_Surface) Surface;
myOK = Standard_False;
TCollection_AsciiString aCommand(CORBA::string_dup(aCmd));
TCollection_AsciiString aToken = aCommand.Token(":", 1);
int n = 0;
TCollection_AsciiString aTab[aCommand.Length()];
while(aToken.Length() != 0) {
if(aCommand.Token(":", n + 1).Length() > 0)
aTab[n] = aCommand.Token(":", n + 1);
aToken = aCommand.Token(":", ++n);
}
n = n - 1;
while(i < n) {
Standard_Real length = 0, radius = 0, angle = 0;
move = point;
int n1 = 0;
TCollection_AsciiString a[aTab[0].Length()];
aToken = aTab[i].Token(" ", 1);
while(aToken.Length() != 0) {
if(aTab[i].Token(" ", n1 + 1).Length() > 0)
a[n1] = aTab[i].Token(" ", n1 + 1);
aToken = aTab[i].Token(" ", ++n1);
}
n1 = n1 - 1;
switch(a[0].Value(1))
{
case 'F':
{
if (n1 != 3) goto badargs;
if (!first) {
cout<<"profile : The F instruction must precede all moves"<<endl;
return;
}
x0 = x = a[1].RealValue();
y0 = y = a[2].RealValue();
stayfirst = Standard_True;
break;
}
case 'O':
{
if (n1 != 4) goto badargs;
P.SetLocation(gp_Pnt(a[1].RealValue(), a[2].RealValue(), a[3].RealValue()));
stayfirst = Standard_True;
break;
}
case 'P':
{
if (n1 != 7) goto badargs;
gp_Vec vn(a[1].RealValue(), a[2].RealValue(), a[3].RealValue());
gp_Vec vx(a[4].RealValue(), a[5].RealValue(), a[6].RealValue());
if (vn.Magnitude() <= Precision::Confusion() || vx.Magnitude() <= Precision::Confusion()) {
cout<<"profile : null direction"<<endl;
return;
}
gp_Ax2 ax(P.Location(), vn, vx);
P.SetPosition(ax);
stayfirst = Standard_True;
break;
}
case 'X':
{
if (n1 != 2) goto badargs;
length = a[1].RealValue();
if (a[0] == "XX")
length -= x;
dx = 1; dy = 0;
move = line;
break;
}
case 'Y':
{
if (n1 != 2) goto badargs;
length = a[1].RealValue();
if (a[0] == "YY")
length -= y;
dx = 0; dy = 1;
move = line;
break;
}
case 'L':
{
if (n1 != 2) goto badargs;
length = a[1].RealValue();
if (Abs(length) > Precision::Confusion())
move = line;
else
move = none;
break;
}
case 'T':
{
if (n1 != 3) goto badargs;
Standard_Real vx = a[1].RealValue();
Standard_Real vy = a[2].RealValue();
if (a[0] == "TT") {
vx -= x;
vy -= y;
}
length = Sqrt(vx * vx + vy * vy);
if (length > Precision::Confusion()) {
move = line;
dx = vx / length;
dy = vy / length;
}
else
move = none;
break;
}
case 'R':
{
if (n1 != 2) goto badargs;
angle = a[1].RealValue() * PI180;
if (a[0] == "RR") {
dx = Cos(angle);
dy = Sin(angle);
}
else {
Standard_Real c = Cos(angle);
Standard_Real s = Sin(angle);
Standard_Real t = c * dx - s * dy;
dy = s * dx + c * dy;
dx = t;
}
break;
}
case 'D':
{
if (n1 != 3) goto badargs;
Standard_Real vx = a[1].RealValue();
Standard_Real vy = a[2].RealValue();
length = Sqrt(vx * vx + vy * vy);
if (length > Precision::Confusion()) {
dx = vx / length;
dy = vy / length;
}
else
move = none;
break;
}
case 'C':
{
if (n1 != 3) goto badargs;
radius = a[1].RealValue();
if (Abs(radius) > Precision::Confusion()) {
angle = a[2].RealValue() * PI180;
move = circle;
}
else
move = none;
break;
}
case 'I':
{
if (n1 != 2) goto badargs;
length = a[1].RealValue();
if (a[0] == "IX") {
if (Abs(dx) < Precision::Confusion()) {
cout<<"profile : cannot intersect, arg "<<i-1<<endl;
return;
}
length = (length - x) / dx;
}
else if (a[0] == "IY") {
if (Abs(dy) < Precision::Confusion()) {
cout<<"profile : cannot intersect, arg "<<i-1<<endl;
return;
}
length = (length - y) / dy;
}
if (Abs(length) > Precision::Confusion())
move = line;
else
move = none;
break;
}
case 'W':
{
if (a[0] == "WW")
close = Standard_True;
else if(a[0] == "WF") {
close = Standard_True;
face = Standard_True;
}
i = n - 1;
break;
}
default:
{
cout<<"profile : unknown code "<<a[i]<<endl;
return;
}
}
again :
switch (move)
{
case line :
{
if (length < 0) {
length = -length;
dx = -dx;
dy = -dy;
}
Handle(Geom2d_Line) l = new Geom2d_Line(gp_Pnt2d(x,y),gp_Dir2d(dx,dy));
MW.Add(BRepBuilderAPI_MakeEdge(GeomAPI::To3d(l,P),0,length));
x += length*dx;
y += length*dy;
break;
}
case circle :
{
Standard_Boolean sense = Standard_True;
if (radius < 0) {
radius = -radius;
sense = !sense;
dx = -dx;
dy = -dy;
}
gp_Ax2d ax(gp_Pnt2d(x-radius*dy,y+radius*dx),gp_Dir2d(dy,-dx));
if (angle < 0) {
angle = -angle;
sense = !sense;
}
Handle(Geom2d_Circle) c = new Geom2d_Circle(ax,radius,sense);
MW.Add(BRepBuilderAPI_MakeEdge(GeomAPI::To3d(c,P),0,angle));
gp_Pnt2d p;
gp_Vec2d v;
c->D1(angle,p,v);
x = p.X();
y = p.Y();
dx = v.X() / radius;
dy = v.Y() / radius;
break;
}
case point:
{
MP = BRepBuilderAPI_MakeVertex(gp_Pnt(x, y, 0.0));
break;
}
case none:
{
i = n - 1;
break;
}
}
// update first
first = stayfirst;
stayfirst = Standard_False;
if(!(dx == 0 && dy == 0))
myLastDir.SetCoord(dx, dy, 0.0);
else
return;
myLastPoint.SetX(x);
myLastPoint.SetY(y);
// next segment....
i++;
if ((i == n) && close) {
// the closing segment
dx = x0 - x;
dy = y0 - y;
length = Sqrt(dx * dx + dy * dy);
if (length > Precision::Confusion()) {
move = line;
dx = dx / length;
dy = dy / length;
goto again;
}
}
}
// get the result, face or wire
if (move == none)
return;
else if (move == point)
S = MP;
else if (face)
S = BRepBuilderAPI_MakeFace(P, MW.Wire());
else
S = MW;
if(!TheLocation.IsIdentity())
S.Move(TheLocation);
myShape = S;
myOK = true;
return;
badargs :
cout<<"profile : bad number of arguments"<<endl;
return;
}

View File

@ -21,33 +21,34 @@
//
//
//
// File : GEOM_SketcherStatus.h
// Author : Nicolas REJNERI
// File : Sketcher_Profile.h
// Author : Damien COQUERET
// Module : GEOM
// $Header$
// $Header:
enum TransitionStatus {
NOCONSTRAINT, // no constraint between consecutive edges
TANGENT, // arc and segment are tangent
PERPENDICULAR,// arc is tangent to the perpendicular to the segment
ANGLE, // Angular constraint between 2 segments
LENGTH_FIXED, // Length of segment has been fixed
X_FIXED, // X coordinate for segment has been fixed
Y_FIXED // Y coordinate for segment has been fixed
};
#include <gp_Pnt.hxx>
#include <gp_Dir.hxx>
#include <TopoDS_Shape.hxx>
enum TypeOfParameter {
ANGLE_PARAMETER,
LENGTH_PARAMETER,
RADIUS_PARAMETER,
XVALUE_PARAMETER,
YVALUE_PARAMETER
};
class Sketcher_Profile
{
public:
Sketcher_Profile();
Sketcher_Profile(const char* aCmd);
private:
gp_Pnt myLastPoint;
gp_Dir myLastDir;
TopoDS_Shape myShape;
bool myOK;
public:
gp_Pnt GetLastPoint(){return myLastPoint;};
gp_Dir GetLastDir(){return myLastDir;};
const TopoDS_Shape& GetShape(){return myShape;};
bool IsDone(){return myOK;};
enum SketchStatus {
BEGIN_SKETCH, // Begin sketch; no edges created yet
SEGMENT, // Current mode for creation is segment
ARC_CHORD, // Current mode for creation is arc by chord
ARC_CHORD_END,// Chord validated, waiting for radius or center
END_SKETCH // End sketch
};