QElectroTech
0.70
|
#include <styleeditor.h>
Public Slots | |
void | updateForm () override |
StyleEditor::updateForm Update the edition form according to the value of edited part(s) More... | |
void | updatePartAntialiasing () |
Update antialiasing with undo command. More... | |
void | updatePartColor () |
Update color with undo command. More... | |
void | updatePartLineStyle () |
Update style with undo command. More... | |
void | updatePartLineWeight () |
Update weight with undo command. More... | |
void | updatePartFilling () |
Update color filling with undo command. More... | |
Public Member Functions | |
StyleEditor (QETElementEditor *, CustomElementGraphicPart *=nullptr, QWidget *=nullptr) | |
~StyleEditor () override | |
Destructeur. More... | |
bool | setPart (CustomElementPart *) override |
StyleEditor::setPart Set the part to edit by this editor. Note : editor can accept or refuse to edit a part. More... | |
bool | setParts (QList< CustomElementPart *>) override |
StyleEditor::setParts Set several parts to edit by this editor. Note : editor can accept or refuse to edit several parts. More... | |
CustomElementPart * | currentPart () const override |
Public Member Functions inherited from ElementItemEditor | |
ElementItemEditor (QETElementEditor *, QWidget *=nullptr) | |
~ElementItemEditor () override | |
virtual QETElementEditor * | elementEditor () const |
virtual ElementScene * | elementScene () const |
virtual QUndoStack & | undoStack () const |
virtual QString | elementTypeName () const |
virtual void | setElementTypeName (const QString &) |
virtual void | detach () |
virtual void | updateForm ()=0 |
Static Public Member Functions | |
static bool | isStyleEditable (QList< CustomElementPart *> cep_list) |
StyleEditor::isStyleEditable. More... | |
Private Member Functions | |
StyleEditor (const StyleEditor &) | |
void | activeConnections (bool) |
void | makeUndo (const QString &undo_text, const char *property_name, const QVariant &new_value) |
Private Attributes | |
CustomElementGraphicPart * | part |
QList< CustomElementGraphicPart * > | m_part_list |
QList< CustomElementPart * > | m_cep_list |
QVBoxLayout * | main_layout |
QCheckBox * | antialiasing |
QComboBox * | filling_color |
QComboBox * | outline_color |
QComboBox * | size_weight |
QComboBox * | line_style |
This class provides a widget to edit styles (color, pen style and thickness, filling, antialiasing) common to most primitives within the element editor. Its appendWidget() method makes the insertion of another widget below it easier.
Definition at line 34 of file styleeditor.h.
StyleEditor::StyleEditor | ( | QETElementEditor * | editor, |
CustomElementGraphicPart * | p = nullptr , |
||
QWidget * | parent = nullptr |
||
) |
Constructeur
editor | L'editeur d'element concerne |
p | La partie a editer |
parent | le Widget parent |
Definition at line 33 of file styleeditor.cpp.
References antialiasing, CustomElementGraphicPart::BdiagFilling, CustomElementGraphicPart::BigWeight, CustomElementGraphicPart::BlackColor, CustomElementGraphicPart::BlackFilling, CustomElementGraphicPart::BlueColor, CustomElementGraphicPart::BlueFilling, CustomElementGraphicPart::BrunColor, CustomElementGraphicPart::BrunFilling, CustomElementGraphicPart::CyanColor, CustomElementGraphicPart::CyanFilling, CustomElementGraphicPart::DashdottedStyle, CustomElementGraphicPart::DashedStyle, CustomElementGraphicPart::DottedStyle, CustomElementGraphicPart::FdiagFilling, filling_color, CustomElementGraphicPart::GrayColor, CustomElementGraphicPart::GrayFilling, CustomElementGraphicPart::GreenColor, CustomElementGraphicPart::GreenFilling, CustomElementGraphicPart::HorFilling, CustomElementGraphicPart::LightgrayColor, CustomElementGraphicPart::LightgrayFilling, line_style, CustomElementGraphicPart::MagentaColor, CustomElementGraphicPart::MagentaFilling, main_layout, CustomElementGraphicPart::NoneColor, CustomElementGraphicPart::NoneFilling, CustomElementGraphicPart::NoneWeight, CustomElementGraphicPart::NormalStyle, CustomElementGraphicPart::NormalWeight, CustomElementGraphicPart::OrangeColor, CustomElementGraphicPart::OrangeFilling, outline_color, CustomElementGraphicPart::PurpleColor, CustomElementGraphicPart::PurpleFilling, CustomElementGraphicPart::RedColor, CustomElementGraphicPart::RedFilling, size_weight, CustomElementGraphicPart::ThinWeight, QET::Icons::tr, CustomElementGraphicPart::UltraWeight, updateForm(), CustomElementGraphicPart::VerFilling, CustomElementGraphicPart::WhiteColor, CustomElementGraphicPart::WhiteFilling, CustomElementGraphicPart::YellowColor, and CustomElementGraphicPart::YellowFilling.
|
override |
Destructeur.
Definition at line 125 of file styleeditor.cpp.
|
private |
|
private |
Active ou desactive les connexionx signaux/slots entre les widgets internes.
active | true pour activer les connexions, false pour les desactiver |
Definition at line 281 of file styleeditor.cpp.
References antialiasing, filling_color, line_style, outline_color, size_weight, updatePartAntialiasing(), updatePartColor(), updatePartFilling(), updatePartLineStyle(), and updatePartLineWeight().
Referenced by updateForm().
|
overridevirtual |
Implements ElementItemEditor.
Definition at line 256 of file styleeditor.cpp.
References part.
|
static |
cep_list |
Definition at line 265 of file styleeditor.cpp.
Referenced by setParts(), and QETElementEditor::slot_updateInformations().
|
private |
Definition at line 297 of file styleeditor.cpp.
References m_part_list, part, CustomElementGraphicPart::property(), and ElementItemEditor::undoStack().
Referenced by updatePartAntialiasing(), updatePartColor(), updatePartFilling(), updatePartLineStyle(), and updatePartLineWeight().
|
overridevirtual |
StyleEditor::setPart Set the part to edit by this editor. Note : editor can accept or refuse to edit a part.
new_part | : part to edit |
Implements ElementItemEditor.
Definition at line 199 of file styleeditor.cpp.
References m_part_list, part, and updateForm().
Referenced by RectangleEditor::setPart(), and setParts().
|
overridevirtual |
StyleEditor::setParts Set several parts to edit by this editor. Note : editor can accept or refuse to edit several parts.
part_list |
Reimplemented from ElementItemEditor.
Definition at line 227 of file styleeditor.cpp.
References isStyleEditable(), m_cep_list, m_part_list, part, setPart(), and updateForm().
|
overrideslot |
StyleEditor::updateForm Update the edition form according to the value of edited part(s)
Definition at line 157 of file styleeditor.cpp.
References activeConnections(), antialiasing, filling_color, line_style, m_part_list, outline_color, part, and size_weight.
Referenced by setPart(), setParts(), and StyleEditor().
|
slot |
Update antialiasing with undo command.
Definition at line 129 of file styleeditor.cpp.
References antialiasing, makeUndo(), and QET::Icons::tr.
Referenced by activeConnections().
|
slot |
Update color with undo command.
Definition at line 134 of file styleeditor.cpp.
References makeUndo(), outline_color, and QET::Icons::tr.
Referenced by activeConnections().
|
slot |
Update color filling with undo command.
Definition at line 149 of file styleeditor.cpp.
References filling_color, makeUndo(), and QET::Icons::tr.
Referenced by activeConnections().
|
slot |
Update style with undo command.
Definition at line 139 of file styleeditor.cpp.
References line_style, makeUndo(), and QET::Icons::tr.
Referenced by activeConnections().
|
slot |
Update weight with undo command.
Definition at line 144 of file styleeditor.cpp.
References makeUndo(), size_weight, and QET::Icons::tr.
Referenced by activeConnections().
|
private |
Definition at line 51 of file styleeditor.h.
Referenced by activeConnections(), StyleEditor(), updateForm(), and updatePartAntialiasing().
|
private |
Definition at line 52 of file styleeditor.h.
Referenced by activeConnections(), StyleEditor(), updateForm(), and updatePartFilling().
|
private |
Definition at line 52 of file styleeditor.h.
Referenced by activeConnections(), StyleEditor(), updateForm(), and updatePartLineStyle().
|
private |
Definition at line 49 of file styleeditor.h.
Referenced by setParts().
|
private |
Definition at line 48 of file styleeditor.h.
Referenced by makeUndo(), setPart(), setParts(), and updateForm().
|
private |
Definition at line 50 of file styleeditor.h.
Referenced by StyleEditor().
|
private |
Definition at line 52 of file styleeditor.h.
Referenced by activeConnections(), StyleEditor(), updateForm(), and updatePartColor().
|
private |
Definition at line 47 of file styleeditor.h.
Referenced by currentPart(), makeUndo(), setPart(), setParts(), and updateForm().
|
private |
Definition at line 52 of file styleeditor.h.
Referenced by activeConnections(), StyleEditor(), updateForm(), and updatePartLineWeight().