SymbolEditor
1.3.0
|
Line to command class. More...
#include <Commands.h>
Public Member Functions | |
LineToCommand (Editor *editor, const QPointF &to) | |
virtual | ~LineToCommand () |
virtual void | undo () |
virtual void | redo () |
Private Attributes | |
Editor * | m_editor |
QPointF | m_to |
QPainterPath | m_path |
Line to command class.
Implement a line to operation on the QPainterPath for the current symbol. The line is added to the current sub path.
The original path is stored for a possible undo.
Definition at line 64 of file Commands.h.
LineToCommand::LineToCommand | ( | Editor * | editor, |
const QPointF & | to | ||
) |
Constructor
editor | a pointer to the Editor |
to | a const reference to a QPointF representing the point to draw to |
Definition at line 112 of file Commands.cpp.
|
virtual |
Destructor
Definition at line 123 of file Commands.cpp.
|
virtual |
Redo the line command. Call the Editor lineTo function with the m_to point returning the QPainterPath existing before the lineTo which is saved for undo.
Definition at line 141 of file Commands.cpp.
|
virtual |
Undo the line command. Restore the path saved during redo.
Definition at line 131 of file Commands.cpp.
|
private |
pointer to the editor
Definition at line 74 of file Commands.h.
|
private |
original path to be restored on undo
Definition at line 76 of file Commands.h.
|
private |
point to draw to
Definition at line 75 of file Commands.h.