SymbolEditor
1.3.0
|
Ellipse command class. More...
#include <Commands.h>
Public Member Functions | |
EllipseCommand (Editor *editor, const QPointF &from, const QPointF &to) | |
virtual | ~EllipseCommand () |
virtual void | undo () |
virtual void | redo () |
Private Attributes | |
Editor * | m_editor |
QPointF | m_from |
QPointF | m_to |
QPainterPath | m_path |
Ellipse command class.
Implement an ellipse operation on the QPainterPath for the current symbol. The current sub path is closed and the ellipse is added as a new sub path as a series of cubic to operations.
The original path is stored for a possible undo.
Definition at line 141 of file Commands.h.
EllipseCommand::EllipseCommand | ( | Editor * | editor, |
const QPointF & | from, | ||
const QPointF & | to | ||
) |
Constructor
editor | a pointer to the Editor |
from | a const reference to a QPointF representing the first corner |
to | a const reference to a QPointF representing the second corner |
Definition at line 242 of file Commands.cpp.
|
virtual |
Destructor
Definition at line 254 of file Commands.cpp.
|
virtual |
Redo the ellipse command. Call the Editor addEllipse function with the two points returning the QPainterPath existing before the addEllipse which is saved for undo.
Definition at line 272 of file Commands.cpp.
|
virtual |
Undo the ellipse command. Restore the path saved during redo.
Definition at line 262 of file Commands.cpp.
|
private |
pointer to the editor
Definition at line 151 of file Commands.h.
|
private |
first corner
Definition at line 152 of file Commands.h.
|
private |
original path to be restored on undo
Definition at line 154 of file Commands.h.
|
private |
second corner
Definition at line 153 of file Commands.h.