QElectroTech  0.70
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
ElementEditionCommand Class Reference

The ElementEditionCommand class ElementEditionCommand is the base class for all commands classes involved in the edition of an electrical element. It provides commonly required methods and attributes, such as accessors to the modified scene and view. More...

#include <editorcommands.h>

Public Member Functions

 ElementEditionCommand (ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 
 ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 
 ~ElementEditionCommand () override
 
ElementSceneelementScene () const
 
void setElementScene (ElementScene *)
 
ElementViewelementView () const
 
void setElementView (ElementView *)
 

Protected Attributes

ElementScenem_scene
 Element editor/view/scene the command should take place on. More...
 
ElementViewm_view
 

Private Member Functions

 ElementEditionCommand (const ElementEditionCommand &)
 

Detailed Description

The ElementEditionCommand class ElementEditionCommand is the base class for all commands classes involved in the edition of an electrical element. It provides commonly required methods and attributes, such as accessors to the modified scene and view.

Definition at line 32 of file editorcommands.h.

Constructor & Destructor Documentation

◆ ElementEditionCommand() [1/3]

ElementEditionCommand::ElementEditionCommand ( ElementScene scene = nullptr,
ElementView view = nullptr,
QUndoCommand *  parent = nullptr 
)

Constructs an ElementEditionCommand, thus embedding the provided scene and view.

Parameters
parentParent command

Definition at line 24 of file editorcommands.cpp.

◆ ElementEditionCommand() [2/3]

ElementEditionCommand::ElementEditionCommand ( const QString &  text,
ElementScene scene = nullptr,
ElementView view = nullptr,
QUndoCommand *  parent = nullptr 
)

Constructs an ElementEditionCommand, thus embedding the provided scene and view.

Parameters
textText describing the effect of the command
parentParent command

Definition at line 36 of file editorcommands.cpp.

◆ ~ElementEditionCommand()

ElementEditionCommand::~ElementEditionCommand ( )
override

Destructor

Definition at line 46 of file editorcommands.cpp.

◆ ElementEditionCommand() [3/3]

ElementEditionCommand::ElementEditionCommand ( const ElementEditionCommand )
private

Member Function Documentation

◆ elementScene()

ElementScene * ElementEditionCommand::elementScene ( ) const
Returns
the element editor/scene the command should take place on

Definition at line 52 of file editorcommands.cpp.

References m_scene.

◆ elementView()

ElementView * ElementEditionCommand::elementView ( ) const
Returns
the view the effect of the command should be rendered on

Definition at line 66 of file editorcommands.cpp.

References m_view.

◆ setElementScene()

void ElementEditionCommand::setElementScene ( ElementScene scene)

Define scene as the element editor/scene the command should take place

Definition at line 59 of file editorcommands.cpp.

References m_scene.

◆ setElementView()

void ElementEditionCommand::setElementView ( ElementView view)

Define view as the view the effect of the command should be rendered on

Definition at line 73 of file editorcommands.cpp.

References m_view.

Member Data Documentation

◆ m_scene

ElementScene* ElementEditionCommand::m_scene
protected

◆ m_view

ElementView* ElementEditionCommand::m_view
protected

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