QElectroTech  0.8-dev
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>

Inheritance diagram for ElementEditionCommand:
Inheritance graph
Collaboration diagram for ElementEditionCommand:
Collaboration graph

Public Member Functions

 ElementEditionCommand (ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ~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.

Constructor & Destructor Documentation

◆ ElementEditionCommand() [1/3]

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

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

Parameters
scene
view
parent: Parent command

◆ ElementEditionCommand() [2/3]

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

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

Parameters
text: Text describing the effect of the command
scene
view
parent: Parent command

◆ ~ElementEditionCommand()

ElementEditionCommand::~ElementEditionCommand ( )
override

Destructor

◆ 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

◆ elementView()

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

◆ setElementScene()

void ElementEditionCommand::setElementScene ( ElementScene scene)

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

◆ setElementView()

void ElementEditionCommand::setElementView ( ElementView view)

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

Member Data Documentation

◆ m_scene

ElementScene* ElementEditionCommand::m_scene
protected

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

◆ m_view

ElementView* ElementEditionCommand::m_view
protected

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