SymbolEditor
1.3.0
|
Cubic to command class. More...
#include <Commands.h>
Public Member Functions | |
CubicToCommand (Editor *editor, const QPointF &control1, const QPointF &control2, const QPointF &to) | |
virtual | ~CubicToCommand () |
virtual void | undo () |
virtual void | redo () |
Private Attributes | |
Editor * | m_editor |
QPointF | m_control1 |
QPointF | m_control2 |
QPointF | m_to |
QPainterPath | m_path |
Cubic to command class.
Implement a cubic to operation on the QPainterPath for the current symbol. The cubic is added to the current sub path.
The original path is stored for a possible undo.
Definition at line 88 of file Commands.h.
CubicToCommand::CubicToCommand | ( | Editor * | editor, |
const QPointF & | control1, | ||
const QPointF & | control2, | ||
const QPointF & | to | ||
) |
Constructor
editor | a pointer to the Editor |
control1 | a const reference to a QPointF representing the first control point |
control2 | a const reference to a QPointF representing the second control point |
to | a const reference to a QPointF representing the end point of the curve |
Definition at line 155 of file Commands.cpp.
|
virtual |
Destructor
Definition at line 168 of file Commands.cpp.
|
virtual |
Redo the cubic command. Call the Editor cubicTo function with the three points returning the QPainterPath existing before the cubicTo which is saved for undo.
Definition at line 186 of file Commands.cpp.
|
virtual |
Undo the cubic command. Restore the path saved during redo.
Definition at line 176 of file Commands.cpp.
|
private |
first control point
Definition at line 99 of file Commands.h.
|
private |
second control point
Definition at line 100 of file Commands.h.
|
private |
pointer to the editor
Definition at line 98 of file Commands.h.
|
private |
original path to be restored on undo
Definition at line 102 of file Commands.h.
|
private |
end point
Definition at line 101 of file Commands.h.