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

#include <lineeditor.h>

Public Slots

void updateLineEndType1 ()
 Met a jour le type de la premiere extremite. More...
 
void updateLineEndLength1 ()
 Met a jour la longueur de la premiere extremite. More...
 
void updateLineEndType2 ()
 Met a jour le type de la seconde extremite. More...
 
void updateLineEndLength2 ()
 Met a jour la longueur de la seconde extremite. More...
 
void lineEditingFinished ()
 
void updateForm () override
 LineEditor::updateForm Update the value of the widgets. More...
 

Public Member Functions

 LineEditor (QETElementEditor *, PartLine *=nullptr, QWidget *=nullptr)
 
 ~LineEditor () override
 Destructeur. More...
 
bool setPart (CustomElementPart *) override
 LineEditor::setPart Specifie to this editor the part to edit. Note that an editor can accept or refuse to edit a part. This editor accept only PartLine. More...
 
CustomElementPartcurrentPart () const override
 
QPointF editedP1 () const
 LineEditor::editedP1. More...
 
QPointF editedP2 () const
 LineEditor::editedP2. More...
 
- 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

 LineEditor (const LineEditor &)
 
void activeConnections (bool)
 LineEditor::activeConnections Enable/disable connection between editor widget and slot editingFinished True == enable | false == disable. More...
 

Private Attributes

PartLinepart
 
StyleEditorstyle_
 
QDoubleSpinBox * x1
 
QDoubleSpinBox * y1
 
QDoubleSpinBox * x2
 
QDoubleSpinBox * y2
 
QComboBox * end1_type
 
QComboBox * end2_type
 
QDoubleSpinBox * end1_length
 
QDoubleSpinBox * end2_length
 
bool m_locked
 

Detailed Description

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

Definition at line 31 of file lineeditor.h.

Constructor & Destructor Documentation

◆ LineEditor() [1/2]

LineEditor::LineEditor ( QETElementEditor editor,
PartLine line = nullptr,
QWidget *  parent = nullptr 
)

Constructeur

Parameters
editorL'editeur d'element concerne
lineLa ligne a editer
parentle Widget parent

Definition at line 32 of file lineeditor.cpp.

References Qet::Circle, Qet::Diamond, end1_length, end1_type, end2_length, end2_type, QET::Icons::EndLineCircle, QET::Icons::EndLineDiamond, QET::Icons::EndLineNone, QET::Icons::EndLineSimple, QET::Icons::EndLineTriangle, Qet::None, Qet::Simple, style_, QET::Icons::tr, Qet::Triangle, updateForm(), x1, x2, y1, and y2.

◆ ~LineEditor()

LineEditor::~LineEditor ( )
override

Destructeur.

Definition at line 92 of file lineeditor.cpp.

◆ LineEditor() [2/2]

LineEditor::LineEditor ( const LineEditor )
private

Member Function Documentation

◆ activeConnections()

void LineEditor::activeConnections ( bool  active)
private

LineEditor::activeConnections Enable/disable connection between editor widget and slot editingFinished True == enable | false == disable.

Parameters
active

Definition at line 274 of file lineeditor.cpp.

References end1_length, end1_type, end2_length, end2_type, lineEditingFinished(), updateLineEndLength1(), updateLineEndLength2(), updateLineEndType1(), updateLineEndType2(), x1, x2, y1, and y2.

Referenced by updateForm().

◆ currentPart()

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

Implements ElementItemEditor.

Definition at line 145 of file lineeditor.cpp.

References part.

◆ editedP1()

QPointF LineEditor::editedP1 ( ) const

LineEditor::editedP1.

Returns
The edited P1 in item coordinate

Definition at line 153 of file lineeditor.cpp.

References part, x1, and y1.

Referenced by lineEditingFinished().

◆ editedP2()

QPointF LineEditor::editedP2 ( ) const

LineEditor::editedP2.

Returns
The edited P2 in item coordinate

Definition at line 161 of file lineeditor.cpp.

References part, x2, and y2.

Referenced by lineEditingFinished().

◆ lineEditingFinished

void LineEditor::lineEditingFinished ( )
slot

◆ setPart()

bool LineEditor::setPart ( CustomElementPart new_part)
overridevirtual

LineEditor::setPart Specifie to this editor the part to edit. Note that an editor can accept or refuse to edit a part. This editor accept only PartLine.

Parameters
new_part
Returns

Implements ElementItemEditor.

Definition at line 102 of file lineeditor.cpp.

References PartLine::firstEndLengthChanged(), PartLine::firstEndTypeChanged(), PartLine::lineChanged(), part, PartLine::secondEndLengthChanged(), PartLine::secondEndTypeChanged(), style_, and updateForm().

◆ updateForm

void LineEditor::updateForm ( )
overrideslot

LineEditor::updateForm Update the value of the widgets.

Definition at line 251 of file lineeditor.cpp.

References activeConnections(), end1_length, end1_type, end2_length, end2_type, part, x1, x2, y1, and y2.

Referenced by LineEditor(), and setPart().

◆ updateLineEndLength1

void LineEditor::updateLineEndLength1 ( )
slot

◆ updateLineEndLength2

void LineEditor::updateLineEndLength2 ( )
slot

◆ updateLineEndType1

void LineEditor::updateLineEndType1 ( )
slot

Met a jour le type de la premiere extremite.

Definition at line 166 of file lineeditor.cpp.

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

Referenced by activeConnections().

◆ updateLineEndType2

void LineEditor::updateLineEndType2 ( )
slot

Met a jour le type de la seconde extremite.

Definition at line 199 of file lineeditor.cpp.

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

Referenced by activeConnections().

Member Data Documentation

◆ end1_length

QDoubleSpinBox* LineEditor::end1_length
private

Definition at line 47 of file lineeditor.h.

Referenced by activeConnections(), LineEditor(), updateForm(), and updateLineEndLength1().

◆ end1_type

QComboBox* LineEditor::end1_type
private

Definition at line 46 of file lineeditor.h.

Referenced by activeConnections(), LineEditor(), updateForm(), and updateLineEndType1().

◆ end2_length

QDoubleSpinBox * LineEditor::end2_length
private

Definition at line 47 of file lineeditor.h.

Referenced by activeConnections(), LineEditor(), updateForm(), and updateLineEndLength2().

◆ end2_type

QComboBox * LineEditor::end2_type
private

Definition at line 46 of file lineeditor.h.

Referenced by activeConnections(), LineEditor(), updateForm(), and updateLineEndType2().

◆ m_locked

bool LineEditor::m_locked
private

◆ part

PartLine* LineEditor::part
private

◆ style_

StyleEditor* LineEditor::style_
private

Definition at line 44 of file lineeditor.h.

Referenced by LineEditor(), and setPart().

◆ x1

QDoubleSpinBox* LineEditor::x1
private

Definition at line 45 of file lineeditor.h.

Referenced by activeConnections(), editedP1(), LineEditor(), and updateForm().

◆ x2

QDoubleSpinBox * LineEditor::x2
private

Definition at line 45 of file lineeditor.h.

Referenced by activeConnections(), editedP2(), LineEditor(), and updateForm().

◆ y1

QDoubleSpinBox * LineEditor::y1
private

Definition at line 45 of file lineeditor.h.

Referenced by activeConnections(), editedP1(), LineEditor(), and updateForm().

◆ y2

QDoubleSpinBox * LineEditor::y2
private

Definition at line 45 of file lineeditor.h.

Referenced by activeConnections(), editedP2(), LineEditor(), and updateForm().


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