#include "OCCViewer_ViewModel.h"
#include "OCCViewer_ViewManager.h"
#include "OCCViewer_ViewPort3d.h"
-#include "utilities.h"
-#include <Precision.hxx>
#include <BRep_Tool.hxx>
#include <ProjLib.hxx>
#include <ElSLib.hxx>
#include "BasicGUI_WorkingPlaneDlg.h" // Method WORKING PLANE
#include "BasicGUI_MarkerDlg.h" // Method REPAIR
+#include <QMouseEvent>
+
using namespace std;
//=======================================================================
QDialog* aDlg = getGeometryGUI()->GetActiveDialogBox();
// Create Point dialog, OCC viewer
- if ( aDlg && aDlg->isA( "BasicGUI_PointDlg" ) &&
+ if ( aDlg && ( QString(aDlg->metaObject()->className()).compare("BasicGUI_PointDlg") == 0) &&
theViewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() &&
- pe->state() != Qt::ControlButton )
+ pe->modifiers() != Qt::ControlModifier )
{
BasicGUI_PointDlg* aPntDlg = (BasicGUI_PointDlg*) aDlg;
if ( aPntDlg->acceptMouseEvent() )
gp_Pnt aPnt;
ic->InitSelected();
- if ( pe->state() == Qt::ShiftButton )
+ if ( pe->modifiers() == Qt::ShiftModifier )
ic->ShiftSelect(); // Append selection
else
ic->Select(); // New selection
#include "GEOM_BasicGUI.hxx"
#include "GEOMGUI.h"
-#include "GEOMBase.h"
#include <V3d_View.hxx>
//=================================================================================
--- /dev/null
+TEMPLATE = lib
+TARGET = BasicGUI
+DESTDIR = ../../lib
+MOC_DIR = ../../moc
+OBJECTS_DIR = ../../obj/$$TARGET
+
+QT_INCLUDES = $$(QTDIR)/include $$(QTDIR)/include/QtCore $$(QTDIR)/include/QtGui $$(QTDIR)/include/QtOpenGL $$(QTDIR)/include/QtXml
+
+VTK_INCLUDES = $$(VTKHOME)/include/vtk
+
+CASROOT = $$(CASROOT)
+CAS_CPPFLAGS = $${CASROOT}/inc
+
+PYTHON_INCLUDES = $$(PYTHONHOME)/include/python2.4
+
+BOOST_CPPFLAGS = $$(BOOSTDIR)/include
+
+KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome
+
+GUI_CXXFLAGS = $$(GUI_ROOT_DIR)/include/salome
+
+CORBA_INCLUDES = $$(OMNIORBDIR)/include $$(OMNIORBDIR)/include/omniORB4 $$(OMNIORBDIR)/include/COS
+
+GUI_LDFLAGS = -L$$(GUI_ROOT_DIR)/lib/salome
+
+INCLUDEPATH += $${QT_INCLUDES} $${VTK_INCLUDES} $${CAS_CPPFLAGS} $${PYTHON_INCLUDES} $${BOOST_CPPFLAGS} $${KERNEL_CXXFLAGS} $${GUI_CXXFLAGS} $${CORBA_INCLUDES} ../OBJECT ../DlgRef ../GEOMGUI ../GEOMFiltersSelection ../GEOMBase ../GEOMImpl ../GEOMClient $$(GEOM_ROOT_DIR)/idl $$(GEOM_ROOT_DIR)/salome_adm/unix
+
+LIBS += -L$$(GEOM_ROOT_DIR)/lib -lGEOMFiltersSelection -lGEOMBase -lGEOM $${GUI_LDFLAGS} -lsuit
+
+CONFIG -= debug release debug_and_release
+CONFIG += qt thread debug dll shared
+
+win32:DEFINES += WIN32
+DEFINES += BASICGUI_EXPORTS OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS OMNIORB_VERSION=4 __x86__ __linux__ COMP_CORBA_DOUBLE COMP_CORBA_LONG
+
+HEADERS = BasicGUI_PointDlg.h
+HEADERS += GEOM_BasicGUI.hxx
+
+SOURCES = BasicGUI.cxx
+SOURCES += BasicGUI_PointDlg.cxx
+SOURCES += BasicGUI_LineDlg.cxx
+SOURCES += BasicGUI_CircleDlg.cxx
+SOURCES += BasicGUI_EllipseDlg.cxx
+SOURCES += BasicGUI_ArcDlg.cxx
+SOURCES += BasicGUI_VectorDlg.cxx
+SOURCES += BasicGUI_PlaneDlg.cxx
+SOURCES += BasicGUI_WorkingPlaneDlg.cxx
+SOURCES += BasicGUI_CurveDlg.cxx
+SOURCES += BasicGUI_MarkerDlg.cxx
+
+includes.files = $$HEADERS
+includes.path = ../../include
+
+INSTALLS += includes
#include "BasicGUI_ArcDlg.h"
-#include "SUIT_Desktop.h"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include <qlabel.h>
-
-#include <BRepBuilderAPI_MakeEdge.hxx>
-#include <GC_MakeArcOfCircle.hxx>
-#include <Geom_TrimmedCurve.hxx>
-#include <Precision.hxx>
-
#include "GEOMImpl_Types.hxx"
-#include "utilities.h"
-
using namespace std;
//=================================================================================
// TRUE to construct a modal dialog.
//=================================================================================
BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
- const char* name, bool modal, WFlags fl)
- : GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ const char* name, bool modal, Qt::WindowFlags fl)
+ : GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ARC")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ARC_CENTER")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
- setCaption(tr("GEOM_ARC_TITLE"));
+ setWindowTitle(tr("GEOM_ARC_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_ARC"));
- RadioButton1->setPixmap(image0);
- RadioButton2->setPixmap(image1);
- RadioButton3->close(TRUE);
+ RadioButton1->setIcon(image0);
+ RadioButton2->setIcon(image1);
+ RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
+ RadioButton3->close();
+
+ Group3Pnts = new Ui::DlgRef_3Sel_QTD();
+ QWidget* aGroup3PntsWidget = new QWidget(this);
+ Group3Pnts->setupUi(aGroup3PntsWidget);
+ aGroup3PntsWidget->setObjectName("Group3Pnts");
- Group3Pnts = new DlgRef_3Sel_QTD(this, "Group3Pnts");
Group3Pnts->GroupBox1->setTitle(tr("GEOM_POINTS"));
Group3Pnts->TextLabel1->setText(tr("GEOM_POINT_I").arg("1"));
Group3Pnts->TextLabel2->setText(tr("GEOM_POINT_I").arg("2"));
Group3Pnts->LineEdit2->setReadOnly( true );
Group3Pnts->LineEdit3->setReadOnly( true );
- Group3Pnts->PushButton1->setPixmap(image2);
- Group3Pnts->PushButton2->setPixmap(image2);
- Group3Pnts->PushButton3->setPixmap(image2);
+ Group3Pnts->PushButton1->setIcon(image2);
+ Group3Pnts->PushButton2->setIcon(image2);
+ Group3Pnts->PushButton3->setIcon(image2);
+
+ Group3Pnts2 = new Ui::DlgRef_3Sel1Check_QTD();
+ QWidget* aGroup3Pnts2Widget = new QWidget(this);
+ Group3Pnts2->setupUi(aGroup3Pnts2Widget);
+ aGroup3Pnts2Widget->setObjectName("Group3Pnts2");
- Group3Pnts2 = new DlgRef_3Sel1Check_QTD(this, "Group3Pnts2");
Group3Pnts2->GroupBox1->setTitle(tr("GEOM_POINTS"));
Group3Pnts2->TextLabel1->setText(tr("GEOM_CENTER_POINT"));
Group3Pnts2->TextLabel2->setText(tr("GEOM_POINT_I").arg("Start"));
Group3Pnts2->LineEdit2->setReadOnly( true );
Group3Pnts2->LineEdit3->setReadOnly( true );
- Group3Pnts2->PushButton1->setPixmap(image2);
- Group3Pnts2->PushButton2->setPixmap(image2);
- Group3Pnts2->PushButton3->setPixmap(image2);
+ Group3Pnts2->PushButton1->setIcon(image2);
+ Group3Pnts2->PushButton2->setIcon(image2);
+ Group3Pnts2->PushButton3->setIcon(image2);
Group3Pnts2->radioButton4->setText(tr("GEOM_REVERSE"));
- Layout1->addWidget( Group3Pnts, 2, 0 );
- Layout1->addWidget( Group3Pnts2, 2, 0 );
+ gridLayout1->addWidget( aGroup3PntsWidget, 2, 0 );
+ gridLayout1->addWidget( aGroup3Pnts2Widget, 2, 0 );
setHelpFileName("arc.htm");
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- initName( tr( "GEOM_ARC" ));
+ initName( tr( "GEOM_ARC" ).toStdString().c_str() );
ConstructorsClicked( 0 );
{
case 0:
{
- Group3Pnts->show();
+ ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->show();
resize(0, 0);
- Group3Pnts2->hide();
+ ::qobject_cast<QWidget*>( Group3Pnts2->gridLayout->parent() )->hide();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
break;
}
case 1:
{
- Group3Pnts->hide();
+ ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->hide();
resize(0, 0);
- Group3Pnts2->show();
+ ::qobject_cast<QWidget*>( Group3Pnts2->gridLayout->parent() )->show();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
break;
public:
BasicGUI_ArcDlg( GeometryGUI* theGeometryGUI, QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0 );
~BasicGUI_ArcDlg();
protected:
int myConstructorId;
GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
- DlgRef_3Sel_QTD* Group3Pnts;
- DlgRef_3Sel1Check_QTD* Group3Pnts2;
+ Ui::DlgRef_3Sel_QTD* Group3Pnts;
+ Ui::DlgRef_3Sel1Check_QTD* Group3Pnts2;
private slots:
void ClickOnOk();
// $Header$
#include "BasicGUI_CircleDlg.h"
+#include "DlgRef_2Sel1Spin.h"
+#include "DlgRef_SpinBox.h"
-#include "SUIT_Desktop.h"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include <qlabel.h>
-
#include "GEOMImpl_Types.hxx"
-#include "utilities.h"
-
//=================================================================================
// class : BasicGUI_CircleDlg()
// purpose : Constructs a BasicGUI_CircleDlg which is a child of 'parent', with the
// TRUE to construct a modal dialog.
//=================================================================================
BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
- const char* name, bool modal, WFlags fl)
- :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ const char* name, bool modal, Qt::WindowFlags fl)
+ :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PV")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PNTS")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
- setCaption(tr("GEOM_CIRCLE_TITLE"));
+ setWindowTitle(tr("GEOM_CIRCLE_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_CIRCLE"));
- RadioButton1->setPixmap(image0);
- RadioButton2->setPixmap(image2);
- RadioButton3->close(TRUE);
+ RadioButton1->setIcon(image0);
+ RadioButton2->setIcon(image2);
+ RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
+ RadioButton3->close();
GroupPntVecR = new DlgRef_2Sel1Spin(this, "GroupPntVecR");
GroupPntVecR->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
GroupPntVecR->TextLabel1->setText(tr("GEOM_CENTER_POINT"));
GroupPntVecR->TextLabel2->setText(tr("GEOM_VECTOR"));
GroupPntVecR->TextLabel3->setText(tr("GEOM_RADIUS"));
- GroupPntVecR->PushButton1->setPixmap(image1);
- GroupPntVecR->PushButton2->setPixmap(image1);
+ GroupPntVecR->PushButton1->setIcon(image1);
+ GroupPntVecR->PushButton2->setIcon(image1);
GroupPntVecR->LineEdit1->setReadOnly( true );
GroupPntVecR->LineEdit2->setReadOnly( true );
- Group3Pnts = new DlgRef_3Sel_QTD(this, "Group3Pnts");
+ Group3Pnts = new Ui::DlgRef_3Sel_QTD();
+ QWidget* aGroup3PntsWidget = new QWidget(this);
+ Group3Pnts->setupUi(aGroup3PntsWidget);
+ aGroup3PntsWidget->setObjectName("Group3Pnts");
+
Group3Pnts->GroupBox1->setTitle(tr("GEOM_3_POINTS"));
Group3Pnts->TextLabel1->setText(tr("GEOM_POINT1"));
Group3Pnts->TextLabel2->setText(tr("GEOM_POINT2"));
Group3Pnts->TextLabel3->setText(tr("GEOM_POINT3"));
- Group3Pnts->PushButton1->setPixmap(image1);
- Group3Pnts->PushButton2->setPixmap(image1);
- Group3Pnts->PushButton3->setPixmap(image1);
+ Group3Pnts->PushButton1->setIcon(image1);
+ Group3Pnts->PushButton2->setIcon(image1);
+ Group3Pnts->PushButton3->setIcon(image1);
Group3Pnts->LineEdit1->setReadOnly( true );
Group3Pnts->LineEdit2->setReadOnly( true );
Group3Pnts->LineEdit3->setReadOnly( true );
- Layout1->addWidget( GroupPntVecR, 2, 0 );
- Layout1->addWidget( Group3Pnts, 2, 0 );
+ gridLayout1->addWidget( GroupPntVecR, 2, 0 );
+ gridLayout1->addWidget( aGroup3PntsWidget, 2, 0 );
/***************************************************************/
setHelpFileName("circle.htm");
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
- initName( tr( "GEOM_CIRCLE" ) );
+ initName( tr( "GEOM_CIRCLE" ).toStdString().c_str() );
- Group3Pnts->hide();
+ ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->hide();
ConstructorsClicked( 0 );
}
{
case 0:
{
- Group3Pnts->hide();
+ ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->hide();
resize(0, 0);
GroupPntVecR->show();
{
GroupPntVecR->hide();
resize( 0, 0 );
- Group3Pnts->show();
+ ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->show();
myEditCurrentArgument = Group3Pnts->LineEdit1;
Group3Pnts->LineEdit1->setText("");
#include "GEOM_BasicGUI.hxx"
#include "GEOMBase_Skeleton.h"
-#include "DlgRef_2Sel1Spin.h"
#include "DlgRef_3Sel_QTD.h"
-#include "BasicGUI.h"
+class DlgRef_2Sel1Spin;
//=================================================================================
// class : BasicGUI_CircleDlg
public:
BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0);
+ const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
~BasicGUI_CircleDlg();
protected:
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3;
- DlgRef_2Sel1Spin* GroupPntVecR;
- DlgRef_3Sel_QTD* Group3Pnts;
+ DlgRef_2Sel1Spin* GroupPntVecR;
+ Ui::DlgRef_3Sel_QTD* Group3Pnts;
private slots:
void ClickOnOk();
#include "BasicGUI_CurveDlg.h"
-#include "SUIT_Desktop.h"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include <qlabel.h>
-
-#include "utilities.h"
-
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SALOME_ListIO.hxx"
// TRUE to construct a modal dialog.
//=================================================================================
BasicGUI_CurveDlg::BasicGUI_CurveDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
- const char* name, bool modal, WFlags fl)
- :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ const char* name, bool modal, Qt::WindowFlags fl)
+ :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_POLYLINE")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SPLINE")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
- setCaption(tr("GEOM_CURVE_TITLE"));
+ setWindowTitle(tr("GEOM_CURVE_TITLE"));
/***************************************************************/
- RadioButton1->setPixmap( image0 );
- RadioButton2->setPixmap( image3 );
- RadioButton3->setPixmap( image2 );
+ RadioButton1->setIcon( image0 );
+ RadioButton2->setIcon( image3 );
+ RadioButton3->setIcon( image2 );
+
+ GroupPoints = new Ui::DlgRef_1Sel_QTD();
+ QWidget* aGroupPointsWidget = new QWidget(this);
+ GroupPoints->setupUi(aGroupPointsWidget);
+ aGroupPointsWidget->setObjectName("GroupPoints");
- GroupPoints = new DlgRef_1Sel_QTD( this, "GroupPoints" );
GroupPoints->GroupBox1->setTitle( tr( "GEOM_NODES" ) );
GroupPoints->TextLabel1->setText( tr("GEOM_POINTS") );
- GroupPoints->PushButton1->setPixmap(image1);
+ GroupPoints->PushButton1->setIcon(image1);
GroupPoints->LineEdit1->setReadOnly( true );
- Layout1->addWidget(GroupPoints, 2, 0);
+ gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
/***************************************************************/
setHelpFileName("curve.htm");
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
- initName( tr( "GEOM_CURVE" ) );
+ initName( tr( "GEOM_CURVE" ).toStdString().c_str() );
ConstructorsClicked( 0 );
}
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel_QTD.h"
-#include "BasicGUI.h"
-
#include <list>
//=================================================================================
public:
BasicGUI_CurveDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0);
+ const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
~BasicGUI_CurveDlg();
protected:
void Init();
void enterEvent(QEvent* e);
- DlgRef_1Sel_QTD* GroupPoints;
+ Ui::DlgRef_1Sel_QTD* GroupPoints;
GEOM::ListOfGO_var myPoints;
list<GEOM::GEOM_Object_var> myOrderedSel;//!< This list used for managing orderes selection
// $Header$
#include "BasicGUI_EllipseDlg.h"
+#include "DlgRef_2Sel2Spin.h"
+#include "DlgRef_SpinBox.h"
-#include "SUIT_Desktop.h"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include <qlabel.h>
-
#include "GEOMImpl_Types.hxx"
-#include "utilities.h"
-
using namespace std;
//=================================================================================
// TRUE to construct a modal dialog.
//=================================================================================
BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
- const char* name, bool modal, WFlags fl)
- :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ const char* name, bool modal, Qt::WindowFlags fl)
+ :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ELLIPSE_PV")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
- setCaption(tr("GEOM_ELLIPSE_TITLE"));
+ setWindowTitle(tr("GEOM_ELLIPSE_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_ELLIPSE"));
- RadioButton1->setPixmap(image0);
- RadioButton2->close(TRUE);
- RadioButton3->close(TRUE);
+ RadioButton1->setIcon(image0);
+ RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
+ RadioButton2->close();
+ RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
+ RadioButton3->close();
GroupPoints = new DlgRef_2Sel2Spin(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR"));
GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS_MAJOR"));
GroupPoints->TextLabel4->setText(tr("GEOM_RADIUS_MINOR"));
- GroupPoints->PushButton1->setPixmap(image1);
- GroupPoints->PushButton2->setPixmap(image1);
+ GroupPoints->PushButton1->setIcon(image1);
+ GroupPoints->PushButton2->setIcon(image1);
GroupPoints->LineEdit1->setReadOnly( true );
GroupPoints->LineEdit2->setReadOnly( true );
- Layout1->addWidget(GroupPoints, 2, 0);
+ gridLayout1->addWidget(GroupPoints, 2, 0);
/***************************************************************/
setHelpFileName("ellipse.htm");
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
- initName( tr( "GEOM_ELLIPSE" ) );
+ initName( tr( "GEOM_ELLIPSE" ).toStdString().c_str() );
}
#include "GEOM_BasicGUI.hxx"
#include "GEOMBase_Skeleton.h"
-#include "DlgRef_2Sel2Spin.h"
-#include "BasicGUI.h"
+class DlgRef_2Sel2Spin;
//=================================================================================
// class : BasicGUI_EllipseDlg
public:
BasicGUI_EllipseDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0);
+ const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
~BasicGUI_EllipseDlg();
protected:
#include "BasicGUI_LineDlg.h"
-#include "SUIT_Desktop.h"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include <qlabel.h>
-
#include "GEOMImpl_Types.hxx"
-#include "utilities.h"
-
using namespace std;
//=================================================================================
// TRUE to construct a modal dialog.
//=================================================================================
BasicGUI_LineDlg::BasicGUI_LineDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
- const char* name, bool modal, WFlags fl)
- :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ const char* name, bool modal, Qt::WindowFlags fl)
+ :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM",tr("ICON_DLG_LINE_2P")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM",tr("ICON_SELECT")));
- setCaption(tr("GEOM_LINE_TITLE"));
+ setWindowTitle(tr("GEOM_LINE_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_LINE"));
- RadioButton1->setPixmap(image0);
- RadioButton2->close(TRUE);
- RadioButton3->close(TRUE);
+ RadioButton1->setIcon(image0);
+ RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
+ RadioButton2->close();
+ RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
+ RadioButton3->close();
+
+ GroupPoints = new Ui::DlgRef_2Sel_QTD();
+ QWidget* aGroupPointsWidget = new QWidget(this);
+ GroupPoints->setupUi(aGroupPointsWidget);
+ aGroupPointsWidget->setObjectName("GroupPoints");
- GroupPoints = new DlgRef_2Sel_QTD(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_POINTS"));
GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg("1"));
GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg("2"));
- GroupPoints->PushButton1->setPixmap(image1);
- GroupPoints->PushButton2->setPixmap(image1);
+ GroupPoints->PushButton1->setIcon(image1);
+ GroupPoints->PushButton2->setIcon(image1);
GroupPoints->LineEdit1->setReadOnly( true );
GroupPoints->LineEdit2->setReadOnly( true );
- Layout1->addWidget(GroupPoints, 2, 0);
+ gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
/***************************************************************/
setHelpFileName("line.htm");
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- initName( tr("GEOM_LINE") );
+ initName( tr("GEOM_LINE").toStdString().c_str() );
}
public:
BasicGUI_LineDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0);
+ const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
~BasicGUI_LineDlg();
protected:
GEOM::GEOM_Object_var myPoint1;
GEOM::GEOM_Object_var myPoint2;
- DlgRef_2Sel_QTD* GroupPoints;
+ Ui::DlgRef_2Sel_QTD* GroupPoints;
private slots:
void ClickOnOk();
#include "BasicGUI_MarkerDlg.h"
#include "DlgRef_SpinBox.h"
-#include "SUIT_Desktop.h"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include <qlabel.h>
+#include <QLabel>
#include "GEOMImpl_Types.hxx"
-#include "utilities.h"
-
// OCCT Includes
#include <BRep_Tool.hxx>
#include <TopExp.hxx>
//=================================================================================
BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* theParent )
: GEOMBase_Skeleton(theGeometryGUI, theParent, "BasicGUI_MarkerDlg", false,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
QPixmap iconCS1 ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER" ) ) );
QPixmap iconCS2 ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER2" ) ) );
QPixmap iconCS3 ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER3" ) ) );
QPixmap iconSelect( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
- setCaption( tr( "CAPTION" ) );
+ setWindowTitle( tr( "CAPTION" ) );
GroupConstructors->setTitle( tr( "LOCALCS" ) );
- RadioButton1->setPixmap( iconCS1 );
- RadioButton2->setPixmap( iconCS2 );
- RadioButton3->setPixmap( iconCS3 );
+ RadioButton1->setIcon( iconCS1 );
+ RadioButton2->setIcon( iconCS2 );
+ RadioButton3->setIcon( iconCS3 );
+
+ Group1 = new Ui::DlgRef_1Sel_QTD();
+ QWidget* aGroup1Widget = new QWidget(this);
+ Group1->setupUi(aGroup1Widget);
+ aGroup1Widget->setObjectName("Group1");
- Group1 = new DlgRef_1Sel_QTD(this, "Group1");
Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
Group1->TextLabel1->setText(tr("GEOM_OBJECT"));
- Group1->PushButton1->setPixmap(iconSelect);
+ Group1->PushButton1->setIcon(iconSelect);
+
+ Group2 = new Ui::DlgRef_3Sel_QTD();
+ QWidget* aGroup2Widget = new QWidget(this);
+ Group2->setupUi(aGroup2Widget);
+ aGroup2Widget->setObjectName("Group2");
- Group2 = new DlgRef_3Sel_QTD(this, "Group2");
Group2->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
Group2->TextLabel1->setText(tr("GEOM_POINT"));
Group2->TextLabel2->setText(tr("XDIR"));
Group2->TextLabel3->setText(tr("YDIR"));
- Group2->PushButton1->setPixmap(iconSelect);
- Group2->PushButton2->setPixmap(iconSelect);
- Group2->PushButton3->setPixmap(iconSelect);
+ Group2->PushButton1->setIcon(iconSelect);
+ Group2->PushButton2->setIcon(iconSelect);
+ Group2->PushButton3->setIcon(iconSelect);
- aMainGrp = new QGroupBox( 1, Qt::Horizontal, this );
+ aMainGrp = new QFrame( this );
aMainGrp->setFrameStyle( QFrame::NoFrame );
- aMainGrp->setInsideMargin( 0 );
+ aMainGrp->setContentsMargins( 0, 0, 0, 0 );
+ QHBoxLayout* aMainGrpLayout = new QHBoxLayout( aMainGrp );
+
+ QGroupBox* anOriGrp = new QGroupBox( tr( "ORIGIN" ), aMainGrp );
+ QVBoxLayout* anOriGrpLayout = new QVBoxLayout( anOriGrp );
- QGroupBox* anOriGrp = new QGroupBox( 1, Qt::Vertical, tr( "ORIGIN" ), aMainGrp );
- new QLabel( tr( "GEOM_X" ), anOriGrp );
+ anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), anOriGrp ) );
myData[ X ] = new DlgRef_SpinBox( anOriGrp );
- new QLabel( tr( "GEOM_Y" ), anOriGrp );
+ anOriGrpLayout->addWidget( myData[ X ] );
+ anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), anOriGrp ) );
myData[ Y ] = new DlgRef_SpinBox( anOriGrp );
- new QLabel( tr( "GEOM_Z" ), anOriGrp );
+ anOriGrpLayout->addWidget( myData[ Y ] );
+ anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), anOriGrp ) );
myData[ Z ] = new DlgRef_SpinBox( anOriGrp );
+ anOriGrpLayout->addWidget( myData[ Z ] );
+
+ aMainGrpLayout->addWidget( anOriGrp );
- QGroupBox* aXAxisGrp = new QGroupBox( 1, Qt::Vertical, tr( "XDIR" ), aMainGrp );
- new QLabel( tr( "DX" ), aXAxisGrp );
+ QGroupBox* aXAxisGrp = new QGroupBox( tr( "XDIR" ), aMainGrp );
+ QVBoxLayout* aXAxisGrpLayout = new QVBoxLayout( aXAxisGrp );
+
+ aXAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), aXAxisGrp ) );
myData[ DX1 ] = new DlgRef_SpinBox( aXAxisGrp );
- new QLabel( tr( "DY" ), aXAxisGrp );
+ aXAxisGrpLayout->addWidget( myData[ DX1 ] );
+ aXAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), aXAxisGrp ) );
myData[ DY1 ] = new DlgRef_SpinBox( aXAxisGrp );
- new QLabel( tr( "DZ" ), aXAxisGrp );
+ aXAxisGrpLayout->addWidget( myData[ DY1 ] );
+ aXAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), aXAxisGrp ) );
myData[ DZ1 ] = new DlgRef_SpinBox( aXAxisGrp );
+ aXAxisGrpLayout->addWidget( myData[ DZ1 ] );
+
+ aMainGrpLayout->addWidget( aXAxisGrp );
- QGroupBox* anYAxisGrp = new QGroupBox( 1, Qt::Vertical, tr( "YDIR" ), aMainGrp );
- new QLabel( tr( "DX" ), anYAxisGrp );
+ QGroupBox* anYAxisGrp = new QGroupBox( tr( "YDIR" ), aMainGrp );
+ QVBoxLayout* anYAxisGrpLayout = new QVBoxLayout( anYAxisGrp );
+
+ anYAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), anYAxisGrp ) );
myData[ DX2 ] = new DlgRef_SpinBox( anYAxisGrp );
- new QLabel( tr( "DY" ), anYAxisGrp );
+ anYAxisGrpLayout->addWidget( myData[ DX2 ] );
+ anYAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), anYAxisGrp ) );
myData[ DY2 ] = new DlgRef_SpinBox( anYAxisGrp );
- new QLabel( tr( "DZ" ), anYAxisGrp );
+ anYAxisGrpLayout->addWidget( myData[ DY2 ] );
+ anYAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), anYAxisGrp ) );
myData[ DZ2 ] = new DlgRef_SpinBox( anYAxisGrp );
+ anYAxisGrpLayout->addWidget( myData[ DZ2 ] );
+
+ aMainGrpLayout->addWidget( anYAxisGrp );
- Layout1->addWidget( aMainGrp, 2, 0 );
- Layout1->addWidget( Group1, 2, 0 );
- Layout1->addWidget( Group2, 2, 0 );
+ gridLayout1->addWidget( aMainGrp, 2, 0 );
+ gridLayout1->addWidget( aGroup1Widget, 2, 0 );
+ gridLayout1->addWidget( aGroup2Widget, 2, 0 );
setHelpFileName("local_coordinate_system.htm");
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
- initName( tr( "LCS_NAME" ) );
+ initName( tr( "LCS_NAME" ).toStdString().c_str() );
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
{
- anIter.data()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, 3 );
- connect( anIter.data(), SIGNAL( valueChanged( double ) ),
+ anIter.value()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, 3 );
+ connect( anIter.value(), SIGNAL( valueChanged( double ) ),
this, SLOT( onValueChanged( double ) ) );
}
myBlockPreview = true;
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
- anIter.data()->SetValue( 0 );
+ anIter.value()->SetValue( 0 );
myData[ DX1 ]->SetValue( 1 );
myData[ DY2 ]->SetValue( 1 );
myBlockPreview = false;
{
case 0:
{
- Group1->hide();
- Group2->hide();
+ ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->hide();
+ ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
resize(0, 0);
aMainGrp->show();
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
}
case 1:
{
- Group2->hide();
+ ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
aMainGrp->hide();
//PAL6669: resize(0, 0);
- Group1->show();
+ ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->show();
globalSelection( GEOM_ALLGEOM );
myEditCurrentArgument = Group1->LineEdit1;
case 2:
{
aMainGrp->hide();
- Group1->show();
+ ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->show();
//PAL6669: resize(0, 0);
- Group2->show();
+ ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->show();
globalSelection( GEOM_POINT );
myEditCurrentArgument = Group2->LineEdit1;
#include "DlgRef_1Sel_QTD.h"
#include "DlgRef_3Sel_QTD.h"
-#include <qmap.h>
+#include <QMap>
class DlgRef_SpinBox;
int myConstructorId;
int myBlockPreview;
- QGroupBox* aMainGrp;
- DlgRef_1Sel_QTD* Group1;
- DlgRef_3Sel_QTD* Group2;
+ QFrame* aMainGrp;
+ Ui::DlgRef_1Sel_QTD* Group1;
+ Ui::DlgRef_3Sel_QTD* Group2;
};
// $Header$
#include "BasicGUI_PlaneDlg.h"
+#include "DlgRef_1Sel1Spin.h"
+#include "DlgRef_2Sel1Spin.h"
+#include "DlgRef_3Sel1Spin.h"
+#include "DlgRef_SpinBox.h"
-#include "SUIT_Desktop.h"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
#include <TColStd_MapOfInteger.hxx>
-#include <qlabel.h>
-
#include "GEOMImpl_Types.hxx"
using namespace std;
// TRUE to construct a modal dialog.
//=================================================================================
BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
- const char* name, bool modal, WFlags fl)
- :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ const char* name, bool modal, Qt::WindowFlags fl)
+ :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_PLANE_PV")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_PLANE_3PNTS")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_PLANE_FACE")));
QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
- setCaption(tr("GEOM_PLANE_TITLE"));
+ setWindowTitle(tr("GEOM_PLANE_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_PLANE"));
- RadioButton1->setPixmap(image0);
- RadioButton2->setPixmap(image1);
- RadioButton3->setPixmap(image2);
+ RadioButton1->setIcon(image0);
+ RadioButton2->setIcon(image1);
+ RadioButton3->setIcon(image2);
GroupPntDir = new DlgRef_2Sel1Spin(this, "GroupPointDirection");
GroupPntDir->GroupBox1->setTitle(tr("GEOM_PLANE_PV"));
GroupPntDir->TextLabel1->setText(tr("GEOM_POINT"));
GroupPntDir->TextLabel2->setText(tr("GEOM_VECTOR"));
GroupPntDir->TextLabel3->setText(tr("GEOM_PLANE_SIZE"));
- GroupPntDir->PushButton1->setPixmap(image3);
- GroupPntDir->PushButton2->setPixmap(image3);
+ GroupPntDir->PushButton1->setIcon(image3);
+ GroupPntDir->PushButton2->setIcon(image3);
GroupPntDir->LineEdit1->setReadOnly( true );
GroupPntDir->LineEdit2->setReadOnly( true );
Group3Pnts->TextLabel2->setText(tr("GEOM_POINT2"));
Group3Pnts->TextLabel3->setText(tr("GEOM_POINT3"));
Group3Pnts->TextLabel4->setText(tr("GEOM_PLANE_SIZE"));
- Group3Pnts->PushButton1->setPixmap(image3);
- Group3Pnts->PushButton2->setPixmap(image3);
- Group3Pnts->PushButton3->setPixmap(image3);
+ Group3Pnts->PushButton1->setIcon(image3);
+ Group3Pnts->PushButton2->setIcon(image3);
+ Group3Pnts->PushButton3->setIcon(image3);
Group3Pnts->LineEdit1->setReadOnly( true );
Group3Pnts->LineEdit2->setReadOnly( true );
GroupFace->GroupBox1->setTitle(tr("GEOM_FACE_OR_LCS"));
GroupFace->TextLabel1->setText(tr("GEOM_SELECTION"));
GroupFace->TextLabel2->setText(tr("GEOM_PLANE_SIZE"));
- GroupFace->PushButton1->setPixmap(image3);
+ GroupFace->PushButton1->setIcon(image3);
GroupFace->LineEdit1->setReadOnly( true );
- Layout1->addWidget(GroupPntDir, 2, 0);
- Layout1->addWidget(Group3Pnts, 2, 0);
- Layout1->addWidget(GroupFace, 2, 0);
+ gridLayout1->addWidget(GroupPntDir, 2, 0);
+ gridLayout1->addWidget(Group3Pnts, 2, 0);
+ gridLayout1->addWidget(GroupFace, 2, 0);
/***************************************************************/
setHelpFileName("plane.htm");
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- initName( tr( "GEOM_PLANE" ) );
+ initName( tr( "GEOM_PLANE" ).toStdString().c_str() );
Group3Pnts->hide();
GroupFace->hide();
#include "GEOM_BasicGUI.hxx"
#include "GEOMBase_Skeleton.h"
-#include "DlgRef_1Sel1Spin.h"
-#include "DlgRef_2Sel1Spin.h"
-#include "DlgRef_3Sel1Spin.h"
+
+class DlgRef_1Sel1Spin;
+class DlgRef_2Sel1Spin;
+class DlgRef_3Sel1Spin;
//=================================================================================
// class : BasicGUI_PlaneDlg
public:
BasicGUI_PlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0);
+ const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
~BasicGUI_PlaneDlg();
protected:
#include "BasicGUI_PointDlg.h"
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include "GEOMImpl_Types.hxx"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "DlgRef_SpinBox.h"
+#include "DlgRef_1Sel1Spin.h"
+#include "DlgRef_3Spin.h"
+#include "DlgRef_1Sel3Spin.h"
-#include <qlabel.h>
+#include "GEOMImpl_Types.hxx"
-#include "utilities.h"
+#include <QApplication>
+#include <QLabel>
#include <gp_Pnt.hxx>
#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS.hxx>
#include <BRep_Tool.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <qapplication.h>
using namespace std;
//=================================================================================
// class : BasicGUI_PointDlg()
// TRUE to construct a modal dialog.
//=================================================================================
BasicGUI_PointDlg::BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
- const char* name, bool modal, WFlags fl)
+ const char* name, bool modal, Qt::WindowFlags fl)
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, fl )
{
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_POINT")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_POINT_REF")));
- setCaption(tr("GEOM_POINT_TITLE"));
+ setWindowTitle(tr("GEOM_POINT_TITLE"));
- QGroupBox* aFrame = new QGroupBox( 1, Qt::Horizontal, this );
- aFrame->setInsideMargin( 0 );
+ QFrame* aFrame = new QFrame( this );
+ aFrame->setContentsMargins( 0, 0, 0, 0 );
aFrame->setFrameStyle( QFrame::NoFrame );
-
+ QHBoxLayout* aFrameLayout = new QHBoxLayout( aFrame );
+
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_POINTS"));
- RadioButton1->setPixmap(image0);
- RadioButton2->setPixmap(image3);
- RadioButton3->setPixmap(image1);
+ RadioButton1->setIcon(image0);
+ RadioButton2->setIcon(image3);
+ RadioButton3->setIcon(image1);
GroupXYZ = new DlgRef_3Spin( aFrame, "GroupXYZ" );
GroupXYZ->GroupBox1->setTitle(tr("GEOM_COORDINATES"));
GroupXYZ->TextLabel1->setText(tr("GEOM_X"));
GroupXYZ->TextLabel2->setText(tr("GEOM_Y"));
GroupXYZ->TextLabel3->setText(tr("GEOM_Z"));
+ aFrameLayout->addWidget(GroupXYZ);
GroupOnCurve = new DlgRef_1Sel1Spin( aFrame, "GroupOnCurve" );
GroupOnCurve->GroupBox1->setTitle(tr("GEOM_PARAM_POINT"));
GroupOnCurve->TextLabel1->setText(tr("GEOM_EDGE"));
GroupOnCurve->TextLabel2->setText(tr("GEOM_PARAMETER"));
- GroupOnCurve->PushButton1->setPixmap(image2);
+ GroupOnCurve->PushButton1->setIcon(image2);
+ aFrameLayout->addWidget(GroupOnCurve);
GroupRefPoint = new DlgRef_1Sel3Spin( aFrame, "GoupRefPoint" );
GroupRefPoint->GroupBox1->setTitle(tr("GEOM_REF_POINT"));
GroupRefPoint->TextLabel1->setText(tr("GEOM_POINT"));
- GroupRefPoint->PushButton1->setPixmap(image2);
+ GroupRefPoint->PushButton1->setIcon(image2);
GroupRefPoint->TextLabel2->setText(tr("GEOM_DX"));
GroupRefPoint->TextLabel3->setText(tr("GEOM_DY"));
GroupRefPoint->TextLabel4->setText(tr("GEOM_DZ"));
+ aFrameLayout->addWidget(GroupRefPoint);
- Layout1->addWidget( aFrame, 2, 0 );
+ gridLayout1->addWidget( aFrame, 2, 0 );
/***************************************************************/
- myCoordGrp = new QGroupBox( 2, Qt::Horizontal, tr( "GEOM_COORDINATES" ), aFrame );
- new QLabel( tr( "GEOM_X" ), myCoordGrp );
+ myCoordGrp = new QGroupBox( tr( "GEOM_COORDINATES" ), aFrame );
+ QGridLayout* myCoordGrpLayout = new QGridLayout( myCoordGrp );
+ myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), myCoordGrp ), 0, 0 );
myX = new QLineEdit( myCoordGrp );
- new QLabel( tr( "GEOM_Y" ), myCoordGrp );
+ myCoordGrpLayout->addWidget( myX, 0, 1 );
+ myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), myCoordGrp ), 1, 0 );
myY = new QLineEdit( myCoordGrp );
- new QLabel( tr( "GEOM_Z" ), myCoordGrp );
+ myCoordGrpLayout->addWidget( myY, 1, 1 );
+ myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), myCoordGrp ), 2, 0 );
myZ = new QLineEdit( myCoordGrp );
+ myCoordGrpLayout->addWidget( myZ, 2, 1 );
myX->setReadOnly( true );
myY->setReadOnly( true );
myZ->setEnabled( false );
QPalette aPal = myX->palette();
- aPal.setColor( QPalette::Disabled, QColorGroup::Text, QColor( 0, 0, 0 ) ) ;
+ aPal.setColor( QPalette::Disabled, QPalette::Text, QColor( 0, 0, 0 ) ) ;
myX->setPalette( aPal );
myY->setPalette( aPal );
myZ->setPalette( aPal );
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- initName( tr("GEOM_VERTEX") );
+ initName( tr("GEOM_VERTEX").toStdString().c_str() );
ConstructorsClicked( 0 );
}
#include "GEOM_BasicGUI.hxx"
#include "GEOMBase_Skeleton.h"
-#include "DlgRef_1Sel1Spin.h"
-#include "DlgRef_3Spin.h"
-#include "DlgRef_1Sel3Spin.h"
+
+class DlgRef_1Sel1Spin;
+class DlgRef_3Spin;
+class DlgRef_1Sel3Spin;
class QLineEdit;
class QGroupBox;
+class gp_Pnt;
+
//=================================================================================
// class : BasicGUI_PointDlg
// purpose :
public:
BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0);
+ const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
~BasicGUI_PointDlg();
// $Header$
#include "BasicGUI_VectorDlg.h"
+#include "DlgRef_3Spin1Check.h"
+#include "DlgRef_SpinBox.h"
-#include "SUIT_Desktop.h"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include <qlabel.h>
-
#include "GEOMImpl_Types.hxx"
-#include "utilities.h"
-
using namespace std;
//=================================================================================
// TRUE to construct a modal dialog.
//=================================================================================
BasicGUI_VectorDlg::BasicGUI_VectorDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
- const char* name, bool modal, WFlags fl)
+ const char* name, bool modal, Qt::WindowFlags fl)
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, fl)
{
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_VECTOR_2P")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_VECTOR_DXYZ")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
- setCaption(tr("GEOM_VECTOR_TITLE"));
+ setWindowTitle(tr("GEOM_VECTOR_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_VECTOR"));
- RadioButton1->setPixmap(image0);
- RadioButton2->setPixmap(image1);
- RadioButton3->close(TRUE);
+ RadioButton1->setIcon(image0);
+ RadioButton2->setIcon(image1);
+ RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
+ RadioButton3->close();
+
+ GroupPoints = new Ui::DlgRef_2Sel_QTD();
+ QWidget* aGroupPointsWidget = new QWidget(this);
+ GroupPoints->setupUi(aGroupPointsWidget);
+ aGroupPointsWidget->setObjectName("GroupPoints");
- GroupPoints = new DlgRef_2Sel_QTD(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_POINTS"));
GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg("1"));
GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg("2"));
- GroupPoints->PushButton1->setPixmap(image2);
- GroupPoints->PushButton2->setPixmap(image2);
+ GroupPoints->PushButton1->setIcon(image2);
+ GroupPoints->PushButton2->setIcon(image2);
GroupPoints->LineEdit1->setReadOnly( true );
GroupPoints->LineEdit2->setReadOnly( true );
GroupDimensions->TextLabel3->setText(tr("GEOM_DZ"));
GroupDimensions->CheckBox1->setText(tr("GEOM_REVERSE_VECTOR"));
- Layout1->addWidget(GroupPoints, 2, 0);
- Layout1->addWidget(GroupDimensions, 2, 0);
+ gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
+ gridLayout1->addWidget(GroupDimensions, 2, 0);
/***************************************************************/
setHelpFileName("vector.htm");
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- initName( tr("GEOM_VECTOR") );
+ initName( tr("GEOM_VECTOR").toStdString().c_str() );
GroupDimensions->hide();
ConstructorsClicked( 0 );
{
GroupDimensions->hide();
resize(0, 0);
- GroupPoints->show();
+ ::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->show();
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit1->setText("");
}
case 1:
{
- GroupPoints->hide();
+ ::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->hide();
resize( 0, 0 );
GroupDimensions->show();
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel_QTD.h"
-#include "DlgRef_3Spin1Check.h"
-#include "BasicGUI.h"
+class DlgRef_3Spin1Check;
//=================================================================================
// class : BasicGUI_VectorDlg
public:
BasicGUI_VectorDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0);
+ const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
~BasicGUI_VectorDlg();
protected:
GEOM::GEOM_Object_var myPoint1;
GEOM::GEOM_Object_var myPoint2;
- DlgRef_2Sel_QTD* GroupPoints;
- DlgRef_3Spin1Check* GroupDimensions;
+ Ui::DlgRef_2Sel_QTD* GroupPoints;
+ DlgRef_3Spin1Check* GroupDimensions;
private slots:
void ClickOnOk();
#include "BasicGUI_WorkingPlaneDlg.h"
+#include "GeometryGUI.h"
#include "GEOMBase.h"
-#include "SUIT_Desktop.h"
+#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
// OCCT Includes
#include <BRep_Tool.hxx>
-#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopExp.hxx>
#include <TColStd_MapOfInteger.hxx>
// QT Includes
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <QCheckBox>
#include "GEOMImpl_Types.hxx"
// TRUE to construct a modal dialog.
//=================================================================================
BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
- const char* name, bool modal, WFlags fl)
- :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ const char* name, bool modal, Qt::WindowFlags fl)
+ :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_FACE")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_VECTOR")));
QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_ORIGIN")));
- setCaption(tr("GEOM_WPLANE_TITLE"));
+ setWindowTitle(tr("GEOM_WPLANE_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_WPLANE"));
- RadioButton1->setPixmap(image1);
- RadioButton2->setPixmap(image2);
- RadioButton3->setPixmap(image3);
+ RadioButton1->setIcon(image1);
+ RadioButton2->setIcon(image2);
+ RadioButton3->setIcon(image3);
+
+ Group1 = new Ui::DlgRef_1Sel_QTD();
+ QWidget* aGroup1Widget = new QWidget(this);
+ Group1->setupUi(aGroup1Widget);
+ aGroup1Widget->setObjectName("Group1");
- Group1 = new DlgRef_1Sel_QTD(this, "Group1");
Group1->GroupBox1->setTitle(tr("GEOM_WPLANE_FACE"));
Group1->TextLabel1->setText(tr("GEOM_SELECTION"));
- Group1->PushButton1->setPixmap(image0);
+ Group1->PushButton1->setIcon(image0);
Group1->LineEdit1->setReadOnly( true );
- Group2 = new DlgRef_2Sel_QTD(this, "Group2");
+ Group2 = new Ui::DlgRef_2Sel_QTD();
+ QWidget* aGroup2Widget = new QWidget(this);
+ Group2->setupUi(aGroup2Widget);
+ aGroup2Widget->setObjectName("Group2");
+
Group2->GroupBox1->setTitle(tr("GEOM_WPLANE_VECTOR"));
Group2->TextLabel1->setText(tr("GEOM_WPLANE_VX"));
Group2->TextLabel2->setText(tr("GEOM_WPLANE_VZ"));
- Group2->PushButton1->setPixmap(image0);
- Group2->PushButton2->setPixmap(image0);
+ Group2->PushButton1->setIcon(image0);
+ Group2->PushButton2->setIcon(image0);
Group2->LineEdit1->setReadOnly( true );
Group2->LineEdit2->setReadOnly( true );
- Group3 = new DlgRef_3Check_QTD(this, "Group3");
+ Group3 = new Ui::DlgRef_3Check_QTD();
+ QWidget* aGroup3Widget = new QWidget(this);
+ Group3->setupUi(aGroup3Widget);
+ aGroup3Widget->setObjectName("Group3");
+
Group3->GroupBox1->setTitle(tr("GEOM_WPLANE_ORIGIN"));
Group3->RadioButton1->setText(tr("GEOM_WPLANE_OXY"));
Group3->RadioButton2->setText(tr("GEOM_WPLANE_OYZ"));
Group3->RadioButton3->setText(tr("GEOM_WPLANE_OZX"));
- Layout1->addWidget(Group1, 1, 0);
- Layout1->addWidget(Group2, 1, 0);
- Layout1->addWidget(Group3, 1, 0);
+ gridLayout1->addWidget(aGroup1Widget, 1, 0);
+ gridLayout1->addWidget(aGroup2Widget, 1, 0);
+ gridLayout1->addWidget(aGroup3Widget, 1, 0);
/***************************************************************/
- QGroupBox* aReverseGroupBox = new QGroupBox(this, "aReverseGroupBox");
- aReverseGroupBox->setTitle(tr(""));
- aReverseGroupBox->setColumnLayout(1, Qt::Horizontal);
- aReverseGroupBox->setInsideMargin(10);
-
- myReverseCB = new QCheckBox(aReverseGroupBox, "myReverseCB");
+ QFrame* aReverseGroupBox = new QFrame(this);
+ aReverseGroupBox->setObjectName("aReverseGroupBox");
+ aReverseGroupBox->setContentsMargins(10, 10, 10, 10);
+ QHBoxLayout* aReverseGroupBoxLayout = new QHBoxLayout( aReverseGroupBox );
+
+ myReverseCB = new QCheckBox(aReverseGroupBox);
+ myReverseCB->setObjectName("myReverseCB");
myReverseCB->setText(tr("GEOM_REVERSE_PLANE"));
+ aReverseGroupBoxLayout->addWidget(myReverseCB);
- Layout1->addWidget(aReverseGroupBox, 2, 0);
+ gridLayout1->addWidget(aReverseGroupBox, 2, 0);
setHelpFileName("working_plane.htm");
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- initName( tr( "GEOM_WPLANE" ) );
+ initName( tr( "GEOM_WPLANE" ).toStdString().c_str() );
ConstructorsClicked(0);
}
aMap.Add( GEOM_MARKER );
globalSelection( aMap );
- Group2->hide();
- Group3->hide();
+ ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
+ ::qobject_cast<QWidget*>( Group3->gridLayout->parent() )->hide();
resize(0, 0);
- Group1->show();
+ ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->show();
myEditCurrentArgument = Group1->LineEdit1;
Group1->LineEdit1->setText("");
{
globalSelection( GEOM_LINE );
- Group1->hide();
- Group3->hide();
+ ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->hide();
+ ::qobject_cast<QWidget*>( Group3->gridLayout->parent() )->hide();
resize(0, 0);
- Group2->show();
+ ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->show();
myEditCurrentArgument = Group2->LineEdit1;
Group2->LineEdit1->setText("");
}
case 2:
{
- Group1->hide();
- Group2->hide();
+ ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->hide();
+ ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
resize(0, 0);
- Group3->show();
+ ::qobject_cast<QWidget*>( Group3->gridLayout->parent() )->show();
Group3->RadioButton1->setChecked(true);
aOriginType = 1;
#include "DlgRef_2Sel_QTD.h"
#include "DlgRef_3Check_QTD.h"
+#include <gp_Ax3.hxx>
+
class QCheckBox;
//=================================================================================
public:
BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0 );
~BasicGUI_WorkingPlaneDlg();
virtual void closeEvent( QCloseEvent* e );
int aOriginType;
- DlgRef_1Sel_QTD* Group1;
- DlgRef_2Sel_QTD* Group2;
- DlgRef_3Check_QTD* Group3;
+ Ui::DlgRef_1Sel_QTD* Group1;
+ Ui::DlgRef_2Sel_QTD* Group2;
+ Ui::DlgRef_3Check_QTD* Group3;
QCheckBox* myReverseCB;
SUBDIRS += GEOMBase
SUBDIRS += GEOMToolsGUI
SUBDIRS += DisplayGUI
-#SUBDIRS += BasicGUI
+SUBDIRS += BasicGUI
#SUBDIRS += PrimitiveGUI
#SUBDIRS += GenerationGUI
#SUBDIRS += EntityGUI