mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-01 02:35:37 +05:00
*** empty log message ***
This commit is contained in:
parent
7a04da0b3c
commit
496cc5f9ba
@ -36,14 +36,19 @@ docdir = $(datadir)/doc/@PACKAGE@
|
|||||||
$(MOC) $< -o $@
|
$(MOC) $< -o $@
|
||||||
|
|
||||||
# qm-files generation
|
# qm-files generation
|
||||||
%.qm: %.po
|
%.qm: %.ts
|
||||||
$(MSG2QM) $< $@
|
$(LRELEASE) $< -qm $@
|
||||||
|
|
||||||
|
# uic-files generation
|
||||||
|
ui_%.h: %.ui
|
||||||
|
$(UIC) -o $@ $<
|
||||||
|
|
||||||
EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.po)
|
EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.po)
|
||||||
|
|
||||||
mostlyclean-local:
|
mostlyclean-local:
|
||||||
rm -f @builddir@/*_moc.cxx
|
rm -f @builddir@/*_moc.cxx
|
||||||
rm -f @builddir@/*.qm
|
rm -f @builddir@/*.qm
|
||||||
|
rm -f @builddir@/ui_*.h
|
||||||
|
|
||||||
# tests
|
# tests
|
||||||
tests: unittest
|
tests: unittest
|
||||||
|
24
configure.ac
24
configure.ac
@ -74,7 +74,7 @@ dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairie
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo ---------------------------------------------
|
echo ---------------------------------------------
|
||||||
echo Coniguring production
|
echo Configuring production
|
||||||
echo ---------------------------------------------
|
echo ---------------------------------------------
|
||||||
echo
|
echo
|
||||||
AC_ENABLE_DEBUG(yes)
|
AC_ENABLE_DEBUG(yes)
|
||||||
@ -234,14 +234,6 @@ echo
|
|||||||
|
|
||||||
CHECK_QT
|
CHECK_QT
|
||||||
|
|
||||||
echo
|
|
||||||
echo ---------------------------------------------
|
|
||||||
echo testing msg2qm
|
|
||||||
echo ---------------------------------------------
|
|
||||||
echo
|
|
||||||
|
|
||||||
CHECK_MSG2QM
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo ---------------------------------------------
|
echo ---------------------------------------------
|
||||||
echo testing VTK
|
echo testing VTK
|
||||||
@ -304,12 +296,20 @@ fi
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo ---------------------------------------------
|
echo ---------------------------------------------
|
||||||
echo Testing Kernel
|
echo Testing SALOME KERNEL module
|
||||||
echo ---------------------------------------------
|
echo ---------------------------------------------
|
||||||
echo
|
echo
|
||||||
|
|
||||||
CHECK_KERNEL
|
CHECK_KERNEL
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo ---------------------------------------------
|
||||||
|
echo Testing SALOME GUI module
|
||||||
|
echo ---------------------------------------------
|
||||||
|
echo
|
||||||
|
|
||||||
|
CHECK_SALOME_GUI
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo ---------------------------------------------
|
echo ---------------------------------------------
|
||||||
echo Summary
|
echo Summary
|
||||||
@ -317,7 +317,7 @@ echo ---------------------------------------------
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
echo Configure
|
echo Configure
|
||||||
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok"
|
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok SalomeGUI_ok"
|
||||||
|
|
||||||
for var in $variables
|
for var in $variables
|
||||||
do
|
do
|
||||||
@ -330,7 +330,7 @@ echo "Default ORB : $DEFAULT_ORB"
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
dnl We don t need to say when we re entering directories if we re using
|
dnl We don t need to say when we re entering directories if we re using
|
||||||
dnl GNU make becuase make does it for us.
|
dnl GNU make because make does it for us.
|
||||||
if test "X$GMAKE" = "Xyes"; then
|
if test "X$GMAKE" = "Xyes"; then
|
||||||
AC_SUBST(SETX) SETX=":"
|
AC_SUBST(SETX) SETX=":"
|
||||||
else
|
else
|
||||||
|
@ -19,28 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI.cxx
|
// File : BasicGUI.cxx
|
||||||
// Author : Damien COQUERET
|
// Author : Damien COQUERET, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI.h"
|
#include "BasicGUI.h"
|
||||||
#include "GeometryGUI.h"
|
|
||||||
|
|
||||||
#include "SUIT_Session.h"
|
|
||||||
#include "SUIT_Desktop.h"
|
|
||||||
#include "SUIT_ViewWindow.h"
|
|
||||||
#include "OCCViewer_ViewWindow.h"
|
|
||||||
#include "OCCViewer_ViewModel.h"
|
|
||||||
#include "OCCViewer_ViewManager.h"
|
|
||||||
#include "OCCViewer_ViewPort3d.h"
|
|
||||||
|
|
||||||
#include <BRep_Tool.hxx>
|
|
||||||
#include <ProjLib.hxx>
|
|
||||||
#include <ElSLib.hxx>
|
|
||||||
#include <TopoDS.hxx>
|
|
||||||
|
|
||||||
#include "BasicGUI_PointDlg.h" // Method POINT
|
#include "BasicGUI_PointDlg.h" // Method POINT
|
||||||
#include "BasicGUI_LineDlg.h" // Method LINE
|
#include "BasicGUI_LineDlg.h" // Method LINE
|
||||||
@ -53,16 +36,29 @@
|
|||||||
#include "BasicGUI_WorkingPlaneDlg.h" // Method WORKING PLANE
|
#include "BasicGUI_WorkingPlaneDlg.h" // Method WORKING PLANE
|
||||||
#include "BasicGUI_MarkerDlg.h" // Method REPAIR
|
#include "BasicGUI_MarkerDlg.h" // Method REPAIR
|
||||||
|
|
||||||
#include <QMouseEvent>
|
#include <GeometryGUI.h>
|
||||||
|
|
||||||
using namespace std;
|
#include <SUIT_Session.h>
|
||||||
|
#include <SUIT_Desktop.h>
|
||||||
|
#include <SUIT_ViewWindow.h>
|
||||||
|
#include <OCCViewer_ViewWindow.h>
|
||||||
|
#include <OCCViewer_ViewModel.h>
|
||||||
|
#include <OCCViewer_ViewManager.h>
|
||||||
|
#include <OCCViewer_ViewPort3d.h>
|
||||||
|
|
||||||
|
#include <BRep_Tool.hxx>
|
||||||
|
#include <ProjLib.hxx>
|
||||||
|
#include <ElSLib.hxx>
|
||||||
|
#include <TopoDS.hxx>
|
||||||
|
|
||||||
|
#include <QMouseEvent>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : BasicGUI()
|
// function : BasicGUI()
|
||||||
// purpose : Constructor
|
// purpose : Constructor
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
BasicGUI::BasicGUI( GeometryGUI* parent ) :
|
BasicGUI::BasicGUI( GeometryGUI* parent )
|
||||||
GEOMGUI(parent)
|
: GEOMGUI( parent )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,8 +80,7 @@ bool BasicGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
|||||||
getGeometryGUI()->EmitSignalDeactivateDialog();
|
getGeometryGUI()->EmitSignalDeactivateDialog();
|
||||||
QDialog* aDlg = NULL;
|
QDialog* aDlg = NULL;
|
||||||
|
|
||||||
switch ( theCommandID )
|
switch ( theCommandID ) {
|
||||||
{
|
|
||||||
case 4011: // POINT
|
case 4011: // POINT
|
||||||
aDlg = new BasicGUI_PointDlg( getGeometryGUI(), parent, "" );
|
aDlg = new BasicGUI_PointDlg( getGeometryGUI(), parent, "" );
|
||||||
break;
|
break;
|
||||||
@ -139,11 +134,9 @@ bool BasicGUI::OnMousePress( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWin
|
|||||||
// Create Point dialog, OCC viewer
|
// Create Point dialog, OCC viewer
|
||||||
if ( aDlg && ( QString( aDlg->metaObject()->className() ).compare( "BasicGUI_PointDlg" ) == 0 ) &&
|
if ( aDlg && ( QString( aDlg->metaObject()->className() ).compare( "BasicGUI_PointDlg" ) == 0 ) &&
|
||||||
theViewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() &&
|
theViewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() &&
|
||||||
pe->modifiers() != Qt::ControlModifier )
|
pe->modifiers() != Qt::ControlModifier ) {
|
||||||
{
|
|
||||||
BasicGUI_PointDlg* aPntDlg = (BasicGUI_PointDlg*) aDlg;
|
BasicGUI_PointDlg* aPntDlg = (BasicGUI_PointDlg*) aDlg;
|
||||||
if ( aPntDlg->acceptMouseEvent() )
|
if ( aPntDlg->acceptMouseEvent() ) {
|
||||||
{
|
|
||||||
OCCViewer_Viewer* anOCCViewer =
|
OCCViewer_Viewer* anOCCViewer =
|
||||||
( (OCCViewer_ViewManager*)( theViewWindow->getViewManager() ) )->getOCCViewer();
|
( (OCCViewer_ViewManager*)( theViewWindow->getViewManager() ) )->getOCCViewer();
|
||||||
Handle(AIS_InteractiveContext) ic = anOCCViewer->getAISContext();
|
Handle(AIS_InteractiveContext) ic = anOCCViewer->getAISContext();
|
||||||
@ -157,14 +150,12 @@ bool BasicGUI::OnMousePress( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWin
|
|||||||
ic->Select(); // New selection
|
ic->Select(); // New selection
|
||||||
|
|
||||||
ic->InitSelected();
|
ic->InitSelected();
|
||||||
if ( ic->MoreSelected() )
|
if ( ic->MoreSelected() ) {
|
||||||
{
|
|
||||||
TopoDS_Shape aShape = ic->SelectedShape();
|
TopoDS_Shape aShape = ic->SelectedShape();
|
||||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
|
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
|
||||||
aPnt = BRep_Tool::Pnt( TopoDS::Vertex( ic->SelectedShape() ) );
|
aPnt = BRep_Tool::Pnt( TopoDS::Vertex( ic->SelectedShape() ) );
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
|
OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
|
||||||
aPnt = ConvertClickToPoint( pe->x(), pe->y(), vp->getView() );
|
aPnt = ConvertClickToPoint( pe->x(), pe->y(), vp->getView() );
|
||||||
}
|
}
|
||||||
@ -207,7 +198,7 @@ gp_Pnt BasicGUI::ConvertClickToPoint( int x, int y, Handle(V3d_View) aView)
|
|||||||
//=====================================================================================
|
//=====================================================================================
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
GEOM_BASICGUI_EXPORT
|
BASICGUI_EXPORT
|
||||||
GEOMGUI* GetLibGUI( GeometryGUI* parent )
|
GEOMGUI* GetLibGUI( GeometryGUI* parent )
|
||||||
{
|
{
|
||||||
return new BasicGUI( parent );
|
return new BasicGUI( parent );
|
||||||
|
@ -19,34 +19,32 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI.h
|
// File : BasicGUI.h
|
||||||
// Author : Damien COQUERET
|
// Author : Damien COQUERET, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef BASICGUI_H
|
#ifndef BASICGUI_H
|
||||||
#define BASICGUI_H
|
#define BASICGUI_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMGUI.h"
|
#include <GEOMGUI.h>
|
||||||
#include <V3d_View.hxx>
|
#include <V3d_View.hxx>
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI
|
// class : BasicGUI
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI : public GEOMGUI
|
class BASICGUI_EXPORT BasicGUI : public GEOMGUI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BasicGUI( GeometryGUI* parent );
|
BasicGUI( GeometryGUI* );
|
||||||
~BasicGUI();
|
~BasicGUI();
|
||||||
|
|
||||||
bool OnGUIEvent(int theCommandID, SUIT_Desktop* parent);
|
bool OnGUIEvent( int, SUIT_Desktop* );
|
||||||
bool OnMousePress(QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* theViewWindow);
|
bool OnMousePress( QMouseEvent*, SUIT_Desktop*, SUIT_ViewWindow* );
|
||||||
|
|
||||||
gp_Pnt ConvertClickToPoint( int x, int y, Handle(V3d_View) aView );
|
gp_Pnt ConvertClickToPoint( int, int, Handle(V3d_View) );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // BASICGUI_H
|
||||||
|
@ -19,26 +19,22 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_ArcDlg.cxx
|
// File : BasicGUI_ArcDlg.cxx
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI_ArcDlg.h"
|
#include "BasicGUI_ArcDlg.h"
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "GEOMBase.h"
|
#include <GeometryGUI.h>
|
||||||
|
#include <GEOMBase.h>
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <SUIT_ResourceMgr.h>
|
||||||
#include "SUIT_Session.h"
|
#include <SUIT_Session.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <SalomeApp_Application.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_ArcDlg()
|
// class : BasicGUI_ArcDlg()
|
||||||
@ -49,7 +45,7 @@ using namespace std;
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_ArcDlg::BasicGUI_ArcDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_ArcDlg::BasicGUI_ArcDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
const char* name, bool modal, Qt::WindowFlags fl )
|
const char* name, bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
: GEOMBase_Skeleton( theGeometryGUI, parent, name, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_ARC" ) ) );
|
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 image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_ARC_CENTER" ) ) );
|
||||||
@ -58,21 +54,18 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
|||||||
setWindowTitle( tr( "GEOM_ARC_TITLE" ) );
|
setWindowTitle( tr( "GEOM_ARC_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_ARC"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_ARC" ) );
|
||||||
RadioButton1->setIcon(image0);
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->setIcon(image1);
|
mainFrame()->RadioButton2->setIcon( image1 );
|
||||||
RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
RadioButton3->close();
|
mainFrame()->RadioButton3->close();
|
||||||
|
|
||||||
Group3Pnts = new Ui::DlgRef_3Sel_QTD();
|
Group3Pnts = new DlgRef_3Sel( centralWidget() );
|
||||||
QWidget* aGroup3PntsWidget = new QWidget(this);
|
|
||||||
Group3Pnts->setupUi(aGroup3PntsWidget);
|
|
||||||
aGroup3PntsWidget->setObjectName("Group3Pnts");
|
|
||||||
|
|
||||||
Group3Pnts->GroupBox1->setTitle( tr( "GEOM_POINTS" ) );
|
Group3Pnts->GroupBox1->setTitle( tr( "GEOM_POINTS" ) );
|
||||||
Group3Pnts->TextLabel1->setText(tr("GEOM_POINT_I").arg("1"));
|
Group3Pnts->TextLabel1->setText( tr( "GEOM_POINT_I" ).arg( 1 ) );
|
||||||
Group3Pnts->TextLabel2->setText(tr("GEOM_POINT_I").arg("2"));
|
Group3Pnts->TextLabel2->setText( tr( "GEOM_POINT_I" ).arg( 2 ) );
|
||||||
Group3Pnts->TextLabel3->setText(tr("GEOM_POINT_I").arg("3"));
|
Group3Pnts->TextLabel3->setText( tr( "GEOM_POINT_I" ).arg( 3 ) );
|
||||||
|
|
||||||
Group3Pnts->LineEdit1->setReadOnly( true );
|
Group3Pnts->LineEdit1->setReadOnly( true );
|
||||||
Group3Pnts->LineEdit2->setReadOnly( true );
|
Group3Pnts->LineEdit2->setReadOnly( true );
|
||||||
@ -83,10 +76,7 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
|||||||
Group3Pnts->PushButton3->setIcon(image2);
|
Group3Pnts->PushButton3->setIcon(image2);
|
||||||
|
|
||||||
|
|
||||||
Group3Pnts2 = new Ui::DlgRef_3Sel1Check_QTD();
|
Group3Pnts2 = new DlgRef_3Sel1Check( centralWidget() );
|
||||||
QWidget* aGroup3Pnts2Widget = new QWidget(this);
|
|
||||||
Group3Pnts2->setupUi(aGroup3Pnts2Widget);
|
|
||||||
aGroup3Pnts2Widget->setObjectName("Group3Pnts2");
|
|
||||||
|
|
||||||
Group3Pnts2->GroupBox1->setTitle( tr( "GEOM_POINTS" ) );
|
Group3Pnts2->GroupBox1->setTitle( tr( "GEOM_POINTS" ) );
|
||||||
Group3Pnts2->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) );
|
Group3Pnts2->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) );
|
||||||
@ -101,10 +91,12 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
|||||||
Group3Pnts2->PushButton2->setIcon( image2 );
|
Group3Pnts2->PushButton2->setIcon( image2 );
|
||||||
Group3Pnts2->PushButton3->setIcon( image2 );
|
Group3Pnts2->PushButton3->setIcon( image2 );
|
||||||
|
|
||||||
Group3Pnts2->radioButton4->setText(tr("GEOM_REVERSE"));
|
Group3Pnts2->CheckButton1->setText( tr( "GEOM_REVERSE" ) );
|
||||||
|
|
||||||
gridLayout1->addWidget( aGroup3PntsWidget, 2, 0 );
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
gridLayout1->addWidget( aGroup3Pnts2Widget, 2, 0 );
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( Group3Pnts );
|
||||||
|
layout->addWidget( Group3Pnts2 );
|
||||||
|
|
||||||
setHelpFileName( "arc.htm" );
|
setHelpFileName( "arc.htm" );
|
||||||
|
|
||||||
@ -136,17 +128,17 @@ void BasicGUI_ArcDlg::Init()
|
|||||||
myEditCurrentArgument->setFocus();
|
myEditCurrentArgument->setFocus();
|
||||||
|
|
||||||
myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
|
myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
|
||||||
Group3Pnts2->radioButton4->setChecked(FALSE);
|
Group3Pnts2->CheckButton1->setChecked( false );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
|
|
||||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
connect( Group3Pnts->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( Group3Pnts->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( Group3Pnts->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( Group3Pnts->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
@ -164,12 +156,12 @@ void BasicGUI_ArcDlg::Init()
|
|||||||
connect( Group3Pnts2->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( Group3Pnts2->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
connect( Group3Pnts2->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( Group3Pnts2->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
|
|
||||||
connect(Group3Pnts2->radioButton4, SIGNAL(stateChanged(int)), this, SLOT(ReverseSense(int)));
|
connect( Group3Pnts2->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( ReverseSense() ) );
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_ARC" ).toLatin1().constData() );
|
initName( tr( "GEOM_ARC" ) );
|
||||||
|
|
||||||
|
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
@ -228,23 +220,19 @@ bool BasicGUI_ArcDlg::ClickOnApply()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_ArcDlg::SelectionIntoArgument()
|
void BasicGUI_ArcDlg::SelectionIntoArgument()
|
||||||
{
|
{
|
||||||
if ((getConstructorId() != 0) && (getConstructorId() != 1))
|
if ( getConstructorId() != 0 && getConstructorId() != 1 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
myEditCurrentArgument->setText( "" );
|
myEditCurrentArgument->setText( "" );
|
||||||
if ( IObjectCount() != 1 ) {
|
if ( IObjectCount() != 1 ) {
|
||||||
switch (getConstructorId())
|
switch ( getConstructorId() ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
|
||||||
if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil();
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 1:
|
case 1:
|
||||||
{
|
|
||||||
if ( myEditCurrentArgument == Group3Pnts2->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
if ( myEditCurrentArgument == Group3Pnts2->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil();
|
||||||
@ -252,24 +240,18 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// nbSel == 1
|
// nbSel == 1
|
||||||
Standard_Boolean aRes = Standard_False;
|
Standard_Boolean aRes = Standard_False;
|
||||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
||||||
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
|
||||||
{
|
switch ( getConstructorId() ) {
|
||||||
switch (getConstructorId())
|
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = aSelectedObject;
|
if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = aSelectedObject;
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = aSelectedObject;
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = aSelectedObject;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 1:
|
case 1:
|
||||||
{
|
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if ( myEditCurrentArgument == Group3Pnts2->LineEdit1 ) myPoint1 = aSelectedObject;
|
if ( myEditCurrentArgument == Group3Pnts2->LineEdit1 ) myPoint1 = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit2 ) myPoint2 = aSelectedObject;
|
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit2 ) myPoint2 = aSelectedObject;
|
||||||
@ -277,7 +259,6 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
@ -290,23 +271,18 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
|||||||
void BasicGUI_ArcDlg::SetEditCurrentArgument()
|
void BasicGUI_ArcDlg::SetEditCurrentArgument()
|
||||||
{
|
{
|
||||||
QPushButton* send = (QPushButton*)sender();
|
QPushButton* send = (QPushButton*)sender();
|
||||||
switch (getConstructorId())
|
switch ( getConstructorId() ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
|
||||||
if ( send == Group3Pnts->PushButton1 ) myEditCurrentArgument = Group3Pnts->LineEdit1;
|
if ( send == Group3Pnts->PushButton1 ) myEditCurrentArgument = Group3Pnts->LineEdit1;
|
||||||
else if ( send == Group3Pnts->PushButton2 ) myEditCurrentArgument = Group3Pnts->LineEdit2;
|
else if ( send == Group3Pnts->PushButton2 ) myEditCurrentArgument = Group3Pnts->LineEdit2;
|
||||||
else if ( send == Group3Pnts->PushButton3 ) myEditCurrentArgument = Group3Pnts->LineEdit3;
|
else if ( send == Group3Pnts->PushButton3 ) myEditCurrentArgument = Group3Pnts->LineEdit3;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 1:
|
case 1:
|
||||||
{
|
|
||||||
if ( send == Group3Pnts2->PushButton1 ) myEditCurrentArgument = Group3Pnts2->LineEdit1;
|
if ( send == Group3Pnts2->PushButton1 ) myEditCurrentArgument = Group3Pnts2->LineEdit1;
|
||||||
else if ( send == Group3Pnts2->PushButton2 ) myEditCurrentArgument = Group3Pnts2->LineEdit2;
|
else if ( send == Group3Pnts2->PushButton2 ) myEditCurrentArgument = Group3Pnts2->LineEdit2;
|
||||||
else if ( send == Group3Pnts2->PushButton3 ) myEditCurrentArgument = Group3Pnts2->LineEdit3;
|
else if ( send == Group3Pnts2->PushButton3 ) myEditCurrentArgument = Group3Pnts2->LineEdit3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
myEditCurrentArgument->setFocus();
|
myEditCurrentArgument->setFocus();
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
}
|
}
|
||||||
@ -320,8 +296,7 @@ void BasicGUI_ArcDlg::LineEditReturnPressed()
|
|||||||
{
|
{
|
||||||
QLineEdit* send = (QLineEdit*)sender();
|
QLineEdit* send = (QLineEdit*)sender();
|
||||||
if ( send == Group3Pnts->LineEdit1 || send == Group3Pnts->LineEdit2 || send == Group3Pnts->LineEdit3 ||
|
if ( send == Group3Pnts->LineEdit1 || send == Group3Pnts->LineEdit2 || send == Group3Pnts->LineEdit3 ||
|
||||||
send == Group3Pnts2->LineEdit1 || send == Group3Pnts2->LineEdit2 || send == Group3Pnts2->LineEdit3 )
|
send == Group3Pnts2->LineEdit1 || send == Group3Pnts2->LineEdit2 || send == Group3Pnts2->LineEdit3 ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument = send;
|
myEditCurrentArgument = send;
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
}
|
}
|
||||||
@ -367,9 +342,9 @@ void BasicGUI_ArcDlg::DeactivateActiveDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_ArcDlg::enterEvent(QEvent* e)
|
void BasicGUI_ArcDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,8 +385,7 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects )
|
|||||||
bool res = false;
|
bool res = false;
|
||||||
GEOM::GEOM_Object_var anObj;
|
GEOM::GEOM_Object_var anObj;
|
||||||
|
|
||||||
switch (getConstructorId())
|
switch ( getConstructorId() ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
||||||
@ -422,8 +396,7 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects )
|
|||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
bool Sense;
|
bool Sense = Group3Pnts2->CheckButton1->isChecked();
|
||||||
(Group3Pnts2->radioButton4->isChecked()) ? Sense=true : Sense = false;
|
|
||||||
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
||||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeArcCenter( myPoint1, myPoint2, myPoint3, Sense );
|
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeArcCenter( myPoint1, myPoint2, myPoint3, Sense );
|
||||||
res = true;
|
res = true;
|
||||||
@ -452,30 +425,33 @@ void BasicGUI_ArcDlg::closeEvent( QCloseEvent* e )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId )
|
void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId )
|
||||||
{
|
{
|
||||||
|
|
||||||
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
||||||
|
|
||||||
switch (constructorId)
|
switch ( constructorId ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->show();
|
Group3Pnts2->hide();
|
||||||
resize(0, 0);
|
Group3Pnts->show();
|
||||||
::qobject_cast<QWidget*>( Group3Pnts2->gridLayout->parent() )->hide();
|
|
||||||
|
|
||||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
|
SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->hide();
|
Group3Pnts->hide();
|
||||||
resize(0, 0);
|
Group3Pnts2->show();
|
||||||
::qobject_cast<QWidget*>( Group3Pnts2->gridLayout->parent() )->show();
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize( minimumSize() );
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -483,7 +459,7 @@ void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId )
|
|||||||
// function : ReverseSense()
|
// function : ReverseSense()
|
||||||
// purpose : Orientation of the arc
|
// purpose : Orientation of the arc
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_ArcDlg::ReverseSense(int sense)
|
void BasicGUI_ArcDlg::ReverseSense()
|
||||||
{
|
{
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
|
@ -19,50 +19,51 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_ArcDlg.h
|
// File : BasicGUI_ArcDlg.h
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef DIALOGBOX_ARC_H
|
#ifndef BASICGUI_ARCDLG_H
|
||||||
#define DIALOGBOX_ARC_H
|
#define BASICGUI_ARCDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
#include "DlgRef_3Sel_QTD.h"
|
|
||||||
#include "DlgRef_3Sel1Check_QTD.h"
|
class DlgRef_3Sel;
|
||||||
|
class DlgRef_3Sel1Check;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_ArcDlg
|
// class : BasicGUI_ArcDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_ArcDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_ArcDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_ArcDlg( GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
BasicGUI_ArcDlg( GeometryGUI*, QWidget* = 0,
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0 );
|
const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
~BasicGUI_ArcDlg();
|
~BasicGUI_ArcDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
|
|
||||||
|
private:
|
||||||
int myConstructorId;
|
int myConstructorId;
|
||||||
GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
|
GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
|
||||||
|
|
||||||
Ui::DlgRef_3Sel_QTD* Group3Pnts;
|
DlgRef_3Sel* Group3Pnts;
|
||||||
Ui::DlgRef_3Sel1Check_QTD* Group3Pnts2;
|
DlgRef_3Sel1Check* Group3Pnts2;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
@ -75,7 +76,7 @@ private slots:
|
|||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void ReverseSense(int);
|
void ReverseSense();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_ARC_H
|
#endif // BASICGUI_ARCDLG_H
|
||||||
|
@ -19,26 +19,23 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_CircleDlg.cxx
|
// File : BasicGUI_CircleDlg.cxx
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI_CircleDlg.h"
|
#include "BasicGUI_CircleDlg.h"
|
||||||
#include "DlgRef_2Sel1Spin.h"
|
|
||||||
#include "DlgRef_SpinBox.h"
|
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "GEOMBase.h"
|
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <GeometryGUI.h>
|
||||||
#include "SUIT_Session.h"
|
#include <GEOMBase.h>
|
||||||
#include "SalomeApp_Application.h"
|
|
||||||
#include "LightApp_SelectionMgr.h"
|
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
#include <SUIT_Session.h>
|
||||||
|
#include <SalomeApp_Application.h>
|
||||||
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_CircleDlg()
|
// class : BasicGUI_CircleDlg()
|
||||||
@ -49,7 +46,7 @@
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
const char* name, bool modal, Qt::WindowFlags fl )
|
const char* name, bool modal, Qt::WindowFlags fl )
|
||||||
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
: GEOMBase_Skeleton( theGeometryGUI, parent, name, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PV" ) ) );
|
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 image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PNTS" ) ) );
|
||||||
@ -58,13 +55,13 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* par
|
|||||||
setWindowTitle( tr( "GEOM_CIRCLE_TITLE" ) );
|
setWindowTitle( tr( "GEOM_CIRCLE_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_CIRCLE"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_CIRCLE" ) );
|
||||||
RadioButton1->setIcon(image0);
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->setIcon(image2);
|
mainFrame()->RadioButton2->setIcon( image2 );
|
||||||
RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
RadioButton3->close();
|
mainFrame()->RadioButton3->close();
|
||||||
|
|
||||||
GroupPntVecR = new DlgRef_2Sel1Spin(this, "GroupPntVecR");
|
GroupPntVecR = new DlgRef_2Sel1Spin( centralWidget() );
|
||||||
GroupPntVecR->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
GroupPntVecR->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
||||||
|
|
||||||
GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) );
|
GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) );
|
||||||
@ -76,10 +73,7 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* par
|
|||||||
GroupPntVecR->LineEdit1->setReadOnly( true );
|
GroupPntVecR->LineEdit1->setReadOnly( true );
|
||||||
GroupPntVecR->LineEdit2->setReadOnly( true );
|
GroupPntVecR->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
Group3Pnts = new Ui::DlgRef_3Sel_QTD();
|
Group3Pnts = new DlgRef_3Sel( centralWidget() );
|
||||||
QWidget* aGroup3PntsWidget = new QWidget(this);
|
|
||||||
Group3Pnts->setupUi(aGroup3PntsWidget);
|
|
||||||
aGroup3PntsWidget->setObjectName("Group3Pnts");
|
|
||||||
|
|
||||||
Group3Pnts->GroupBox1->setTitle( tr( "GEOM_3_POINTS" ) );
|
Group3Pnts->GroupBox1->setTitle( tr( "GEOM_3_POINTS" ) );
|
||||||
Group3Pnts->TextLabel1->setText( tr( "GEOM_POINT1" ) );
|
Group3Pnts->TextLabel1->setText( tr( "GEOM_POINT1" ) );
|
||||||
@ -93,8 +87,10 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* par
|
|||||||
Group3Pnts->LineEdit2->setReadOnly( true );
|
Group3Pnts->LineEdit2->setReadOnly( true );
|
||||||
Group3Pnts->LineEdit3->setReadOnly( true );
|
Group3Pnts->LineEdit3->setReadOnly( true );
|
||||||
|
|
||||||
gridLayout1->addWidget( GroupPntVecR, 2, 0 );
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
gridLayout1->addWidget( aGroup3PntsWidget, 2, 0 );
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupPntVecR );
|
||||||
|
layout->addWidget( Group3Pnts );
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName( "circle.htm" );
|
setHelpFileName( "circle.htm" );
|
||||||
@ -130,17 +126,18 @@ void BasicGUI_CircleDlg::Init()
|
|||||||
double aStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
double aStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes & initial values */
|
/* min, max, step and decimals for spin boxes & initial values */
|
||||||
GroupPntVecR->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3);
|
initSpinBox( GroupPntVecR->SpinBox_DX, 0.001, COORD_MAX, aStep, 3 );
|
||||||
GroupPntVecR->SpinBox_DX->SetValue( 100 );
|
GroupPntVecR->SpinBox_DX->setValue( 100 );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
connect( GroupPntVecR->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPntVecR->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( GroupPntVecR->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPntVecR->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
@ -152,14 +149,15 @@ void BasicGUI_CircleDlg::Init()
|
|||||||
connect( GroupPntVecR->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( GroupPntVecR->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
|
|
||||||
connect( GroupPntVecR->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT(ValueChangedInSpinBox() ) );
|
connect( GroupPntVecR->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT(ValueChangedInSpinBox() ) );
|
||||||
|
// VSR: TODO ->>
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPntVecR->SpinBox_DX, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPntVecR->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
|
// <<-
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT(SelectionIntoArgument() ) ) ;
|
SIGNAL( currentSelectionChanged() ), this, SLOT(SelectionIntoArgument() ) ) ;
|
||||||
|
|
||||||
initName( tr( "GEOM_CIRCLE" ).toLatin1().constData() );
|
initName( tr( "GEOM_CIRCLE" ) );
|
||||||
|
|
||||||
::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->hide();
|
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,12 +170,10 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
|||||||
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
||||||
myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
|
myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
|
||||||
|
|
||||||
switch ( constructorId )
|
switch ( constructorId ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->hide();
|
Group3Pnts->hide();
|
||||||
resize(0, 0);
|
|
||||||
GroupPntVecR->show();
|
GroupPntVecR->show();
|
||||||
|
|
||||||
myEditCurrentArgument = GroupPntVecR->LineEdit1;
|
myEditCurrentArgument = GroupPntVecR->LineEdit1;
|
||||||
@ -188,8 +184,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
|||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
GroupPntVecR->hide();
|
GroupPntVecR->hide();
|
||||||
resize( 0, 0 );
|
Group3Pnts->show();
|
||||||
::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->show();
|
|
||||||
|
|
||||||
myEditCurrentArgument = Group3Pnts->LineEdit1;
|
myEditCurrentArgument = Group3Pnts->LineEdit1;
|
||||||
Group3Pnts->LineEdit1->setText( "" );
|
Group3Pnts->LineEdit1->setText( "" );
|
||||||
@ -199,6 +194,10 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize( minimumSize() );
|
||||||
|
|
||||||
myEditCurrentArgument->setFocus();
|
myEditCurrentArgument->setFocus();
|
||||||
globalSelection( GEOM_POINT );
|
globalSelection( GEOM_POINT );
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
@ -246,8 +245,7 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
|
|||||||
{
|
{
|
||||||
myEditCurrentArgument->setText( "" );
|
myEditCurrentArgument->setText( "" );
|
||||||
|
|
||||||
if ( IObjectCount() != 1 )
|
if ( IObjectCount() != 1 ) {
|
||||||
{
|
|
||||||
if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint = GEOM::GEOM_Object::_nil();
|
if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
||||||
@ -259,8 +257,7 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
|
|||||||
// nbSel == 1
|
// nbSel == 1
|
||||||
Standard_Boolean aRes = Standard_False;
|
Standard_Boolean aRes = Standard_False;
|
||||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
||||||
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint = aSelectedObject;
|
if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir = aSelectedObject;
|
else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir = aSelectedObject;
|
||||||
@ -307,8 +304,7 @@ void BasicGUI_CircleDlg::LineEditReturnPressed()
|
|||||||
send == GroupPntVecR->LineEdit2 ||
|
send == GroupPntVecR->LineEdit2 ||
|
||||||
send == Group3Pnts->LineEdit1 ||
|
send == Group3Pnts->LineEdit1 ||
|
||||||
send == Group3Pnts->LineEdit2 ||
|
send == Group3Pnts->LineEdit2 ||
|
||||||
send == Group3Pnts->LineEdit3 )
|
send == Group3Pnts->LineEdit3 ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument = send;
|
myEditCurrentArgument = send;
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
}
|
}
|
||||||
@ -336,9 +332,9 @@ void BasicGUI_CircleDlg::ActivateThisDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_CircleDlg::enterEvent(QEvent* e)
|
void BasicGUI_CircleDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -367,7 +363,7 @@ void BasicGUI_CircleDlg::ValueChangedInSpinBox()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
double BasicGUI_CircleDlg::getRadius() const
|
double BasicGUI_CircleDlg::getRadius() const
|
||||||
{
|
{
|
||||||
return GroupPntVecR->SpinBox_DX->GetValue();
|
return GroupPntVecR->SpinBox_DX->value();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -413,8 +409,7 @@ bool BasicGUI_CircleDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var anObj;
|
GEOM::GEOM_Object_var anObj;
|
||||||
|
|
||||||
switch ( getConstructorId() )
|
switch ( getConstructorId() ) {
|
||||||
{
|
|
||||||
case 0 :
|
case 0 :
|
||||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCirclePntVecR( myPoint, myDir, getRadius() );
|
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCirclePntVecR( myPoint, myDir, getRadius() );
|
||||||
res = true;
|
res = true;
|
||||||
@ -439,4 +434,3 @@ void BasicGUI_CircleDlg::closeEvent( QCloseEvent* e )
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::closeEvent( e );
|
GEOMBase_Skeleton::closeEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,52 +19,51 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_CircleDlg.h
|
// File : BasicGUI_CircleDlg.h
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef DIALOGBOX_CIRCLE_H
|
#ifndef BASICGUI_CIRCLEDLG_H
|
||||||
#define DIALOGBOX_CIRCLE_H
|
#define BASICGUI_CIRCLEDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
#include "DlgRef_3Sel_QTD.h"
|
|
||||||
|
|
||||||
|
class DlgRef_3Sel;
|
||||||
class DlgRef_2Sel1Spin;
|
class DlgRef_2Sel1Spin;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_CircleDlg
|
// class : BasicGUI_CircleDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_CircleDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_CircleDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
BasicGUI_CircleDlg( GeometryGUI*, QWidget* = 0,
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
|
const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
~BasicGUI_CircleDlg();
|
~BasicGUI_CircleDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
double getRadius() const;
|
double getRadius() const;
|
||||||
|
|
||||||
|
private:
|
||||||
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3;
|
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3;
|
||||||
|
|
||||||
DlgRef_2Sel1Spin* GroupPntVecR;
|
DlgRef_2Sel1Spin* GroupPntVecR;
|
||||||
Ui::DlgRef_3Sel_QTD* Group3Pnts;
|
DlgRef_3Sel* Group3Pnts;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
@ -82,4 +81,4 @@ private slots:
|
|||||||
void ValueChangedInSpinBox();
|
void ValueChangedInSpinBox();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_CIRCLE_H
|
#endif // BASICGUI_CIRCLEDLG_H
|
||||||
|
@ -18,30 +18,25 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_CurveDlg.cxx
|
// File : BasicGUI_CurveDlg.cxx
|
||||||
// Author : Nicolas REJNERI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI_CurveDlg.h"
|
#include "BasicGUI_CurveDlg.h"
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "GEOMBase.h"
|
#include <GeometryGUI.h>
|
||||||
|
#include <GEOMBase.h>
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <SUIT_ResourceMgr.h>
|
||||||
#include "SUIT_Session.h"
|
#include <SUIT_Session.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <SalomeApp_Application.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
#include "SALOME_ListIteratorOfListIO.hxx"
|
#include <SALOME_ListIteratorOfListIO.hxx>
|
||||||
#include "SALOME_ListIO.hxx"
|
#include <SALOME_ListIO.hxx>
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_CurveDlg()
|
// class : BasicGUI_CurveDlg()
|
||||||
@ -52,25 +47,21 @@ using namespace std;
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_CurveDlg::BasicGUI_CurveDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_CurveDlg::BasicGUI_CurveDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
const char* name, bool modal, Qt::WindowFlags fl )
|
const char* name, bool modal, Qt::WindowFlags fl )
|
||||||
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
: GEOMBase_Skeleton( theGeometryGUI, parent, name, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POLYLINE" ) ) );
|
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 image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_SPLINE" ) ) );
|
||||||
QPixmap image3( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_BEZIER" ) ) );
|
QPixmap image3( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_BEZIER" ) ) );
|
||||||
|
|
||||||
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
|
|
||||||
setWindowTitle( tr( "GEOM_CURVE_TITLE" ) );
|
setWindowTitle( tr( "GEOM_CURVE_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
RadioButton1->setIcon( image0 );
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->setIcon( image3 );
|
mainFrame()->RadioButton2->setIcon( image3 );
|
||||||
RadioButton3->setIcon( image2 );
|
mainFrame()->RadioButton3->setIcon( image2 );
|
||||||
|
|
||||||
GroupPoints = new Ui::DlgRef_1Sel_QTD();
|
GroupPoints = new DlgRef_1Sel( centralWidget() );
|
||||||
QWidget* aGroupPointsWidget = new QWidget(this);
|
|
||||||
GroupPoints->setupUi(aGroupPointsWidget);
|
|
||||||
aGroupPointsWidget->setObjectName("GroupPoints");
|
|
||||||
|
|
||||||
GroupPoints->GroupBox1->setTitle( tr( "GEOM_NODES" ) );
|
GroupPoints->GroupBox1->setTitle( tr( "GEOM_NODES" ) );
|
||||||
GroupPoints->TextLabel1->setText( tr( "GEOM_POINTS" ) );
|
GroupPoints->TextLabel1->setText( tr( "GEOM_POINTS" ) );
|
||||||
@ -78,7 +69,9 @@ BasicGUI_CurveDlg::BasicGUI_CurveDlg(GeometryGUI* theGeometryGUI, QWidget* paren
|
|||||||
|
|
||||||
GroupPoints->LineEdit1->setReadOnly( true );
|
GroupPoints->LineEdit1->setReadOnly( true );
|
||||||
|
|
||||||
gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupPoints );
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName( "curve.htm" );
|
setHelpFileName( "curve.htm" );
|
||||||
@ -111,13 +104,14 @@ void BasicGUI_CurveDlg::Init()
|
|||||||
globalSelection( GEOM_POINT );
|
globalSelection( GEOM_POINT );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog( ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog( ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
@ -125,7 +119,7 @@ void BasicGUI_CurveDlg::Init()
|
|||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_CURVE" ).toLatin1().constData() );
|
initName( tr( "GEOM_CURVE" ) );
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +130,7 @@ void BasicGUI_CurveDlg::Init()
|
|||||||
void BasicGUI_CurveDlg::ConstructorsClicked( int id )
|
void BasicGUI_CurveDlg::ConstructorsClicked( int id )
|
||||||
{
|
{
|
||||||
QString aTitle = tr( id == 0 ? "GEOM_POLYLINE" : id == 1 ? "GEOM_BEZIER" : "GEOM_INTERPOL" );
|
QString aTitle = tr( id == 0 ? "GEOM_POLYLINE" : id == 1 ? "GEOM_BEZIER" : "GEOM_INTERPOL" );
|
||||||
GroupConstructors->setTitle( aTitle );
|
mainFrame()->GroupConstructors->setTitle( aTitle );
|
||||||
|
|
||||||
myPoints = new GEOM::ListOfGO();
|
myPoints = new GEOM::ListOfGO();
|
||||||
myPoints->length( 0 );
|
myPoints->length( 0 );
|
||||||
@ -220,10 +214,11 @@ static int isPointInList(list<GEOM::GEOM_Object_var>& thePoints,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(list<GEOM::GEOM_Object_var>::iterator i=thePoints.begin();i!=thePoints.end();i++)
|
for ( list<GEOM::GEOM_Object_var>::iterator i = thePoints.begin(); i != thePoints.end(); i++ ) {
|
||||||
if ( string( (*i)->GetEntry() ) == string( theObject->GetEntry() ) ) {
|
if ( string( (*i)->GetEntry() ) == string( theObject->GetEntry() ) ) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -270,11 +265,9 @@ void BasicGUI_CurveDlg::SelectionIntoArgument()
|
|||||||
bool is_append = myPoints->length() < IOC; // if true - add point, else remove
|
bool is_append = myPoints->length() < IOC; // if true - add point, else remove
|
||||||
myPoints->length( IOC ); // this length may be greater than number of objects,
|
myPoints->length( IOC ); // this length may be greater than number of objects,
|
||||||
// that will actually be put into myPoints
|
// that will actually be put into myPoints
|
||||||
for ( SALOME_ListIteratorOfListIO anIt( selectedIO() ); anIt.More(); anIt.Next() )
|
for ( SALOME_ListIteratorOfListIO anIt( selectedIO() ); anIt.More(); anIt.Next() ) {
|
||||||
{
|
|
||||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value(), aRes );
|
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value(), aRes );
|
||||||
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
|
||||||
{
|
|
||||||
//TopoDS_Shape aPointShape;
|
//TopoDS_Shape aPointShape;
|
||||||
//if ( myGeomBase->GetShape( aSelectedObject, aPointShape, TopAbs_VERTEX ) )
|
//if ( myGeomBase->GetShape( aSelectedObject, aPointShape, TopAbs_VERTEX ) )
|
||||||
int pos = isPointInList(myOrderedSel, aSelectedObject);
|
int pos = isPointInList(myOrderedSel, aSelectedObject);
|
||||||
@ -294,7 +287,8 @@ void BasicGUI_CurveDlg::SelectionIntoArgument()
|
|||||||
int k = 0;
|
int k = 0;
|
||||||
for ( list<GEOM::GEOM_Object_var>::iterator j = myOrderedSel.begin(); j!= myOrderedSel.end(); j++ )
|
for ( list<GEOM::GEOM_Object_var>::iterator j = myOrderedSel.begin(); j!= myOrderedSel.end(); j++ )
|
||||||
myPoints[k++] = *j;
|
myPoints[k++] = *j;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
//cout << "ERROR: Ordered sequence size != selection sequence size! ("<<myOrderedSel.size()<<"!="<<myPoints->length()<<")"<<endl;
|
//cout << "ERROR: Ordered sequence size != selection sequence size! ("<<myOrderedSel.size()<<"!="<<myPoints->length()<<")"<<endl;
|
||||||
}
|
}
|
||||||
if ( i )
|
if ( i )
|
||||||
@ -334,9 +328,9 @@ void BasicGUI_CurveDlg::DeactivateActiveDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_CurveDlg::enterEvent(QEvent* e)
|
void BasicGUI_CurveDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,8 +362,7 @@ bool BasicGUI_CurveDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var anObj;
|
GEOM::GEOM_Object_var anObj;
|
||||||
|
|
||||||
switch ( getConstructorId() )
|
switch ( getConstructorId() ) {
|
||||||
{
|
|
||||||
case 0 :
|
case 0 :
|
||||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakePolyline( myPoints );
|
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakePolyline( myPoints );
|
||||||
res = true;
|
res = true;
|
||||||
|
@ -18,48 +18,48 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_CurveDlg.h
|
// File : BasicGUI_CurveDlg.h
|
||||||
// Author : Alexander SLADKOV
|
// Author : Alexander SLADKOV, Open CASCADE S.A.S. (alexander.sladkov@opencascade.com)
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef BASICGUI_CURVE_H
|
#ifndef BASICGUI_CURVEDLG_H
|
||||||
#define BASICGUI_CURVE_H
|
#define BASICGUI_CURVEDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
#include "DlgRef_1Sel_QTD.h"
|
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
class DlgRef_1Sel;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_CurveDlg
|
// class : BasicGUI_CurveDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_CurveDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_CurveDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_CurveDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
BasicGUI_CurveDlg( GeometryGUI*, QWidget* = 0,
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
|
const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
~BasicGUI_CurveDlg();
|
~BasicGUI_CurveDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
|
|
||||||
Ui::DlgRef_1Sel_QTD* GroupPoints;
|
private:
|
||||||
|
DlgRef_1Sel* GroupPoints;
|
||||||
GEOM::ListOfGO_var myPoints;
|
GEOM::ListOfGO_var myPoints;
|
||||||
list<GEOM::GEOM_Object_var> myOrderedSel; //!< This list used for managing orderes selection
|
list<GEOM::GEOM_Object_var> myOrderedSel; //!< This list used for managing orderes selection
|
||||||
|
|
||||||
@ -75,7 +75,6 @@ private slots:
|
|||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BASICGUI_CURVE_H
|
#endif // BASICGUI_CURVEDLG_H
|
||||||
|
@ -18,28 +18,23 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_EllipseDlg.cxx
|
// File : BasicGUI_EllipseDlg.cxx
|
||||||
// Author : Nicolas REJNERI
|
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI_EllipseDlg.h"
|
#include "BasicGUI_EllipseDlg.h"
|
||||||
#include "DlgRef_2Sel2Spin.h"
|
|
||||||
#include "DlgRef_SpinBox.h"
|
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "GEOMBase.h"
|
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <GeometryGUI.h>
|
||||||
#include "SUIT_Session.h"
|
#include <GEOMBase.h>
|
||||||
#include "SalomeApp_Application.h"
|
|
||||||
#include "LightApp_SelectionMgr.h"
|
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
#include <SUIT_Session.h>
|
||||||
|
#include <SalomeApp_Application.h>
|
||||||
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
using namespace std;
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_EllipseDlg()
|
// class : BasicGUI_EllipseDlg()
|
||||||
@ -50,7 +45,7 @@ using namespace std;
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_EllipseDlg::BasicGUI_EllipseDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_EllipseDlg::BasicGUI_EllipseDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
const char* name, bool modal, Qt::WindowFlags fl )
|
const char* name, bool modal, Qt::WindowFlags fl )
|
||||||
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
: GEOMBase_Skeleton( theGeometryGUI, parent, name, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_ELLIPSE_PV" ) ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_ELLIPSE_PV" ) ) );
|
||||||
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
@ -58,14 +53,14 @@ BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(GeometryGUI* theGeometryGUI, QWidget* p
|
|||||||
setWindowTitle( tr( "GEOM_ELLIPSE_TITLE" ) );
|
setWindowTitle( tr( "GEOM_ELLIPSE_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_ELLIPSE"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_ELLIPSE" ) );
|
||||||
RadioButton1->setIcon(image0);
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
|
mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
RadioButton2->close();
|
mainFrame()->RadioButton2->close();
|
||||||
RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
RadioButton3->close();
|
mainFrame()->RadioButton3->close();
|
||||||
|
|
||||||
GroupPoints = new DlgRef_2Sel2Spin(this, "GroupPoints");
|
GroupPoints = new DlgRef_2Sel2Spin( centralWidget() );
|
||||||
GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
||||||
GroupPoints->TextLabel1->setText( tr( "GEOM_CENTER" ) );
|
GroupPoints->TextLabel1->setText( tr( "GEOM_CENTER" ) );
|
||||||
GroupPoints->TextLabel2->setText( tr( "GEOM_VECTOR" ) );
|
GroupPoints->TextLabel2->setText( tr( "GEOM_VECTOR" ) );
|
||||||
@ -77,7 +72,9 @@ BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(GeometryGUI* theGeometryGUI, QWidget* p
|
|||||||
GroupPoints->LineEdit1->setReadOnly( true );
|
GroupPoints->LineEdit1->setReadOnly( true );
|
||||||
GroupPoints->LineEdit2->setReadOnly( true );
|
GroupPoints->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
gridLayout1->addWidget(GroupPoints, 2, 0);
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupPoints );
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName( "ellipse.htm" );
|
setHelpFileName( "ellipse.htm" );
|
||||||
@ -116,18 +113,18 @@ void BasicGUI_EllipseDlg::Init()
|
|||||||
double aMajorR( 200. ), aMinorR( 100. );
|
double aMajorR( 200. ), aMinorR( 100. );
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes & initial values */
|
/* min, max, step and decimals for spin boxes & initial values */
|
||||||
GroupPoints->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, step, 3 );
|
initSpinBox( GroupPoints->SpinBox_DX, 0.001, COORD_MAX, step, 3 );
|
||||||
GroupPoints->SpinBox_DY->RangeStepAndValidator( 0.001, COORD_MAX, step, 3 );
|
initSpinBox( GroupPoints->SpinBox_DY, 0.001, COORD_MAX, step, 3 );
|
||||||
GroupPoints->SpinBox_DX->SetValue( aMajorR );
|
GroupPoints->SpinBox_DX->setValue( aMajorR );
|
||||||
GroupPoints->SpinBox_DY->SetValue( aMinorR );
|
GroupPoints->SpinBox_DY->setValue( aMinorR );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
@ -138,13 +135,15 @@ void BasicGUI_EllipseDlg::Init()
|
|||||||
connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
connect( GroupPoints->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( GroupPoints->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
|
||||||
|
// VSR: TODO ->>
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY, SLOT( SetStep( double ) ) );
|
||||||
|
// <<-
|
||||||
|
|
||||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
|
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
|
||||||
|
|
||||||
initName( tr( "GEOM_ELLIPSE" ).toLatin1().constData() );
|
initName( tr( "GEOM_ELLIPSE" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -197,8 +196,7 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
|
|||||||
{
|
{
|
||||||
myEditCurrentArgument->setText( "" );
|
myEditCurrentArgument->setText( "" );
|
||||||
|
|
||||||
if ( IObjectCount() != 1 )
|
if ( IObjectCount() != 1 ) {
|
||||||
{
|
|
||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint = GEOM::GEOM_Object::_nil();
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myDir = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myDir = GEOM::GEOM_Object::_nil();
|
||||||
return;
|
return;
|
||||||
@ -206,8 +204,7 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
Standard_Boolean aRes = Standard_False;
|
Standard_Boolean aRes = Standard_False;
|
||||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
||||||
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint = aSelectedObject;
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myDir = aSelectedObject;
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myDir = aSelectedObject;
|
||||||
@ -244,8 +241,7 @@ void BasicGUI_EllipseDlg::LineEditReturnPressed()
|
|||||||
{
|
{
|
||||||
QLineEdit* send = (QLineEdit*)sender();
|
QLineEdit* send = (QLineEdit*)sender();
|
||||||
if ( send == GroupPoints->LineEdit1 ||
|
if ( send == GroupPoints->LineEdit1 ||
|
||||||
send == GroupPoints->LineEdit2 )
|
send == GroupPoints->LineEdit2 ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument = send;
|
myEditCurrentArgument = send;
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
}
|
}
|
||||||
@ -286,9 +282,9 @@ void BasicGUI_EllipseDlg::DeactivateActiveDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_EllipseDlg::enterEvent(QEvent* e)
|
void BasicGUI_EllipseDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,10 +312,9 @@ GEOM::GEOM_IOperations_ptr BasicGUI_EllipseDlg::createOperation()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool BasicGUI_EllipseDlg::isValid( QString& msg )
|
bool BasicGUI_EllipseDlg::isValid( QString& msg )
|
||||||
{
|
{
|
||||||
double aMajorR = GroupPoints->SpinBox_DX->GetValue();
|
double aMajorR = GroupPoints->SpinBox_DX->value();
|
||||||
double aMinorR = GroupPoints->SpinBox_DY->GetValue();
|
double aMinorR = GroupPoints->SpinBox_DY->value();
|
||||||
if ( aMajorR < aMinorR )
|
if ( aMajorR < aMinorR ) {
|
||||||
{
|
|
||||||
msg = tr( "GEOM_ELLIPSE_ERROR_1" );
|
msg = tr( "GEOM_ELLIPSE_ERROR_1" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -332,8 +327,8 @@ bool BasicGUI_EllipseDlg::isValid( QString& msg )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool BasicGUI_EllipseDlg::execute( ObjectList& objects )
|
bool BasicGUI_EllipseDlg::execute( ObjectList& objects )
|
||||||
{
|
{
|
||||||
double aMajorR = GroupPoints->SpinBox_DX->GetValue();
|
double aMajorR = GroupPoints->SpinBox_DX->value();
|
||||||
double aMinorR = GroupPoints->SpinBox_DY->GetValue();
|
double aMinorR = GroupPoints->SpinBox_DY->value();
|
||||||
GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeEllipse( myPoint, myDir, aMajorR, aMinorR );
|
GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeEllipse( myPoint, myDir, aMajorR, aMinorR );
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if ( !anObj->_is_nil() )
|
||||||
@ -350,4 +345,3 @@ void BasicGUI_EllipseDlg::closeEvent( QCloseEvent* e )
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::closeEvent( e );
|
GEOMBase_Skeleton::closeEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,18 +18,16 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_EllipseDlg.h
|
// File : BasicGUI_EllipseDlg.h
|
||||||
// Author : Nicolas REJNERI
|
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef BASICGUI_ELLIPSE_H
|
#ifndef BASICGUI_ELLIPSEDLG_H
|
||||||
#define BASICGUI_ELLIPSE_H
|
#define BASICGUI_ELLIPSEDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
|
|
||||||
class DlgRef_2Sel2Spin;
|
class DlgRef_2Sel2Spin;
|
||||||
|
|
||||||
@ -37,27 +35,28 @@ class DlgRef_2Sel2Spin;
|
|||||||
// class : BasicGUI_EllipseDlg
|
// class : BasicGUI_EllipseDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_EllipseDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_EllipseDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_EllipseDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
BasicGUI_EllipseDlg( GeometryGUI*, QWidget* = 0,
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
|
const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
~BasicGUI_EllipseDlg();
|
~BasicGUI_EllipseDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
|
|
||||||
|
private:
|
||||||
GEOM::GEOM_Object_var myPoint, myDir;
|
GEOM::GEOM_Object_var myPoint, myDir;
|
||||||
|
|
||||||
DlgRef_2Sel2Spin* GroupPoints;
|
DlgRef_2Sel2Spin* GroupPoints;
|
||||||
@ -73,8 +72,7 @@ private slots:
|
|||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void ValueChangedInSpinBox(double newValue);
|
void ValueChangedInSpinBox( double );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BASICGUI_ELLIPSE_H
|
#endif // BASICGUI_ELLIPSEDLG_H
|
||||||
|
@ -19,26 +19,22 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_LineDlg.cxx
|
// File : BasicGUI_LineDlg.cxx
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI_LineDlg.h"
|
#include "BasicGUI_LineDlg.h"
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GeometryGUI.h>
|
||||||
#include "GEOMBase.h"
|
#include <GEOMBase.h>
|
||||||
|
#include <GEOM_DlgRef.h>
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <SUIT_ResourceMgr.h>
|
||||||
#include "SUIT_Session.h"
|
#include <SUIT_Session.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <SalomeApp_Application.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_LineDlg()
|
// class : BasicGUI_LineDlg()
|
||||||
@ -49,7 +45,7 @@ using namespace std;
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_LineDlg::BasicGUI_LineDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_LineDlg::BasicGUI_LineDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
const char* name, bool modal, Qt::WindowFlags fl )
|
const char* name, bool modal, Qt::WindowFlags fl )
|
||||||
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
: GEOMBase_Skeleton( theGeometryGUI, parent, name, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_LINE_2P" ) ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_LINE_2P" ) ) );
|
||||||
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
@ -57,28 +53,28 @@ BasicGUI_LineDlg::BasicGUI_LineDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
|||||||
setWindowTitle( tr( "GEOM_LINE_TITLE" ) );
|
setWindowTitle( tr( "GEOM_LINE_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_LINE"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_LINE" ) );
|
||||||
RadioButton1->setIcon(image0);
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
|
mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
RadioButton2->close();
|
mainFrame()->RadioButton2->close();
|
||||||
RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
RadioButton3->close();
|
mainFrame()->RadioButton3->close();
|
||||||
|
|
||||||
GroupPoints = new Ui::DlgRef_2Sel_QTD();
|
GroupPoints = new DlgRef_2Sel( centralWidget() );
|
||||||
QWidget* aGroupPointsWidget = new QWidget(this);
|
|
||||||
GroupPoints->setupUi(aGroupPointsWidget);
|
|
||||||
aGroupPointsWidget->setObjectName("GroupPoints");
|
|
||||||
|
|
||||||
GroupPoints->GroupBox1->setTitle( tr( "GEOM_POINTS" ) );
|
GroupPoints->GroupBox1->setTitle( tr( "GEOM_POINTS" ) );
|
||||||
GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg("1"));
|
GroupPoints->TextLabel1->setText( tr( "GEOM_POINT_I" ).arg( 1 ) );
|
||||||
GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg("2"));
|
GroupPoints->TextLabel2->setText( tr( "GEOM_POINT_I" ).arg( 2 ) );
|
||||||
GroupPoints->PushButton1->setIcon( image1 );
|
GroupPoints->PushButton1->setIcon( image1 );
|
||||||
GroupPoints->PushButton2->setIcon( image1 );
|
GroupPoints->PushButton2->setIcon( image1 );
|
||||||
|
|
||||||
GroupPoints->LineEdit1->setReadOnly( true );
|
GroupPoints->LineEdit1->setReadOnly( true );
|
||||||
GroupPoints->LineEdit2->setReadOnly( true );
|
GroupPoints->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupPoints );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName( "line.htm" );
|
setHelpFileName( "line.htm" );
|
||||||
@ -111,12 +107,12 @@ void BasicGUI_LineDlg::Init()
|
|||||||
globalSelection( GEOM_POINT );
|
globalSelection( GEOM_POINT );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
@ -127,7 +123,7 @@ void BasicGUI_LineDlg::Init()
|
|||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr("GEOM_LINE").toLatin1().constData() );
|
initName( tr( "GEOM_LINE" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -172,8 +168,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
|
|||||||
{
|
{
|
||||||
myEditCurrentArgument->setText( "" );
|
myEditCurrentArgument->setText( "" );
|
||||||
|
|
||||||
if ( IObjectCount() != 1 )
|
if ( IObjectCount() != 1 ) {
|
||||||
{
|
|
||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
|
||||||
return;
|
return;
|
||||||
@ -182,8 +177,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
|
|||||||
// nbSel == 1
|
// nbSel == 1
|
||||||
Standard_Boolean aRes = Standard_False;
|
Standard_Boolean aRes = Standard_False;
|
||||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
||||||
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = aSelectedObject;
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = aSelectedObject;
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = aSelectedObject;
|
||||||
@ -256,9 +250,9 @@ void BasicGUI_LineDlg::DeactivateActiveDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_LineDlg::enterEvent(QEvent* e)
|
void BasicGUI_LineDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,49 +19,49 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_LineDlg.h
|
// File : BasicGUI_LineDlg.h
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef DIALOGBOX_LINE_H
|
#ifndef BASICGUI_LINEDLG_H
|
||||||
#define DIALOGBOX_LINE_H
|
#define BASICGUI_LINEDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
#include "DlgRef_2Sel_QTD.h"
|
|
||||||
|
class DlgRef_2Sel;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_LineDlg
|
// class : BasicGUI_LineDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_LineDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_LineDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_LineDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
BasicGUI_LineDlg( GeometryGUI*, QWidget* = 0,
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
|
const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
~BasicGUI_LineDlg();
|
~BasicGUI_LineDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
|
|
||||||
|
private:
|
||||||
GEOM::GEOM_Object_var myPoint1;
|
GEOM::GEOM_Object_var myPoint1;
|
||||||
GEOM::GEOM_Object_var myPoint2;
|
GEOM::GEOM_Object_var myPoint2;
|
||||||
|
|
||||||
Ui::DlgRef_2Sel_QTD* GroupPoints;
|
DlgRef_2Sel* GroupPoints;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
@ -74,7 +74,6 @@ private slots:
|
|||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_LINE_H
|
#endif // BASICGUI_LINEDLG_H
|
||||||
|
@ -19,27 +19,24 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_MarkerDlg.cxx
|
// File : BasicGUI_MarkerDlg.cxx
|
||||||
// Author : Sergey LITONIN
|
// Author : Sergey LITONIN, Open CASCADE S.A.S. (sergey.litonin@opencascade.com)
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI_MarkerDlg.h"
|
#include "BasicGUI_MarkerDlg.h"
|
||||||
#include "DlgRef_SpinBox.h"
|
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "GEOMBase.h"
|
#include <GeometryGUI.h>
|
||||||
|
#include <GEOMBase.h>
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <SUIT_ResourceMgr.h>
|
||||||
#include "SUIT_Session.h"
|
#include <SUIT_Session.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <SalomeApp_Application.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
// OCCT Includes
|
// OCCT Includes
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
@ -69,24 +66,18 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
|
|||||||
|
|
||||||
setWindowTitle( tr( "CAPTION" ) );
|
setWindowTitle( tr( "CAPTION" ) );
|
||||||
|
|
||||||
GroupConstructors->setTitle( tr( "LOCALCS" ) );
|
mainFrame()->GroupConstructors->setTitle( tr( "LOCALCS" ) );
|
||||||
RadioButton1->setIcon( iconCS1 );
|
mainFrame()->RadioButton1->setIcon( iconCS1 );
|
||||||
RadioButton2->setIcon( iconCS2 );
|
mainFrame()->RadioButton2->setIcon( iconCS2 );
|
||||||
RadioButton3->setIcon( iconCS3 );
|
mainFrame()->RadioButton3->setIcon( iconCS3 );
|
||||||
|
|
||||||
Group1 = new Ui::DlgRef_1Sel_QTD();
|
Group1 = new DlgRef_1Sel( centralWidget() );
|
||||||
QWidget* aGroup1Widget = new QWidget(this);
|
|
||||||
Group1->setupUi(aGroup1Widget);
|
|
||||||
aGroup1Widget->setObjectName("Group1");
|
|
||||||
|
|
||||||
Group1->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
Group1->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
||||||
Group1->TextLabel1->setText( tr( "GEOM_OBJECT" ) );
|
Group1->TextLabel1->setText( tr( "GEOM_OBJECT" ) );
|
||||||
Group1->PushButton1->setIcon( iconSelect );
|
Group1->PushButton1->setIcon( iconSelect );
|
||||||
|
|
||||||
Group2 = new Ui::DlgRef_3Sel_QTD();
|
Group2 = new DlgRef_3Sel( centralWidget() );
|
||||||
QWidget* aGroup2Widget = new QWidget(this);
|
|
||||||
Group2->setupUi(aGroup2Widget);
|
|
||||||
aGroup2Widget->setObjectName("Group2");
|
|
||||||
|
|
||||||
Group2->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
Group2->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
||||||
Group2->TextLabel1->setText( tr( "GEOM_POINT" ) );
|
Group2->TextLabel1->setText( tr( "GEOM_POINT" ) );
|
||||||
@ -96,22 +87,23 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
|
|||||||
Group2->PushButton2->setIcon( iconSelect );
|
Group2->PushButton2->setIcon( iconSelect );
|
||||||
Group2->PushButton3->setIcon( iconSelect );
|
Group2->PushButton3->setIcon( iconSelect );
|
||||||
|
|
||||||
aMainGrp = new QFrame( this );
|
aMainGrp = new QFrame( centralWidget() );
|
||||||
aMainGrp->setFrameStyle( QFrame::NoFrame );
|
aMainGrp->setFrameStyle( QFrame::NoFrame | QFrame::Plain );
|
||||||
aMainGrp->setContentsMargins( 0, 0, 0, 0 );
|
aMainGrp->setContentsMargins( 0, 0, 0, 0 );
|
||||||
QHBoxLayout* aMainGrpLayout = new QHBoxLayout( aMainGrp );
|
QHBoxLayout* aMainGrpLayout = new QHBoxLayout( aMainGrp );
|
||||||
|
aMainGrpLayout->setMargin( 0 );
|
||||||
|
|
||||||
QGroupBox* anOriGrp = new QGroupBox( tr( "ORIGIN" ), aMainGrp );
|
QGroupBox* anOriGrp = new QGroupBox( tr( "ORIGIN" ), aMainGrp );
|
||||||
QVBoxLayout* anOriGrpLayout = new QVBoxLayout( anOriGrp );
|
QVBoxLayout* anOriGrpLayout = new QVBoxLayout( anOriGrp );
|
||||||
|
|
||||||
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), anOriGrp ) );
|
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), anOriGrp ) );
|
||||||
myData[ X ] = new DlgRef_SpinBox( anOriGrp );
|
myData[ X ] = new QDoubleSpinBox( anOriGrp );
|
||||||
anOriGrpLayout->addWidget( myData[ X ] );
|
anOriGrpLayout->addWidget( myData[ X ] );
|
||||||
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), anOriGrp ) );
|
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), anOriGrp ) );
|
||||||
myData[ Y ] = new DlgRef_SpinBox( anOriGrp );
|
myData[ Y ] = new QDoubleSpinBox( anOriGrp );
|
||||||
anOriGrpLayout->addWidget( myData[ Y ] );
|
anOriGrpLayout->addWidget( myData[ Y ] );
|
||||||
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), anOriGrp ) );
|
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), anOriGrp ) );
|
||||||
myData[ Z ] = new DlgRef_SpinBox( anOriGrp );
|
myData[ Z ] = new QDoubleSpinBox( anOriGrp );
|
||||||
anOriGrpLayout->addWidget( myData[ Z ] );
|
anOriGrpLayout->addWidget( myData[ Z ] );
|
||||||
|
|
||||||
aMainGrpLayout->addWidget( anOriGrp );
|
aMainGrpLayout->addWidget( anOriGrp );
|
||||||
@ -120,13 +112,13 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
|
|||||||
QVBoxLayout* aXAxisGrpLayout = new QVBoxLayout( aXAxisGrp );
|
QVBoxLayout* aXAxisGrpLayout = new QVBoxLayout( aXAxisGrp );
|
||||||
|
|
||||||
aXAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), aXAxisGrp ) );
|
aXAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), aXAxisGrp ) );
|
||||||
myData[ DX1 ] = new DlgRef_SpinBox( aXAxisGrp );
|
myData[ DX1 ] = new QDoubleSpinBox( aXAxisGrp );
|
||||||
aXAxisGrpLayout->addWidget( myData[ DX1 ] );
|
aXAxisGrpLayout->addWidget( myData[ DX1 ] );
|
||||||
aXAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), aXAxisGrp ) );
|
aXAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), aXAxisGrp ) );
|
||||||
myData[ DY1 ] = new DlgRef_SpinBox( aXAxisGrp );
|
myData[ DY1 ] = new QDoubleSpinBox( aXAxisGrp );
|
||||||
aXAxisGrpLayout->addWidget( myData[ DY1 ] );
|
aXAxisGrpLayout->addWidget( myData[ DY1 ] );
|
||||||
aXAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), aXAxisGrp ) );
|
aXAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), aXAxisGrp ) );
|
||||||
myData[ DZ1 ] = new DlgRef_SpinBox( aXAxisGrp );
|
myData[ DZ1 ] = new QDoubleSpinBox( aXAxisGrp );
|
||||||
aXAxisGrpLayout->addWidget( myData[ DZ1 ] );
|
aXAxisGrpLayout->addWidget( myData[ DZ1 ] );
|
||||||
|
|
||||||
aMainGrpLayout->addWidget( aXAxisGrp );
|
aMainGrpLayout->addWidget( aXAxisGrp );
|
||||||
@ -135,20 +127,22 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
|
|||||||
QVBoxLayout* anYAxisGrpLayout = new QVBoxLayout( anYAxisGrp );
|
QVBoxLayout* anYAxisGrpLayout = new QVBoxLayout( anYAxisGrp );
|
||||||
|
|
||||||
anYAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), anYAxisGrp ) );
|
anYAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), anYAxisGrp ) );
|
||||||
myData[ DX2 ] = new DlgRef_SpinBox( anYAxisGrp );
|
myData[ DX2 ] = new QDoubleSpinBox( anYAxisGrp );
|
||||||
anYAxisGrpLayout->addWidget( myData[ DX2 ] );
|
anYAxisGrpLayout->addWidget( myData[ DX2 ] );
|
||||||
anYAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), anYAxisGrp ) );
|
anYAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), anYAxisGrp ) );
|
||||||
myData[ DY2 ] = new DlgRef_SpinBox( anYAxisGrp );
|
myData[ DY2 ] = new QDoubleSpinBox( anYAxisGrp );
|
||||||
anYAxisGrpLayout->addWidget( myData[ DY2 ] );
|
anYAxisGrpLayout->addWidget( myData[ DY2 ] );
|
||||||
anYAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), anYAxisGrp ) );
|
anYAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), anYAxisGrp ) );
|
||||||
myData[ DZ2 ] = new DlgRef_SpinBox( anYAxisGrp );
|
myData[ DZ2 ] = new QDoubleSpinBox( anYAxisGrp );
|
||||||
anYAxisGrpLayout->addWidget( myData[ DZ2 ] );
|
anYAxisGrpLayout->addWidget( myData[ DZ2 ] );
|
||||||
|
|
||||||
aMainGrpLayout->addWidget( anYAxisGrp );
|
aMainGrpLayout->addWidget( anYAxisGrp );
|
||||||
|
|
||||||
gridLayout1->addWidget( aMainGrp, 2, 0 );
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
gridLayout1->addWidget( aGroup1Widget, 2, 0 );
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
gridLayout1->addWidget( aGroup2Widget, 2, 0 );
|
layout->addWidget( aMainGrp );
|
||||||
|
layout->addWidget( Group1 );
|
||||||
|
layout->addWidget( Group2 );
|
||||||
|
|
||||||
setHelpFileName( "local_coordinate_system.htm" );
|
setHelpFileName( "local_coordinate_system.htm" );
|
||||||
|
|
||||||
@ -179,7 +173,8 @@ void BasicGUI_MarkerDlg::Init()
|
|||||||
Group2->LineEdit2->setReadOnly( true );
|
Group2->LineEdit2->setReadOnly( true );
|
||||||
Group2->LineEdit3->setReadOnly( true );
|
Group2->LineEdit3->setReadOnly( true );
|
||||||
|
|
||||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
connect( Group1->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( Group1->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( Group2->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( Group2->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( Group2->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( Group2->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
@ -190,33 +185,32 @@ void BasicGUI_MarkerDlg::Init()
|
|||||||
connect( Group2->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( Group2->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
connect( Group2->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( Group2->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
|
|
||||||
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( onClose() ) );
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( onDeactivate() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( onDeactivate() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( onClose() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( onClose() ) );
|
||||||
|
|
||||||
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( onOk() ) );
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( onClose() ) );
|
||||||
connect( buttonApply, SIGNAL( clicked() ), this, SLOT( onApply() ) );
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( onOk() ) );
|
||||||
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( onApply() ) );
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
|
||||||
|
|
||||||
initName( tr( "LCS_NAME" ).toLatin1().constData() );
|
initName( tr( "LCS_NAME" ) );
|
||||||
|
|
||||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
||||||
|
|
||||||
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
|
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter ) {
|
||||||
{
|
initSpinBox( anIter.value(), COORD_MIN, COORD_MAX, step, 3 );
|
||||||
anIter.value()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, 3 );
|
|
||||||
connect( anIter.value(), SIGNAL( valueChanged( double ) ),
|
connect( anIter.value(), SIGNAL( valueChanged( double ) ),
|
||||||
this, SLOT( onValueChanged( double ) ) );
|
this, SLOT( onValueChanged( double ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
myBlockPreview = true;
|
myBlockPreview = true;
|
||||||
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
|
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
|
||||||
anIter.value()->SetValue( 0 );
|
anIter.value()->setValue( 0 );
|
||||||
myData[ DX1 ]->SetValue( 1 );
|
myData[ DX1 ]->setValue( 1 );
|
||||||
myData[ DY2 ]->SetValue( 1 );
|
myData[ DY2 ]->setValue( 1 );
|
||||||
myBlockPreview = false;
|
myBlockPreview = false;
|
||||||
|
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
@ -246,8 +240,7 @@ void BasicGUI_MarkerDlg::Init()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
|
void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
|
||||||
{
|
{
|
||||||
if ( myConstructorId == constructorId && myConstructorId == 0 )
|
if ( myConstructorId == constructorId && myConstructorId == 0 ) {
|
||||||
{
|
|
||||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||||
activate( GEOM_MARKER );
|
activate( GEOM_MARKER );
|
||||||
displayPreview();
|
displayPreview();
|
||||||
@ -258,13 +251,11 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
|
|||||||
|
|
||||||
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
||||||
|
|
||||||
switch (constructorId)
|
switch ( constructorId ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->hide();
|
Group1->hide();
|
||||||
::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
|
Group2->hide();
|
||||||
resize(0, 0);
|
|
||||||
aMainGrp->show();
|
aMainGrp->show();
|
||||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||||
activate( GEOM_MARKER );
|
activate( GEOM_MARKER );
|
||||||
@ -272,10 +263,9 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
|
|||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
|
|
||||||
aMainGrp->hide();
|
aMainGrp->hide();
|
||||||
//PAL6669: resize(0, 0);
|
Group2->hide();
|
||||||
::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->show();
|
Group1->show();
|
||||||
|
|
||||||
globalSelection( GEOM_ALLGEOM );
|
globalSelection( GEOM_ALLGEOM );
|
||||||
myEditCurrentArgument = Group1->LineEdit1;
|
myEditCurrentArgument = Group1->LineEdit1;
|
||||||
@ -285,9 +275,8 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
|
|||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
aMainGrp->hide();
|
aMainGrp->hide();
|
||||||
::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->show();
|
Group1->show();
|
||||||
//PAL6669: resize(0, 0);
|
Group2->show();
|
||||||
::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->show();
|
|
||||||
|
|
||||||
globalSelection( GEOM_POINT );
|
globalSelection( GEOM_POINT );
|
||||||
myEditCurrentArgument = Group2->LineEdit1;
|
myEditCurrentArgument = Group2->LineEdit1;
|
||||||
@ -298,6 +287,10 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize( minimumSize() );
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
|
||||||
onSelectionDone();
|
onSelectionDone();
|
||||||
@ -343,52 +336,45 @@ bool BasicGUI_MarkerDlg::onApply()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_MarkerDlg::onSelectionDone0()
|
void BasicGUI_MarkerDlg::onSelectionDone0()
|
||||||
{
|
{
|
||||||
if ( IObjectCount() == 1 )
|
if ( IObjectCount() == 1 ) {
|
||||||
{
|
|
||||||
Standard_Boolean aRes = Standard_False;
|
Standard_Boolean aRes = Standard_False;
|
||||||
Handle(SALOME_InteractiveObject) anIO = firstIObject();
|
Handle(SALOME_InteractiveObject) anIO = firstIObject();
|
||||||
GEOM::GEOM_Object_var aSelectedObj = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
|
GEOM::GEOM_Object_var aSelectedObj = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
|
||||||
|
|
||||||
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
|
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
|
||||||
|
|
||||||
if ( aRes && !aSelectedObj->_is_nil() )
|
if ( aRes && !aSelectedObj->_is_nil() ) {
|
||||||
{
|
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
if ( GEOMBase::GetShape( aSelectedObj, aShape, TopAbs_SHAPE ) && !aShape.IsNull() )
|
if ( GEOMBase::GetShape( aSelectedObj, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
|
||||||
{
|
|
||||||
// Existing LCS selected
|
// Existing LCS selected
|
||||||
if ( aSelectedObj->GetType() == GEOM_MARKER && aShape.ShapeType() == TopAbs_FACE )
|
if ( aSelectedObj->GetType() == GEOM_MARKER && aShape.ShapeType() == TopAbs_FACE ) {
|
||||||
{
|
|
||||||
TopoDS_Face aFace = TopoDS::Face( aShape );
|
TopoDS_Face aFace = TopoDS::Face( aShape );
|
||||||
Handle(Geom_Plane) aPlane = Handle(Geom_Plane)::DownCast( BRep_Tool::Surface( aFace ) );
|
Handle(Geom_Plane) aPlane = Handle(Geom_Plane)::DownCast( BRep_Tool::Surface( aFace ) );
|
||||||
|
|
||||||
if ( !aPlane.IsNull() )
|
if ( !aPlane.IsNull() ) {
|
||||||
{
|
|
||||||
gp_Ax3 anAx3 = aPlane->Pln().Position();
|
gp_Ax3 anAx3 = aPlane->Pln().Position();
|
||||||
gp_Pnt aLoc = anAx3.Location();
|
gp_Pnt aLoc = anAx3.Location();
|
||||||
gp_Dir aXDir = anAx3.XDirection();
|
gp_Dir aXDir = anAx3.XDirection();
|
||||||
gp_Dir aYDir = anAx3.YDirection();
|
gp_Dir aYDir = anAx3.YDirection();
|
||||||
|
|
||||||
myData[ X ]->SetValue( aLoc.X() );
|
myData[ X ]->setValue( aLoc.X() );
|
||||||
myData[ Y ]->SetValue( aLoc.Y() );
|
myData[ Y ]->setValue( aLoc.Y() );
|
||||||
myData[ Z ]->SetValue( aLoc.Z() );
|
myData[ Z ]->setValue( aLoc.Z() );
|
||||||
|
|
||||||
myData[ DX1 ]->SetValue( aXDir.X() );
|
myData[ DX1 ]->setValue( aXDir.X() );
|
||||||
myData[ DY1 ]->SetValue( aXDir.Y() );
|
myData[ DY1 ]->setValue( aXDir.Y() );
|
||||||
myData[ DZ1 ]->SetValue( aXDir.Z() );
|
myData[ DZ1 ]->setValue( aXDir.Z() );
|
||||||
|
|
||||||
myData[ DX2 ]->SetValue( aYDir.X() );
|
myData[ DX2 ]->setValue( aYDir.X() );
|
||||||
myData[ DY2 ]->SetValue( aYDir.Y() );
|
myData[ DY2 ]->setValue( aYDir.Y() );
|
||||||
myData[ DZ2 ]->SetValue( aYDir.Z() );
|
myData[ DZ2 ]->setValue( aYDir.Z() );
|
||||||
aSelMgr->clearSelected();
|
aSelMgr->clearSelected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
TColStd_IndexedMapOfInteger aMap;
|
TColStd_IndexedMapOfInteger aMap;
|
||||||
aSelMgr->GetIndexes( anIO, aMap );
|
aSelMgr->GetIndexes( anIO, aMap );
|
||||||
if ( aMap.Extent() == 1 )
|
if ( aMap.Extent() == 1 ) {
|
||||||
{
|
|
||||||
int anIndex = aMap( 1 );
|
int anIndex = aMap( 1 );
|
||||||
TopTools_IndexedMapOfShape aShapes;
|
TopTools_IndexedMapOfShape aShapes;
|
||||||
TopExp::MapShapes( aShape, aShapes );
|
TopExp::MapShapes( aShape, aShapes );
|
||||||
@ -396,12 +382,11 @@ void BasicGUI_MarkerDlg::onSelectionDone0()
|
|||||||
aSelMgr->clearSelected();
|
aSelMgr->clearSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
|
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
||||||
{
|
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||||
myData[ X ]->SetValue( aPnt.X() );
|
myData[ X ]->setValue( aPnt.X() );
|
||||||
myData[ Y ]->SetValue( aPnt.Y() );
|
myData[ Y ]->setValue( aPnt.Y() );
|
||||||
myData[ Z ]->SetValue( aPnt.Z() );
|
myData[ Z ]->setValue( aPnt.Z() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -456,17 +441,17 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set values
|
// Set values
|
||||||
myData[ X ]->SetValue( Ox );
|
myData[ X ]->setValue( Ox );
|
||||||
myData[ Y ]->SetValue( Oy );
|
myData[ Y ]->setValue( Oy );
|
||||||
myData[ Z ]->SetValue( Oz );
|
myData[ Z ]->setValue( Oz );
|
||||||
|
|
||||||
myData[ DX1 ]->SetValue( Xx );
|
myData[ DX1 ]->setValue( Xx );
|
||||||
myData[ DY1 ]->SetValue( Xy );
|
myData[ DY1 ]->setValue( Xy );
|
||||||
myData[ DZ1 ]->SetValue( Xz );
|
myData[ DZ1 ]->setValue( Xz );
|
||||||
|
|
||||||
myData[ DX2 ]->SetValue( Yx );
|
myData[ DX2 ]->setValue( Yx );
|
||||||
myData[ DY2 ]->SetValue( Yy );
|
myData[ DY2 ]->setValue( Yy );
|
||||||
myData[ DZ2 ]->SetValue( Yz );
|
myData[ DZ2 ]->setValue( Yz );
|
||||||
|
|
||||||
myEditCurrentArgument->setText( aName );
|
myEditCurrentArgument->setText( aName );
|
||||||
}
|
}
|
||||||
@ -489,15 +474,15 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
|||||||
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
||||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||||
myData[ X ]->SetValue( aPnt.X() );
|
myData[ X ]->setValue( aPnt.X() );
|
||||||
myData[ Y ]->SetValue( aPnt.Y() );
|
myData[ Y ]->setValue( aPnt.Y() );
|
||||||
myData[ Z ]->SetValue( aPnt.Z() );
|
myData[ Z ]->setValue( aPnt.Z() );
|
||||||
myEditCurrentArgument->setText( aName );
|
myEditCurrentArgument->setText( aName );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myData[ X ]->SetValue( 0 );
|
myData[ X ]->setValue( 0 );
|
||||||
myData[ Y ]->SetValue( 0 );
|
myData[ Y ]->setValue( 0 );
|
||||||
myData[ Z ]->SetValue( 0 );
|
myData[ Z ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (myEditCurrentArgument == Group2->LineEdit2) {
|
else if (myEditCurrentArgument == Group2->LineEdit2) {
|
||||||
@ -506,15 +491,15 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
|||||||
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
||||||
gp_Dir aDir( gp_Vec( aP1, aP2 ) );
|
gp_Dir aDir( gp_Vec( aP1, aP2 ) );
|
||||||
|
|
||||||
myData[ DX1 ]->SetValue( aDir.X() );
|
myData[ DX1 ]->setValue( aDir.X() );
|
||||||
myData[ DY1 ]->SetValue( aDir.Y() );
|
myData[ DY1 ]->setValue( aDir.Y() );
|
||||||
myData[ DZ1 ]->SetValue( aDir.Z() );
|
myData[ DZ1 ]->setValue( aDir.Z() );
|
||||||
myEditCurrentArgument->setText( aName );
|
myEditCurrentArgument->setText( aName );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myData[ DX1 ]->SetValue( 0 );
|
myData[ DX1 ]->setValue( 0 );
|
||||||
myData[ DY1 ]->SetValue( 0 );
|
myData[ DY1 ]->setValue( 0 );
|
||||||
myData[ DZ1 ]->SetValue( 0 );
|
myData[ DZ1 ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
||||||
@ -523,15 +508,15 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
|||||||
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
||||||
gp_Dir aDir(gp_Vec( aP1, aP2 ));
|
gp_Dir aDir(gp_Vec( aP1, aP2 ));
|
||||||
|
|
||||||
myData[ DX2 ]->SetValue( aDir.X() );
|
myData[ DX2 ]->setValue( aDir.X() );
|
||||||
myData[ DY2 ]->SetValue( aDir.Y() );
|
myData[ DY2 ]->setValue( aDir.Y() );
|
||||||
myData[ DZ2 ]->SetValue( aDir.Z() );
|
myData[ DZ2 ]->setValue( aDir.Z() );
|
||||||
myEditCurrentArgument->setText( aName );
|
myEditCurrentArgument->setText( aName );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myData[ DX2 ]->SetValue( 0 );
|
myData[ DX2 ]->setValue( 0 );
|
||||||
myData[ DY2 ]->SetValue( 0 );
|
myData[ DY2 ]->setValue( 0 );
|
||||||
myData[ DZ2 ]->SetValue( 0 );
|
myData[ DZ2 ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -540,33 +525,33 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( getConstructorId() == 1 ) {
|
if ( getConstructorId() == 1 ) {
|
||||||
myData[ X ]->SetValue( 0 );
|
myData[ X ]->setValue( 0 );
|
||||||
myData[ Y ]->SetValue( 0 );
|
myData[ Y ]->setValue( 0 );
|
||||||
myData[ Z ]->SetValue( 0 );
|
myData[ Z ]->setValue( 0 );
|
||||||
|
|
||||||
myData[ DX1 ]->SetValue( 0 );
|
myData[ DX1 ]->setValue( 0 );
|
||||||
myData[ DY1 ]->SetValue( 0 );
|
myData[ DY1 ]->setValue( 0 );
|
||||||
myData[ DZ1 ]->SetValue( 0 );
|
myData[ DZ1 ]->setValue( 0 );
|
||||||
|
|
||||||
myData[ DX2 ]->SetValue( 0 );
|
myData[ DX2 ]->setValue( 0 );
|
||||||
myData[ DY2 ]->SetValue( 0 );
|
myData[ DY2 ]->setValue( 0 );
|
||||||
myData[ DZ2 ]->SetValue( 0 );
|
myData[ DZ2 ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
else if ( getConstructorId() == 2 ) {
|
else if ( getConstructorId() == 2 ) {
|
||||||
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
||||||
myData[ X ]->SetValue( 0 );
|
myData[ X ]->setValue( 0 );
|
||||||
myData[ Y ]->SetValue( 0 );
|
myData[ Y ]->setValue( 0 );
|
||||||
myData[ Z ]->SetValue( 0 );
|
myData[ Z ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group2->LineEdit2 ) {
|
else if ( myEditCurrentArgument == Group2->LineEdit2 ) {
|
||||||
myData[ DX1 ]->SetValue( 0 );
|
myData[ DX1 ]->setValue( 0 );
|
||||||
myData[ DY1 ]->SetValue( 0 );
|
myData[ DY1 ]->setValue( 0 );
|
||||||
myData[ DZ1 ]->SetValue( 0 );
|
myData[ DZ1 ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
||||||
myData[ DX2 ]->SetValue( 0 );
|
myData[ DX2 ]->setValue( 0 );
|
||||||
myData[ DY2 ]->SetValue( 0 );
|
myData[ DY2 ]->setValue( 0 );
|
||||||
myData[ DZ2 ]->SetValue( 0 );
|
myData[ DZ2 ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -641,9 +626,9 @@ void BasicGUI_MarkerDlg::onDeactivate()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_MarkerDlg::enterEvent(QEvent* e)
|
void BasicGUI_MarkerDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
onActivate();
|
onActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -663,8 +648,8 @@ GEOM::GEOM_IOperations_ptr BasicGUI_MarkerDlg::createOperation()
|
|||||||
bool BasicGUI_MarkerDlg::isValid( QString& msg )
|
bool BasicGUI_MarkerDlg::isValid( QString& msg )
|
||||||
{
|
{
|
||||||
const int id = getConstructorId();
|
const int id = getConstructorId();
|
||||||
gp_Vec v1( myData[ DX1 ]->GetValue(), myData[ DY1 ]->GetValue(), myData[ DZ1 ]->GetValue() ),
|
gp_Vec v1( myData[ DX1 ]->value(), myData[ DY1 ]->value(), myData[ DZ1 ]->value() ),
|
||||||
v2( myData[ DX2 ]->GetValue(), myData[ DY2 ]->GetValue(), myData[ DZ2 ]->GetValue() );
|
v2( myData[ DX2 ]->value(), myData[ DY2 ]->value(), myData[ DZ2 ]->value() );
|
||||||
|
|
||||||
bool isOk = false;
|
bool isOk = false;
|
||||||
// we will got exception if the magnitude of any of the 2 vectors <= gp::Resolution()
|
// we will got exception if the magnitude of any of the 2 vectors <= gp::Resolution()
|
||||||
@ -675,8 +660,7 @@ bool BasicGUI_MarkerDlg::isValid( QString& msg )
|
|||||||
msg += tr( "VEC_PARALLEL" );
|
msg += tr( "VEC_PARALLEL" );
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ( id )
|
switch ( id ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
return isOk;
|
return isOk;
|
||||||
case 1:
|
case 1:
|
||||||
@ -696,9 +680,9 @@ bool BasicGUI_MarkerDlg::isValid( QString& msg )
|
|||||||
bool BasicGUI_MarkerDlg::execute( ObjectList& objects )
|
bool BasicGUI_MarkerDlg::execute( ObjectList& objects )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var anObj = GEOM::GEOM_IBasicOperations::_narrow(
|
GEOM::GEOM_Object_var anObj = GEOM::GEOM_IBasicOperations::_narrow(
|
||||||
getOperation() )->MakeMarker( myData[ X ]->GetValue(), myData[ Y ]->GetValue(), myData[ Z ]->GetValue(),
|
getOperation() )->MakeMarker( myData[ X ]->value(), myData[ Y ]->value(), myData[ Z ]->value(),
|
||||||
myData[ DX1 ]->GetValue(), myData[ DY1 ]->GetValue(), myData[ DZ1 ]->GetValue(),
|
myData[ DX1 ]->value(), myData[ DY1 ]->value(), myData[ DZ1 ]->value(),
|
||||||
myData[ DX2 ]->GetValue(), myData[ DY2 ]->GetValue(), myData[ DZ2 ]->GetValue() );
|
myData[ DX2 ]->value(), myData[ DY2 ]->value(), myData[ DZ2 ]->value() );
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if ( !anObj->_is_nil() )
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back( anObj._retn() );
|
||||||
@ -733,12 +717,9 @@ void BasicGUI_MarkerDlg::displayPreview ( const bool activate,
|
|||||||
const bool toRemoveFromEngine,
|
const bool toRemoveFromEngine,
|
||||||
const double lineWidth )
|
const double lineWidth )
|
||||||
{
|
{
|
||||||
if ( !myBlockPreview )
|
if ( !myBlockPreview ) {
|
||||||
{
|
|
||||||
GEOMBase_Skeleton::displayPreview( activate, update, toRemoveFromEngine, lineWidth );
|
GEOMBase_Skeleton::displayPreview( activate, update, toRemoveFromEngine, lineWidth );
|
||||||
if ( myConstructorId == 0 )
|
if ( myConstructorId == 0 )
|
||||||
{
|
|
||||||
GEOMBase_Skeleton::activate( GEOM_MARKER );
|
GEOMBase_Skeleton::activate( GEOM_MARKER );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -19,50 +19,49 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_MarkerDlg.h
|
// File : BasicGUI_MarkerDlg.h
|
||||||
// Author : Sergey LITONIN
|
// Author : Sergey LITONIN, Open CASCADE S.A.S. (sergey.litonin@opencascade.com)
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef DIALOGBOX_Marker_H
|
#ifndef BASICGUI_MARKERDLG_H
|
||||||
#define DIALOGBOX_Marker_H
|
#define BASICGUI_MARKERDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
#include "DlgRef_1Sel_QTD.h"
|
|
||||||
#include "DlgRef_3Sel_QTD.h"
|
|
||||||
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
class DlgRef_SpinBox;
|
class DlgRef_1Sel;
|
||||||
|
class DlgRef_3Sel;
|
||||||
|
class QDoubleSpinBox;
|
||||||
|
class QFrame;
|
||||||
|
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_MarkerDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_MarkerDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum { X, Y, Z, DX1, DY1, DZ1, DX2, DY2, DZ2 };
|
enum { X, Y, Z, DX1, DY1, DZ1, DX2, DY2, DZ2 };
|
||||||
typedef QMap< int, DlgRef_SpinBox* > DataMap;
|
typedef QMap< int, QDoubleSpinBox* > DataMap;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* );
|
BasicGUI_MarkerDlg( GeometryGUI*, QWidget* );
|
||||||
virtual ~BasicGUI_MarkerDlg();
|
virtual ~BasicGUI_MarkerDlg();
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
virtual void closeEvent( QCloseEvent* );
|
||||||
virtual void displayPreview ( const bool activate = false,
|
virtual void displayPreview ( const bool = false,
|
||||||
const bool update = true,
|
const bool = true,
|
||||||
const bool toRemoveFromEngine = true,
|
const bool = true,
|
||||||
const double lineWidth = -1 );
|
const double = -1 );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void enterEvent( QEvent* e );
|
void enterEvent( QEvent* );
|
||||||
void onSelectionDone0();
|
void onSelectionDone0();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@ -83,9 +82,8 @@ private:
|
|||||||
int myBlockPreview;
|
int myBlockPreview;
|
||||||
|
|
||||||
QFrame* aMainGrp;
|
QFrame* aMainGrp;
|
||||||
Ui::DlgRef_1Sel_QTD* Group1;
|
DlgRef_1Sel* Group1;
|
||||||
Ui::DlgRef_3Sel_QTD* Group2;
|
DlgRef_3Sel* Group2;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_Marker_H
|
#endif // BASICGUI_MARKERDLG_H
|
||||||
|
@ -19,32 +19,25 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_PlaneDlg.cxx
|
// File : BasicGUI_PlaneDlg.cxx
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI_PlaneDlg.h"
|
#include "BasicGUI_PlaneDlg.h"
|
||||||
#include "DlgRef_1Sel1Spin.h"
|
|
||||||
#include "DlgRef_2Sel1Spin.h"
|
|
||||||
#include "DlgRef_3Sel1Spin.h"
|
|
||||||
#include "DlgRef_SpinBox.h"
|
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "GEOMBase.h"
|
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <GeometryGUI.h>
|
||||||
#include "SUIT_Session.h"
|
#include <GEOMBase.h>
|
||||||
#include "SalomeApp_Application.h"
|
|
||||||
#include "LightApp_SelectionMgr.h"
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
#include <SUIT_Session.h>
|
||||||
|
#include <SalomeApp_Application.h>
|
||||||
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
#include <TColStd_MapOfInteger.hxx>
|
#include <TColStd_MapOfInteger.hxx>
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_PlaneDlg()
|
// class : BasicGUI_PlaneDlg()
|
||||||
@ -55,7 +48,7 @@ using namespace std;
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_PlaneDlg::BasicGUI_PlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_PlaneDlg::BasicGUI_PlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
const char* name, bool modal, Qt::WindowFlags fl )
|
const char* name, bool modal, Qt::WindowFlags fl )
|
||||||
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
: GEOMBase_Skeleton( theGeometryGUI, parent, name, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_PLANE_PV" ) ) );
|
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 image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_PLANE_3PNTS" ) ) );
|
||||||
@ -65,12 +58,12 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(GeometryGUI* theGeometryGUI, QWidget* paren
|
|||||||
setWindowTitle( tr( "GEOM_PLANE_TITLE" ) );
|
setWindowTitle( tr( "GEOM_PLANE_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_PLANE"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_PLANE" ) );
|
||||||
RadioButton1->setIcon(image0);
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->setIcon(image1);
|
mainFrame()->RadioButton2->setIcon( image1 );
|
||||||
RadioButton3->setIcon(image2);
|
mainFrame()->RadioButton3->setIcon( image2 );
|
||||||
|
|
||||||
GroupPntDir = new DlgRef_2Sel1Spin(this, "GroupPointDirection");
|
GroupPntDir = new DlgRef_2Sel1Spin( centralWidget() );
|
||||||
GroupPntDir->GroupBox1->setTitle( tr( "GEOM_PLANE_PV" ) );
|
GroupPntDir->GroupBox1->setTitle( tr( "GEOM_PLANE_PV" ) );
|
||||||
GroupPntDir->TextLabel1->setText( tr( "GEOM_POINT" ) );
|
GroupPntDir->TextLabel1->setText( tr( "GEOM_POINT" ) );
|
||||||
GroupPntDir->TextLabel2->setText( tr( "GEOM_VECTOR" ) );
|
GroupPntDir->TextLabel2->setText( tr( "GEOM_VECTOR" ) );
|
||||||
@ -80,7 +73,7 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(GeometryGUI* theGeometryGUI, QWidget* paren
|
|||||||
GroupPntDir->LineEdit1->setReadOnly( true );
|
GroupPntDir->LineEdit1->setReadOnly( true );
|
||||||
GroupPntDir->LineEdit2->setReadOnly( true );
|
GroupPntDir->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
Group3Pnts = new DlgRef_3Sel1Spin(this, "Group3Pnts");
|
Group3Pnts = new DlgRef_3Sel1Spin( centralWidget() );
|
||||||
Group3Pnts->GroupBox1->setTitle( tr( "GEOM_3_POINTS" ) );
|
Group3Pnts->GroupBox1->setTitle( tr( "GEOM_3_POINTS" ) );
|
||||||
Group3Pnts->TextLabel1->setText( tr( "GEOM_POINT1" ) );
|
Group3Pnts->TextLabel1->setText( tr( "GEOM_POINT1" ) );
|
||||||
Group3Pnts->TextLabel2->setText( tr( "GEOM_POINT2" ) );
|
Group3Pnts->TextLabel2->setText( tr( "GEOM_POINT2" ) );
|
||||||
@ -94,7 +87,7 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(GeometryGUI* theGeometryGUI, QWidget* paren
|
|||||||
Group3Pnts->LineEdit2->setReadOnly( true );
|
Group3Pnts->LineEdit2->setReadOnly( true );
|
||||||
Group3Pnts->LineEdit3->setReadOnly( true );
|
Group3Pnts->LineEdit3->setReadOnly( true );
|
||||||
|
|
||||||
GroupFace = new DlgRef_1Sel1Spin(this, "GroupFace");
|
GroupFace = new DlgRef_1Sel1Spin( centralWidget() );
|
||||||
GroupFace->GroupBox1->setTitle( tr( "GEOM_FACE_OR_LCS" ) );
|
GroupFace->GroupBox1->setTitle( tr( "GEOM_FACE_OR_LCS" ) );
|
||||||
GroupFace->TextLabel1->setText( tr( "GEOM_SELECTION" ) );
|
GroupFace->TextLabel1->setText( tr( "GEOM_SELECTION" ) );
|
||||||
GroupFace->TextLabel2->setText( tr( "GEOM_PLANE_SIZE" ) );
|
GroupFace->TextLabel2->setText( tr( "GEOM_PLANE_SIZE" ) );
|
||||||
@ -102,9 +95,11 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(GeometryGUI* theGeometryGUI, QWidget* paren
|
|||||||
|
|
||||||
GroupFace->LineEdit1->setReadOnly( true );
|
GroupFace->LineEdit1->setReadOnly( true );
|
||||||
|
|
||||||
gridLayout1->addWidget(GroupPntDir, 2, 0);
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
gridLayout1->addWidget(Group3Pnts, 2, 0);
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
gridLayout1->addWidget(GroupFace, 2, 0);
|
layout->addWidget( GroupPntDir );
|
||||||
|
layout->addWidget( Group3Pnts );
|
||||||
|
layout->addWidget( GroupFace );
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName( "plane.htm" );
|
setHelpFileName( "plane.htm" );
|
||||||
@ -142,21 +137,22 @@ void BasicGUI_PlaneDlg::Init()
|
|||||||
double aTrimSize = 2000.0;
|
double aTrimSize = 2000.0;
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes */
|
/* min, max, step and decimals for spin boxes */
|
||||||
GroupPntDir->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, aStep, 3 );
|
initSpinBox( GroupPntDir->SpinBox_DX, 0.001, COORD_MAX, aStep, 3 );
|
||||||
GroupPntDir->SpinBox_DX->SetValue( aTrimSize );
|
GroupPntDir->SpinBox_DX->setValue( aTrimSize );
|
||||||
Group3Pnts->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3);
|
initSpinBox( Group3Pnts->SpinBox_DX, 0.001, COORD_MAX, aStep, 3 );
|
||||||
Group3Pnts->SpinBox_DX->SetValue( aTrimSize );
|
Group3Pnts->SpinBox_DX->setValue( aTrimSize );
|
||||||
GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3);
|
initSpinBox( GroupFace->SpinBox_DX, 0.001, COORD_MAX, aStep, 3 );
|
||||||
GroupFace->SpinBox_DX->SetValue( aTrimSize );
|
GroupFace->SpinBox_DX->setValue( aTrimSize );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
connect( GroupPntDir->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPntDir->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( GroupPntDir->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPntDir->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
@ -176,16 +172,16 @@ void BasicGUI_PlaneDlg::Init()
|
|||||||
connect( Group3Pnts->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( Group3Pnts->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
connect( GroupFace->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( GroupFace->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
|
||||||
|
// VSR: TODO ->>
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPntDir->SpinBox_DX, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPntDir->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group3Pnts->SpinBox_DX, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group3Pnts->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupFace->SpinBox_DX, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupFace->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
|
// <<-
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_PLANE" ).toLatin1().constData() );
|
initName( tr( "GEOM_PLANE" ) );
|
||||||
|
|
||||||
Group3Pnts->hide();
|
|
||||||
GroupFace->hide();
|
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,18 +195,16 @@ void BasicGUI_PlaneDlg::ConstructorsClicked(int constructorId)
|
|||||||
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
||||||
myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = myFace = GEOM::GEOM_Object::_nil();
|
myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = myFace = GEOM::GEOM_Object::_nil();
|
||||||
|
|
||||||
switch ( constructorId )
|
switch ( constructorId ) {
|
||||||
{
|
|
||||||
case 0: /* plane from a point and a direction (vector, edge...) */
|
case 0: /* plane from a point and a direction (vector, edge...) */
|
||||||
{
|
{
|
||||||
Group3Pnts->hide();
|
Group3Pnts->hide();
|
||||||
GroupFace->hide();
|
GroupFace->hide();
|
||||||
resize(0, 0);
|
|
||||||
GroupPntDir->show();
|
GroupPntDir->show();
|
||||||
|
|
||||||
myEditCurrentArgument = GroupPntDir->LineEdit1;
|
myEditCurrentArgument = GroupPntDir->LineEdit1;
|
||||||
GroupPntDir->LineEdit1->setText(tr(""));
|
GroupPntDir->LineEdit1->setText( "" );
|
||||||
GroupPntDir->LineEdit2->setText(tr(""));
|
GroupPntDir->LineEdit2->setText( "" );
|
||||||
|
|
||||||
/* for the first argument */
|
/* for the first argument */
|
||||||
globalSelection( GEOM_POINT );
|
globalSelection( GEOM_POINT );
|
||||||
@ -220,7 +214,6 @@ void BasicGUI_PlaneDlg::ConstructorsClicked(int constructorId)
|
|||||||
{
|
{
|
||||||
GroupPntDir->hide();
|
GroupPntDir->hide();
|
||||||
GroupFace->hide();
|
GroupFace->hide();
|
||||||
resize(0, 0);
|
|
||||||
Group3Pnts->show();
|
Group3Pnts->show();
|
||||||
|
|
||||||
myEditCurrentArgument = Group3Pnts->LineEdit1;
|
myEditCurrentArgument = Group3Pnts->LineEdit1;
|
||||||
@ -236,11 +229,10 @@ void BasicGUI_PlaneDlg::ConstructorsClicked(int constructorId)
|
|||||||
{
|
{
|
||||||
GroupPntDir->hide();
|
GroupPntDir->hide();
|
||||||
Group3Pnts->hide();
|
Group3Pnts->hide();
|
||||||
resize(0, 0);
|
|
||||||
GroupFace->show();
|
GroupFace->show();
|
||||||
|
|
||||||
myEditCurrentArgument = GroupFace->LineEdit1;
|
myEditCurrentArgument = GroupFace->LineEdit1;
|
||||||
GroupFace->LineEdit1->setText(tr(""));
|
GroupFace->LineEdit1->setText( "" );
|
||||||
|
|
||||||
/* for the first argument */
|
/* for the first argument */
|
||||||
//globalSelection( GEOM_PLANE );
|
//globalSelection( GEOM_PLANE );
|
||||||
@ -252,6 +244,10 @@ void BasicGUI_PlaneDlg::ConstructorsClicked(int constructorId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize( minimumSize() );
|
||||||
|
|
||||||
myEditCurrentArgument->setFocus();
|
myEditCurrentArgument->setFocus();
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
@ -300,8 +296,7 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
|
|||||||
{
|
{
|
||||||
myEditCurrentArgument->setText("");
|
myEditCurrentArgument->setText("");
|
||||||
|
|
||||||
if ( IObjectCount() != 1 )
|
if ( IObjectCount() != 1 ) {
|
||||||
{
|
|
||||||
if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) myPoint = GEOM::GEOM_Object::_nil();
|
if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) myPoint = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) myDir = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) myDir = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
||||||
@ -314,8 +309,7 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
|
|||||||
// nbSel == 1
|
// nbSel == 1
|
||||||
Standard_Boolean aRes = Standard_False;
|
Standard_Boolean aRes = Standard_False;
|
||||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
||||||
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) myPoint = aSelectedObject;
|
if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) myPoint = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) myDir = aSelectedObject;
|
else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) myDir = aSelectedObject;
|
||||||
@ -374,8 +368,7 @@ void BasicGUI_PlaneDlg::LineEditReturnPressed()
|
|||||||
send == Group3Pnts->LineEdit1 ||
|
send == Group3Pnts->LineEdit1 ||
|
||||||
send == Group3Pnts->LineEdit2 ||
|
send == Group3Pnts->LineEdit2 ||
|
||||||
send == Group3Pnts->LineEdit3 ||
|
send == Group3Pnts->LineEdit3 ||
|
||||||
send == GroupFace->LineEdit1 )
|
send == GroupFace->LineEdit1 ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument = send;
|
myEditCurrentArgument = send;
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
}
|
}
|
||||||
@ -411,9 +404,9 @@ void BasicGUI_PlaneDlg::DeactivateActiveDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_PlaneDlg::enterEvent(QEvent* e)
|
void BasicGUI_PlaneDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,11 +426,10 @@ void BasicGUI_PlaneDlg::ValueChangedInSpinBox(double newValue)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
double BasicGUI_PlaneDlg::getSize() const
|
double BasicGUI_PlaneDlg::getSize() const
|
||||||
{
|
{
|
||||||
switch ( getConstructorId() )
|
switch ( getConstructorId() ) {
|
||||||
{
|
case 0 : return GroupPntDir->SpinBox_DX->value();
|
||||||
case 0 : return GroupPntDir->SpinBox_DX->GetValue();
|
case 1 : return Group3Pnts->SpinBox_DX->value();
|
||||||
case 1 : return Group3Pnts->SpinBox_DX->GetValue();
|
case 2 : return GroupFace->SpinBox_DX->value();
|
||||||
case 2 : return GroupFace->SpinBox_DX->GetValue();
|
|
||||||
}
|
}
|
||||||
return 0.;
|
return 0.;
|
||||||
}
|
}
|
||||||
@ -467,8 +459,7 @@ static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Obje
|
|||||||
bool BasicGUI_PlaneDlg::isValid( QString& msg )
|
bool BasicGUI_PlaneDlg::isValid( QString& msg )
|
||||||
{
|
{
|
||||||
const int id = getConstructorId();
|
const int id = getConstructorId();
|
||||||
if ( getSize() <= 0 )
|
if ( getSize() <= 0 ) {
|
||||||
{
|
|
||||||
msg = QString( "Please, enter size greater than 0." );
|
msg = QString( "Please, enter size greater than 0." );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -492,8 +483,7 @@ bool BasicGUI_PlaneDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var anObj;
|
GEOM::GEOM_Object_var anObj;
|
||||||
|
|
||||||
switch ( getConstructorId() )
|
switch ( getConstructorId() ) {
|
||||||
{
|
|
||||||
case 0 :
|
case 0 :
|
||||||
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePlanePntVec( myPoint, myDir, getSize() );
|
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePlanePntVec( myPoint, myDir, getSize() );
|
||||||
res = true;
|
res = true;
|
||||||
|
@ -19,18 +19,16 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_PlaneDlg.h
|
// File : BasicGUI_PlaneDlg.h
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef DIALOGBOX_PLANE_H
|
#ifndef BASICGUI_PLANEDLG_H
|
||||||
#define DIALOGBOX_PLANE_H
|
#define BASICGUI_PLANEDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
|
|
||||||
class DlgRef_1Sel1Spin;
|
class DlgRef_1Sel1Spin;
|
||||||
class DlgRef_2Sel1Spin;
|
class DlgRef_2Sel1Spin;
|
||||||
@ -40,28 +38,29 @@ class DlgRef_3Sel1Spin;
|
|||||||
// class : BasicGUI_PlaneDlg
|
// class : BasicGUI_PlaneDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_PlaneDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_PlaneDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_PlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
BasicGUI_PlaneDlg( GeometryGUI*, QWidget* = 0,
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
|
const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
~BasicGUI_PlaneDlg();
|
~BasicGUI_PlaneDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
double getSize() const;
|
double getSize() const;
|
||||||
|
|
||||||
|
private:
|
||||||
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3, myFace;
|
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3, myFace;
|
||||||
|
|
||||||
DlgRef_2Sel1Spin* GroupPntDir;
|
DlgRef_2Sel1Spin* GroupPntDir;
|
||||||
@ -79,9 +78,8 @@ private slots:
|
|||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void ConstructorsClicked(int constructorId);
|
void ConstructorsClicked( int );
|
||||||
void ValueChangedInSpinBox(double newValue);
|
void ValueChangedInSpinBox( double );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_PLANE_H
|
#endif // BASICGUI_PLANEDLG_H
|
||||||
|
@ -19,29 +19,23 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_PointDlg.cxx
|
// File : BasicGUI_PointDlg.cxx
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI_PointDlg.h"
|
#include "BasicGUI_PointDlg.h"
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <SUIT_ResourceMgr.h>
|
||||||
#include "SUIT_Session.h"
|
#include <SUIT_Session.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <SalomeApp_Application.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GeometryGUI.h>
|
||||||
#include "GEOMBase.h"
|
#include <GEOMBase.h>
|
||||||
|
|
||||||
#include "DlgRef_SpinBox.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "DlgRef_1Sel1Spin.h"
|
|
||||||
#include "DlgRef_3Spin.h"
|
|
||||||
#include "DlgRef_1Sel3Spin.h"
|
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
@ -55,7 +49,6 @@
|
|||||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||||
#include <TopTools_IndexedMapOfShape.hxx>
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_PointDlg()
|
// class : BasicGUI_PointDlg()
|
||||||
// purpose : Constructs a BasicGUI_PointDlg which is a child of 'parent', with the
|
// purpose : Constructs a BasicGUI_PointDlg which is a child of 'parent', with the
|
||||||
@ -74,44 +67,33 @@ BasicGUI_PointDlg::BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* paren
|
|||||||
|
|
||||||
setWindowTitle( tr( "GEOM_POINT_TITLE" ) );
|
setWindowTitle( tr( "GEOM_POINT_TITLE" ) );
|
||||||
|
|
||||||
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"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_POINTS" ) );
|
||||||
RadioButton1->setIcon(image0);
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->setIcon(image3);
|
mainFrame()->RadioButton2->setIcon( image3 );
|
||||||
RadioButton3->setIcon(image1);
|
mainFrame()->RadioButton3->setIcon( image1 );
|
||||||
|
|
||||||
GroupXYZ = new DlgRef_3Spin( aFrame, "GroupXYZ" );
|
GroupXYZ = new DlgRef_3Spin( centralWidget() );
|
||||||
GroupXYZ->GroupBox1->setTitle( tr( "GEOM_COORDINATES" ) );
|
GroupXYZ->GroupBox1->setTitle( tr( "GEOM_COORDINATES" ) );
|
||||||
GroupXYZ->TextLabel1->setText( tr( "GEOM_X" ) );
|
GroupXYZ->TextLabel1->setText( tr( "GEOM_X" ) );
|
||||||
GroupXYZ->TextLabel2->setText( tr( "GEOM_Y" ) );
|
GroupXYZ->TextLabel2->setText( tr( "GEOM_Y" ) );
|
||||||
GroupXYZ->TextLabel3->setText( tr( "GEOM_Z" ) );
|
GroupXYZ->TextLabel3->setText( tr( "GEOM_Z" ) );
|
||||||
aFrameLayout->addWidget(GroupXYZ);
|
|
||||||
|
|
||||||
GroupOnCurve = new DlgRef_1Sel1Spin( aFrame, "GroupOnCurve" );
|
GroupOnCurve = new DlgRef_1Sel1Spin( centralWidget() );
|
||||||
GroupOnCurve->GroupBox1->setTitle( tr( "GEOM_PARAM_POINT" ) );
|
GroupOnCurve->GroupBox1->setTitle( tr( "GEOM_PARAM_POINT" ) );
|
||||||
GroupOnCurve->TextLabel1->setText( tr( "GEOM_EDGE" ) );
|
GroupOnCurve->TextLabel1->setText( tr( "GEOM_EDGE" ) );
|
||||||
GroupOnCurve->TextLabel2->setText( tr( "GEOM_PARAMETER" ) );
|
GroupOnCurve->TextLabel2->setText( tr( "GEOM_PARAMETER" ) );
|
||||||
GroupOnCurve->PushButton1->setIcon( image2 );
|
GroupOnCurve->PushButton1->setIcon( image2 );
|
||||||
aFrameLayout->addWidget(GroupOnCurve);
|
|
||||||
|
|
||||||
GroupRefPoint = new DlgRef_1Sel3Spin( aFrame, "GoupRefPoint" );
|
GroupRefPoint = new DlgRef_1Sel3Spin( centralWidget() );
|
||||||
GroupRefPoint->GroupBox1->setTitle( tr( "GEOM_REF_POINT" ) );
|
GroupRefPoint->GroupBox1->setTitle( tr( "GEOM_REF_POINT" ) );
|
||||||
GroupRefPoint->TextLabel1->setText( tr( "GEOM_POINT" ) );
|
GroupRefPoint->TextLabel1->setText( tr( "GEOM_POINT" ) );
|
||||||
GroupRefPoint->PushButton1->setIcon( image2 );
|
GroupRefPoint->PushButton1->setIcon( image2 );
|
||||||
GroupRefPoint->TextLabel2->setText( tr( "GEOM_DX" ) );
|
GroupRefPoint->TextLabel2->setText( tr( "GEOM_DX" ) );
|
||||||
GroupRefPoint->TextLabel3->setText( tr( "GEOM_DY" ) );
|
GroupRefPoint->TextLabel3->setText( tr( "GEOM_DY" ) );
|
||||||
GroupRefPoint->TextLabel4->setText( tr( "GEOM_DZ" ) );
|
GroupRefPoint->TextLabel4->setText( tr( "GEOM_DZ" ) );
|
||||||
aFrameLayout->addWidget(GroupRefPoint);
|
|
||||||
|
|
||||||
gridLayout1->addWidget( aFrame, 2, 0 );
|
myCoordGrp = new QGroupBox( tr( "GEOM_COORDINATES" ), centralWidget() );
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
myCoordGrp = new QGroupBox( tr( "GEOM_COORDINATES" ), aFrame );
|
|
||||||
QGridLayout* myCoordGrpLayout = new QGridLayout( myCoordGrp );
|
QGridLayout* myCoordGrpLayout = new QGridLayout( myCoordGrp );
|
||||||
myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), myCoordGrp ), 0, 0 );
|
myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), myCoordGrp ), 0, 0 );
|
||||||
myX = new QLineEdit( myCoordGrp );
|
myX = new QLineEdit( myCoordGrp );
|
||||||
@ -123,6 +105,13 @@ BasicGUI_PointDlg::BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* paren
|
|||||||
myZ = new QLineEdit( myCoordGrp );
|
myZ = new QLineEdit( myCoordGrp );
|
||||||
myCoordGrpLayout->addWidget( myZ, 2, 1 );
|
myCoordGrpLayout->addWidget( myZ, 2, 1 );
|
||||||
|
|
||||||
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupXYZ );
|
||||||
|
layout->addWidget( GroupOnCurve );
|
||||||
|
layout->addWidget( GroupRefPoint );
|
||||||
|
layout->addWidget( myCoordGrp );
|
||||||
|
|
||||||
myX->setReadOnly( true );
|
myX->setReadOnly( true );
|
||||||
myY->setReadOnly( true );
|
myY->setReadOnly( true );
|
||||||
myZ->setReadOnly( true );
|
myZ->setReadOnly( true );
|
||||||
@ -171,32 +160,34 @@ void BasicGUI_PointDlg::Init()
|
|||||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes */
|
/* min, max, step and decimals for spin boxes */
|
||||||
GroupXYZ->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
initSpinBox( GroupXYZ->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 );
|
||||||
GroupXYZ->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
initSpinBox( GroupXYZ->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 );
|
||||||
GroupXYZ->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
initSpinBox( GroupXYZ->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 3 );
|
||||||
GroupXYZ->SpinBox_DX->SetValue(0.0);
|
GroupXYZ->SpinBox_DX->setValue( 0.0 );
|
||||||
GroupXYZ->SpinBox_DY->SetValue(0.0);
|
GroupXYZ->SpinBox_DY->setValue( 0.0 );
|
||||||
GroupXYZ->SpinBox_DZ->SetValue(0.0);
|
GroupXYZ->SpinBox_DZ->setValue( 0.0 );
|
||||||
|
|
||||||
GroupRefPoint->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
initSpinBox( GroupRefPoint->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 );
|
||||||
GroupRefPoint->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
initSpinBox( GroupRefPoint->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 );
|
||||||
GroupRefPoint->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
initSpinBox( GroupRefPoint->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 3 );
|
||||||
GroupRefPoint->SpinBox_DX->SetValue(0.0);
|
GroupRefPoint->SpinBox_DX->setValue( 0.0 );
|
||||||
GroupRefPoint->SpinBox_DY->SetValue(0.0);
|
GroupRefPoint->SpinBox_DY->setValue( 0.0 );
|
||||||
GroupRefPoint->SpinBox_DZ->SetValue(0.0);
|
GroupRefPoint->SpinBox_DZ->setValue( 0.0 );
|
||||||
|
|
||||||
step = 0.1;
|
step = 0.1;
|
||||||
GroupOnCurve->SpinBox_DX->RangeStepAndValidator(0., 1., step, 3);
|
|
||||||
GroupOnCurve->SpinBox_DX->SetValue( 0.5 );
|
initSpinBox( GroupOnCurve->SpinBox_DX, 0., 1., step, 3 );
|
||||||
|
GroupOnCurve->SpinBox_DX->setValue( 0.5 );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
connect( GroupOnCurve->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupOnCurve->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( GroupOnCurve->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( GroupOnCurve->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
@ -209,6 +200,7 @@ void BasicGUI_PointDlg::Init()
|
|||||||
connect( GroupRefPoint->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( GroupRefPoint->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
connect( GroupRefPoint->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( GroupRefPoint->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
|
||||||
|
// VSR: TODO ->>
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupOnCurve->SpinBox_DX, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupOnCurve->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DX, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DY, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DY, SLOT( SetStep( double ) ) );
|
||||||
@ -216,11 +208,12 @@ void BasicGUI_PointDlg::Init()
|
|||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DX, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DY, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DY, SLOT( SetStep( double ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DZ, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DZ, SLOT( SetStep( double ) ) );
|
||||||
|
// <<-
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr("GEOM_VERTEX").toLatin1().constData() );
|
initName( tr( "GEOM_VERTEX" ) );
|
||||||
|
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
}
|
}
|
||||||
@ -232,8 +225,7 @@ void BasicGUI_PointDlg::Init()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
|
void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
|
||||||
{
|
{
|
||||||
switch ( constructorId )
|
switch ( constructorId ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||||
@ -241,9 +233,9 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
|
|||||||
GroupRefPoint->hide();
|
GroupRefPoint->hide();
|
||||||
GroupOnCurve->hide();
|
GroupOnCurve->hide();
|
||||||
|
|
||||||
GroupXYZ->show();
|
|
||||||
|
|
||||||
myCoordGrp->hide();
|
myCoordGrp->hide();
|
||||||
|
|
||||||
|
GroupXYZ->show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
@ -336,8 +328,7 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
|||||||
{
|
{
|
||||||
const int id = getConstructorId();
|
const int id = getConstructorId();
|
||||||
|
|
||||||
if ( ( id == 1 || id == 2 ) && myEditCurrentArgument != 0 )
|
if ( ( id == 1 || id == 2 ) && myEditCurrentArgument != 0 ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument->setText( "" );
|
myEditCurrentArgument->setText( "" );
|
||||||
myX->setText( "" );
|
myX->setText( "" );
|
||||||
myY->setText( "" );
|
myY->setText( "" );
|
||||||
@ -345,30 +336,24 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
|||||||
myRefPoint = myEdge = GEOM::GEOM_Object::_nil();
|
myRefPoint = myEdge = GEOM::GEOM_Object::_nil();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( IObjectCount() == 1 )
|
if ( IObjectCount() == 1 ) {
|
||||||
{
|
|
||||||
Standard_Boolean aRes = Standard_False;
|
Standard_Boolean aRes = Standard_False;
|
||||||
Handle(SALOME_InteractiveObject) anIO = firstIObject();
|
Handle(SALOME_InteractiveObject) anIO = firstIObject();
|
||||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
|
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
|
||||||
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
|
||||||
{
|
if ( id == 0 ) {
|
||||||
if ( id == 0 )
|
|
||||||
{
|
|
||||||
// get CORBA reference to data object
|
// get CORBA reference to data object
|
||||||
TopoDS_Shape aShape = myGeomGUI->GetShapeReader().GetShape
|
TopoDS_Shape aShape = myGeomGUI->GetShapeReader().GetShape( myGeomGUI->GetGeomGen(), aSelectedObject );
|
||||||
( myGeomGUI->GetGeomGen(), aSelectedObject );
|
|
||||||
if ( aShape.IsNull() )
|
if ( aShape.IsNull() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( aShape.ShapeType() != TopAbs_VERTEX )
|
if ( aShape.ShapeType() != TopAbs_VERTEX ) {
|
||||||
{
|
|
||||||
TColStd_IndexedMapOfInteger aMap;
|
TColStd_IndexedMapOfInteger aMap;
|
||||||
LightApp_Application* anApp =
|
LightApp_Application* anApp =
|
||||||
(LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
(LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
||||||
anApp->selectionMgr()->GetIndexes( anIO, aMap );
|
anApp->selectionMgr()->GetIndexes( anIO, aMap );
|
||||||
|
|
||||||
if ( aMap.Extent() == 1 )
|
if ( aMap.Extent() == 1 ) {
|
||||||
{
|
|
||||||
int anIndex = aMap( 1 );
|
int anIndex = aMap( 1 );
|
||||||
TopTools_IndexedMapOfShape aShapes;
|
TopTools_IndexedMapOfShape aShapes;
|
||||||
TopExp::MapShapes( aShape, aShapes );
|
TopExp::MapShapes( aShape, aShapes );
|
||||||
@ -382,17 +367,15 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
|
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||||
GroupXYZ->SpinBox_DX->SetValue( aPnt.X() );
|
GroupXYZ->SpinBox_DX->setValue( aPnt.X() );
|
||||||
GroupXYZ->SpinBox_DY->SetValue( aPnt.Y() );
|
GroupXYZ->SpinBox_DY->setValue( aPnt.Y() );
|
||||||
GroupXYZ->SpinBox_DZ->SetValue( aPnt.Z() );
|
GroupXYZ->SpinBox_DZ->setValue( aPnt.Z() );
|
||||||
}
|
}
|
||||||
else if ( id == 1 )
|
else if ( id == 1 ) {
|
||||||
{
|
|
||||||
myRefPoint = aSelectedObject;
|
myRefPoint = aSelectedObject;
|
||||||
GroupRefPoint->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
GroupRefPoint->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
}
|
}
|
||||||
else if ( id == 2 )
|
else if ( id == 2 ) {
|
||||||
{
|
|
||||||
myEdge = aSelectedObject;
|
myEdge = aSelectedObject;
|
||||||
GroupOnCurve->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
GroupOnCurve->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
}
|
}
|
||||||
@ -426,15 +409,13 @@ void BasicGUI_PointDlg::SetEditCurrentArgument()
|
|||||||
{
|
{
|
||||||
QPushButton* send = (QPushButton*)sender();
|
QPushButton* send = (QPushButton*)sender();
|
||||||
|
|
||||||
if ( send == GroupRefPoint->PushButton1 )
|
if ( send == GroupRefPoint->PushButton1 ) {
|
||||||
{
|
|
||||||
GroupRefPoint->LineEdit1->setFocus();
|
GroupRefPoint->LineEdit1->setFocus();
|
||||||
myEditCurrentArgument = GroupRefPoint->LineEdit1;
|
myEditCurrentArgument = GroupRefPoint->LineEdit1;
|
||||||
|
|
||||||
globalSelection( GEOM_POINT );
|
globalSelection( GEOM_POINT );
|
||||||
}
|
}
|
||||||
else if ( send == GroupOnCurve->PushButton1 )
|
else if ( send == GroupOnCurve->PushButton1 ) {
|
||||||
{
|
|
||||||
GroupOnCurve->LineEdit1->setFocus();
|
GroupOnCurve->LineEdit1->setFocus();
|
||||||
myEditCurrentArgument = GroupOnCurve->LineEdit1;
|
myEditCurrentArgument = GroupOnCurve->LineEdit1;
|
||||||
|
|
||||||
@ -447,9 +428,9 @@ void BasicGUI_PointDlg::SetEditCurrentArgument()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose : to reactivate this dialog box when mouse enter onto the window
|
// purpose : to reactivate this dialog box when mouse enter onto the window
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_PointDlg::enterEvent(QEvent* e)
|
void BasicGUI_PointDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,7 +473,7 @@ void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
double BasicGUI_PointDlg::getParameter() const
|
double BasicGUI_PointDlg::getParameter() const
|
||||||
{
|
{
|
||||||
return GroupOnCurve->SpinBox_DX->GetValue();
|
return GroupOnCurve->SpinBox_DX->value();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -501,11 +482,10 @@ double BasicGUI_PointDlg::getParameter() const
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_PointDlg::OnPointSelected( const gp_Pnt& thePnt )
|
void BasicGUI_PointDlg::OnPointSelected( const gp_Pnt& thePnt )
|
||||||
{
|
{
|
||||||
if ( getConstructorId() == 0 )
|
if ( getConstructorId() == 0 ) {
|
||||||
{
|
GroupXYZ->SpinBox_DX->setValue( thePnt.X() );
|
||||||
GroupXYZ->SpinBox_DX->SetValue( thePnt.X() );
|
GroupXYZ->SpinBox_DY->setValue( thePnt.Y() );
|
||||||
GroupXYZ->SpinBox_DY->SetValue( thePnt.Y() );
|
GroupXYZ->SpinBox_DZ->setValue( thePnt.Z() );
|
||||||
GroupXYZ->SpinBox_DZ->SetValue( thePnt.Z() );
|
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
@ -546,13 +526,12 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var anObj;
|
GEOM::GEOM_Object_var anObj;
|
||||||
|
|
||||||
switch ( getConstructorId() )
|
switch ( getConstructorId() ) {
|
||||||
{
|
|
||||||
case 0 :
|
case 0 :
|
||||||
{
|
{
|
||||||
double x = GroupXYZ->SpinBox_DX->GetValue();
|
double x = GroupXYZ->SpinBox_DX->value();
|
||||||
double y = GroupXYZ->SpinBox_DY->GetValue();
|
double y = GroupXYZ->SpinBox_DY->value();
|
||||||
double z = GroupXYZ->SpinBox_DZ->GetValue();
|
double z = GroupXYZ->SpinBox_DZ->value();
|
||||||
|
|
||||||
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePointXYZ( x, y, z );
|
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePointXYZ( x, y, z );
|
||||||
res = true;
|
res = true;
|
||||||
@ -560,9 +539,9 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects )
|
|||||||
}
|
}
|
||||||
case 1 :
|
case 1 :
|
||||||
{
|
{
|
||||||
double dx = GroupRefPoint->SpinBox_DX->GetValue();
|
double dx = GroupRefPoint->SpinBox_DX->value();
|
||||||
double dy = GroupRefPoint->SpinBox_DY->GetValue();
|
double dy = GroupRefPoint->SpinBox_DY->value();
|
||||||
double dz = GroupRefPoint->SpinBox_DZ->GetValue();
|
double dz = GroupRefPoint->SpinBox_DZ->value();
|
||||||
|
|
||||||
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->
|
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->
|
||||||
MakePointWithReference( myRefPoint, dx, dy, dz );
|
MakePointWithReference( myRefPoint, dx, dy, dz );
|
||||||
@ -576,27 +555,22 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( getConstructorId() == 1 || getConstructorId() == 2 )
|
if ( getConstructorId() == 1 || getConstructorId() == 2 ) {
|
||||||
{
|
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
|
if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
||||||
{
|
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||||
myX->setText( QString( "%1" ).arg( aPnt.X() ) );
|
myX->setText( QString( "%1" ).arg( aPnt.X() ) );
|
||||||
myY->setText( QString( "%1" ).arg( aPnt.Y() ) );
|
myY->setText( QString( "%1" ).arg( aPnt.Y() ) );
|
||||||
myZ->setText( QString( "%1" ).arg( aPnt.Z() ) );
|
myZ->setText( QString( "%1" ).arg( aPnt.Z() ) );
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
myX->setText( "" );
|
myX->setText( "" );
|
||||||
myY->setText( "" );
|
myY->setText( "" );
|
||||||
myZ->setText( "" );
|
myZ->setText( "" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if ( !anObj->_is_nil() ) {
|
||||||
{
|
|
||||||
//printf( "--> a valid point is created\n" );
|
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back( anObj._retn() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,18 +19,16 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_PointDlg.h
|
// File : BasicGUI_PointDlg.h
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef DIALOGBOX_POINT_H
|
#ifndef BASICGUI_POINTDLG_H
|
||||||
#define DIALOGBOX_POINT_H
|
#define BASICGUI_POINTDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
|
|
||||||
class DlgRef_1Sel1Spin;
|
class DlgRef_1Sel1Spin;
|
||||||
class DlgRef_3Spin;
|
class DlgRef_3Spin;
|
||||||
@ -45,32 +43,33 @@ class gp_Pnt;
|
|||||||
// class : BasicGUI_PointDlg
|
// class : BasicGUI_PointDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_PointDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_PointDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
BasicGUI_PointDlg( GeometryGUI*, QWidget* = 0,
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
|
const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
|
|
||||||
~BasicGUI_PointDlg();
|
~BasicGUI_PointDlg();
|
||||||
|
|
||||||
bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); };
|
bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); }
|
||||||
void OnPointSelected( const gp_Pnt& ); // called by BasicGUI::OnMousePress()
|
void OnPointSelected( const gp_Pnt& ); // called by BasicGUI::OnMousePress()
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
double getParameter() const;
|
double getParameter() const;
|
||||||
|
|
||||||
|
private:
|
||||||
GEOM::GEOM_Object_var myEdge;
|
GEOM::GEOM_Object_var myEdge;
|
||||||
GEOM::GEOM_Object_var myRefPoint;
|
GEOM::GEOM_Object_var myRefPoint;
|
||||||
|
|
||||||
@ -92,8 +91,8 @@ private slots:
|
|||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void ConstructorsClicked(int constructorId);
|
void ConstructorsClicked( int );
|
||||||
void ValueChangedInSpinBox(double newValue);
|
void ValueChangedInSpinBox( double );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_POINT_H
|
#endif // BASICGUI_POINTDLG_H
|
||||||
|
@ -19,28 +19,22 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_VectorDlg.cxx
|
// File : BasicGUI_VectorDlg.cxx
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "BasicGUI_VectorDlg.h"
|
#include "BasicGUI_VectorDlg.h"
|
||||||
#include "DlgRef_3Spin1Check.h"
|
|
||||||
#include "DlgRef_SpinBox.h"
|
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "GEOMBase.h"
|
#include <GeometryGUI.h>
|
||||||
|
#include <GEOMBase.h>
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <SUIT_ResourceMgr.h>
|
||||||
#include "SUIT_Session.h"
|
#include <SUIT_Session.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <SalomeApp_Application.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_VectorDlg()
|
// class : BasicGUI_VectorDlg()
|
||||||
@ -60,35 +54,34 @@ BasicGUI_VectorDlg::BasicGUI_VectorDlg(GeometryGUI* theGeometryGUI, QWidget* par
|
|||||||
setWindowTitle( tr( "GEOM_VECTOR_TITLE" ) );
|
setWindowTitle( tr( "GEOM_VECTOR_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_VECTOR"));
|
mainFrame()->GroupConstructors->setTitle(tr("GEOM_VECTOR"));
|
||||||
RadioButton1->setIcon(image0);
|
mainFrame()->RadioButton1->setIcon(image0);
|
||||||
RadioButton2->setIcon(image1);
|
mainFrame()->RadioButton2->setIcon(image1);
|
||||||
RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
RadioButton3->close();
|
mainFrame()->RadioButton3->close();
|
||||||
|
|
||||||
GroupPoints = new Ui::DlgRef_2Sel_QTD();
|
GroupPoints = new DlgRef_2Sel( centralWidget() );
|
||||||
QWidget* aGroupPointsWidget = new QWidget(this);
|
|
||||||
GroupPoints->setupUi(aGroupPointsWidget);
|
|
||||||
aGroupPointsWidget->setObjectName("GroupPoints");
|
|
||||||
|
|
||||||
GroupPoints->GroupBox1->setTitle( tr( "GEOM_POINTS" ) );
|
GroupPoints->GroupBox1->setTitle( tr( "GEOM_POINTS" ) );
|
||||||
GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg("1"));
|
GroupPoints->TextLabel1->setText( tr( "GEOM_POINT_I" ).arg( 1 ) );
|
||||||
GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg("2"));
|
GroupPoints->TextLabel2->setText( tr( "GEOM_POINT_I" ).arg( 2 ) );
|
||||||
GroupPoints->PushButton1->setIcon( image2 );
|
GroupPoints->PushButton1->setIcon( image2 );
|
||||||
GroupPoints->PushButton2->setIcon( image2 );
|
GroupPoints->PushButton2->setIcon( image2 );
|
||||||
|
|
||||||
GroupPoints->LineEdit1->setReadOnly( true );
|
GroupPoints->LineEdit1->setReadOnly( true );
|
||||||
GroupPoints->LineEdit2->setReadOnly( true );
|
GroupPoints->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
GroupDimensions = new DlgRef_3Spin1Check(this, "GroupDimensions");
|
GroupDimensions = new DlgRef_3Spin1Check( centralWidget() );
|
||||||
GroupDimensions->GroupBox1->setTitle( tr( "GEOM_COORDINATES" ) );
|
GroupDimensions->GroupBox1->setTitle( tr( "GEOM_COORDINATES" ) );
|
||||||
GroupDimensions->TextLabel1->setText( tr( "GEOM_DX" ) );
|
GroupDimensions->TextLabel1->setText( tr( "GEOM_DX" ) );
|
||||||
GroupDimensions->TextLabel2->setText( tr( "GEOM_DY" ) );
|
GroupDimensions->TextLabel2->setText( tr( "GEOM_DY" ) );
|
||||||
GroupDimensions->TextLabel3->setText( tr( "GEOM_DZ" ) );
|
GroupDimensions->TextLabel3->setText( tr( "GEOM_DZ" ) );
|
||||||
GroupDimensions->CheckBox1->setText(tr("GEOM_REVERSE_VECTOR"));
|
GroupDimensions->CheckButton1->setText( tr( "GEOM_REVERSE_VECTOR" ) );
|
||||||
|
|
||||||
gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
gridLayout1->addWidget(GroupDimensions, 2, 0);
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupPoints );
|
||||||
|
layout->addWidget( GroupDimensions );
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName( "vector.htm" );
|
setHelpFileName( "vector.htm" );
|
||||||
@ -124,25 +117,26 @@ void BasicGUI_VectorDlg::Init()
|
|||||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes */
|
/* min, max, step and decimals for spin boxes */
|
||||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
initSpinBox( GroupDimensions->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 );
|
||||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
initSpinBox( GroupDimensions->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 );
|
||||||
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
initSpinBox( GroupDimensions->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 3 );
|
||||||
|
|
||||||
double dx( 0. ), dy( 0. ), dz( 200. );
|
double dx( 0. ), dy( 0. ), dz( 200. );
|
||||||
GroupDimensions->SpinBox_DX->SetValue( dx );
|
GroupDimensions->SpinBox_DX->setValue( dx );
|
||||||
GroupDimensions->SpinBox_DY->SetValue( dy );
|
GroupDimensions->SpinBox_DY->setValue( dy );
|
||||||
GroupDimensions->SpinBox_DZ->SetValue( dz );
|
GroupDimensions->SpinBox_DZ->setValue( dz );
|
||||||
|
|
||||||
GroupDimensions->CheckBox1->setChecked(FALSE);
|
GroupDimensions->CheckButton1->setChecked( false );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
@ -154,18 +148,19 @@ void BasicGUI_VectorDlg::Init()
|
|||||||
connect( GroupDimensions->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( GroupDimensions->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
connect( GroupDimensions->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( GroupDimensions->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
|
||||||
|
// VSR: TODO ->>
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY, SLOT( SetStep( double ) ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DZ, SLOT( SetStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DZ, SLOT( SetStep( double ) ) );
|
||||||
|
// <<-
|
||||||
|
|
||||||
connect(GroupDimensions->CheckBox1, SIGNAL(stateChanged(int)), this, SLOT(ReverseVector(int)));
|
connect( GroupDimensions->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( ReverseVector( int ) ) );
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT(SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT(SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr("GEOM_VECTOR").toLatin1().constData() );
|
initName( tr("GEOM_VECTOR") );
|
||||||
|
|
||||||
GroupDimensions->hide();
|
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,13 +175,11 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
|
|||||||
myPoint1 = GEOM::GEOM_Object::_nil();
|
myPoint1 = GEOM::GEOM_Object::_nil();
|
||||||
myPoint2 = GEOM::GEOM_Object::_nil();
|
myPoint2 = GEOM::GEOM_Object::_nil();
|
||||||
|
|
||||||
switch (constructorId)
|
switch ( constructorId ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
GroupDimensions->hide();
|
GroupDimensions->hide();
|
||||||
resize(0, 0);
|
GroupPoints->show();
|
||||||
::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->show();
|
|
||||||
|
|
||||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||||
GroupPoints->LineEdit1->setText( "" );
|
GroupPoints->LineEdit1->setText( "" );
|
||||||
@ -199,20 +192,23 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
|
|||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->hide();
|
GroupPoints->hide();
|
||||||
resize( 0, 0 );
|
|
||||||
GroupDimensions->show();
|
GroupDimensions->show();
|
||||||
|
|
||||||
double dx( 0. ), dy( 0. ), dz( 0. );
|
double dx( 0. ), dy( 0. ), dz( 0. );
|
||||||
GroupDimensions->SpinBox_DX->SetValue( dx );
|
GroupDimensions->SpinBox_DX->setValue( dx );
|
||||||
GroupDimensions->SpinBox_DY->SetValue( dy );
|
GroupDimensions->SpinBox_DY->setValue( dy );
|
||||||
GroupDimensions->SpinBox_DZ->SetValue( dz );
|
GroupDimensions->SpinBox_DZ->setValue( dz );
|
||||||
|
|
||||||
GroupDimensions->CheckBox1->setChecked( FALSE );
|
GroupDimensions->CheckButton1->setChecked( false );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize( minimumSize() );
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +238,7 @@ void BasicGUI_VectorDlg::ClickOnCancel()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool BasicGUI_VectorDlg::ClickOnApply()
|
bool BasicGUI_VectorDlg::ClickOnApply()
|
||||||
{
|
{
|
||||||
buttonApply->setFocus();
|
buttonApply()->setFocus();
|
||||||
|
|
||||||
if ( !onAccept() )
|
if ( !onAccept() )
|
||||||
return false;
|
return false;
|
||||||
@ -262,8 +258,7 @@ void BasicGUI_VectorDlg::SelectionIntoArgument()
|
|||||||
{
|
{
|
||||||
myEditCurrentArgument->setText( "" );
|
myEditCurrentArgument->setText( "" );
|
||||||
|
|
||||||
if ( IObjectCount() != 1 )
|
if ( IObjectCount() != 1 ) {
|
||||||
{
|
|
||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 )
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 )
|
||||||
myPoint1 = GEOM::GEOM_Object::_nil();
|
myPoint1 = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
|
||||||
@ -274,8 +269,7 @@ void BasicGUI_VectorDlg::SelectionIntoArgument()
|
|||||||
// nbSel == 1
|
// nbSel == 1
|
||||||
Standard_Boolean aRes = Standard_False;
|
Standard_Boolean aRes = Standard_False;
|
||||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
||||||
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = aSelectedObject;
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = aSelectedObject;
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = aSelectedObject;
|
||||||
@ -340,9 +334,9 @@ void BasicGUI_VectorDlg::DeactivateActiveDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_VectorDlg::enterEvent(QEvent* e)
|
void BasicGUI_VectorDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -361,13 +355,13 @@ void BasicGUI_VectorDlg::ValueChangedInSpinBox( double newValue )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_VectorDlg::ReverseVector( int state )
|
void BasicGUI_VectorDlg::ReverseVector( int state )
|
||||||
{
|
{
|
||||||
double dx = -GroupDimensions->SpinBox_DX->GetValue();
|
double dx = -GroupDimensions->SpinBox_DX->value();
|
||||||
double dy = -GroupDimensions->SpinBox_DY->GetValue();
|
double dy = -GroupDimensions->SpinBox_DY->value();
|
||||||
double dz = -GroupDimensions->SpinBox_DZ->GetValue();
|
double dz = -GroupDimensions->SpinBox_DZ->value();
|
||||||
|
|
||||||
GroupDimensions->SpinBox_DX->SetValue( dx );
|
GroupDimensions->SpinBox_DX->setValue( dx );
|
||||||
GroupDimensions->SpinBox_DY->SetValue( dy );
|
GroupDimensions->SpinBox_DY->setValue( dy );
|
||||||
GroupDimensions->SpinBox_DZ->SetValue( dz );
|
GroupDimensions->SpinBox_DZ->setValue( dz );
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
@ -402,15 +396,16 @@ bool BasicGUI_VectorDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
switch ( getConstructorId() ) {
|
switch ( getConstructorId() ) {
|
||||||
case 0 :
|
case 0 :
|
||||||
|
{
|
||||||
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorTwoPnt( myPoint1, myPoint2 );
|
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorTwoPnt( myPoint1, myPoint2 );
|
||||||
res = true;
|
res = true;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 1 :
|
case 1 :
|
||||||
{
|
{
|
||||||
double dx = GroupDimensions->SpinBox_DX->GetValue();
|
double dx = GroupDimensions->SpinBox_DX->value();
|
||||||
double dy = GroupDimensions->SpinBox_DY->GetValue();
|
double dy = GroupDimensions->SpinBox_DY->value();
|
||||||
double dz = GroupDimensions->SpinBox_DZ->GetValue();
|
double dz = GroupDimensions->SpinBox_DZ->value();
|
||||||
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorDXDYDZ( dx, dy, dz );
|
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorDXDYDZ( dx, dy, dz );
|
||||||
res = true;
|
res = true;
|
||||||
break;
|
break;
|
||||||
|
@ -19,49 +19,47 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_VectorDlg.h
|
// File : BasicGUI_VectorDlg.h
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef DIALOGBOX_VECTOR_H
|
#ifndef BASICGUI_VECTORDLG_H
|
||||||
#define DIALOGBOX_VECTOR_H
|
#define BASICGUI_VECTORDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
#include "DlgRef_2Sel_QTD.h"
|
|
||||||
|
|
||||||
|
class DlgRef_2Sel;
|
||||||
class DlgRef_3Spin1Check;
|
class DlgRef_3Spin1Check;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_VectorDlg
|
// class : BasicGUI_VectorDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_VectorDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_VectorDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_VectorDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
BasicGUI_VectorDlg( GeometryGUI*, QWidget* = 0,
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
|
const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
~BasicGUI_VectorDlg();
|
~BasicGUI_VectorDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
|
|
||||||
GEOM::GEOM_Object_var myPoint1;
|
GEOM::GEOM_Object_var myPoint1;
|
||||||
GEOM::GEOM_Object_var myPoint2;
|
GEOM::GEOM_Object_var myPoint2;
|
||||||
|
|
||||||
Ui::DlgRef_2Sel_QTD* GroupPoints;
|
DlgRef_2Sel* GroupPoints;
|
||||||
DlgRef_3Spin1Check* GroupDimensions;
|
DlgRef_3Spin1Check* GroupDimensions;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@ -75,10 +73,9 @@ private slots:
|
|||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void ConstructorsClicked(int constructorId);
|
void ConstructorsClicked( int );
|
||||||
void ValueChangedInSpinBox(double newValue);
|
void ValueChangedInSpinBox( double );
|
||||||
void ReverseVector(int state);
|
void ReverseVector( int );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_VECTOR_H
|
#endif // BASICGUI_VECTORDLG_H
|
||||||
|
@ -19,21 +19,20 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_WorkingPlaneDlg.cxx
|
// File : BasicGUI_WorkingPlaneDlg.cxx
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#include "BasicGUI_WorkingPlaneDlg.h"
|
#include "BasicGUI_WorkingPlaneDlg.h"
|
||||||
|
|
||||||
#include "GeometryGUI.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "GEOMBase.h"
|
#include <GeometryGUI.h>
|
||||||
|
#include <GEOMBase.h>
|
||||||
|
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include <SUIT_ResourceMgr.h>
|
||||||
#include "SUIT_Session.h"
|
#include <SUIT_Session.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <SalomeApp_Application.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
// OCCT Includes
|
// OCCT Includes
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
@ -47,9 +46,7 @@
|
|||||||
// QT Includes
|
// QT Includes
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_WorkingPlaneDlg()
|
// class : BasicGUI_WorkingPlaneDlg()
|
||||||
@ -60,7 +57,7 @@ using namespace std;
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
const char* name, bool modal, Qt::WindowFlags fl )
|
const char* name, bool modal, Qt::WindowFlags fl )
|
||||||
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
: GEOMBase_Skeleton( theGeometryGUI, parent, name, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
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 image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_WPLANE_FACE" ) ) );
|
||||||
@ -70,25 +67,19 @@ BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg(GeometryGUI* theGeometryGUI,
|
|||||||
setWindowTitle( tr( "GEOM_WPLANE_TITLE" ) );
|
setWindowTitle( tr( "GEOM_WPLANE_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_WPLANE"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_WPLANE" ) );
|
||||||
RadioButton1->setIcon(image1);
|
mainFrame()->RadioButton1->setIcon( image1 );
|
||||||
RadioButton2->setIcon(image2);
|
mainFrame()->RadioButton2->setIcon( image2 );
|
||||||
RadioButton3->setIcon(image3);
|
mainFrame()->RadioButton3->setIcon( image3 );
|
||||||
|
|
||||||
Group1 = new Ui::DlgRef_1Sel_QTD();
|
Group1 = new DlgRef_1Sel( centralWidget() );
|
||||||
QWidget* aGroup1Widget = new QWidget(this);
|
|
||||||
Group1->setupUi(aGroup1Widget);
|
|
||||||
aGroup1Widget->setObjectName("Group1");
|
|
||||||
|
|
||||||
Group1->GroupBox1->setTitle( tr( "GEOM_WPLANE_FACE" ) );
|
Group1->GroupBox1->setTitle( tr( "GEOM_WPLANE_FACE" ) );
|
||||||
Group1->TextLabel1->setText( tr( "GEOM_SELECTION" ) );
|
Group1->TextLabel1->setText( tr( "GEOM_SELECTION" ) );
|
||||||
Group1->PushButton1->setIcon( image0 );
|
Group1->PushButton1->setIcon( image0 );
|
||||||
Group1->LineEdit1->setReadOnly( true );
|
Group1->LineEdit1->setReadOnly( true );
|
||||||
|
|
||||||
Group2 = new Ui::DlgRef_2Sel_QTD();
|
Group2 = new DlgRef_2Sel( centralWidget() );
|
||||||
QWidget* aGroup2Widget = new QWidget(this);
|
|
||||||
Group2->setupUi(aGroup2Widget);
|
|
||||||
aGroup2Widget->setObjectName("Group2");
|
|
||||||
|
|
||||||
Group2->GroupBox1->setTitle( tr( "GEOM_WPLANE_VECTOR" ) );
|
Group2->GroupBox1->setTitle( tr( "GEOM_WPLANE_VECTOR" ) );
|
||||||
Group2->TextLabel1->setText( tr( "GEOM_WPLANE_VX" ) );
|
Group2->TextLabel1->setText( tr( "GEOM_WPLANE_VX" ) );
|
||||||
@ -98,32 +89,29 @@ BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg(GeometryGUI* theGeometryGUI,
|
|||||||
Group2->LineEdit1->setReadOnly( true );
|
Group2->LineEdit1->setReadOnly( true );
|
||||||
Group2->LineEdit2->setReadOnly( true );
|
Group2->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
Group3 = new Ui::DlgRef_3Check_QTD();
|
Group3 = new DlgRef_3Check( centralWidget() );
|
||||||
QWidget* aGroup3Widget = new QWidget(this);
|
|
||||||
Group3->setupUi(aGroup3Widget);
|
|
||||||
aGroup3Widget->setObjectName("Group3");
|
|
||||||
|
|
||||||
Group3->GroupBox1->setTitle( tr( "GEOM_WPLANE_ORIGIN" ) );
|
Group3->GroupBox1->setTitle( tr( "GEOM_WPLANE_ORIGIN" ) );
|
||||||
Group3->RadioButton1->setText( tr( "GEOM_WPLANE_OXY" ) );
|
Group3->RadioButton1->setText( tr( "GEOM_WPLANE_OXY" ) );
|
||||||
Group3->RadioButton2->setText( tr( "GEOM_WPLANE_OYZ" ) );
|
Group3->RadioButton2->setText( tr( "GEOM_WPLANE_OYZ" ) );
|
||||||
Group3->RadioButton3->setText( tr( "GEOM_WPLANE_OZX" ) );
|
Group3->RadioButton3->setText( tr( "GEOM_WPLANE_OZX" ) );
|
||||||
|
|
||||||
gridLayout1->addWidget(aGroup1Widget, 1, 0);
|
|
||||||
gridLayout1->addWidget(aGroup2Widget, 1, 0);
|
|
||||||
gridLayout1->addWidget(aGroup3Widget, 1, 0);
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
QFrame* aReverseGroupBox = new QFrame(this);
|
QGroupBox* aReverseGroupBox = new QGroupBox( centralWidget() );
|
||||||
aReverseGroupBox->setObjectName("aReverseGroupBox");
|
|
||||||
aReverseGroupBox->setContentsMargins(10, 10, 10, 10);
|
|
||||||
QHBoxLayout* aReverseGroupBoxLayout = new QHBoxLayout( aReverseGroupBox );
|
QHBoxLayout* aReverseGroupBoxLayout = new QHBoxLayout( aReverseGroupBox );
|
||||||
|
aReverseGroupBoxLayout->setMargin( 9 );
|
||||||
|
aReverseGroupBoxLayout->setSpacing( 6 );
|
||||||
|
|
||||||
myReverseCB = new QCheckBox( aReverseGroupBox );
|
myReverseCB = new QCheckBox( aReverseGroupBox );
|
||||||
myReverseCB->setObjectName("myReverseCB");
|
|
||||||
myReverseCB->setText( tr( "GEOM_REVERSE_PLANE" ) );
|
myReverseCB->setText( tr( "GEOM_REVERSE_PLANE" ) );
|
||||||
aReverseGroupBoxLayout->addWidget( myReverseCB );
|
aReverseGroupBoxLayout->addWidget( myReverseCB );
|
||||||
|
|
||||||
gridLayout1->addWidget(aReverseGroupBox, 2, 0);
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( Group1 );
|
||||||
|
layout->addWidget( Group2 );
|
||||||
|
layout->addWidget( Group3 );
|
||||||
|
layout->addWidget( aReverseGroupBox );
|
||||||
|
|
||||||
setHelpFileName( "working_plane.htm" );
|
setHelpFileName( "working_plane.htm" );
|
||||||
|
|
||||||
@ -160,17 +148,17 @@ void BasicGUI_WorkingPlaneDlg::Init()
|
|||||||
globalSelection( GEOM_PLANE );
|
globalSelection( GEOM_PLANE );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
connect( Group1->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( Group1->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
connect( Group1->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( Group1->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
|
|
||||||
connect( Group2->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( Group2->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
connect( Group2->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( Group2->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( Group2->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( Group2->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
@ -183,7 +171,8 @@ void BasicGUI_WorkingPlaneDlg::Init()
|
|||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_WPLANE" ).toLatin1().constData() );
|
initName( tr( "GEOM_WPLANE" ) );
|
||||||
|
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,8 +186,7 @@ void BasicGUI_WorkingPlaneDlg::ConstructorsClicked(int constructorId)
|
|||||||
|
|
||||||
disconnect( aSelMgr, 0, this, 0 );
|
disconnect( aSelMgr, 0, this, 0 );
|
||||||
|
|
||||||
switch (constructorId)
|
switch ( constructorId ) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
//globalSelection( GEOM_PLANE );
|
//globalSelection( GEOM_PLANE );
|
||||||
@ -207,10 +195,9 @@ void BasicGUI_WorkingPlaneDlg::ConstructorsClicked(int constructorId)
|
|||||||
aMap.Add( GEOM_MARKER );
|
aMap.Add( GEOM_MARKER );
|
||||||
globalSelection( aMap );
|
globalSelection( aMap );
|
||||||
|
|
||||||
::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
|
Group2->hide();
|
||||||
::qobject_cast<QWidget*>( Group3->gridLayout->parent() )->hide();
|
Group3->hide();
|
||||||
resize(0, 0);
|
Group1->show();
|
||||||
::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->show();
|
|
||||||
|
|
||||||
myEditCurrentArgument = Group1->LineEdit1;
|
myEditCurrentArgument = Group1->LineEdit1;
|
||||||
Group1->LineEdit1->setText( "" );
|
Group1->LineEdit1->setText( "" );
|
||||||
@ -223,10 +210,9 @@ void BasicGUI_WorkingPlaneDlg::ConstructorsClicked(int constructorId)
|
|||||||
{
|
{
|
||||||
globalSelection( GEOM_LINE );
|
globalSelection( GEOM_LINE );
|
||||||
|
|
||||||
::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->hide();
|
Group1->hide();
|
||||||
::qobject_cast<QWidget*>( Group3->gridLayout->parent() )->hide();
|
Group3->hide();
|
||||||
resize(0, 0);
|
Group2->show();
|
||||||
::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->show();
|
|
||||||
|
|
||||||
myEditCurrentArgument = Group2->LineEdit1;
|
myEditCurrentArgument = Group2->LineEdit1;
|
||||||
Group2->LineEdit1->setText( "" );
|
Group2->LineEdit1->setText( "" );
|
||||||
@ -239,10 +225,9 @@ void BasicGUI_WorkingPlaneDlg::ConstructorsClicked(int constructorId)
|
|||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->hide();
|
Group1->hide();
|
||||||
::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
|
Group2->hide();
|
||||||
resize(0, 0);
|
Group3->show();
|
||||||
::qobject_cast<QWidget*>( Group3->gridLayout->parent() )->show();
|
|
||||||
|
|
||||||
Group3->RadioButton1->setChecked( true );
|
Group3->RadioButton1->setChecked( true );
|
||||||
aOriginType = 1;
|
aOriginType = 1;
|
||||||
@ -250,6 +235,10 @@ void BasicGUI_WorkingPlaneDlg::ConstructorsClicked(int constructorId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize( minimumSize() );
|
||||||
|
|
||||||
updateWPlane();
|
updateWPlane();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,8 +268,8 @@ void BasicGUI_WorkingPlaneDlg::ClickOnOk()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool BasicGUI_WorkingPlaneDlg::ClickOnApply()
|
bool BasicGUI_WorkingPlaneDlg::ClickOnApply()
|
||||||
{
|
{
|
||||||
buttonApply->setFocus();
|
buttonApply()->setFocus();
|
||||||
myGeomGUI->application()->putInfo(tr(""));
|
myGeomGUI->application()->putInfo( "" );
|
||||||
|
|
||||||
if ( updateWPlane( false ) ) {
|
if ( updateWPlane( false ) ) {
|
||||||
myGeomGUI->SetWorkingPlane( myWPlane );
|
myGeomGUI->SetWorkingPlane( myWPlane );
|
||||||
@ -418,9 +407,9 @@ void BasicGUI_WorkingPlaneDlg::ClickOnCancel()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BasicGUI_WorkingPlaneDlg::enterEvent(QEvent* e)
|
void BasicGUI_WorkingPlaneDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,13 +455,14 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
gp_Dir aDirN ( Zx, Zy, Zz );
|
gp_Dir aDirN ( Zx, Zy, Zz );
|
||||||
gp_Dir aDirX ( Xx, Xy, Xz );
|
gp_Dir aDirX ( Xx, Xy, Xz );
|
||||||
myWPlane = gp_Ax3( aPnt, aDirN, aDirX );
|
myWPlane = gp_Ax3( aPnt, aDirN, aDirX );
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Wrong shape selected (has to be a planar face)" );
|
showError( "Wrong shape selected (has to be a planar face)" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (id == 1) { // by two vectors (Ox & Oz)
|
else if ( id == 1 ) { // by two vectors (Ox & Oz)
|
||||||
if ( CORBA::is_nil( myVectX ) || CORBA::is_nil( myVectZ ) ) {
|
if ( CORBA::is_nil( myVectX ) || CORBA::is_nil( myVectZ ) ) {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Two vectors have to be selected" );
|
showError( "Two vectors have to be selected" );
|
||||||
@ -529,7 +519,8 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
|
|
||||||
myWPlane = gp_Ax3( BRep_Tool::Pnt( VX1 ), aDirZ, aDirX );
|
myWPlane = gp_Ax3( BRep_Tool::Pnt( VX1 ), aDirZ, aDirX );
|
||||||
|
|
||||||
} else if (id == 2) { // by selection from standard (OXY or OYZ, or OZX)
|
}
|
||||||
|
else if ( id == 2 ) { // by selection from standard (OXY or OYZ, or OZX)
|
||||||
gp_Ax2 anAx2;
|
gp_Ax2 anAx2;
|
||||||
|
|
||||||
if ( aOriginType == 1 ) anAx2 = gp::XOY();
|
if ( aOriginType == 1 ) anAx2 = gp::XOY();
|
||||||
@ -538,18 +529,17 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
|
|
||||||
myWPlane = gp_Ax3( anAx2 );
|
myWPlane = gp_Ax3( anAx2 );
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myReverseCB->isChecked())
|
if ( myReverseCB->isChecked() ) {
|
||||||
{
|
|
||||||
myWPlane.YReverse();
|
myWPlane.YReverse();
|
||||||
myWPlane.ZReverse();
|
myWPlane.ZReverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showPreview)
|
if ( showPreview ) {
|
||||||
{
|
|
||||||
GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations( getStudyId() );
|
GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations( getStudyId() );
|
||||||
GEOM::GEOM_Object_var anObj = aBasicOp->MakeMarker( myWPlane.Location().X(), myWPlane.Location().Y(), myWPlane.Location().Z(),
|
GEOM::GEOM_Object_var anObj = aBasicOp->MakeMarker( myWPlane.Location().X(), myWPlane.Location().Y(), myWPlane.Location().Z(),
|
||||||
myWPlane.XDirection().X(), myWPlane.XDirection().Y(), myWPlane.XDirection().Z(),
|
myWPlane.XDirection().X(), myWPlane.XDirection().Y(), myWPlane.XDirection().Z(),
|
||||||
|
@ -19,45 +19,45 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : BasicGUI_WorkingPlaneDlg.h
|
// File : BasicGUI_WorkingPlaneDlg.h
|
||||||
// Author : Lucien PIGNOLONI
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef DIALOGBOX_WORKINGPLANE_H
|
#ifndef BASICGUI_WORKINGPLANEDLG_H
|
||||||
#define DIALOGBOX_WORKINGPLANE_H
|
#define BASICGUI_WORKINGPLANEDLG_H
|
||||||
|
|
||||||
#include "GEOM_BasicGUI.hxx"
|
#include "GEOM_BasicGUI.hxx"
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
#include "DlgRef_1Sel_QTD.h"
|
|
||||||
#include "DlgRef_2Sel_QTD.h"
|
|
||||||
#include "DlgRef_3Check_QTD.h"
|
|
||||||
|
|
||||||
#include <gp_Ax3.hxx>
|
#include <gp_Ax3.hxx>
|
||||||
|
|
||||||
|
class DlgRef_1Sel;
|
||||||
|
class DlgRef_2Sel;
|
||||||
|
class DlgRef_3Check;
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BasicGUI_WorkingPlaneDlg
|
// class : BasicGUI_WorkingPlaneDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class GEOM_BASICGUI_EXPORT BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton
|
class BASICGUI_EXPORT BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
BasicGUI_WorkingPlaneDlg( GeometryGUI*, QWidget* = 0,
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0 );
|
const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
~BasicGUI_WorkingPlaneDlg();
|
~BasicGUI_WorkingPlaneDlg();
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
|
||||||
|
protected:
|
||||||
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
|
|
||||||
bool updateWPlane(const bool showPreview = true);
|
bool updateWPlane( const bool = true );
|
||||||
|
|
||||||
GEOM::GEOM_Object_var myFace;
|
GEOM::GEOM_Object_var myFace;
|
||||||
GEOM::GEOM_Object_var myVectX;
|
GEOM::GEOM_Object_var myVectX;
|
||||||
@ -65,9 +65,9 @@ private:
|
|||||||
|
|
||||||
int aOriginType;
|
int aOriginType;
|
||||||
|
|
||||||
Ui::DlgRef_1Sel_QTD* Group1;
|
DlgRef_1Sel* Group1;
|
||||||
Ui::DlgRef_2Sel_QTD* Group2;
|
DlgRef_2Sel* Group2;
|
||||||
Ui::DlgRef_3Check_QTD* Group3;
|
DlgRef_3Check* Group3;
|
||||||
|
|
||||||
QCheckBox* myReverseCB;
|
QCheckBox* myReverseCB;
|
||||||
|
|
||||||
@ -78,8 +78,8 @@ private slots:
|
|||||||
void ClickOnCancel();
|
void ClickOnCancel();
|
||||||
bool ClickOnApply();
|
bool ClickOnApply();
|
||||||
|
|
||||||
void ConstructorsClicked(int constructorId);
|
void ConstructorsClicked( int );
|
||||||
void GroupClicked(int groupId);
|
void GroupClicked( int );
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
@ -87,7 +87,6 @@ private slots:
|
|||||||
|
|
||||||
void ActivateThisDialog();
|
void ActivateThisDialog();
|
||||||
void DeactivateActiveDialog();
|
void DeactivateActiveDialog();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_WORKINGPLANE_H
|
#endif // BASICGUI_WORKINGPLANEDLG_H
|
||||||
|
@ -17,31 +17,26 @@
|
|||||||
//
|
//
|
||||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
// File : GEOM_BasicGUI.hxx
|
// File : GEOM_BasicGUI.hxx
|
||||||
// Author : Alexander A. BORODIN
|
// Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
|
||||||
// Module : GEOM
|
//
|
||||||
|
|
||||||
#ifndef _GEOM_BasicGUI_HXX_
|
#ifndef GEOM_BASICGUI_HXX
|
||||||
#define _GEOM_BasicGUI_HXX_
|
#define GEOM_BASICGUI_HXX
|
||||||
|
|
||||||
#ifdef WNT
|
#if defined WIN32
|
||||||
# if defined BASICGUI_EXPORTS
|
# if defined BASICGUI_EXPORTS
|
||||||
#if defined WIN32
|
# define BASICGUI_EXPORT __declspec( dllexport )
|
||||||
#define GEOM_BASICGUI_EXPORT __declspec( dllexport )
|
|
||||||
# else
|
# else
|
||||||
#define GEOM_BASICGUI_EXPORT
|
# define BASICGUI_EXPORT __declspec( dllimport )
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
#if defined WIN32
|
# define BASICGUI_EXPORT
|
||||||
#define GEOM_BASICGUI_EXPORT __declspec( dllimport )
|
|
||||||
#else
|
|
||||||
#define GEOM_BASICGUI_EXPORT
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define GEOM_BASICGUI_EXPORT
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#ifndef COORD_MIN
|
||||||
|
#define COORD_MIN -1e+15
|
||||||
|
#define COORD_MAX +1e+15
|
||||||
|
#endif // COORD_MIN
|
||||||
|
|
||||||
|
#endif // GEOM_BASICGUI_HXX
|
||||||
|
@ -19,13 +19,9 @@
|
|||||||
#
|
#
|
||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
#
|
|
||||||
#
|
|
||||||
# File : Makefile.in
|
# File : Makefile.in
|
||||||
# Author : Damien COQUERET (OCC)
|
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
|
||||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
#
|
||||||
# Module : GEOM
|
|
||||||
# $Header:
|
|
||||||
|
|
||||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||||
|
|
||||||
@ -89,6 +85,7 @@ libBasicGUI_la_CPPFLAGS = \
|
|||||||
-I$(srcdir)/../GEOMBase \
|
-I$(srcdir)/../GEOMBase \
|
||||||
-I$(srcdir)/../GEOMImpl \
|
-I$(srcdir)/../GEOMImpl \
|
||||||
-I$(srcdir)/../GEOMClient \
|
-I$(srcdir)/../GEOMClient \
|
||||||
|
-I$(top_builddir)/src/DlgRef \
|
||||||
-I$(top_builddir)/idl \
|
-I$(top_builddir)/idl \
|
||||||
-I$(top_builddir)/salome_adm/unix
|
-I$(top_builddir)/salome_adm/unix
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<ui version="4.0" >
|
<ui version="4.0" >
|
||||||
<class>DlgRef_Skeleton_QTD</class>
|
<class>DlgRef_Skeleton_QTD</class>
|
||||||
<widget class="QDialog" name="DlgRef_Skeleton_QTD" >
|
<widget class="QWidget" name="DlgRef_Skeleton_QTD" >
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
@ -9,20 +9,9 @@
|
|||||||
<height>170</height>
|
<height>170</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>7</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeGripEnabled" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
@ -30,8 +19,41 @@
|
|||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="2" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QWidget" native="1" name="GroupMedium" />
|
<widget class="QGroupBox" name="DlgRef_Skeleton_QTD" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>5</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title" >
|
||||||
|
<string>Result name</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="NameLabel" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Name</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="ResultName" />
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QGroupBox" name="GroupConstructors" >
|
<widget class="QGroupBox" name="GroupConstructors" >
|
||||||
@ -151,49 +173,20 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="2" column="0" >
|
||||||
<widget class="QGroupBox" name="GroupBoxName" >
|
<widget class="QWidget" native="1" name="GroupMedium" >
|
||||||
<property name="title" >
|
<property name="sizePolicy" >
|
||||||
<string>Result name</string>
|
<sizepolicy>
|
||||||
|
<hsizetype>7</hsizetype>
|
||||||
|
<vsizetype>7</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<property name="margin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="NameLabel" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Name</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="ResultName" />
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11" />
|
|
||||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>RadioButton1</tabstop>
|
|
||||||
<tabstop>RadioButton2</tabstop>
|
|
||||||
<tabstop>RadioButton3</tabstop>
|
|
||||||
<tabstop>RadioButton4</tabstop>
|
|
||||||
<tabstop>ResultName</tabstop>
|
|
||||||
<tabstop>buttonOk</tabstop>
|
|
||||||
<tabstop>buttonApply</tabstop>
|
|
||||||
<tabstop>buttonCancel</tabstop>
|
|
||||||
<tabstop>buttonHelp</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -522,27 +522,11 @@ DlgRef_6Sel::~DlgRef_6Sel()
|
|||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
|
|
||||||
DlgRef_Skeleton::DlgRef_Skeleton( QWidget* parent, Qt::WindowFlags f )
|
DlgRef_Skeleton::DlgRef_Skeleton( QWidget* parent, Qt::WindowFlags f )
|
||||||
: QDialog( parent, f )
|
: QWidget( parent, f )
|
||||||
{
|
{
|
||||||
setupUi( this );
|
setupUi( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
DlgRef_Skeleton::DlgRef_Skeleton( QWidget* parent, bool modal, Qt::WindowFlags f )
|
|
||||||
: QDialog( parent, f )
|
|
||||||
{
|
|
||||||
setupUi( this );
|
|
||||||
setModal( modal );
|
|
||||||
}
|
|
||||||
|
|
||||||
DlgRef_Skeleton::~DlgRef_Skeleton()
|
DlgRef_Skeleton::~DlgRef_Skeleton()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void DlgRef_Skeleton::initSpinBox( QDoubleSpinBox* spinBox,
|
|
||||||
double min, double max,
|
|
||||||
double step, int decimals )
|
|
||||||
{
|
|
||||||
spinBox->setRange( min, max );
|
|
||||||
spinBox->setSingleStep( step );
|
|
||||||
spinBox->setDecimals( decimals );
|
|
||||||
}
|
|
||||||
|
@ -572,17 +572,14 @@ public:
|
|||||||
|
|
||||||
#include "ui_DlgRef_Skeleton_QTD.h"
|
#include "ui_DlgRef_Skeleton_QTD.h"
|
||||||
|
|
||||||
class DLGREF_EXPORT DlgRef_Skeleton : public QDialog,
|
class DLGREF_EXPORT DlgRef_Skeleton : public QWidget,
|
||||||
public Ui::DlgRef_Skeleton_QTD
|
public Ui::DlgRef_Skeleton_QTD
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DlgRef_Skeleton( QWidget* = 0, Qt::WindowFlags = 0 );
|
DlgRef_Skeleton( QWidget* = 0, Qt::WindowFlags = 0 );
|
||||||
DlgRef_Skeleton( QWidget* = 0, bool modal = false, Qt::WindowFlags = 0 );
|
|
||||||
~DlgRef_Skeleton();
|
~DlgRef_Skeleton();
|
||||||
|
|
||||||
void initSpinBox( QDoubleSpinBox*, double, double, double = 0.1, int = 3 );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GEOM_DLGREF_H
|
#endif // GEOM_DLGREF_H
|
||||||
|
@ -85,9 +85,8 @@ MOC_FILES = \
|
|||||||
# DlgRef_4Sel1Spin2Check_moc.cxx
|
# DlgRef_4Sel1Spin2Check_moc.cxx
|
||||||
|
|
||||||
# header files
|
# header files
|
||||||
salomeinclude_HEADERS = \
|
#salomeinclude_HEADERS = \
|
||||||
GEOM_DlgRef.h
|
# GEOM_DlgRef.h
|
||||||
|
|
||||||
# DlgRef_Skeleton_QTD.h \
|
# DlgRef_Skeleton_QTD.h \
|
||||||
# DlgRef_1Sel_QTD.h \
|
# DlgRef_1Sel_QTD.h \
|
||||||
# DlgRef_2Sel_QTD.h \
|
# DlgRef_2Sel_QTD.h \
|
||||||
@ -184,6 +183,7 @@ UIC_FILES = \
|
|||||||
BUILT_SOURCES = $(UIC_FILES)
|
BUILT_SOURCES = $(UIC_FILES)
|
||||||
|
|
||||||
nodist_libDlgRef_la_SOURCES = \
|
nodist_libDlgRef_la_SOURCES = \
|
||||||
|
GEOM_DlgRef.h \
|
||||||
$(MOC_FILES) \
|
$(MOC_FILES) \
|
||||||
$(UIC_FILES)
|
$(UIC_FILES)
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "GEOMBase.h"
|
#include "GEOMBase.h"
|
||||||
|
|
||||||
#include <GeometryGUI.h>
|
#include <GeometryGUI.h>
|
||||||
|
#include <GEOM_DlgRef.h>
|
||||||
|
|
||||||
#include <SalomeApp_Application.h>
|
#include <SalomeApp_Application.h>
|
||||||
#include <LightApp_Application.h>
|
#include <LightApp_Application.h>
|
||||||
@ -37,6 +38,7 @@
|
|||||||
#include <SUIT_MessageBox.h>
|
#include <SUIT_MessageBox.h>
|
||||||
|
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
|
#include <QDoubleSpinBox>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -45,7 +47,7 @@ using namespace std;
|
|||||||
// purpose : Constructs a GEOMBase_Skeleton which is a child of 'parent', with the
|
// purpose : Constructs a GEOMBase_Skeleton which is a child of 'parent', with the
|
||||||
// name 'name' and widget flags set to 'f'.
|
// name 'name' and widget flags set to 'f'.
|
||||||
// The dialog will by default be modeless, unless you set 'modal' to
|
// The dialog will by default be modeless, unless you set 'modal' to
|
||||||
// TRUE to construct a modal dialog.
|
// true to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* parent,
|
GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
const char* name, bool modal, Qt::WindowFlags fl )
|
const char* name, bool modal, Qt::WindowFlags fl )
|
||||||
@ -54,36 +56,32 @@ GEOMBase_Skeleton::GEOMBase_Skeleton(GeometryGUI* theGeometryGUI, QWidget* paren
|
|||||||
myGeomGUI( theGeometryGUI ),
|
myGeomGUI( theGeometryGUI ),
|
||||||
myRBGroup( 0 )
|
myRBGroup( 0 )
|
||||||
{
|
{
|
||||||
setupUi(this);
|
|
||||||
|
|
||||||
if ( !name )
|
if ( !name )
|
||||||
setObjectName( "GEOMBase_Skeleton" );
|
setObjectName( "GEOMBase_Skeleton" );
|
||||||
else
|
else
|
||||||
setObjectName( name );
|
setObjectName( name );
|
||||||
|
|
||||||
setModal( modal );
|
|
||||||
setAttribute( Qt::WA_DeleteOnClose );
|
setAttribute( Qt::WA_DeleteOnClose );
|
||||||
|
|
||||||
buttonCancel->setText(tr("GEOM_BUT_CLOSE"));
|
setModal( modal );
|
||||||
buttonOk->setText(tr("GEOM_BUT_OK"));
|
|
||||||
buttonApply->setText(tr("GEOM_BUT_APPLY"));
|
|
||||||
buttonHelp->setText(tr("GEOM_BUT_HELP"));
|
|
||||||
|
|
||||||
GroupMedium->setAttribute( Qt::WA_DeleteOnClose );
|
myMainFrame = new DlgRef_Skeleton( this );
|
||||||
GroupMedium->close();
|
QVBoxLayout* topLayout = new QVBoxLayout( this );
|
||||||
resize(0, 0);
|
topLayout->setMargin( 0 ); topLayout->setSpacing( 0 );
|
||||||
|
topLayout->addWidget( myMainFrame );
|
||||||
|
|
||||||
if ( GroupConstructors != NULL ) {
|
buttonCancel()->setText( tr( "GEOM_BUT_CLOSE" ) );
|
||||||
myRBGroup = new QButtonGroup(GroupConstructors);
|
buttonOk()->setText( tr( "GEOM_BUT_OK" )) ;
|
||||||
QList<QObject*> aRadioButtons = GroupConstructors->children();
|
buttonApply()->setText( tr( "GEOM_BUT_APPLY" ) );
|
||||||
QListIterator<QObject*> it( aRadioButtons );
|
buttonHelp()->setText( tr( "GEOM_BUT_HELP" ) );
|
||||||
int anId = 0;
|
|
||||||
while ( it.hasNext() )
|
myRBGroup = new QButtonGroup( this );
|
||||||
if ( QRadioButton* aRB = ::qobject_cast<QRadioButton*>( it.next() ) ) {
|
myRBGroup->addButton( myMainFrame->RadioButton1, 0 );
|
||||||
myRBGroup->addButton( aRB, anId );
|
myRBGroup->addButton( myMainFrame->RadioButton2, 1 );
|
||||||
anId++;
|
myRBGroup->addButton( myMainFrame->RadioButton3, 2 );
|
||||||
}
|
myRBGroup->addButton( myMainFrame->RadioButton4, 4 );
|
||||||
}
|
|
||||||
|
connect( myRBGroup, SIGNAL( buttonClicked( int ) ), this, SIGNAL( constructorsClicked( int ) ) );
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
@ -114,23 +112,28 @@ void GEOMBase_Skeleton::Init()
|
|||||||
myGeomGUI->SetActiveDialogBox( this );
|
myGeomGUI->SetActiveDialogBox( this );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
|
||||||
if (myGeomGUI)
|
if ( myGeomGUI ) {
|
||||||
{
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect help button on a private slot that displays help information
|
// connect help button on a private slot that displays help information
|
||||||
connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( ClickOnHelp() ) );
|
connect( buttonHelp(), SIGNAL( clicked() ), this, SLOT( ClickOnHelp() ) );
|
||||||
|
|
||||||
/* displays Dialog */
|
/* displays Dialog */
|
||||||
RadioButton1->setChecked(TRUE);
|
myMainFrame->RadioButton1->setChecked( true );
|
||||||
RadioButton4->hide();
|
myMainFrame->RadioButton4->hide();
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GEOMBase_Skeleton::initSpinBox( QDoubleSpinBox* spinBox,
|
||||||
|
double min, double max,
|
||||||
|
double step, int decimals )
|
||||||
|
{
|
||||||
|
spinBox->setRange( min, max );
|
||||||
|
spinBox->setSingleStep( step );
|
||||||
|
spinBox->setDecimals( decimals );
|
||||||
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : ClickOnCancel()
|
// function : ClickOnCancel()
|
||||||
@ -159,8 +162,6 @@ void GEOMBase_Skeleton::LineEditReturnPressed()
|
|||||||
|
|
||||||
if ( GEOMBase::SelectionByNameInDialogs( thisWidget, objectUserName, selectedIO() ) )
|
if ( GEOMBase::SelectionByNameInDialogs( thisWidget, objectUserName, selectedIO() ) )
|
||||||
myEditCurrentArgument->setText( objectUserName );
|
myEditCurrentArgument->setText( objectUserName );
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -174,8 +175,6 @@ void GEOMBase_Skeleton::DeactivateActiveDialog()
|
|||||||
globalSelection();
|
globalSelection();
|
||||||
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 );
|
||||||
if ( myGeomGUI ) myGeomGUI->SetActiveDialogBox( 0 );
|
if ( myGeomGUI ) myGeomGUI->SetActiveDialogBox( 0 );
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -211,11 +210,11 @@ void GEOMBase_Skeleton::closeEvent(QCloseEvent* e)
|
|||||||
// function : initName()
|
// function : initName()
|
||||||
// purpose : initialize the Name field with a string "thePrefix_X" (Vertex_3)
|
// purpose : initialize the Name field with a string "thePrefix_X" (Vertex_3)
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void GEOMBase_Skeleton::initName( const char* thePrefix )
|
void GEOMBase_Skeleton::initName( const QString& thePrefix )
|
||||||
{
|
{
|
||||||
if ( thePrefix )
|
if ( !thePrefix.isNull() )
|
||||||
setPrefix( thePrefix );
|
setPrefix( thePrefix );
|
||||||
ResultName->setText( GEOMBase::GetDefaultName( getPrefix() ) );
|
myMainFrame->ResultName->setText( GEOMBase::GetDefaultName( getPrefix() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -224,7 +223,7 @@ void GEOMBase_Skeleton::initName( const char* thePrefix )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
const char* GEOMBase_Skeleton::getNewObjectName() const
|
const char* GEOMBase_Skeleton::getNewObjectName() const
|
||||||
{
|
{
|
||||||
return ResultName->text().toLatin1().constData();
|
return myMainFrame->ResultName->text().toLatin1().constData();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -274,6 +273,36 @@ void GEOMBase_Skeleton::setHelpFileName(const QString& theName)
|
|||||||
myHelpFileName = theName;
|
myHelpFileName = theName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DlgRef_Skeleton* GEOMBase_Skeleton::mainFrame()
|
||||||
|
{
|
||||||
|
return myMainFrame;
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget* GEOMBase_Skeleton::centralWidget()
|
||||||
|
{
|
||||||
|
return myMainFrame->GroupMedium;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton* GEOMBase_Skeleton::buttonCancel() const
|
||||||
|
{
|
||||||
|
return myMainFrame->buttonCancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton* GEOMBase_Skeleton::buttonOk() const
|
||||||
|
{
|
||||||
|
return myMainFrame->buttonOk;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton* GEOMBase_Skeleton::buttonApply() const
|
||||||
|
{
|
||||||
|
return myMainFrame->buttonApply;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton* GEOMBase_Skeleton::buttonHelp() const
|
||||||
|
{
|
||||||
|
return myMainFrame->buttonHelp;
|
||||||
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : keyPressEvent()
|
// function : keyPressEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -284,8 +313,7 @@ void GEOMBase_Skeleton::keyPressEvent( QKeyEvent* e )
|
|||||||
if ( e->isAccepted() )
|
if ( e->isAccepted() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( e->key() == Qt::Key_F1 )
|
if ( e->key() == Qt::Key_F1 ) {
|
||||||
{
|
|
||||||
e->accept();
|
e->accept();
|
||||||
ClickOnHelp();
|
ClickOnHelp();
|
||||||
}
|
}
|
||||||
|
@ -29,29 +29,35 @@
|
|||||||
#include "GEOM_GEOMBase.hxx"
|
#include "GEOM_GEOMBase.hxx"
|
||||||
#include "GEOMBase_Helper.h"
|
#include "GEOMBase_Helper.h"
|
||||||
|
|
||||||
#include <GEOM_DlgRef.h>
|
#include <QDialog>
|
||||||
|
|
||||||
class GeometryGUI;
|
class GeometryGUI;
|
||||||
|
class DlgRef_Skeleton;
|
||||||
|
class QDoubleSpinBox;
|
||||||
|
class QLineEdit;
|
||||||
|
class QButtonGroup;
|
||||||
|
class QPushButton;
|
||||||
|
|
||||||
class GEOMBASE_EXPORT GEOMBase_Skeleton : public QDialog, public Ui::DlgRef_Skeleton_QTD, public GEOMBase_Helper
|
class GEOMBASE_EXPORT GEOMBase_Skeleton : public QDialog, public GEOMBase_Helper
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GEOMBase_Skeleton(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
|
GEOMBase_Skeleton( GeometryGUI*, QWidget* = 0, const char* = 0, bool = false, Qt::WindowFlags = 0 );
|
||||||
const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
|
|
||||||
~GEOMBase_Skeleton();
|
~GEOMBase_Skeleton();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent* e);
|
void initSpinBox( QDoubleSpinBox*, double, double, double = 0.1, int = 3 );
|
||||||
void keyPressEvent(QKeyEvent* e);
|
|
||||||
|
void closeEvent( QCloseEvent* );
|
||||||
|
void keyPressEvent( QKeyEvent* );
|
||||||
|
|
||||||
/*! initialize "Name" field with a string "thePrefix_X" (Vertex_3)
|
/*! initialize "Name" field with a string "thePrefix_X" (Vertex_3)
|
||||||
*/
|
*/
|
||||||
void initName( const char* thePrefix = 0 );
|
void initName( const QString& = QString() );
|
||||||
|
|
||||||
/*! returns contents of "Name" field
|
/*! returns contents of "Name" field
|
||||||
*/
|
*/
|
||||||
@ -63,11 +69,20 @@ protected:
|
|||||||
|
|
||||||
void setHelpFileName( const QString& );
|
void setHelpFileName( const QString& );
|
||||||
|
|
||||||
|
DlgRef_Skeleton* mainFrame();
|
||||||
|
QWidget* centralWidget();
|
||||||
|
QPushButton* buttonCancel() const;
|
||||||
|
QPushButton* buttonOk() const;
|
||||||
|
QPushButton* buttonApply() const;
|
||||||
|
QPushButton* buttonHelp() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
QLineEdit* myEditCurrentArgument; //!< Current LineEdit
|
QLineEdit* myEditCurrentArgument; //!< Current LineEdit
|
||||||
GeometryGUI* myGeomGUI; //!< reference GEOM GUI
|
GeometryGUI* myGeomGUI; //!< reference GEOM GUI
|
||||||
QString myHelpFileName;
|
QString myHelpFileName; //!< Associated HTML help file name
|
||||||
|
|
||||||
QButtonGroup* myRBGroup;
|
QButtonGroup* myRBGroup; //!< radio button group
|
||||||
|
DlgRef_Skeleton* myMainFrame; //!< dialog box's mainframe widgetx
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
virtual void ClickOnCancel();
|
virtual void ClickOnCancel();
|
||||||
@ -75,6 +90,9 @@ protected slots:
|
|||||||
void DeactivateActiveDialog();
|
void DeactivateActiveDialog();
|
||||||
void ActivateThisDialog();
|
void ActivateThisDialog();
|
||||||
void ClickOnHelp();
|
void ClickOnHelp();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void constructorsClicked( int );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GEOMBASE_SKELETON_H
|
#endif // GEOMBASE_SKELETON_H
|
||||||
|
@ -54,7 +54,9 @@ libGEOMClient_la_LDFLAGS = \
|
|||||||
../../idl/libSalomeIDLGEOM.la \
|
../../idl/libSalomeIDLGEOM.la \
|
||||||
../GEOM/libGEOMbasic.la \
|
../GEOM/libGEOMbasic.la \
|
||||||
$(KERNEL_LDFLAGS) -lSalomeIDLKernel -lOpUtil \
|
$(KERNEL_LDFLAGS) -lSalomeIDLKernel -lOpUtil \
|
||||||
$(CAS_TKTopAlgo) \
|
$(CAS_TKTopAlgo)
|
||||||
$(CORBA_LIBS) \
|
|
||||||
$(STDLIB)
|
# \
|
||||||
|
# $(CORBA_LIBS) \
|
||||||
|
# #$(STDLIB)
|
||||||
|
|
||||||
|
@ -93,6 +93,8 @@ libGEOMEngine_la_LDFLAGS = \
|
|||||||
../GEOM/libGEOMbasic.la \
|
../GEOM/libGEOMbasic.la \
|
||||||
$(KERNEL_LDFLAGS) -lSalomeNS -lSalomeContainer -lSalomeGenericObj -lTOOLSDS \
|
$(KERNEL_LDFLAGS) -lSalomeNS -lSalomeContainer -lSalomeGenericObj -lTOOLSDS \
|
||||||
$(CAS_DATAEXCHANGE) \
|
$(CAS_DATAEXCHANGE) \
|
||||||
$(CAS_LDPATH) -lTKFillet -lTKOffset \
|
$(CAS_LDPATH) -lTKFillet -lTKOffset
|
||||||
$(STDLIB) \
|
|
||||||
$(CORBA_LIBS)
|
# \
|
||||||
|
# $(STDLIB) \
|
||||||
|
# $(CORBA_LIBS)
|
||||||
|
Loading…
Reference in New Issue
Block a user