mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Element editor : Editor can change several primitive style in same time. Just select several primitive and edit it with the style editor widget.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3716 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -65,6 +65,30 @@ void CustomElementGraphicPart::drawCross(const QPointF ¢er, QPainter *painte
|
||||
painter -> restore();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief CustomElementGraphicPart::setLineStyle
|
||||
* Set line style to ls
|
||||
* @param ls
|
||||
*/
|
||||
void CustomElementGraphicPart::setLineStyle(const LineStyle ls)
|
||||
{
|
||||
if (_linestyle == ls) return;
|
||||
_linestyle = ls;
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief CustomElementGraphicPart::setLineWeight
|
||||
* Set line weight to lw
|
||||
* @param lw
|
||||
*/
|
||||
void CustomElementGraphicPart::setLineWeight(const LineWeight lw)
|
||||
{
|
||||
if (_lineweight == lw) return;
|
||||
_lineweight = lw;
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief CustomElementGraphicPart::penWeight
|
||||
* @return the weight of pen
|
||||
@@ -78,6 +102,42 @@ qreal CustomElementGraphicPart::penWeight() const
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief CustomElementGraphicPart::setFilling
|
||||
* Set filling to f
|
||||
* @param f
|
||||
*/
|
||||
void CustomElementGraphicPart::setFilling(const Filling f)
|
||||
{
|
||||
if (_filling == f) return;
|
||||
_filling = f;
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief CustomElementGraphicPart::setColor
|
||||
* Set color to c
|
||||
* @param c
|
||||
*/
|
||||
void CustomElementGraphicPart::setColor(const Color c)
|
||||
{
|
||||
if (_color == c) return;
|
||||
_color = c;
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief CustomElementGraphicPart::setAntialiased
|
||||
* Set antialias to b
|
||||
* @param b
|
||||
*/
|
||||
void CustomElementGraphicPart::setAntialiased(const bool b)
|
||||
{
|
||||
if (_antialiased == b) return;
|
||||
_antialiased = b;
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief CustomElementGraphicPart::stylesToXml
|
||||
* Write the curent style to xml element.
|
||||
|
||||
@@ -61,7 +61,6 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
//Line color
|
||||
enum Color {BlackColor, WhiteColor, GreenColor, RedColor, BlueColor};
|
||||
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
|
||||
@@ -71,21 +70,21 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
static void drawCross (const QPointF ¢er, QPainter *painter);
|
||||
|
||||
//Getter and setter
|
||||
LineStyle lineStyle () const {return _linestyle;}
|
||||
void setLineStyle (const LineStyle ls) {_linestyle = ls;}
|
||||
LineStyle lineStyle () const {return _linestyle;}
|
||||
void setLineStyle (const LineStyle ls);
|
||||
|
||||
LineWeight lineWeight () const {return _lineweight;}
|
||||
void setLineWeight (const LineWeight lw) {_lineweight = lw;}
|
||||
LineWeight lineWeight () const {return _lineweight;}
|
||||
void setLineWeight (const LineWeight lw);
|
||||
qreal penWeight () const;
|
||||
|
||||
Filling filling () const {return _filling;}
|
||||
void setFilling(const Filling f) {_filling = f;}
|
||||
Filling filling () const {return _filling;}
|
||||
void setFilling(const Filling f);
|
||||
|
||||
Color color () const {return _color;}
|
||||
void setColor(const Color c) {_color = c;}
|
||||
Color color () const {return _color;}
|
||||
void setColor(const Color c);
|
||||
|
||||
bool antialiased () const {return _antialiased;}
|
||||
void setAntialiased(const bool b) {_antialiased = b;}
|
||||
bool antialiased () const {return _antialiased;}
|
||||
void setAntialiased(const bool b);
|
||||
//End of getter and setter
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user