mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-23 15:35:37 +05:00
DCQ: New Sketcher
This commit is contained in:
parent
86d182ee79
commit
e1866186e9
88
src/SketcherGUI/Makefile.in
Normal file
88
src/SketcherGUI/Makefile.in
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
# GEOM GEOMBASE :
|
||||||
|
#
|
||||||
|
# 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 = libSketcherGUI.la
|
||||||
|
|
||||||
|
# header files
|
||||||
|
EXPORT_HEADERS=
|
||||||
|
|
||||||
|
LIB_SRC = SketcherGUI.cxx \
|
||||||
|
SketcherGUI_Profile.cxx \
|
||||||
|
SketcherGUI_Skeleton_QTD.cxx \
|
||||||
|
SketcherGUI_Point_QTD.cxx \
|
||||||
|
SketcherGUI_Dir1_QTD.cxx \
|
||||||
|
SketcherGUI_Dir2_QTD.cxx \
|
||||||
|
SketcherGUI_1Sel_QTD.cxx \
|
||||||
|
SketcherGUI_1Spin_QTD.cxx \
|
||||||
|
SketcherGUI_2Spin_QTD.cxx \
|
||||||
|
SketcherGUI_3Spin_QTD.cxx \
|
||||||
|
SketcherGUI_4Spin_QTD.cxx \
|
||||||
|
SketcherGUI_1Spin.cxx \
|
||||||
|
SketcherGUI_2Spin.cxx \
|
||||||
|
SketcherGUI_3Spin.cxx \
|
||||||
|
SketcherGUI_4Spin.cxx \
|
||||||
|
SketcherGUI_Dlg.cxx
|
||||||
|
|
||||||
|
LIB_MOC = \
|
||||||
|
SketcherGUI.h \
|
||||||
|
SketcherGUI_Skeleton_QTD.h \
|
||||||
|
SketcherGUI_Point_QTD.h \
|
||||||
|
SketcherGUI_Dir1_QTD.h \
|
||||||
|
SketcherGUI_Dir2_QTD.h \
|
||||||
|
SketcherGUI_1Sel_QTD.h \
|
||||||
|
SketcherGUI_1Spin_QTD.h \
|
||||||
|
SketcherGUI_2Spin_QTD.h \
|
||||||
|
SketcherGUI_3Spin_QTD.h \
|
||||||
|
SketcherGUI_4Spin_QTD.h \
|
||||||
|
SketcherGUI_1Spin.h \
|
||||||
|
SketcherGUI_2Spin.h \
|
||||||
|
SketcherGUI_3Spin.h \
|
||||||
|
SketcherGUI_4Spin.h \
|
||||||
|
SketcherGUI_Dlg.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 += -lGEOMFiltersSelection -lGEOMBase
|
||||||
|
|
||||||
|
@CONCLUDE@
|
262
src/SketcherGUI/SketcherGUI.cxx
Normal file
262
src/SketcherGUI/SketcherGUI.cxx
Normal file
@ -0,0 +1,262 @@
|
|||||||
|
// 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 : SketcherGUI.cxx
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
#include "SketcherGUI.h"
|
||||||
|
|
||||||
|
#include "QAD_RightFrame.h"
|
||||||
|
#include "OCCViewer_Viewer3d.h"
|
||||||
|
#include "SALOMEGUI_QtCatchCorbaException.hxx"
|
||||||
|
|
||||||
|
#include <BRepTools_WireExplorer.hxx>
|
||||||
|
#include <TopoDS_Edge.hxx>
|
||||||
|
#include <TopoDS_Wire.hxx>
|
||||||
|
#include <BRep_Tool.hxx>
|
||||||
|
#include <TopExp.hxx>
|
||||||
|
#include <gp_Circ.hxx>
|
||||||
|
#include <Geom_Circle.hxx>
|
||||||
|
#include <Geom_Curve.hxx>
|
||||||
|
|
||||||
|
#include "SketcherGUI_Dlg.h" // Sketcher
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
// function : SketcherGUI()
|
||||||
|
// purpose : Constructor
|
||||||
|
//=======================================================================
|
||||||
|
SketcherGUI::SketcherGUI() :
|
||||||
|
QObject()
|
||||||
|
{
|
||||||
|
myGeomBase = new GEOMBase();
|
||||||
|
myGeomGUI = GEOMContext::GetGeomGUI();
|
||||||
|
myGeom = myGeomGUI->myComponentGeom;
|
||||||
|
|
||||||
|
mySimulationShape1 = new AIS_Shape(TopoDS_Shape());
|
||||||
|
mySimulationShape2 = new AIS_Shape(TopoDS_Shape());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
// function : ~SketcherGUI()
|
||||||
|
// purpose : Destructor
|
||||||
|
//=======================================================================
|
||||||
|
SketcherGUI::~SketcherGUI()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
// function : OnGUIEvent()
|
||||||
|
// purpose :
|
||||||
|
//=======================================================================
|
||||||
|
bool SketcherGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||||
|
{
|
||||||
|
SketcherGUI* mySketcherGUI = new SketcherGUI();
|
||||||
|
mySketcherGUI->myGeomGUI->EmitSignalDeactivateDialog();
|
||||||
|
SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection());
|
||||||
|
|
||||||
|
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
||||||
|
|
||||||
|
switch (theCommandID)
|
||||||
|
{
|
||||||
|
case 404: // SKETCHER
|
||||||
|
{
|
||||||
|
((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->onViewTop(); // DCQ : 28/02/2002
|
||||||
|
SketcherGUI_Dlg* aDlg = new SketcherGUI_Dlg(parent, "", mySketcherGUI, Sel);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
// function : OnSketchEnd()
|
||||||
|
// purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SketcherGUI::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 SketcherGUI::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 SketcherGUI::DisplaySimulationShape ");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//==================================================================================
|
||||||
|
// function : EraseSimulationShape()
|
||||||
|
// purpose : Clears the display of 'mySimulationShape' a pure graphical shape
|
||||||
|
//==================================================================================
|
||||||
|
void SketcherGUI::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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=====================================================================================
|
||||||
|
// EXPORTED METHODS
|
||||||
|
//=====================================================================================
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||||
|
{return SketcherGUI::OnGUIEvent(theCommandID, parent);}
|
||||||
|
}
|
63
src/SketcherGUI/SketcherGUI.h
Normal file
63
src/SketcherGUI/SketcherGUI.h
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SketcherGUI.h
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#ifndef SKETCHERGUI_H
|
||||||
|
#define SKETCHERGUI_H
|
||||||
|
|
||||||
|
#include "GEOMBase.h"
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// class : SketcherGUI
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
|
class SketcherGUI : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT /* for QT compatibility */
|
||||||
|
|
||||||
|
public :
|
||||||
|
SketcherGUI();
|
||||||
|
~SketcherGUI();
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
/* 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
|
93
src/SketcherGUI/SketcherGUI_1Sel_QTD.cxx
Normal file
93
src/SketcherGUI/SketcherGUI_1Sel_QTD.cxx
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'SketcherGUI_1Sel_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: dim nov 2 17:13:01 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#include "SketcherGUI_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 SketcherGUI_1Sel_QTD which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'.
|
||||||
|
*/
|
||||||
|
SketcherGUI_1Sel_QTD::SketcherGUI_1Sel_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||||
|
: QWidget( parent, name, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "SketcherGUI_1Sel_QTD" );
|
||||||
|
resize( 186, 96 );
|
||||||
|
setCaption( trUtf8( "SketcherGUI_1Sel_QTD" ) );
|
||||||
|
SketcherGUI_1Sel_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "SketcherGUI_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 );
|
||||||
|
|
||||||
|
SketcherGUI_1Sel_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroys the object and frees any allocated resources
|
||||||
|
*/
|
||||||
|
SketcherGUI_1Sel_QTD::~SketcherGUI_1Sel_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
46
src/SketcherGUI/SketcherGUI_1Sel_QTD.h
Normal file
46
src/SketcherGUI/SketcherGUI_1Sel_QTD.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'SketcherGUI_1Sel_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: dim nov 2 17:13:01 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef SKETCHERGUI_1SEL_QTD_H
|
||||||
|
#define SKETCHERGUI_1SEL_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QGroupBox;
|
||||||
|
class QLabel;
|
||||||
|
class QLineEdit;
|
||||||
|
class QPushButton;
|
||||||
|
|
||||||
|
class SketcherGUI_1Sel_QTD : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_1Sel_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_1Sel_QTD();
|
||||||
|
|
||||||
|
QGroupBox* GroupBox1;
|
||||||
|
QPushButton* buttonUndo;
|
||||||
|
QPushButton* buttonApply;
|
||||||
|
QLabel* TextLabel1;
|
||||||
|
QPushButton* PushButton1;
|
||||||
|
QLineEdit* LineEdit1;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QGridLayout* SketcherGUI_1Sel_QTDLayout;
|
||||||
|
QGridLayout* GroupBox1Layout;
|
||||||
|
QGridLayout* Layout3;
|
||||||
|
QGridLayout* Layout2;
|
||||||
|
QGridLayout* Layout1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_1SEL_QTD_H
|
56
src/SketcherGUI/SketcherGUI_1Spin.cxx
Normal file
56
src/SketcherGUI/SketcherGUI_1Spin.cxx
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SketcherGUI_1Spin.cxx
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#include "SketcherGUI_1Spin.h"
|
||||||
|
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qspinbox.h>
|
||||||
|
#include <qgroupbox.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Constructs a SketcherGUI_1Spin which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'
|
||||||
|
*/
|
||||||
|
SketcherGUI_1Spin::SketcherGUI_1Spin(QWidget* parent, const char* name, WFlags fl)
|
||||||
|
:SketcherGUI_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
|
||||||
|
*/
|
||||||
|
SketcherGUI_1Spin::~SketcherGUI_1Spin()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
47
src/SketcherGUI/SketcherGUI_1Spin.h
Normal file
47
src/SketcherGUI/SketcherGUI_1Spin.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SketcherGUI_1Spin.h
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#ifndef SKETCHERGUI_1SPIN_H
|
||||||
|
#define SKETCHERGUI_1SPIN_H
|
||||||
|
|
||||||
|
#include "SketcherGUI_1Spin_QTD.h"
|
||||||
|
#include "DlgRef_SpinBox.h"
|
||||||
|
|
||||||
|
class SketcherGUI_1Spin : public SketcherGUI_1Spin_QTD
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_1Spin(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
|
||||||
|
~SketcherGUI_1Spin();
|
||||||
|
|
||||||
|
DlgRef_SpinBox* SpinBox_DX;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_1SPIN_H
|
88
src/SketcherGUI/SketcherGUI_1Spin_QTD.cxx
Normal file
88
src/SketcherGUI/SketcherGUI_1Spin_QTD.cxx
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'SketcherGUI_1Spin_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: jeu oct 30 18:28:53 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#include "SketcherGUI_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 SketcherGUI_1Spin_QTD which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'.
|
||||||
|
*/
|
||||||
|
SketcherGUI_1Spin_QTD::SketcherGUI_1Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||||
|
: QWidget( parent, name, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "SketcherGUI_1Spin_QTD" );
|
||||||
|
resize( 154, 89 );
|
||||||
|
setCaption( trUtf8( "SketcherGUI_1Spin_QTD" ) );
|
||||||
|
SketcherGUI_1Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "SketcherGUI_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 );
|
||||||
|
|
||||||
|
SketcherGUI_1Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroys the object and frees any allocated resources
|
||||||
|
*/
|
||||||
|
SketcherGUI_1Spin_QTD::~SketcherGUI_1Spin_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
45
src/SketcherGUI/SketcherGUI_1Spin_QTD.h
Normal file
45
src/SketcherGUI/SketcherGUI_1Spin_QTD.h
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'SketcherGUI_1Spin_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: jeu oct 30 18:28:53 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef SKETCHERGUI_1SPIN_QTD_H
|
||||||
|
#define SKETCHERGUI_1SPIN_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QGroupBox;
|
||||||
|
class QLabel;
|
||||||
|
class QPushButton;
|
||||||
|
class QSpinBox;
|
||||||
|
|
||||||
|
class SketcherGUI_1Spin_QTD : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_1Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_1Spin_QTD();
|
||||||
|
|
||||||
|
QGroupBox* GroupBox1;
|
||||||
|
QPushButton* buttonUndo;
|
||||||
|
QPushButton* buttonApply;
|
||||||
|
QLabel* TextLabel1;
|
||||||
|
QSpinBox* SpinBox1;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QGridLayout* SketcherGUI_1Spin_QTDLayout;
|
||||||
|
QGridLayout* GroupBox1Layout;
|
||||||
|
QGridLayout* Layout3;
|
||||||
|
QGridLayout* Layout2;
|
||||||
|
QGridLayout* Layout1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_1SPIN_QTD_H
|
60
src/SketcherGUI/SketcherGUI_2Spin.cxx
Normal file
60
src/SketcherGUI/SketcherGUI_2Spin.cxx
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SketcherGUI_2Spin.cxx
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#include "SketcherGUI_2Spin.h"
|
||||||
|
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qspinbox.h>
|
||||||
|
#include <qgroupbox.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Constructs a SketcherGUI_2Spin which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'
|
||||||
|
*/
|
||||||
|
SketcherGUI_2Spin::SketcherGUI_2Spin(QWidget* parent, const char* name, WFlags fl)
|
||||||
|
:SketcherGUI_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
|
||||||
|
*/
|
||||||
|
SketcherGUI_2Spin::~SketcherGUI_2Spin()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
48
src/SketcherGUI/SketcherGUI_2Spin.h
Normal file
48
src/SketcherGUI/SketcherGUI_2Spin.h
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SketcherGUI_2Spin.h
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#ifndef SKETCHERGUI_2SPIN_H
|
||||||
|
#define SKETCHERGUI_2SPIN_H
|
||||||
|
|
||||||
|
#include "SketcherGUI_2Spin_QTD.h"
|
||||||
|
#include "DlgRef_SpinBox.h"
|
||||||
|
|
||||||
|
class SketcherGUI_2Spin : public SketcherGUI_2Spin_QTD
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_2Spin(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
|
||||||
|
~SketcherGUI_2Spin();
|
||||||
|
|
||||||
|
DlgRef_SpinBox* SpinBox_DX;
|
||||||
|
DlgRef_SpinBox* SpinBox_DY;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_2SPIN_H
|
99
src/SketcherGUI/SketcherGUI_2Spin_QTD.cxx
Normal file
99
src/SketcherGUI/SketcherGUI_2Spin_QTD.cxx
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'SketcherGUI_2Spin_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: jeu oct 30 18:28:54 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#include "SketcherGUI_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 SketcherGUI_2Spin_QTD which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'.
|
||||||
|
*/
|
||||||
|
SketcherGUI_2Spin_QTD::SketcherGUI_2Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||||
|
: QWidget( parent, name, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "SketcherGUI_2Spin_QTD" );
|
||||||
|
resize( 154, 89 );
|
||||||
|
setCaption( trUtf8( "SketcherGUI_2Spin_QTD" ) );
|
||||||
|
SketcherGUI_2Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "SketcherGUI_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 );
|
||||||
|
|
||||||
|
SketcherGUI_2Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroys the object and frees any allocated resources
|
||||||
|
*/
|
||||||
|
SketcherGUI_2Spin_QTD::~SketcherGUI_2Spin_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
47
src/SketcherGUI/SketcherGUI_2Spin_QTD.h
Normal file
47
src/SketcherGUI/SketcherGUI_2Spin_QTD.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'SketcherGUI_2Spin_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: jeu oct 30 18:28:53 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef SKETCHERGUI_2SPIN_QTD_H
|
||||||
|
#define SKETCHERGUI_2SPIN_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QGroupBox;
|
||||||
|
class QLabel;
|
||||||
|
class QPushButton;
|
||||||
|
class QSpinBox;
|
||||||
|
|
||||||
|
class SketcherGUI_2Spin_QTD : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_2Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_2Spin_QTD();
|
||||||
|
|
||||||
|
QGroupBox* GroupBox1;
|
||||||
|
QPushButton* buttonUndo;
|
||||||
|
QPushButton* buttonApply;
|
||||||
|
QLabel* TextLabel2;
|
||||||
|
QLabel* TextLabel1;
|
||||||
|
QSpinBox* SpinBox1;
|
||||||
|
QSpinBox* SpinBox2;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QGridLayout* SketcherGUI_2Spin_QTDLayout;
|
||||||
|
QGridLayout* GroupBox1Layout;
|
||||||
|
QGridLayout* Layout3;
|
||||||
|
QGridLayout* Layout2;
|
||||||
|
QGridLayout* Layout1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_2SPIN_QTD_H
|
63
src/SketcherGUI/SketcherGUI_3Spin.cxx
Normal file
63
src/SketcherGUI/SketcherGUI_3Spin.cxx
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SketcherGUI_3Spin.cxx
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#include "SketcherGUI_3Spin.h"
|
||||||
|
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qspinbox.h>
|
||||||
|
#include <qgroupbox.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Constructs a SketcherGUI_3Spin which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'
|
||||||
|
*/
|
||||||
|
SketcherGUI_3Spin::SketcherGUI_3Spin(QWidget* parent, const char* name, WFlags fl)
|
||||||
|
:SketcherGUI_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
|
||||||
|
*/
|
||||||
|
SketcherGUI_3Spin::~SketcherGUI_3Spin()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
49
src/SketcherGUI/SketcherGUI_3Spin.h
Normal file
49
src/SketcherGUI/SketcherGUI_3Spin.h
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SketcherGUI_3Spin.h
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#ifndef SKETCHERGUI_3SPIN_H
|
||||||
|
#define SKETCHERGUI_3SPIN_H
|
||||||
|
|
||||||
|
#include "SketcherGUI_3Spin_QTD.h"
|
||||||
|
#include "DlgRef_SpinBox.h"
|
||||||
|
|
||||||
|
class SketcherGUI_3Spin : public SketcherGUI_3Spin_QTD
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_3Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_3Spin();
|
||||||
|
|
||||||
|
DlgRef_SpinBox* SpinBox_DX;
|
||||||
|
DlgRef_SpinBox* SpinBox_DY;
|
||||||
|
DlgRef_SpinBox* SpinBox_DZ;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_3SPIN_H
|
110
src/SketcherGUI/SketcherGUI_3Spin_QTD.cxx
Normal file
110
src/SketcherGUI/SketcherGUI_3Spin_QTD.cxx
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'SketcherGUI_3Spin_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: jeu oct 30 18:28:54 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#include "SketcherGUI_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 SketcherGUI_3Spin_QTD which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'.
|
||||||
|
*/
|
||||||
|
SketcherGUI_3Spin_QTD::SketcherGUI_3Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||||
|
: QWidget( parent, name, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "SketcherGUI_3Spin_QTD" );
|
||||||
|
resize( 154, 113 );
|
||||||
|
setCaption( trUtf8( "SketcherGUI_3Spin_QTD" ) );
|
||||||
|
SketcherGUI_3Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "SketcherGUI_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 );
|
||||||
|
|
||||||
|
SketcherGUI_3Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroys the object and frees any allocated resources
|
||||||
|
*/
|
||||||
|
SketcherGUI_3Spin_QTD::~SketcherGUI_3Spin_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
49
src/SketcherGUI/SketcherGUI_3Spin_QTD.h
Normal file
49
src/SketcherGUI/SketcherGUI_3Spin_QTD.h
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'SketcherGUI_3Spin_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: jeu oct 30 18:28:54 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef SKETCHERGUI_3SPIN_QTD_H
|
||||||
|
#define SKETCHERGUI_3SPIN_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QGroupBox;
|
||||||
|
class QLabel;
|
||||||
|
class QPushButton;
|
||||||
|
class QSpinBox;
|
||||||
|
|
||||||
|
class SketcherGUI_3Spin_QTD : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_3Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_3Spin_QTD();
|
||||||
|
|
||||||
|
QGroupBox* GroupBox1;
|
||||||
|
QPushButton* buttonUndo;
|
||||||
|
QPushButton* buttonApply;
|
||||||
|
QLabel* TextLabel2;
|
||||||
|
QLabel* TextLabel1;
|
||||||
|
QSpinBox* SpinBox1;
|
||||||
|
QSpinBox* SpinBox2;
|
||||||
|
QLabel* TextLabel3;
|
||||||
|
QSpinBox* SpinBox3;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QGridLayout* SketcherGUI_3Spin_QTDLayout;
|
||||||
|
QGridLayout* GroupBox1Layout;
|
||||||
|
QGridLayout* Layout3;
|
||||||
|
QGridLayout* Layout2;
|
||||||
|
QGridLayout* Layout1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_3SPIN_QTD_H
|
67
src/SketcherGUI/SketcherGUI_4Spin.cxx
Normal file
67
src/SketcherGUI/SketcherGUI_4Spin.cxx
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SketcherGUI_4Spin.cxx
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#include "SketcherGUI_4Spin.h"
|
||||||
|
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qspinbox.h>
|
||||||
|
#include <qgroupbox.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Constructs a SketcherGUI_4Spin which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'
|
||||||
|
*/
|
||||||
|
SketcherGUI_4Spin::SketcherGUI_4Spin(QWidget* parent, const char* name, WFlags fl)
|
||||||
|
:SketcherGUI_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
|
||||||
|
*/
|
||||||
|
SketcherGUI_4Spin::~SketcherGUI_4Spin()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
50
src/SketcherGUI/SketcherGUI_4Spin.h
Normal file
50
src/SketcherGUI/SketcherGUI_4Spin.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SketcherGUI_4Spin.h
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#ifndef SKETCHERGUI_4SPIN_H
|
||||||
|
#define SKETCHERGUI_4SPIN_H
|
||||||
|
|
||||||
|
#include "SketcherGUI_4Spin_QTD.h"
|
||||||
|
#include "DlgRef_SpinBox.h"
|
||||||
|
|
||||||
|
class SketcherGUI_4Spin : public SketcherGUI_4Spin_QTD
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_4Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_4Spin();
|
||||||
|
|
||||||
|
DlgRef_SpinBox* SpinBox_DX;
|
||||||
|
DlgRef_SpinBox* SpinBox_DY;
|
||||||
|
DlgRef_SpinBox* SpinBox_DZ;
|
||||||
|
DlgRef_SpinBox* SpinBox_DS;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_4SPIN_H
|
121
src/SketcherGUI/SketcherGUI_4Spin_QTD.cxx
Normal file
121
src/SketcherGUI/SketcherGUI_4Spin_QTD.cxx
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'SketcherGUI_4Spin_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:39:03 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#include "SketcherGUI_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 SketcherGUI_4Spin_QTD which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'.
|
||||||
|
*/
|
||||||
|
SketcherGUI_4Spin_QTD::SketcherGUI_4Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||||
|
: QWidget( parent, name, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "SketcherGUI_4Spin_QTD" );
|
||||||
|
resize( 143, 148 );
|
||||||
|
setCaption( trUtf8( "SketcherGUI_4Spin_QTD" ) );
|
||||||
|
SketcherGUI_4Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "SketcherGUI_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 );
|
||||||
|
|
||||||
|
SketcherGUI_4Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroys the object and frees any allocated resources
|
||||||
|
*/
|
||||||
|
SketcherGUI_4Spin_QTD::~SketcherGUI_4Spin_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
51
src/SketcherGUI/SketcherGUI_4Spin_QTD.h
Normal file
51
src/SketcherGUI/SketcherGUI_4Spin_QTD.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'SketcherGUI_4Spin_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:39:03 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef SKETCHERGUI_4SPIN_QTD_H
|
||||||
|
#define SKETCHERGUI_4SPIN_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QGroupBox;
|
||||||
|
class QLabel;
|
||||||
|
class QPushButton;
|
||||||
|
class QSpinBox;
|
||||||
|
|
||||||
|
class SketcherGUI_4Spin_QTD : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_4Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_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* SketcherGUI_4Spin_QTDLayout;
|
||||||
|
QGridLayout* GroupBox1Layout;
|
||||||
|
QGridLayout* Layout3;
|
||||||
|
QGridLayout* Layout2;
|
||||||
|
QGridLayout* Layout1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_4SPIN_QTD_H
|
80
src/SketcherGUI/SketcherGUI_Dir1_QTD.cxx
Normal file
80
src/SketcherGUI/SketcherGUI_Dir1_QTD.cxx
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'SketcherGUI_Dir1_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:27:54 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#include "SketcherGUI_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 SketcherGUI_Dir1_QTD which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'.
|
||||||
|
*/
|
||||||
|
SketcherGUI_Dir1_QTD::SketcherGUI_Dir1_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||||
|
: QWidget( parent, name, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "SketcherGUI_Dir1_QTD" );
|
||||||
|
resize( 131, 123 );
|
||||||
|
setCaption( trUtf8( "SketcherGUI_Dir1_QTD" ) );
|
||||||
|
SketcherGUI_Dir1_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "SketcherGUI_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 );
|
||||||
|
|
||||||
|
SketcherGUI_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
|
||||||
|
*/
|
||||||
|
SketcherGUI_Dir1_QTD::~SketcherGUI_Dir1_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
41
src/SketcherGUI/SketcherGUI_Dir1_QTD.h
Normal file
41
src/SketcherGUI/SketcherGUI_Dir1_QTD.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'SketcherGUI_Dir1_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:27:54 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef SKETCHERGUI_DIR1_QTD_H
|
||||||
|
#define SKETCHERGUI_DIR1_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QButtonGroup;
|
||||||
|
class QRadioButton;
|
||||||
|
|
||||||
|
class SketcherGUI_Dir1_QTD : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_Dir1_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_Dir1_QTD();
|
||||||
|
|
||||||
|
QButtonGroup* GroupDir1;
|
||||||
|
QRadioButton* RB_Dir12;
|
||||||
|
QRadioButton* RB_Dir13;
|
||||||
|
QRadioButton* RB_Dir11;
|
||||||
|
QRadioButton* RB_Dir14;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QGridLayout* SketcherGUI_Dir1_QTDLayout;
|
||||||
|
QGridLayout* GroupDir1Layout;
|
||||||
|
QGridLayout* Layout1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_DIR1_QTD_H
|
76
src/SketcherGUI/SketcherGUI_Dir2_QTD.cxx
Normal file
76
src/SketcherGUI/SketcherGUI_Dir2_QTD.cxx
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'SketcherGUI_Dir2_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:27:54 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#include "SketcherGUI_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 SketcherGUI_Dir2_QTD which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'.
|
||||||
|
*/
|
||||||
|
SketcherGUI_Dir2_QTD::SketcherGUI_Dir2_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||||
|
: QWidget( parent, name, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "SketcherGUI_Dir2_QTD" );
|
||||||
|
resize( 124, 106 );
|
||||||
|
setCaption( trUtf8( "SketcherGUI_Dir2_QTD" ) );
|
||||||
|
SketcherGUI_Dir2_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "SketcherGUI_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 );
|
||||||
|
|
||||||
|
SketcherGUI_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
|
||||||
|
*/
|
||||||
|
SketcherGUI_Dir2_QTD::~SketcherGUI_Dir2_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
40
src/SketcherGUI/SketcherGUI_Dir2_QTD.h
Normal file
40
src/SketcherGUI/SketcherGUI_Dir2_QTD.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'SketcherGUI_Dir2_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:27:54 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef SKETCHERGUI_DIR2_QTD_H
|
||||||
|
#define SKETCHERGUI_DIR2_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QButtonGroup;
|
||||||
|
class QRadioButton;
|
||||||
|
|
||||||
|
class SketcherGUI_Dir2_QTD : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_Dir2_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_Dir2_QTD();
|
||||||
|
|
||||||
|
QButtonGroup* GroupDir2;
|
||||||
|
QRadioButton* RB_Dir22;
|
||||||
|
QRadioButton* RB_Dir23;
|
||||||
|
QRadioButton* RB_Dir21;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QGridLayout* SketcherGUI_Dir2_QTDLayout;
|
||||||
|
QGridLayout* GroupDir2Layout;
|
||||||
|
QGridLayout* Layout1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_DIR2_QTD_H
|
1058
src/SketcherGUI/SketcherGUI_Dlg.cxx
Normal file
1058
src/SketcherGUI/SketcherGUI_Dlg.cxx
Normal file
File diff suppressed because it is too large
Load Diff
148
src/SketcherGUI/SketcherGUI_Dlg.h
Normal file
148
src/SketcherGUI/SketcherGUI_Dlg.h
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
// 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 : SketcherGUI_Dlg.h
|
||||||
|
// Author : Damine COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#ifndef SKETCHERGUI_DLG_H
|
||||||
|
#define SKETCHERGUI_DLG_H
|
||||||
|
|
||||||
|
#include "SketcherGUI_Skeleton_QTD.h"
|
||||||
|
#include "SketcherGUI_Point_QTD.h"
|
||||||
|
#include "SketcherGUI_Dir1_QTD.h"
|
||||||
|
#include "SketcherGUI_Dir2_QTD.h"
|
||||||
|
|
||||||
|
#include "SketcherGUI_1Sel_QTD.h"
|
||||||
|
#include "SketcherGUI_1Spin.h"
|
||||||
|
#include "SketcherGUI_2Spin.h"
|
||||||
|
#include "SketcherGUI_3Spin.h"
|
||||||
|
#include "SketcherGUI_4Spin.h"
|
||||||
|
|
||||||
|
#include "SketcherGUI.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 : SketcherGUI_Dlg
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
|
class SketcherGUI_Dlg : public SketcherGUI_Skeleton_QTD
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_Dlg(QWidget* parent = 0, const char* name = 0, SketcherGUI* theSketcherGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
|
||||||
|
~SketcherGUI_Dlg();
|
||||||
|
|
||||||
|
private :
|
||||||
|
void Init();
|
||||||
|
void enterEvent(QEvent* e);
|
||||||
|
void closeEvent(QCloseEvent* e);
|
||||||
|
void InitClick();
|
||||||
|
void MakeSimulationAndDisplay();
|
||||||
|
QString GetNewCommand();
|
||||||
|
|
||||||
|
SketcherGUI* mySketcherGUI;
|
||||||
|
|
||||||
|
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;
|
||||||
|
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;
|
||||||
|
|
||||||
|
SketcherGUI_Point_QTD* GroupPt;
|
||||||
|
SketcherGUI_Dir1_QTD* GroupD1;
|
||||||
|
SketcherGUI_Dir2_QTD* GroupD2;
|
||||||
|
|
||||||
|
SketcherGUI_1Sel_QTD* Group1Sel;
|
||||||
|
SketcherGUI_1Spin* Group1Spin;
|
||||||
|
SketcherGUI_2Spin* Group2Spin;
|
||||||
|
SketcherGUI_3Spin* Group3Spin;
|
||||||
|
SketcherGUI_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 // SKETCHERGUI_DLG_H
|
74
src/SketcherGUI/SketcherGUI_Point_QTD.cxx
Normal file
74
src/SketcherGUI/SketcherGUI_Point_QTD.cxx
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'SketcherGUI_Point_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:27:54 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#include "SketcherGUI_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 SketcherGUI_Point_QTD which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'.
|
||||||
|
*/
|
||||||
|
SketcherGUI_Point_QTD::SketcherGUI_Point_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||||
|
: QWidget( parent, name, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "SketcherGUI_Point_QTD" );
|
||||||
|
resize( 124, 106 );
|
||||||
|
setCaption( trUtf8( "SketcherGUI_Point_QTD" ) );
|
||||||
|
SketcherGUI_Point_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "SketcherGUI_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 );
|
||||||
|
|
||||||
|
SketcherGUI_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
|
||||||
|
*/
|
||||||
|
SketcherGUI_Point_QTD::~SketcherGUI_Point_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
40
src/SketcherGUI/SketcherGUI_Point_QTD.h
Normal file
40
src/SketcherGUI/SketcherGUI_Point_QTD.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'SketcherGUI_Point_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:27:53 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef SKETCHERGUI_POINT_QTD_H
|
||||||
|
#define SKETCHERGUI_POINT_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QButtonGroup;
|
||||||
|
class QRadioButton;
|
||||||
|
|
||||||
|
class SketcherGUI_Point_QTD : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_Point_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_Point_QTD();
|
||||||
|
|
||||||
|
QButtonGroup* GroupPoint;
|
||||||
|
QRadioButton* RB_Point2;
|
||||||
|
QRadioButton* RB_Point1;
|
||||||
|
QRadioButton* RB_Point3;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QGridLayout* SketcherGUI_Point_QTDLayout;
|
||||||
|
QGridLayout* GroupPointLayout;
|
||||||
|
QGridLayout* Layout1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SKETCHERGUI_POINT_QTD_H
|
382
src/SketcherGUI/SketcherGUI_Profile.cxx
Normal file
382
src/SketcherGUI/SketcherGUI_Profile.cxx
Normal 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 : SketcherGUI_Profile.cxx
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
#include "SketcherGUI_Profile.h"
|
||||||
|
|
||||||
|
#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>
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
// profile
|
||||||
|
// command to build a profile
|
||||||
|
//=======================================================================
|
||||||
|
SketcherGUI_Profile::SketcherGUI_Profile()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
// profile
|
||||||
|
// command to build a profile
|
||||||
|
//=======================================================================
|
||||||
|
SketcherGUI_Profile::SketcherGUI_Profile(QStringList aCommand)
|
||||||
|
{
|
||||||
|
// this command build a profile
|
||||||
|
// from a moving point
|
||||||
|
|
||||||
|
myOK = false;
|
||||||
|
Standard_Integer n = aCommand.count();
|
||||||
|
|
||||||
|
Standard_Integer i = 1;
|
||||||
|
Standard_Real x0 = 0, y0 = 0, x = 0, y = 0, dx = 1, dy = 0;
|
||||||
|
TopoDS_Vertex MP;
|
||||||
|
BRepBuilderAPI_MakeWire MW;
|
||||||
|
gp_Ax3 DummyHP(gp::XOY());
|
||||||
|
gp_Pln P(DummyHP);
|
||||||
|
enum {line , circle, point, none} move;
|
||||||
|
Standard_Boolean face = Standard_False;
|
||||||
|
Standard_Boolean close = Standard_False;
|
||||||
|
Standard_Boolean first = Standard_True;
|
||||||
|
Standard_Boolean stayfirst = Standard_False;
|
||||||
|
TopoDS_Shape S;
|
||||||
|
TopLoc_Location TheLocation;
|
||||||
|
Handle(Geom_Surface) Surface;
|
||||||
|
|
||||||
|
while (i < n) {
|
||||||
|
|
||||||
|
Standard_Real length=0,radius=0,angle=0;
|
||||||
|
move = point;
|
||||||
|
|
||||||
|
QStringList a = QStringList::split(" ", aCommand[i]);
|
||||||
|
Standard_Integer n1 = a.count();
|
||||||
|
|
||||||
|
switch ((a[0].ref(0)).latin1()) {
|
||||||
|
|
||||||
|
case 'F':
|
||||||
|
{
|
||||||
|
if (n1 != 3) goto badargs;
|
||||||
|
if (!first) {
|
||||||
|
cout<<"profile : The F instruction must precede all moves"<<endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
x0 = x = a[1].toFloat();
|
||||||
|
y0 = y = a[2].toFloat();
|
||||||
|
stayfirst = Standard_True;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'O':
|
||||||
|
{
|
||||||
|
if (n1 != 4) goto badargs;
|
||||||
|
P.SetLocation(gp_Pnt(a[1].toFloat(), a[2].toFloat(), a[3].toFloat()));
|
||||||
|
stayfirst = Standard_True;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'P':
|
||||||
|
{
|
||||||
|
if (n1 != 7) goto badargs;
|
||||||
|
gp_Vec vn(a[1].toFloat(), a[2].toFloat(), a[3].toFloat());
|
||||||
|
gp_Vec vx(a[4].toFloat(), a[5].toFloat(), a[6].toFloat());
|
||||||
|
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].toFloat();
|
||||||
|
if ((a[0].ref(1)).latin1() == 'X')
|
||||||
|
length -= x;
|
||||||
|
dx = 1; dy = 0;
|
||||||
|
move = line;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'Y':
|
||||||
|
{
|
||||||
|
if (n1 != 2) goto badargs;
|
||||||
|
length = a[1].toFloat();
|
||||||
|
if ((a[0].ref(1)).latin1() == 'Y')
|
||||||
|
length -= y;
|
||||||
|
dx = 0; dy = 1;
|
||||||
|
move = line;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'L':
|
||||||
|
{
|
||||||
|
if (n1 != 2) goto badargs;
|
||||||
|
length = a[1].toFloat();
|
||||||
|
if (Abs(length) > Precision::Confusion())
|
||||||
|
move = line;
|
||||||
|
else
|
||||||
|
move = none;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'T':
|
||||||
|
{
|
||||||
|
if (n1 != 3) goto badargs;
|
||||||
|
Standard_Real vx = a[1].toFloat();
|
||||||
|
Standard_Real vy = a[2].toFloat();
|
||||||
|
if ((a[0].ref(1)).latin1() == 'T') {
|
||||||
|
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].toFloat() * PI180;
|
||||||
|
if ((a[0].ref(1)).latin1() == 'R') {
|
||||||
|
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].toFloat();
|
||||||
|
Standard_Real vy = a[2].toFloat();
|
||||||
|
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].toFloat();
|
||||||
|
if (Abs(radius) > Precision::Confusion()) {
|
||||||
|
angle = a[2].toFloat() * PI180;
|
||||||
|
move = circle;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
move = none;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'I':
|
||||||
|
{
|
||||||
|
if (n1 != 2) goto badargs;
|
||||||
|
length = a[1].toFloat();
|
||||||
|
if ((a[0].ref(1)).latin1() == 'X') {
|
||||||
|
if (Abs(dx) < Precision::Confusion()) {
|
||||||
|
cout<<"profile : cannot intersect, arg "<<i-1<<endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
length = (length - x) / dx;
|
||||||
|
}
|
||||||
|
else if ((a[0].ref(1)).latin1() == 'Y') {
|
||||||
|
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].ref(1)).latin1() == 'W')
|
||||||
|
close = Standard_True;
|
||||||
|
else if((a[0].ref(1)).latin1() == 'F') {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
56
src/SketcherGUI/SketcherGUI_Profile.h
Normal file
56
src/SketcherGUI/SketcherGUI_Profile.h
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
// 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 : SketcherGUI_Profile.h
|
||||||
|
// Author : Damien COQUERET
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_Dir.hxx>
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
|
||||||
|
#include <qstringlist.h>
|
||||||
|
|
||||||
|
class SketcherGUI_Profile
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_Profile();
|
||||||
|
SketcherGUI_Profile(QStringList aCommand);
|
||||||
|
|
||||||
|
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;};
|
||||||
|
|
||||||
|
};
|
176
src/SketcherGUI/SketcherGUI_Skeleton_QTD.cxx
Normal file
176
src/SketcherGUI/SketcherGUI_Skeleton_QTD.cxx
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'SketcherGUI_Skeleton_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:27:53 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#include "SketcherGUI_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 SketcherGUI_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.
|
||||||
|
*/
|
||||||
|
SketcherGUI_Skeleton_QTD::SketcherGUI_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl )
|
||||||
|
: QDialog( parent, name, modal, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "SketcherGUI_Skeleton_QTD" );
|
||||||
|
resize( 317, 276 );
|
||||||
|
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
|
||||||
|
setCaption( trUtf8( "SketcherGUI_Skeleton_QTD" ) );
|
||||||
|
SketcherGUI_Skeleton_QTDLayout = new QGridLayout( this, 1, 1, 11, 6, "SketcherGUI_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 );
|
||||||
|
|
||||||
|
SketcherGUI_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
|
||||||
|
*/
|
||||||
|
SketcherGUI_Skeleton_QTD::~SketcherGUI_Skeleton_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
61
src/SketcherGUI/SketcherGUI_Skeleton_QTD.h
Normal file
61
src/SketcherGUI/SketcherGUI_Skeleton_QTD.h
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'SketcherGUI_Skeleton_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: lun nov 3 17:27:53 2003
|
||||||
|
** by: The User Interface Compiler (uic)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef SKETCHERGUI_SKELETON_QTD_H
|
||||||
|
#define SKETCHERGUI_SKELETON_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qdialog.h>
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QButtonGroup;
|
||||||
|
class QGroupBox;
|
||||||
|
class QPushButton;
|
||||||
|
class QRadioButton;
|
||||||
|
|
||||||
|
class SketcherGUI_Skeleton_QTD : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SketcherGUI_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||||
|
~SketcherGUI_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* SketcherGUI_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 // SKETCHERGUI_SKELETON_QTD_H
|
Loading…
Reference in New Issue
Block a user