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

#include <arceditor.h>

Public Slots

void updateArcS ()
 ArcEditor::updateArcS Update the start angle of the arc according to the edited value. More...
 
void updateArcA ()
 ArcEditor::updateArcA Update the span angle of the arc according to the edited value. More...
 
void updateArcRect ()
 ArcEditor::updateArcRect Update the geometrie of the rect that define this arc according the the edited values. More...
 
void updateForm () override
 ArcEditor::updateForm Update the value of the widgets. More...
 

Public Member Functions

 ArcEditor (QETElementEditor *, PartArc *=nullptr, QWidget *=nullptr)
 
 ~ArcEditor () override
 Destructeur. More...
 
bool setPart (CustomElementPart *) override
 ArcEditor::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 partArc. More...
 
CustomElementPartcurrentPart () const override
 ArcEditor::currentPart. 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

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

Private Attributes

PartArcpart
 
StyleEditorstyle_
 
QDoubleSpinBox * x
 
QDoubleSpinBox * y
 
QDoubleSpinBox * h
 
QDoubleSpinBox * v
 
QSpinBox * angle
 
QSpinBox * start_angle
 
bool m_locked
 

Detailed Description

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

Definition at line 31 of file arceditor.h.

Constructor & Destructor Documentation

◆ ArcEditor() [1/2]

ArcEditor::ArcEditor ( QETElementEditor editor,
PartArc arc = nullptr,
QWidget *  parent = nullptr 
)

Constructeur

Parameters
editorL'editeur d'element concerne
arcL'arc a editer
parentle Widget parent

Definition at line 30 of file arceditor.cpp.

References activeConnections(), angle, h, start_angle, style_, QET::Icons::tr, updateForm(), v, x, and y.

◆ ~ArcEditor()

ArcEditor::~ArcEditor ( )
override

Destructeur.

Definition at line 78 of file arceditor.cpp.

◆ ArcEditor() [2/2]

ArcEditor::ArcEditor ( const ArcEditor )
private

Member Function Documentation

◆ activeConnections()

void ArcEditor::activeConnections ( bool  active)
private

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

Parameters
active

Definition at line 219 of file arceditor.cpp.

References angle, h, start_angle, updateArcA(), updateArcRect(), updateArcS(), v, x, and y.

Referenced by ArcEditor(), and updateForm().

◆ currentPart()

CustomElementPart * ArcEditor::currentPart ( ) const
overridevirtual

ArcEditor::currentPart.

Returns
the curent edited part, or 0 if there is no edited part

Implements ElementItemEditor.

Definition at line 127 of file arceditor.cpp.

References part.

◆ setPart()

bool ArcEditor::setPart ( CustomElementPart new_part)
overridevirtual

ArcEditor::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 partArc.

Parameters
new_part
Returns

Implements ElementItemEditor.

Definition at line 87 of file arceditor.cpp.

References part, AbstractPartEllipse::rectChanged(), AbstractPartEllipse::spanAngleChanged(), AbstractPartEllipse::startAngleChanged(), style_, and updateForm().

◆ updateArcA

void ArcEditor::updateArcA ( )
slot

ArcEditor::updateArcA Update the span angle of the arc according to the edited value.

Definition at line 156 of file arceditor.cpp.

References angle, ElementItemEditor::elementScene(), QPropertyUndoCommand::enableAnimation(), m_locked, part, CustomElementGraphicPart::property(), and ElementScene::undoStack().

Referenced by activeConnections().

◆ updateArcRect

void ArcEditor::updateArcRect ( )
slot

ArcEditor::updateArcRect Update the geometrie of the rect that define this arc according the the edited values.

Definition at line 177 of file arceditor.cpp.

References ElementItemEditor::elementScene(), QPropertyUndoCommand::enableAnimation(), h, m_locked, part, CustomElementGraphicPart::property(), ElementScene::undoStack(), v, x, and y.

Referenced by activeConnections().

◆ updateArcS

void ArcEditor::updateArcS ( )
slot

ArcEditor::updateArcS Update the start angle of the arc according to the edited value.

Definition at line 135 of file arceditor.cpp.

References ElementItemEditor::elementScene(), QPropertyUndoCommand::enableAnimation(), m_locked, part, CustomElementGraphicPart::property(), start_angle, and ElementScene::undoStack().

Referenced by activeConnections().

◆ updateForm

void ArcEditor::updateForm ( )
overrideslot

ArcEditor::updateForm Update the value of the widgets.

Definition at line 199 of file arceditor.cpp.

References activeConnections(), angle, h, part, CustomElementGraphicPart::property(), start_angle, v, x, and y.

Referenced by ArcEditor(), and setPart().

Member Data Documentation

◆ angle

QSpinBox* ArcEditor::angle
private

Definition at line 47 of file arceditor.h.

Referenced by activeConnections(), ArcEditor(), updateArcA(), and updateForm().

◆ h

QDoubleSpinBox * ArcEditor::h
private

Definition at line 46 of file arceditor.h.

Referenced by activeConnections(), ArcEditor(), updateArcRect(), and updateForm().

◆ m_locked

bool ArcEditor::m_locked
private

Definition at line 48 of file arceditor.h.

Referenced by updateArcA(), updateArcRect(), and updateArcS().

◆ part

PartArc* ArcEditor::part
private

Definition at line 44 of file arceditor.h.

Referenced by currentPart(), setPart(), updateArcA(), updateArcRect(), updateArcS(), and updateForm().

◆ start_angle

QSpinBox * ArcEditor::start_angle
private

Definition at line 47 of file arceditor.h.

Referenced by activeConnections(), ArcEditor(), updateArcS(), and updateForm().

◆ style_

StyleEditor* ArcEditor::style_
private

Definition at line 45 of file arceditor.h.

Referenced by ArcEditor(), and setPart().

◆ v

QDoubleSpinBox * ArcEditor::v
private

Definition at line 46 of file arceditor.h.

Referenced by activeConnections(), ArcEditor(), updateArcRect(), and updateForm().

◆ x

QDoubleSpinBox* ArcEditor::x
private

Definition at line 46 of file arceditor.h.

Referenced by activeConnections(), ArcEditor(), updateArcRect(), and updateForm().

◆ y

QDoubleSpinBox * ArcEditor::y
private

Definition at line 46 of file arceditor.h.

Referenced by activeConnections(), ArcEditor(), updateArcRect(), and updateForm().


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