LibrePCB Developers Documentation
|
The schematic editor finite state machine (FSM) More...
#include <schematiceditorfsm.h>
Inherits QObject.
Classes | |
struct | Context |
FSM Context. More... | |
Public Types | |
enum | State |
FSM States. More... | |
Signals | |
void | stateChanged (State newState) |
void | statusBarMessageChanged (const QString &message, int timeoutMs=-1) |
Public Member Functions | |
SchematicEditorFsm ()=delete | |
SchematicEditorFsm (const SchematicEditorFsm &other)=delete | |
SchematicEditorFsm (const Context &context, QObject *parent=nullptr) noexcept | |
virtual | ~SchematicEditorFsm () noexcept |
State | getCurrentState () const noexcept |
bool | processSelect () noexcept |
bool | processAddComponent (const QString &searchTerm=QString()) noexcept |
bool | processAddComponent (const Uuid &cmp, const Uuid &symbVar) noexcept |
bool | processAddNetLabel () noexcept |
bool | processDrawPolygon () noexcept |
bool | processAddText () noexcept |
bool | processDrawWire () noexcept |
bool | processMeasure () noexcept |
bool | processAbortCommand () noexcept |
bool | processSelectAll () noexcept |
bool | processCut () noexcept |
bool | processCopy () noexcept |
bool | processPaste () noexcept |
bool | processMove (const Point &delta) noexcept |
bool | processRotate (const Angle &rotation) noexcept |
bool | processMirror (Qt::Orientation orientation) noexcept |
bool | processResetAllTexts () noexcept |
bool | processRemove () noexcept |
bool | processEditProperties () noexcept |
bool | processKeyPressed (const QKeyEvent &e) noexcept |
bool | processKeyReleased (const QKeyEvent &e) noexcept |
bool | processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept |
bool | processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept |
bool | processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept |
bool | processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept |
bool | processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept |
bool | processSwitchToSchematicPage (int index) noexcept |
SchematicEditorFsm & | operator= (const SchematicEditorFsm &rhs)=delete |
Private Member Functions | |
SchematicEditorState * | getCurrentStateObj () const noexcept |
bool | setNextState (State state) noexcept |
bool | leaveCurrentState () noexcept |
bool | enterNextState (State state) noexcept |
bool | switchToPreviousState () noexcept |
Private Attributes | |
QMap< State, SchematicEditorState * > | mStates |
State | mCurrentState |
State | mPreviousState |
The schematic editor finite state machine (FSM)
enum State |
|
delete |
|
delete |
|
explicitnoexcept |
|
virtualnoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Switch to another schematic page
If someone (the user or the application) wants to switch to another schematic page in the schematic editor, this is not allowed at any time (for example, while drawing a netline in the active schematic, you cannot switch to another schematic). So this kind of event must be processed by the FSM. The FSM then will only decide whether changing the schematic is allowed (event accepted) or not (event rejected). If the event was accepted, the schematic editor then is allowed to switch to the requested schematic page.
index | The new schematic page index |
true | If switching is allowed |
false | If switching is rejected |
|
delete |
|
signal |
|
signal |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
|
private |
|
private |