23 #include <QVBoxLayout> 24 #include <QHBoxLayout> 99 main_layout -> addWidget(
new QLabel(
"<u>" +
tr(
"Apparence :") +
"</u> "));
101 QHBoxLayout *color_layout =
new QHBoxLayout();
102 color_layout -> addWidget(
new QLabel(
tr(
"Contour :")), 0, Qt::AlignRight);
104 color_layout -> addSpacing(10);
105 color_layout -> addWidget(
new QLabel(
tr(
"Remplissage :")), 0, Qt::AlignRight);
109 QHBoxLayout *style_layout =
new QHBoxLayout();
110 style_layout -> addWidget(
new QLabel(
tr(
"Style : ")), 0, Qt::AlignRight);
112 style_layout -> addSpacing(10);
113 style_layout -> addWidget(
new QLabel(
tr(
"Épaisseur : ")), 0, Qt::AlignRight);
120 main_layout -> addWidget(
new QLabel(
"<u>" +
tr(
"Géométrie :") +
"</u> "));
173 antialiasing -> setChecked(first_part -> antialiased());
175 line_style -> setCurrentIndex(first_part -> lineStyle());
176 size_weight -> setCurrentIndex(first_part -> lineWeight());
181 if (first_part -> antialiased() != cegp -> antialiased())
antialiasing -> setChecked(
false);
182 if (first_part -> color() != cegp -> color())
outline_color -> setCurrentIndex(-1);
183 if (first_part -> lineStyle() != cegp -> lineStyle())
line_style -> setCurrentIndex(-1);
184 if (first_part -> lineWeight() != cegp -> lineWeight())
size_weight -> setCurrentIndex(-1);
185 if (first_part -> filling() != cegp -> filling())
filling_color -> setCurrentIndex(-1);
229 if (part_list.isEmpty())
return false;
230 if (part_list.size() == 1)
return setPart(part_list.first());
268 str <<
"arc" <<
"ellipse" <<
"line" <<
"polygon" <<
"rect";
271 if (!str.contains(cep -> xmlName()))
303 undo->setText(undo_text);
314 undo->setText(undo_text);
The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can...
CustomElementGraphicPart * part
bool setPart(CustomElementPart *) override
StyleEditor::setPart Set the part to edit by this editor. Note : editor can accept or refuse to edit ...
QList< CustomElementGraphicPart * > m_part_list
QComboBox * outline_color
void updateForm() override
StyleEditor::updateForm Update the edition form according to the value of edited part(s) ...
bool setParts(QList< CustomElementPart *>) override
StyleEditor::setParts Set several parts to edit by this editor. Note : editor can accept or refuse to...
void updatePartAntialiasing()
Update antialiasing with undo command.
void updatePartColor()
Update color with undo command.
static bool isStyleEditable(QList< CustomElementPart *> cep_list)
StyleEditor::isStyleEditable.
QComboBox * filling_color
The CustomElementGraphicPart class This class is the base for all home-made primitive like line...
QList< CustomElementPart * > m_cep_list
void updatePartFilling()
Update color filling with undo command.
QVBoxLayout * main_layout
void updatePartLineStyle()
Update style with undo command.
void updatePartLineWeight()
Update weight with undo command.
QVariant property(const char *name) const override
void makeUndo(const QString &undo_text, const char *property_name, const QVariant &new_value)
StyleEditor(QETElementEditor *, CustomElementGraphicPart *=nullptr, QWidget *=nullptr)
~StyleEditor() override
Destructeur.
CustomElementPart * currentPart() const override
virtual QUndoStack & undoStack() const
void activeConnections(bool)