mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-20 11:59:59 +02:00
Basic shapes: Items can be selected and moved (thanks joshua)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2879 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -21,6 +21,7 @@ class QetShapeItem : public QetGraphicsItem
|
||||
ShapeType getType() const { return _shapeType; }
|
||||
void setBoundingRect(QRectF rec) { _boundingRect = rec; }
|
||||
void setLineAngle(bool lineAngle){ _lineAngle = lineAngle; }
|
||||
void setFullyBuilt(bool isBuilt);
|
||||
|
||||
private:
|
||||
ShapeType _shapeType;
|
||||
@@ -28,12 +29,14 @@ class QetShapeItem : public QetGraphicsItem
|
||||
QRectF _boundingRect;
|
||||
bool _lineAngle; // false if line from topleft corner to bottomright corner
|
||||
// and true if line from topright corner to bottomleft corner
|
||||
bool _isFullyBuilt;
|
||||
|
||||
virtual void editProperty() {}
|
||||
|
||||
protected:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
QRectF boundingRect() const;
|
||||
QPainterPath shape() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user