mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-06 13:40:52 +01:00
Element editor : replace home made property by Q_PROPERTY for all primitive,
Add combo box for input to set the tagg (nothing or label, actually) Remove terminal text because unused. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3088 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -178,52 +178,3 @@ void CustomElementGraphicPart::applyStylesToQPainter(QPainter &painter) const {
|
||||
painter.setPen(pen);
|
||||
painter.setBrush(brush);
|
||||
}
|
||||
|
||||
/**
|
||||
Specifie la valeur d'une propriete de style donnee.
|
||||
@param property propriete a modifier. Valeurs acceptees :
|
||||
* line-style : type de trait (@see LineStyle)
|
||||
* line-weight : epaisseur du traut (@see LineWeight)
|
||||
* filling : couleur de remplissage (@see Color)
|
||||
* color : couleur du trait (@see Color)
|
||||
* antialias : utiliser l'antialiasing ou non (booleen)
|
||||
@param value Valeur a attribuer a la propriete
|
||||
*/
|
||||
void CustomElementGraphicPart::setProperty(const QString &property, const QVariant &value) {
|
||||
if (property == "line-style") {
|
||||
setLineStyle(static_cast<LineStyle>(value.toInt()));
|
||||
} else if (property == "line-weight") {
|
||||
setLineWeight(static_cast<LineWeight>(value.toInt()));
|
||||
} else if (property == "filling") {
|
||||
setFilling(static_cast<Filling>(value.toInt()));
|
||||
} else if (property == "color") {
|
||||
setColor(static_cast<Color>(value.toInt()));
|
||||
} else if (property == "antialias") {
|
||||
setAntialiased(value.toBool());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Permet d'acceder a la valeur d'une propriete de style donnee.
|
||||
@param property propriete lue. Valeurs acceptees :
|
||||
* line-style : type de trait (@see LineStyle)
|
||||
* line-weight : epaisseur du traut (@see LineWeight)
|
||||
* filling : couleur de remplissage (@see Color)
|
||||
* color : couleur du trait (@see Color)
|
||||
* antialias : utiliser l'antialiasing ou non (booleen)
|
||||
@return La valeur de la propriete property
|
||||
*/
|
||||
QVariant CustomElementGraphicPart::property(const QString &property) {
|
||||
if (property == "line-style") {
|
||||
return(lineStyle());
|
||||
} else if (property == "line-weight") {
|
||||
return(lineWeight());
|
||||
} else if (property == "filling") {
|
||||
return(filling());
|
||||
} else if (property == "color") {
|
||||
return(color());
|
||||
} else if (property == "antialias") {
|
||||
return(antialiased());
|
||||
}
|
||||
return(QVariant());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user