SketcherGui::DrawSketchHandlerLineSet Class Reference

#include <DrawSketchHandlerLineSet.h>

Public Types

enum  SEGMENT_MODE { SEGMENT_MODE_Arc , SEGMENT_MODE_Line }
 
enum  SELECT_MODE { STATUS_SEEK_First , STATUS_SEEK_Second , STATUS_Do , STATUS_Close }
 mode table More...
 
enum  SNAP_MODE { SNAP_MODE_Free , SNAP_MODE_45Degree }
 
enum  TRANSITION_MODE { TRANSITION_MODE_Free , TRANSITION_MODE_Tangent , TRANSITION_MODE_Perpendicular_L , TRANSITION_MODE_Perpendicular_R }
 

Public Member Functions

 DrawSketchHandlerLineSet ()
 
virtual void mouseMove (Base::Vector2d onSketchPos) override
 
virtual bool pressButton (Base::Vector2d onSketchPos) override
 
virtual void quit (void) override
 
virtual void registerPressedKey (bool pressed, int key) override
 
virtual bool releaseButton (Base::Vector2d onSketchPos) override
 
virtual ~DrawSketchHandlerLineSet ()=default
 
- Public Member Functions inherited from SketcherGui::DrawSketchHandler
void activate (ViewProviderSketch *)
 
void createAutoConstraints (const std::vector< AutoConstraint > &autoConstrs, int geoId, Sketcher::PointPos pointPos=Sketcher::PointPos::none, bool createowncommand=true)
 
void deactivate ()
 
 DrawSketchHandler ()
 
int getHighestCurveIndex (void)
 
int getHighestVertexIndex (void)
 
virtual void mouseMove (Base::Vector2d onSketchPos)=0
 
virtual bool onSelectionChanged (const Gui::SelectionChanges &)
 
virtual bool pressButton (Base::Vector2d onSketchPos)=0
 
virtual void quit (void)
 
virtual void registerPressedKey (bool, int)
 
virtual bool releaseButton (Base::Vector2d onSketchPos)=0
 
void renderSuggestConstraintsCursor (std::vector< AutoConstraint > &suggestedConstraints)
 
void resetPositionText (void)
 
int seekAutoConstraint (std::vector< AutoConstraint > &suggestedConstraints, const Base::Vector2d &Pos, const Base::Vector2d &Dir, AutoConstraint::TargetType type=AutoConstraint::VERTEX)
 
void setPositionText (const Base::Vector2d &Pos)
 
void setPositionText (const Base::Vector2d &Pos, const SbString &text)
 
virtual ~DrawSketchHandler ()
 

Protected Member Functions

void updateTransitionData (int GeoId, Sketcher::PointPos PosId)
 
- Protected Member Functions inherited from SketcherGui::DrawSketchHandler
virtual QString getCrosshairCursorSVGName () const
 
void setCursor (const QPixmap &pixmap, int x, int y, bool autoScale=true)
 
void updateCursor ()
 updates the actCursor with the icon by calling getCrosshairCursorSVGName(), enabling to set data member dependent icons (i.e. More...
 
void unsetCursor (void)
 restitutes the cursor that was in use at the moment of starting the DrawSketchHandler (i.e. oldCursor) More...
 
void applyCursor (void)
 restitutes the DSH cached cursor (e.g. without any tail due to autoconstraints, ...) More...
 
unsigned long getCrosshairColor ()
 returns the color to be used for the crosshair (configurable as a parameter) More...
 
qreal devicePixelRatio ()
 functions to set the cursor to a given svgName (to be migrated to NVI style) More...
 
void drawEdit (const std::vector< Base::Vector2d > &EditCurve)
 
void drawEdit (const std::list< std::vector< Base::Vector2d > > &list)
 
void drawEdit (const std::vector< Part::Geometry * > &geometries)
 
void drawEditMarkers (const std::vector< Base::Vector2d > &EditMarkers, unsigned int augmentationlevel=0)
 
void setAxisPickStyle (bool on)
 
void moveCursorToSketchPoint (Base::Vector2d point)
 
void preselectAtPoint (Base::Vector2d point)
 
void drawPositionAtCursor (const Base::Vector2d &position)
 
void drawDirectionAtCursor (const Base::Vector2d &position, const Base::Vector2d &origin)
 
int getPreselectPoint (void) const
 
int getPreselectCurve (void) const
 
int getPreselectCross (void) const
 
Sketcher::SketchObjectgetSketchObject ()
 
std::vector< QPixmap > suggestedConstraintsPixmaps (std::vector< AutoConstraint > &suggestedConstraints)
 Returns constraints icons scaled to width. More...
 

Protected Attributes

double arcRadius
 
Base::Vector2d CenterPoint
 
Base::Vector3d dirVec
 
std::vector< Base::Vector2dEditCurve
 
double endAngle
 
int firstCurve
 
Sketcher::PointPos firstPosId
 
bool firstsegment
 
SELECT_MODE Mode
 
int previousCurve
 
Sketcher::PointPos previousPosId
 
SEGMENT_MODE SegmentMode
 
SNAP_MODE SnapMode
 
double startAngle
 
std::vector< AutoConstraintsugConstr1
 
std::vector< AutoConstraintsugConstr2
 
bool suppressTransition
 
TRANSITION_MODE TransitionMode
 
std::vector< AutoConstraintvirtualsugConstr1
 
- Protected Attributes inherited from SketcherGui::DrawSketchHandler
ViewProviderSketchsketchgui
 
QCursor oldCursor
 
QCursor actCursor
 
QPixmap actCursorPixmap
 

Member Enumeration Documentation

◆ SEGMENT_MODE

Enumerator
SEGMENT_MODE_Arc 
SEGMENT_MODE_Line 

◆ SELECT_MODE

mode table

Enumerator
STATUS_SEEK_First 

enum value -—.

STATUS_SEEK_Second 

enum value -—.

STATUS_Do 
STATUS_Close 

◆ SNAP_MODE

Enumerator
SNAP_MODE_Free 
SNAP_MODE_45Degree 

◆ TRANSITION_MODE

Enumerator
TRANSITION_MODE_Free 
TRANSITION_MODE_Tangent 
TRANSITION_MODE_Perpendicular_L 
TRANSITION_MODE_Perpendicular_R 

Constructor & Destructor Documentation

◆ DrawSketchHandlerLineSet()

SketcherGui::DrawSketchHandlerLineSet::DrawSketchHandlerLineSet ( )

◆ ~DrawSketchHandlerLineSet()

virtual SketcherGui::DrawSketchHandlerLineSet::~DrawSketchHandlerLineSet ( )
virtualdefault

Member Function Documentation

◆ mouseMove()

◆ pressButton()

◆ quit()

◆ registerPressedKey()

◆ releaseButton()

virtual bool SketcherGui::DrawSketchHandlerLineSet::releaseButton ( Base::Vector2d  onSketchPos)
overridevirtual

Implements SketcherGui::DrawSketchHandler.

References Gui::Command::abortCommand(), SketcherGui::DrawSketchHandler::applyCursor(), arcRadius, SketcherGui::ViewProviderSketch::Autoconstraints, SketcherGui::ViewProviderSketch::AvoidRedundant, CenterPoint, Gui::cmdAppObjectArgs(), Sketcher::Coincident, Gui::Command::commitCommand(), Base::Console(), SketcherGui::Construction, SketcherGui::DrawSketchHandler::createAutoConstraints(), SketcherGui::DrawSketchHandler::drawEdit(), EditCurve, Sketcher::end, endAngle, Base::ConsoleSingleton::Error(), firstCurve, firstPosId, firstsegment, SketcherGui::geometryCreationMode, App::GetApplication(), ParameterGrp::GetBool(), SketcherGui::DrawSketchHandler::getHighestCurveIndex(), Gui::ViewProviderDocumentObject::getObject(), App::Application::GetParameterGroupByPath(), App::PropertyBool::getValue(), Mode, mouseMove(), Sketcher::none, Gui::Command::openCommand(), previousCurve, previousPosId, SketcherGui::ViewProviderSketch::purgeHandler(), draftutils.translate::QT_TRANSLATE_NOOP, SketcherGui::removeRedundantHorizontalVertical(), SketcherGui::DrawSketchHandler::resetPositionText(), SEGMENT_MODE_Arc, SEGMENT_MODE_Line, SegmentMode, SketcherGui::DrawSketchHandler::sketchgui, SNAP_MODE_45Degree, SNAP_MODE_Free, Sketcher::start, startAngle, STATUS_Close, STATUS_Do, STATUS_SEEK_First, STATUS_SEEK_Second, sugConstr1, sugConstr2, suppressTransition, TRANSITION_MODE_Free, TRANSITION_MODE_Perpendicular_L, TRANSITION_MODE_Perpendicular_R, TRANSITION_MODE_Tangent, TransitionMode, SketcherGui::tryAutoRecomputeIfNotSolve(), SketcherGui::DrawSketchHandler::unsetCursor(), updateTransitionData(), virtualsugConstr1, Base::Vector2d::x, and Base::Vector2d::y.

◆ updateTransitionData()

Member Data Documentation

◆ arcRadius

double SketcherGui::DrawSketchHandlerLineSet::arcRadius
protected

Referenced by mouseMove(), and releaseButton().

◆ CenterPoint

Base::Vector2d SketcherGui::DrawSketchHandlerLineSet::CenterPoint
protected

Referenced by mouseMove(), and releaseButton().

◆ dirVec

Base::Vector3d SketcherGui::DrawSketchHandlerLineSet::dirVec
protected

Referenced by mouseMove(), and updateTransitionData().

◆ EditCurve

std::vector<Base::Vector2d> SketcherGui::DrawSketchHandlerLineSet::EditCurve
protected

◆ endAngle

double SketcherGui::DrawSketchHandlerLineSet::endAngle
protected

Referenced by mouseMove(), and releaseButton().

◆ firstCurve

int SketcherGui::DrawSketchHandlerLineSet::firstCurve
protected

Referenced by pressButton(), quit(), and releaseButton().

◆ firstPosId

Sketcher::PointPos SketcherGui::DrawSketchHandlerLineSet::firstPosId
protected

Referenced by pressButton(), quit(), and releaseButton().

◆ firstsegment

bool SketcherGui::DrawSketchHandlerLineSet::firstsegment
protected

Referenced by quit(), and releaseButton().

◆ Mode

SELECT_MODE SketcherGui::DrawSketchHandlerLineSet::Mode
protected

◆ previousCurve

int SketcherGui::DrawSketchHandlerLineSet::previousCurve
protected

◆ previousPosId

Sketcher::PointPos SketcherGui::DrawSketchHandlerLineSet::previousPosId
protected

Referenced by pressButton(), quit(), and releaseButton().

◆ SegmentMode

SEGMENT_MODE SketcherGui::DrawSketchHandlerLineSet::SegmentMode
protected

◆ SnapMode

SNAP_MODE SketcherGui::DrawSketchHandlerLineSet::SnapMode
protected

◆ startAngle

double SketcherGui::DrawSketchHandlerLineSet::startAngle
protected

Referenced by mouseMove(), and releaseButton().

◆ sugConstr1

std::vector<AutoConstraint> SketcherGui::DrawSketchHandlerLineSet::sugConstr1
protected

◆ sugConstr2

std::vector<AutoConstraint> SketcherGui::DrawSketchHandlerLineSet::sugConstr2
protected

Referenced by mouseMove(), and releaseButton().

◆ suppressTransition

bool SketcherGui::DrawSketchHandlerLineSet::suppressTransition
protected

◆ TransitionMode

TRANSITION_MODE SketcherGui::DrawSketchHandlerLineSet::TransitionMode
protected

◆ virtualsugConstr1

std::vector<AutoConstraint> SketcherGui::DrawSketchHandlerLineSet::virtualsugConstr1
protected

Referenced by pressButton(), and releaseButton().


The documentation for this class was generated from the following file: