mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-14 21:50:01 +01:00
Basic Shape: qgraphicsitem_cast<> instead of dynamic_cast
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2897 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -16,6 +16,19 @@ class QetShapeItem : public QetGraphicsItem
|
||||
QetShapeItem(QPointF, QPointF = QPointF(0,0), ShapeType = Line, bool lineAngle = false, QGraphicsItem *parent = 0);
|
||||
virtual ~QetShapeItem();
|
||||
|
||||
// attributes
|
||||
public:
|
||||
enum { Type = UserType + 1008 };
|
||||
|
||||
// methods
|
||||
public:
|
||||
/**
|
||||
Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a
|
||||
QetShapeItem
|
||||
@return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
|
||||
void setStyle(Qt::PenStyle);
|
||||
Qt::PenStyle getStyle() const { return _shapeStyle; }
|
||||
ShapeType getType() const { return _shapeType; }
|
||||
|
||||
Reference in New Issue
Block a user