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