#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);
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;
}
//=======================================================================
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();
QPushButton* myCancelBtn;
bool myIsEdit;
QString mySectionName;
+ bool myIsInstantSketchingEnabled;
};
#endif // CURVECREATOR_NEWPOINTDLG_H
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]
QList<int> getSelectedSections();
QList< QPair< int, int > > getSelectedPoints();
+ bool isInstantSketchingEnabled() const;
+ void setInstantSketchingEnabled( const bool theState );
+
signals:
void selectionChanged();
void subOperationStarted( QWidget* );