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

Scale to preferred size class. More...

#include <Commands.h>

Inheritance diagram for ScalePreferredCommand:
Collaboration diagram for ScalePreferredCommand:

Public Member Functions

 ScalePreferredCommand (Editor *editor, const QPainterPath &originlSymbol, int gridElements, int borderSize)
 
 ~ScalePreferredCommand ()
 
virtual void undo ()
 
virtual void redo ()
 

Private Attributes

Editorm_editor
 
QPainterPath m_originalSymbol
 
int m_gridElements
 
int m_borderSize
 

Detailed Description

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.

Constructor & Destructor Documentation

ScalePreferredCommand::ScalePreferredCommand ( Editor editor,
const QPainterPath &  originalSymbol,
int  gridElements,
int  borderSize 
)

Constructor

Parameters
editora pointer to the editor
painterPaththe current path to scale
gridElementsthe number of elements along the grid side
borderSizethe 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.

Member Function Documentation

void ScalePreferredCommand::redo ( )
virtual

Redo the scale command. Apply the scaled symbol.

Definition at line 617 of file Commands.cpp.

Here is the call graph for this function:

void ScalePreferredCommand::undo ( )
virtual

Undo the scale command. Restore the original path.

Definition at line 608 of file Commands.cpp.

Here is the call graph for this function:

Member Data Documentation

int ScalePreferredCommand::m_borderSize
private

the number of elements in a border

Definition at line 337 of file Commands.h.

Editor* ScalePreferredCommand::m_editor
private

pointer to the editor

Definition at line 334 of file Commands.h.

int ScalePreferredCommand::m_gridElements
private

the number of elements in a grid side

Definition at line 336 of file Commands.h.

QPainterPath ScalePreferredCommand::m_originalSymbol
private

original symbol path used for undo

Definition at line 335 of file Commands.h.


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