QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
StyleEditor Class Reference

#include <styleeditor.h>

Inheritance diagram for StyleEditor:
Inheritance graph
Collaboration diagram for StyleEditor:
Collaboration graph

Public Slots

void updateForm () override
 StyleEditor::updateForm Update the edition form according to the value of edited part(s)
 
void updatePartAntialiasing ()
 Update antialiasing with undo command.
 
void updatePartColor ()
 Update color with undo command.
 
void updatePartLineStyle ()
 Update style with undo command.
 
void updatePartLineWeight ()
 Update weight with undo command.
 
void updatePartFilling ()
 Update color filling with undo command.
 

Public Member Functions

 StyleEditor (QETElementEditor *, CustomElementGraphicPart *=nullptr, QWidget *=nullptr)
 
 ~StyleEditor () override
 Destructeur.
 
bool setPart (CustomElementPart *) override
 StyleEditor::setPart Set the part to edit by this editor. Note : editor can accept or refuse to edit a part.
 
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.
 
CustomElementPartcurrentPart () const override
 
QList< CustomElementPart * > currentParts () 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 void updateForm ()=0
 

Static Public Member Functions

static bool isStyleEditable (QList< CustomElementPart * > cep_list)
 StyleEditor::isStyleEditable.
 

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

CustomElementGraphicPartpart
 
QList< CustomElementGraphicPart * > m_part_list
 
QList< CustomElementPart * > m_cep_list
 
QCheckBox * antialiasing
 
QComboBox * filling_color
 
QComboBox * outline_color
 
QComboBox * size_weight
 
QComboBox * line_style
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ StyleEditor() [1/2]

StyleEditor::StyleEditor ( QETElementEditor editor,
CustomElementGraphicPart p = nullptr,
QWidget *  parent = nullptr 
)

Constructeur

Parameters
editorL'editeur d'element concerne
pLa partie a editer
parentle Widget parent
Here is the call graph for this function:

◆ ~StyleEditor()

StyleEditor::~StyleEditor ( )
override

Destructeur.

◆ StyleEditor() [2/2]

StyleEditor::StyleEditor ( const StyleEditor )
private

Member Function Documentation

◆ activeConnections()

void StyleEditor::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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ currentPart()

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

Implements ElementItemEditor.

◆ currentParts()

QList< CustomElementPart * > StyleEditor::currentParts ( ) const
overridevirtual

Implements ElementItemEditor.

Here is the caller graph for this function:

◆ isStyleEditable()

bool StyleEditor::isStyleEditable ( QList< CustomElementPart * >  cep_list)
static

StyleEditor::isStyleEditable.

Parameters
cep_list
Returns
true if all of the content of cep_list can be edited by style editor, else return false.
Here is the caller graph for this function:

◆ makeUndo()

void StyleEditor::makeUndo ( const QString &  undo_text,
const char *  property_name,
const QVariant &  new_value 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPart()

bool StyleEditor::setPart ( CustomElementPart new_part)
overridevirtual

StyleEditor::setPart Set the part to edit by this editor. Note : editor can accept or refuse to edit a part.

Parameters
new_part: part to edit
Returns
true if editor accept to edit this CustomElementPart otherwise false

Implements ElementItemEditor.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setParts()

bool StyleEditor::setParts ( QList< CustomElementPart * >  part_list)
overridevirtual

StyleEditor::setParts Set several parts to edit by this editor. Note : editor can accept or refuse to edit several parts.

Parameters
part_list
Returns
true if every customeElementPart stored in part_list can be edited by this part editor, otherwise return false (see StyleEditor::isStyleEditable)

Reimplemented from ElementItemEditor.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateForm

void StyleEditor::updateForm ( )
overrideslot

StyleEditor::updateForm Update the edition form according to the value of edited part(s)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePartAntialiasing

void StyleEditor::updatePartAntialiasing ( )
slot

Update antialiasing with undo command.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePartColor

void StyleEditor::updatePartColor ( )
slot

Update color with undo command.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePartFilling

void StyleEditor::updatePartFilling ( )
slot

Update color filling with undo command.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePartLineStyle

void StyleEditor::updatePartLineStyle ( )
slot

Update style with undo command.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePartLineWeight

void StyleEditor::updatePartLineWeight ( )
slot

Update weight with undo command.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ antialiasing

QCheckBox* StyleEditor::antialiasing
private

◆ filling_color

QComboBox* StyleEditor::filling_color
private

◆ line_style

QComboBox * StyleEditor::line_style
private

◆ m_cep_list

QList<CustomElementPart *> StyleEditor::m_cep_list
private

◆ m_part_list

QList<CustomElementGraphicPart *> StyleEditor::m_part_list
private

◆ outline_color

QComboBox * StyleEditor::outline_color
private

◆ part

CustomElementGraphicPart* StyleEditor::part
private

◆ size_weight

QComboBox * StyleEditor::size_weight
private

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