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

Increase the line width of the path. More...

#include <Commands.h>

Inheritance diagram for IncreaseLineWidthCommand:
Collaboration diagram for IncreaseLineWidthCommand:

Public Member Functions

 IncreaseLineWidthCommand (Editor *editor, qreal from, qreal to)
 
virtual ~IncreaseLineWidthCommand ()
 
virtual void redo ()
 
virtual void undo ()
 
virtual int id () const
 
virtual bool mergeWith (const QUndoCommand *command)
 

Private Attributes

Editorm_editor
 
qreal m_from
 
qreal m_to
 

Detailed Description

Increase the line width of the path.

Implement increasing the line width for the current symbol. Multiple increases of the width are merged together to allow for a single undo or redo operation.

The original width is stored for a possible undo.

Definition at line 464 of file Commands.h.

Constructor & Destructor Documentation

IncreaseLineWidthCommand::IncreaseLineWidthCommand ( Editor editor,
qreal  from,
qreal  to 
)

Constructor

Parameters
editora pointer to the Editor
fromthe value of the original setting
tothe value of the new setting

Definition at line 860 of file Commands.cpp.

IncreaseLineWidthCommand::~IncreaseLineWidthCommand ( )
virtual

Destructor

Definition at line 872 of file Commands.cpp.

Member Function Documentation

int IncreaseLineWidthCommand::id ( ) const
virtual

Get the id related to this command.

Returns
int representing the value from the IDs enum

Definition at line 900 of file Commands.cpp.

Here is the caller graph for this function:

bool IncreaseLineWidthCommand::mergeWith ( const QUndoCommand *  command)
virtual

Merge this command with another IncreaseLineWidthCommand. This allows repeated increases without additional commands added to the stack.

Parameters
commanda pointer to the additional QUndoCommand
Returns
true if the merge succeeded, false otherwise

Definition at line 914 of file Commands.cpp.

Here is the call graph for this function:

void IncreaseLineWidthCommand::redo ( )
virtual

Redo the line width increase.

Definition at line 889 of file Commands.cpp.

Here is the call graph for this function:

void IncreaseLineWidthCommand::undo ( )
virtual

Undo the line width increase.

Definition at line 880 of file Commands.cpp.

Here is the call graph for this function:

Member Data Documentation

Editor* IncreaseLineWidthCommand::m_editor
private

pointer to the Editor

Definition at line 477 of file Commands.h.

qreal IncreaseLineWidthCommand::m_from
private

the original setting

Definition at line 478 of file Commands.h.

qreal IncreaseLineWidthCommand::m_to
private

the new setting, this may be changed by merging commands

Definition at line 479 of file Commands.h.


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