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

Decrease the line width of the path. More...

#include <Commands.h>

Inheritance diagram for DecreaseLineWidthCommand:
Collaboration diagram for DecreaseLineWidthCommand:

Public Member Functions

 DecreaseLineWidthCommand (Editor *editor, qreal from, qreal to)
 
virtual ~DecreaseLineWidthCommand ()
 
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

Decrease the line width of the path.

Implement decreasing the line width for the current symbol. Multiple decreases 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 491 of file Commands.h.

Constructor & Destructor Documentation

DecreaseLineWidthCommand::DecreaseLineWidthCommand ( 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 932 of file Commands.cpp.

DecreaseLineWidthCommand::~DecreaseLineWidthCommand ( )
virtual

Destructor

Definition at line 944 of file Commands.cpp.

Member Function Documentation

int DecreaseLineWidthCommand::id ( ) const
virtual

Get the id related to this command.

Returns
int representing the value from the IDs enum

Definition at line 972 of file Commands.cpp.

Here is the caller graph for this function:

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

Merge this command with another DecreaseLineWidthCommand. This allows repeated decreases 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 986 of file Commands.cpp.

Here is the call graph for this function:

void DecreaseLineWidthCommand::redo ( )
virtual

Redo the line width decrease.

Definition at line 961 of file Commands.cpp.

Here is the call graph for this function:

void DecreaseLineWidthCommand::undo ( )
virtual

Undo the line width decrease.

Definition at line 952 of file Commands.cpp.

Here is the call graph for this function:

Member Data Documentation

Editor* DecreaseLineWidthCommand::m_editor
private

pointer to the Editor

Definition at line 504 of file Commands.h.

qreal DecreaseLineWidthCommand::m_from
private

the original setting

Definition at line 505 of file Commands.h.

qreal DecreaseLineWidthCommand::m_to
private

the new setting, this may be changed by merging commands

Definition at line 506 of file Commands.h.


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