Porting to Qt4.

This commit is contained in:
mkr 2007-07-09 10:12:14 +00:00
parent 162d5c03bd
commit 5887eb5b1a
13 changed files with 165 additions and 104 deletions

View File

@ -30,7 +30,6 @@
#include "PrimitiveGUI.h"
#include "GeometryGUI.h"
#include "SUIT_Session.h"
#include "SUIT_Desktop.h"
#include "SalomeApp_Application.h"

View File

@ -0,0 +1,44 @@
TEMPLATE = lib
TARGET = PrimitiveGUI
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
INCLUDEPATH += $${QT_INCLUDES} $${VTK_INCLUDES} $${CAS_CPPFLAGS} $${PYTHON_INCLUDES} $${BOOST_CPPFLAGS} $${KERNEL_CXXFLAGS} $${GUI_CXXFLAGS} $${CORBA_INCLUDES} ../GEOMGUI ../DlgRef ../GEOMBase ../OBJECT ../GEOMClient ../GEOMImpl ../GEOMFiltersSelection $$(GEOM_ROOT_DIR)/idl $$(GEOM_ROOT_DIR)/salome_adm/unix
LIBS += -L$$(GEOM_ROOT_DIR)/lib -lGEOMFiltersSelection -lGEOMBase
CONFIG -= debug release debug_and_release
CONFIG += qt thread debug dll shared
win32:DEFINES += WIN32
DEFINES += 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
SOURCES = PrimitiveGUI.cxx
SOURCES += PrimitiveGUI_BoxDlg.cxx
SOURCES += PrimitiveGUI_CylinderDlg.cxx
SOURCES += PrimitiveGUI_SphereDlg.cxx
SOURCES += PrimitiveGUI_TorusDlg.cxx
SOURCES += PrimitiveGUI_ConeDlg.cxx
includes.files = $$HEADERS
includes.path = ../../include
INSTALLS += includes

View File

@ -27,18 +27,19 @@
// $Header$
#include "PrimitiveGUI_BoxDlg.h"
#include "DlgRef_3Spin.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;
@ -50,28 +51,32 @@ using namespace std;
// TRUE to construct a modal dialog.
//=================================================================================
PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg(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_BOX_2P")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BOX_DXYZ")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
setCaption(tr("GEOM_BOX_TITLE"));
setWindowTitle(tr("GEOM_BOX_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_BOX"));
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_DIAGONAL_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);
GroupDimensions = new DlgRef_3Spin(this, "GroupDimensions");
GroupDimensions->GroupBox1->setTitle(tr("GEOM_BOX_OBJ"));
@ -79,8 +84,8 @@ PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg(GeometryGUI* theGeometryGUI, QWidget* p
GroupDimensions->TextLabel2->setText(tr("GEOM_DY"));
GroupDimensions->TextLabel3->setText(tr("GEOM_DZ"));
Layout1->addWidget(GroupPoints, 2, 0);
Layout1->addWidget(GroupDimensions, 2, 0);
gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
gridLayout1->addWidget(GroupDimensions, 2, 0);
/***************************************************************/
setHelpFileName("box.htm");
@ -149,7 +154,7 @@ void PrimitiveGUI_BoxDlg::Init()
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
initName( tr( "GEOM_BOX" ) );
initName( tr( "GEOM_BOX" ).toStdString().c_str() );
ConstructorsClicked(0);
}
@ -170,7 +175,7 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId)
GroupDimensions->hide();
resize(0, 0);
GroupPoints->show();
::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->show();
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit1->setText("");
@ -183,7 +188,7 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId)
}
case 1:
{
GroupPoints->hide();
::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->hide();
resize(0, 0);
GroupDimensions->show();

View File

@ -30,10 +30,11 @@
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel_QTD.h"
#include "DlgRef_3Spin.h"
using namespace std;
class DlgRef_3Spin;
//=================================================================================
// class : PrimitiveGUI_BoxDlg
// purpose :
@ -44,7 +45,7 @@ class PrimitiveGUI_BoxDlg : public GEOMBase_Skeleton
public:
PrimitiveGUI_BoxDlg(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);
~PrimitiveGUI_BoxDlg();
protected:
@ -61,7 +62,7 @@ private :
GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the vector */
DlgRef_2Sel_QTD* GroupPoints;
Ui::DlgRef_2Sel_QTD* GroupPoints;
DlgRef_3Spin* GroupDimensions;
private slots:

View File

@ -27,18 +27,20 @@
// $Header$
#include "PrimitiveGUI_ConeDlg.h"
#include "DlgRef_2Sel3Spin.h"
#include "DlgRef_3Spin.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;
//=================================================================================
@ -49,21 +51,21 @@ using namespace std;
// TRUE to construct a modal dialog.
//=================================================================================
PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(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_CONE_PV")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CONE_DXYZ")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_CONE_TITLE"));
setWindowTitle(tr("GEOM_CONE_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_CONE"));
RadioButton1->setPixmap(image0);
RadioButton2->setPixmap(image1);
RadioButton3->close(TRUE);
RadioButton1->setIcon(image0);
RadioButton2->setIcon(image1);
RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
RadioButton3->close();
GroupPoints = new DlgRef_2Sel3Spin(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
@ -72,8 +74,8 @@ PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(GeometryGUI* theGeometryGUI, QWidget*
GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS_I").arg("1"));
GroupPoints->TextLabel4->setText(tr("GEOM_RADIUS_I").arg("2"));
GroupPoints->TextLabel5->setText(tr("GEOM_HEIGHT"));
GroupPoints->PushButton1->setPixmap(image2);
GroupPoints->PushButton2->setPixmap(image2);
GroupPoints->PushButton1->setIcon(image2);
GroupPoints->PushButton2->setIcon(image2);
GroupDimensions = new DlgRef_3Spin(this, "GroupDimensions");
GroupDimensions->GroupBox1->setTitle(tr("GEOM_BOX_OBJ"));
@ -81,8 +83,8 @@ PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(GeometryGUI* theGeometryGUI, QWidget*
GroupDimensions->TextLabel2->setText(tr("GEOM_RADIUS_I").arg("2"));
GroupDimensions->TextLabel3->setText(tr("GEOM_HEIGHT"));
Layout1->addWidget(GroupPoints, 2, 0);
Layout1->addWidget(GroupDimensions, 2, 0);
gridLayout1->addWidget(GroupPoints, 2, 0);
gridLayout1->addWidget(GroupDimensions, 2, 0);
/***************************************************************/
setHelpFileName( "cone.htm" );
@ -162,7 +164,7 @@ void PrimitiveGUI_ConeDlg::Init()
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
initName( tr( "GEOM_CONE" ) );
initName( tr( "GEOM_CONE" ).toStdString().c_str() );
ConstructorsClicked(0);
}

View File

@ -29,8 +29,9 @@
#define DIALOGBOX_CONE_H
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel3Spin.h"
#include "DlgRef_3Spin.h"
class DlgRef_2Sel3Spin;
class DlgRef_3Spin;
//=================================================================================
// class : PrimitiveGUI_ConeDlg
@ -42,7 +43,7 @@ class PrimitiveGUI_ConeDlg : public GEOMBase_Skeleton
public:
PrimitiveGUI_ConeDlg(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);
~PrimitiveGUI_ConeDlg();
protected:

View File

@ -27,18 +27,20 @@
// $Header$
#include "PrimitiveGUI_CylinderDlg.h"
#include "DlgRef_2Sel2Spin.h"
#include "DlgRef_2Spin.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;
//=================================================================================
@ -49,21 +51,21 @@ using namespace std;
// TRUE to construct a modal dialog.
//=================================================================================
PrimitiveGUI_CylinderDlg::PrimitiveGUI_CylinderDlg(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_CYLINDER_PV")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CYLINDER_DXYZ")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_CYLINDER_TITLE"));
setWindowTitle(tr("GEOM_CYLINDER_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_CYLINDER"));
RadioButton1->setPixmap(image0);
RadioButton2->setPixmap(image1);
RadioButton3->close(TRUE);
RadioButton1->setIcon(image0);
RadioButton2->setIcon(image1);
RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
RadioButton3->close();
GroupPoints = new DlgRef_2Sel2Spin(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
@ -71,16 +73,16 @@ PrimitiveGUI_CylinderDlg::PrimitiveGUI_CylinderDlg(GeometryGUI* theGeometryGUI,
GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR"));
GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS"));
GroupPoints->TextLabel4->setText(tr("GEOM_HEIGHT"));
GroupPoints->PushButton1->setPixmap(image2);
GroupPoints->PushButton2->setPixmap(image2);
GroupPoints->PushButton1->setIcon(image2);
GroupPoints->PushButton2->setIcon(image2);
GroupDimensions = new DlgRef_2Spin(this, "GroupDimensions");
GroupDimensions->GroupBox1->setTitle(tr("GEOM_BOX_OBJ"));
GroupDimensions->TextLabel1->setText(tr("GEOM_RADIUS"));
GroupDimensions->TextLabel2->setText(tr("GEOM_HEIGHT"));
Layout1->addWidget(GroupPoints, 2, 0);
Layout1->addWidget(GroupDimensions, 2, 0);
gridLayout1->addWidget(GroupPoints, 2, 0);
gridLayout1->addWidget(GroupDimensions, 2, 0);
/***************************************************************/
setHelpFileName("cylinder.htm");
@ -155,7 +157,7 @@ void PrimitiveGUI_CylinderDlg::Init()
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
initName( tr( "GEOM_CYLINDER" ) );
initName( tr( "GEOM_CYLINDER" ).toStdString().c_str() );
ConstructorsClicked(0);
}

View File

@ -29,8 +29,9 @@
#define DIALOGBOX_CYLINDER_H
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel2Spin.h"
#include "DlgRef_2Spin.h"
class DlgRef_2Sel2Spin;
class DlgRef_2Spin;
//=================================================================================
@ -43,7 +44,7 @@ class PrimitiveGUI_CylinderDlg : public GEOMBase_Skeleton
public:
PrimitiveGUI_CylinderDlg(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);
~PrimitiveGUI_CylinderDlg();
protected:

View File

@ -27,18 +27,20 @@
// $Header$
#include "PrimitiveGUI_SphereDlg.h"
#include "DlgRef_1Sel1Spin.h"
#include "DlgRef_1Spin.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;
//=================================================================================
@ -49,34 +51,34 @@ using namespace std;
// TRUE to construct a modal dialog.
//=================================================================================
PrimitiveGUI_SphereDlg::PrimitiveGUI_SphereDlg(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_SPHERE_P")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SPHERE_DXYZ")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_SPHERE_TITLE"));
setWindowTitle(tr("GEOM_SPHERE_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_SPHERE"));
RadioButton1->setPixmap(image0);
RadioButton2->setPixmap(image1);
RadioButton3->close(TRUE);
RadioButton1->setIcon(image0);
RadioButton2->setIcon(image1);
RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
RadioButton3->close();
GroupPoints = new DlgRef_1Sel1Spin(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_SPHERE_CR"));
GroupPoints->TextLabel1->setText(tr("GEOM_CENTER"));
GroupPoints->TextLabel2->setText(tr("GEOM_RADIUS"));
GroupPoints->PushButton1->setPixmap(image2);
GroupPoints->PushButton1->setIcon(image2);
GroupDimensions = new DlgRef_1Spin(this, "GroupDimensions");
GroupDimensions->GroupBox1->setTitle(tr("GEOM_SPHERE_RO"));
GroupDimensions->TextLabel1->setText(tr("GEOM_RADIUS"));
Layout1->addWidget(GroupPoints, 2, 0);
Layout1->addWidget(GroupDimensions, 2, 0);
gridLayout1->addWidget(GroupPoints, 2, 0);
gridLayout1->addWidget(GroupDimensions, 2, 0);
/***************************************************************/
setHelpFileName("sphere.htm");
@ -134,7 +136,7 @@ void PrimitiveGUI_SphereDlg::Init()
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
initName(tr("GEOM_SPHERE"));
initName(tr("GEOM_SPHERE").toStdString().c_str());
ConstructorsClicked(0);
}

View File

@ -29,8 +29,9 @@
#define DIALOGBOX_SPHERE_H
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel1Spin.h"
#include "DlgRef_1Spin.h"
class DlgRef_1Sel1Spin;
class DlgRef_1Spin;
//=================================================================================
@ -43,7 +44,7 @@ class PrimitiveGUI_SphereDlg : public GEOMBase_Skeleton
public:
PrimitiveGUI_SphereDlg(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);
~PrimitiveGUI_SphereDlg();
protected:

View File

@ -27,18 +27,20 @@
// $Header$
#include "PrimitiveGUI_TorusDlg.h"
#include "DlgRef_2Sel2Spin.h"
#include "DlgRef_2Spin.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;
//=================================================================================
@ -49,21 +51,21 @@ using namespace std;
// TRUE to construct a modal dialog.
//=================================================================================
PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg(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_TORUS_PV")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_TORUS_DXYZ")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_TORUS_TITLE"));
setWindowTitle(tr("GEOM_TORUS_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_TORUS"));
RadioButton1->setPixmap(image0);
RadioButton2->setPixmap(image1);
RadioButton3->close(TRUE);
RadioButton1->setIcon(image0);
RadioButton2->setIcon(image1);
RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
RadioButton3->close();
GroupPoints = new DlgRef_2Sel2Spin(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
@ -71,16 +73,16 @@ PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg(GeometryGUI* theGeometryGUI, QWidge
GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR"));
GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS_I").arg("1"));
GroupPoints->TextLabel4->setText(tr("GEOM_RADIUS_I").arg("2"));
GroupPoints->PushButton1->setPixmap(image2);
GroupPoints->PushButton2->setPixmap(image2);
GroupPoints->PushButton1->setIcon(image2);
GroupPoints->PushButton2->setIcon(image2);
GroupDimensions = new DlgRef_2Spin(this, "GroupDimensions");
GroupDimensions->GroupBox1->setTitle(tr("GEOM_BOX_OBJ"));
GroupDimensions->TextLabel1->setText(tr("GEOM_RADIUS_I").arg("1"));
GroupDimensions->TextLabel2->setText(tr("GEOM_RADIUS_I").arg("2"));
Layout1->addWidget(GroupPoints, 2, 0);
Layout1->addWidget(GroupDimensions, 2, 0);
gridLayout1->addWidget(GroupPoints, 2, 0);
gridLayout1->addWidget(GroupDimensions, 2, 0);
/***************************************************************/
setHelpFileName("turus.htm");
@ -151,7 +153,7 @@ void PrimitiveGUI_TorusDlg::Init()
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
initName( tr( "GEOM_TORUS" ) );
initName( tr( "GEOM_TORUS" ).toStdString().c_str() );
ConstructorsClicked(0);
}

View File

@ -29,8 +29,9 @@
#define DIALOGBOX_TORUS_H
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel2Spin.h"
#include "DlgRef_2Spin.h"
class DlgRef_2Sel2Spin;
class DlgRef_2Spin;
//=================================================================================
@ -43,7 +44,7 @@ class PrimitiveGUI_TorusDlg : public GEOMBase_Skeleton
public:
PrimitiveGUI_TorusDlg(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);
~PrimitiveGUI_TorusDlg();
protected:

View File

@ -27,7 +27,7 @@ SUBDIRS += GEOMBase
SUBDIRS += GEOMToolsGUI
SUBDIRS += DisplayGUI
SUBDIRS += BasicGUI
#SUBDIRS += PrimitiveGUI
SUBDIRS += PrimitiveGUI
#SUBDIRS += GenerationGUI
#SUBDIRS += EntityGUI
#SUBDIRS += BuildGUI