SymbolEditor
1.3.0
|
Scale to preferred size class. More...
#include <Commands.h>
Public Member Functions | |
ScalePreferredCommand (Editor *editor, const QPainterPath &originlSymbol, int gridElements, int borderSize) | |
~ScalePreferredCommand () | |
virtual void | undo () |
virtual void | redo () |
Private Attributes | |
Editor * | m_editor |
QPainterPath | m_originalSymbol |
int | m_gridElements |
int | m_borderSize |
Scale to preferred size class.
Implement scaling of the current symbol so that it fits within the preferred size rectangle. No changes are made to symbols that are already inside it.
Definition at line 324 of file Commands.h.
ScalePreferredCommand::ScalePreferredCommand | ( | Editor * | editor, |
const QPainterPath & | originalSymbol, | ||
int | gridElements, | ||
int | borderSize | ||
) |
Constructor
editor | a pointer to the editor |
painterPath | the current path to scale |
gridElements | the number of elements along the grid side |
borderSize | the number of elements required for the border |
Definition at line 587 of file Commands.cpp.
ScalePreferredCommand::~ScalePreferredCommand | ( | ) |
Destructor.
Definition at line 600 of file Commands.cpp.
|
virtual |
Redo the scale command. Apply the scaled symbol.
Definition at line 617 of file Commands.cpp.
|
virtual |
Undo the scale command. Restore the original path.
Definition at line 608 of file Commands.cpp.
|
private |
the number of elements in a border
Definition at line 337 of file Commands.h.
|
private |
pointer to the editor
Definition at line 334 of file Commands.h.
|
private |
the number of elements in a grid side
Definition at line 336 of file Commands.h.
|
private |
original symbol path used for undo
Definition at line 335 of file Commands.h.