SymbolEditor  1.3.0
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
CubicToCommand Class Reference

Cubic to command class. More...

#include <Commands.h>

Inheritance diagram for CubicToCommand:
Collaboration diagram for CubicToCommand:

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

Editorm_editor
 
QPointF m_control1
 
QPointF m_control2
 
QPointF m_to
 
QPainterPath m_path
 

Detailed Description

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.

Constructor & Destructor Documentation

CubicToCommand::CubicToCommand ( Editor editor,
const QPointF &  control1,
const QPointF &  control2,
const QPointF &  to 
)

Constructor

Parameters
editora pointer to the Editor
control1a const reference to a QPointF representing the first control point
control2a const reference to a QPointF representing the second control point
toa const reference to a QPointF representing the end point of the curve

Definition at line 155 of file Commands.cpp.

CubicToCommand::~CubicToCommand ( )
virtual

Destructor

Definition at line 168 of file Commands.cpp.

Member Function Documentation

void CubicToCommand::redo ( )
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.

Here is the call graph for this function:

void CubicToCommand::undo ( )
virtual

Undo the cubic command. Restore the path saved during redo.

Definition at line 176 of file Commands.cpp.

Here is the call graph for this function:

Member Data Documentation

QPointF CubicToCommand::m_control1
private

first control point

Definition at line 99 of file Commands.h.

QPointF CubicToCommand::m_control2
private

second control point

Definition at line 100 of file Commands.h.

Editor* CubicToCommand::m_editor
private

pointer to the editor

Definition at line 98 of file Commands.h.

QPainterPath CubicToCommand::m_path
private

original path to be restored on undo

Definition at line 102 of file Commands.h.

QPointF CubicToCommand::m_to
private

end point

Definition at line 101 of file Commands.h.


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