QElectroTech  0.70
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TerminalEditor Class Reference

#include <terminaleditor.h>

Public Slots

void updateTerminalO ()
 Met a jour l'orientation de la borne et cree un objet d'annulation. More...
 
void updatePos ()
 
void updateForm () override
 update Number and name, create cancel object More...
 

Public Member Functions

 TerminalEditor (QETElementEditor *, PartTerminal *=nullptr, QWidget *=nullptr)
 
 ~TerminalEditor () override
 Destructeur. More...
 
bool setPart (CustomElementPart *) override
 
CustomElementPartcurrentPart () const override
 
- Public Member Functions inherited from ElementItemEditor
 ElementItemEditor (QETElementEditor *, QWidget *=nullptr)
 
 ~ElementItemEditor () override
 
virtual QETElementEditorelementEditor () const
 
virtual ElementSceneelementScene () const
 
virtual QUndoStack & undoStack () const
 
virtual QString elementTypeName () const
 
virtual void setElementTypeName (const QString &)
 
virtual void detach ()
 
virtual bool setParts (QList< CustomElementPart *>)
 
virtual void updateForm ()=0
 

Private Member Functions

 TerminalEditor (const TerminalEditor &)
 
void activeConnections (bool)
 

Private Attributes

PartTerminalpart
 
QDoubleSpinBox * qle_x
 
QDoubleSpinBox * qle_y
 
QComboBox * orientation
 
bool m_locked
 

Detailed Description

This class provides a widget to edit terminals within the element editor.

Definition at line 30 of file terminaleditor.h.

Constructor & Destructor Documentation

◆ TerminalEditor() [1/2]

TerminalEditor::TerminalEditor ( QETElementEditor editor,
PartTerminal term = nullptr,
QWidget *  parent = nullptr 
)

Constructeur

Parameters
editorL'editeur d'element concerne
termLa borne a editer
parentQWidget parent de ce widget

Definition at line 34 of file terminaleditor.cpp.

References activeConnections(), QET::Icons::East, Qet::East, QET::Icons::North, Qet::North, orientation, qle_x, qle_y, QET::Icons::South, Qet::South, QET::Icons::tr, updateForm(), QET::Icons::West, and Qet::West.

◆ ~TerminalEditor()

TerminalEditor::~TerminalEditor ( )
override

Destructeur.

Definition at line 74 of file terminaleditor.cpp.

◆ TerminalEditor() [2/2]

TerminalEditor::TerminalEditor ( const TerminalEditor )
private

Member Function Documentation

◆ activeConnections()

void TerminalEditor::activeConnections ( bool  active)
private

Active ou desactive les connexionx signaux/slots entre les widgets internes.

Parameters
activetrue pour activer les connexions, false pour les desactiver

Definition at line 161 of file terminaleditor.cpp.

References orientation, qle_x, qle_y, updatePos(), and updateTerminalO().

Referenced by TerminalEditor(), and updateForm().

◆ currentPart()

CustomElementPart * TerminalEditor::currentPart ( ) const
overridevirtual
Returns
la primitive actuellement editee, ou 0 si ce widget n'en edite pas

Implements ElementItemEditor.

Definition at line 110 of file terminaleditor.cpp.

References part.

◆ setPart()

bool TerminalEditor::setPart ( CustomElementPart new_part)
overridevirtual

Permet de specifier a cet editeur quelle primitive il doit editer. A noter qu'un editeur peut accepter ou refuser d'editer une primitive. L'editeur de borne acceptera d'editer la primitive new_part s'il s'agit d'un objet de la classe PartTerminal.

Parameters
new_partNouvelle primitive a editer
Returns
true si l'editeur a accepter d'editer la primitive, false sinon

Implements ElementItemEditor.

Definition at line 85 of file terminaleditor.cpp.

References PartTerminal::orientationChanged(), part, and updateForm().

◆ updateForm

void TerminalEditor::updateForm ( )
overrideslot

update Number and name, create cancel object

Met a jour le formulaire d'edition

Definition at line 148 of file terminaleditor.cpp.

References activeConnections(), orientation, part, CustomElementGraphicPart::property(), qle_x, and qle_y.

Referenced by setPart(), and TerminalEditor().

◆ updatePos

void TerminalEditor::updatePos ( )
slot

◆ updateTerminalO

void TerminalEditor::updateTerminalO ( )
slot

Met a jour l'orientation de la borne et cree un objet d'annulation.

Definition at line 115 of file terminaleditor.cpp.

References m_locked, orientation, part, CustomElementGraphicPart::property(), QET::Icons::tr, and ElementItemEditor::undoStack().

Referenced by activeConnections().

Member Data Documentation

◆ m_locked

bool TerminalEditor::m_locked
private

Definition at line 44 of file terminaleditor.h.

Referenced by updatePos(), and updateTerminalO().

◆ orientation

QComboBox* TerminalEditor::orientation
private

Definition at line 43 of file terminaleditor.h.

Referenced by activeConnections(), TerminalEditor(), updateForm(), and updateTerminalO().

◆ part

PartTerminal* TerminalEditor::part
private

Definition at line 41 of file terminaleditor.h.

Referenced by currentPart(), setPart(), updateForm(), updatePos(), and updateTerminalO().

◆ qle_x

QDoubleSpinBox* TerminalEditor::qle_x
private

Definition at line 42 of file terminaleditor.h.

Referenced by activeConnections(), TerminalEditor(), updateForm(), and updatePos().

◆ qle_y

QDoubleSpinBox * TerminalEditor::qle_y
private

Definition at line 42 of file terminaleditor.h.

Referenced by activeConnections(), TerminalEditor(), updateForm(), and updatePos().


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