mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-26 19:20:33 +05:00
HYDRO feature 34: Polylines creation: improvements.
This commit is contained in:
parent
e7d1a0371b
commit
c75c1e3d11
@ -11,7 +11,8 @@
|
||||
#include <QLocale>
|
||||
|
||||
CurveCreator_NewPointDlg::CurveCreator_NewPointDlg(CurveCreator::Dimension theDim, QWidget *parent) :
|
||||
QWidget(parent), myX(NULL), myY(NULL), myZ(NULL), myIsEdit(false), myDim(theDim)
|
||||
QWidget(parent), myX(NULL), myY(NULL), myZ(NULL), myIsEdit(false), myDim(theDim),
|
||||
myIsInstantSketchingEnabled(false)
|
||||
{
|
||||
QString aTitle = QString(tr("ADD_NEW_POINT"));
|
||||
setWindowTitle(aTitle);
|
||||
@ -143,6 +144,18 @@ void CurveCreator_NewPointDlg::setCoordinates( const CurveCreator::Coordinates&
|
||||
double aZ = theCoords[2];
|
||||
myZ->setValue(aZ);
|
||||
}
|
||||
if( isInstantSketchingEnabled() )
|
||||
emit addPoint();
|
||||
}
|
||||
|
||||
bool CurveCreator_NewPointDlg::isInstantSketchingEnabled() const
|
||||
{
|
||||
return myIsInstantSketchingEnabled;
|
||||
}
|
||||
|
||||
void CurveCreator_NewPointDlg::setInstantSketchingEnabled( const bool theState )
|
||||
{
|
||||
myIsInstantSketchingEnabled = theState;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -23,6 +23,8 @@ public:
|
||||
void setEditMode( bool isEdit );
|
||||
void setCoordinates( const CurveCreator::Coordinates& theCoords );
|
||||
void setDimension(CurveCreator::Dimension theDim);
|
||||
bool isInstantSketchingEnabled() const;
|
||||
void setInstantSketchingEnabled( const bool theState );
|
||||
signals:
|
||||
void addPoint();
|
||||
void modifyPoint();
|
||||
@ -43,6 +45,7 @@ private:
|
||||
QPushButton* myCancelBtn;
|
||||
bool myIsEdit;
|
||||
QString mySectionName;
|
||||
bool myIsInstantSketchingEnabled;
|
||||
};
|
||||
|
||||
#endif // CURVECREATOR_NEWPOINTDLG_H
|
||||
|
@ -743,6 +743,19 @@ QList< QPair< int, int > > CurveCreator_Widget::getSelectedPoints()
|
||||
return mySectionView->getSelectedPoints();
|
||||
}
|
||||
|
||||
bool CurveCreator_Widget::isInstantSketchingEnabled() const
|
||||
{
|
||||
if( myNewPointEditor )
|
||||
return myNewPointEditor->isInstantSketchingEnabled();
|
||||
return false;
|
||||
}
|
||||
|
||||
void CurveCreator_Widget::setInstantSketchingEnabled( const bool theState )
|
||||
{
|
||||
if( myNewPointEditor )
|
||||
myNewPointEditor->setInstantSketchingEnabled( theState );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GeometryGUI::OnMousePress()
|
||||
// purpose : Manage mouse press events [static]
|
||||
|
@ -28,6 +28,9 @@ public:
|
||||
QList<int> getSelectedSections();
|
||||
QList< QPair< int, int > > getSelectedPoints();
|
||||
|
||||
bool isInstantSketchingEnabled() const;
|
||||
void setInstantSketchingEnabled( const bool theState );
|
||||
|
||||
signals:
|
||||
void selectionChanged();
|
||||
void subOperationStarted( QWidget* );
|
||||
|
Loading…
Reference in New Issue
Block a user