class GeomDataAPI_Point2D;
class QMouseEvent;
+class QKeyEvent;
/*!
\class PartSet_OperationSketchLine
/// \param theKey a key value
virtual void keyReleased(const int theKey);
+ virtual void keyReleased(std::string theName, QKeyEvent* theEvent);
+
+ /// \brief Save the point to the line.
+ /// \param theFeature the line feature
+ /// \param theX the horizontal coordinate
+ /// \param theY the vertical coordinate
+ /// \param theAttribute the start or end attribute of the line
+ static void setLinePoint(boost::shared_ptr<ModelAPI_Feature>, double theX, double theY,
+ const std::string& theAttribute);
+
protected:
/// \brief Virtual method called when operation is started
/// Virtual method called when operation started (see start() method for more description)
/// \param theX the horizontal coordnate of the point
/// \param theY the vertical coordnate of the point
void setConstraints(double theX, double theY);
+
protected:
/// \brief Get the line point 2d coordinates.
/// \param theFeature the line feature
double theX, double theY);
/// \brief Save the point to the line.
- /// \param theFeature the line feature
- /// \param theX the horizontal coordinate
- /// \param theY the vertical coordinate
- /// \param theAttribute the start or end attribute of the line
- void setLinePoint(boost::shared_ptr<ModelAPI_Feature>, double theX, double theY,
- const std::string& theAttribute);
- /// \brief Save the point to the line.
/// \param thePoint the 3D point in the viewer
/// \param theAttribute the start or end attribute of the line
void setLinePoint(const gp_Pnt& thePoint, Handle(V3d_View) theView, const std::string& theAttribute);
///< Structure to lists the possible types of point selection modes
enum PointSelectionMode {SM_FirstPoint, SM_SecondPoint, SM_DonePoint};
+ ///< Set the point selection mode. Emit signal about focus change if necessary.
+ /// \param theMode a new selection mode
+ /// \param isToEmitSignal the neccessity to emit signal
+ void setPointSelectionMode(const PointSelectionMode& theMode, const bool isToEmitSignal = true);
+
private:
boost::shared_ptr<ModelAPI_Feature> mySketch; ///< the sketch feature
boost::shared_ptr<GeomDataAPI_Point2D> myInitPoint; ///< the first line point