LibrePCB Developers Documentation
SchematicEditorState_DrawPolygon Class Referencefinal

The SchematicEditorState_DrawPolygon class. More...

#include <schematiceditorstate_drawpolygon.h>

+ Inheritance diagram for SchematicEditorState_DrawPolygon:
+ Collaboration diagram for SchematicEditorState_DrawPolygon:

Public Member Functions

 SchematicEditorState_DrawPolygon ()=delete
 
 SchematicEditorState_DrawPolygon (const SchematicEditorState_DrawPolygon &other)=delete
 
 SchematicEditorState_DrawPolygon (const Context &context) noexcept
 
virtual ~SchematicEditorState_DrawPolygon () noexcept
 
virtual bool entry () noexcept override
 
virtual bool exit () noexcept override
 
virtual bool processAbortCommand () noexcept override
 
virtual bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processSwitchToSchematicPage (int index) noexcept override
 
SchematicEditorState_DrawPolygonoperator= (const SchematicEditorState_DrawPolygon &rhs)=delete
 
- Public Member Functions inherited from SchematicEditorState
 SchematicEditorState ()=delete
 
 SchematicEditorState (const SchematicEditorState &other)=delete
 
 SchematicEditorState (const Context &context, QObject *parent=nullptr) noexcept
 
virtual ~SchematicEditorState () noexcept
 
virtual bool entry () noexcept
 
virtual bool exit () noexcept
 
virtual bool processAddComponent (const QString &searchTerm=QString()) noexcept
 
virtual bool processAddComponent (const Uuid &cmp, const Uuid &symbVar) noexcept
 
virtual bool processSelectAll () noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processMove (const Point &delta) noexcept
 
virtual bool processRotate (const Angle &rotation) noexcept
 
virtual bool processMirror (Qt::Orientation orientation) noexcept
 
virtual bool processResetAllTexts () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processAbortCommand () noexcept
 
virtual bool processKeyPressed (const QKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const QKeyEvent &e) noexcept
 
virtual bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processSwitchToSchematicPage (int index) noexcept
 
SchematicEditorStateoperator= (const SchematicEditorState &rhs)=delete
 

Private Member Functions

bool startAddPolygon (const Point &pos) noexcept
 
bool addSegment (const Point &pos) noexcept
 
bool updateLastVertexPosition (const Point &pos) noexcept
 
bool abortCommand (bool showErrMsgBox) noexcept
 
void layerComboBoxLayerChanged (const Layer &layer) noexcept
 
void widthEditValueChanged (const UnsignedLength &value) noexcept
 
void filledCheckBoxCheckedChanged (bool checked) noexcept
 

Private Attributes

bool mIsUndoCmdActive
 
Polygon mLastPolygonProperties
 
Point mLastSegmentPos
 
SI_PolygonmCurrentPolygon
 
QScopedPointer< CmdPolygonEditmCurrentPolygonEditCmd
 

Additional Inherited Members

- Public Types inherited from SchematicEditorState
enum class  FindFlag
 
using Context = SchematicEditorFsm::Context
 
- Signals inherited from SchematicEditorState
void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 
- Protected Member Functions inherited from SchematicEditorState
SchematicgetActiveSchematic () noexcept
 
SchematicGraphicsScenegetActiveSchematicScene () noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
void abortBlockingToolsInOtherEditors () noexcept
 
bool execCmd (UndoCommand *cmd)
 
QWidget * parentWidget () noexcept
 
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPos (const Point &pos, FindFlags flags, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
template<typename T = QGraphicsItem>
std::shared_ptr< T > findItemAtPos (const Point &pos, FindFlags flags, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
- Static Protected Member Functions inherited from SchematicEditorState
static const QSet< const Layer * > & getAllowedGeometryLayers () noexcept
 
- Protected Attributes inherited from SchematicEditorState
Context mContext
 

Detailed Description

Constructor & Destructor Documentation

◆ SchematicEditorState_DrawPolygon() [1/3]

◆ SchematicEditorState_DrawPolygon() [2/3]

◆ SchematicEditorState_DrawPolygon() [3/3]

SchematicEditorState_DrawPolygon ( const Context context)
explicitnoexcept

◆ ~SchematicEditorState_DrawPolygon()

~SchematicEditorState_DrawPolygon ( )
virtualnoexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ processSwitchToSchematicPage()

bool processSwitchToSchematicPage ( int  index)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ operator=()

◆ startAddPolygon()

bool startAddPolygon ( const Point pos)
privatenoexcept
+ Here is the call graph for this function:

◆ addSegment()

bool addSegment ( const Point pos)
privatenoexcept
+ Here is the call graph for this function:

◆ updateLastVertexPosition()

bool updateLastVertexPosition ( const Point pos)
privatenoexcept
+ Here is the call graph for this function:

◆ abortCommand()

bool abortCommand ( bool  showErrMsgBox)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ layerComboBoxLayerChanged()

void layerComboBoxLayerChanged ( const Layer layer)
privatenoexcept
+ Here is the caller graph for this function:

◆ widthEditValueChanged()

void widthEditValueChanged ( const UnsignedLength value)
privatenoexcept
+ Here is the caller graph for this function:

◆ filledCheckBoxCheckedChanged()

void filledCheckBoxCheckedChanged ( bool  checked)
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mIsUndoCmdActive

bool mIsUndoCmdActive
private

◆ mLastPolygonProperties

Polygon mLastPolygonProperties
private

◆ mLastSegmentPos

Point mLastSegmentPos
private

◆ mCurrentPolygon

SI_Polygon* mCurrentPolygon
private

◆ mCurrentPolygonEditCmd

QScopedPointer<CmdPolygonEdit> mCurrentPolygonEditCmd
private

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