mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-20 03:39:58 +02:00
move undo command: graphics item is animated when undo/redo (testing)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3202 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -34,6 +34,9 @@ typedef QHash<Qt::Corner, ConductorProfile> ConductorProfilesGroup;
|
||||
class Conductor : public QObject, public QGraphicsPathItem {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QPointF pos READ pos WRITE setPos)
|
||||
Q_PROPERTY(int animPath READ fakePath WRITE updatePathAnimate)
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
@@ -67,6 +70,12 @@ class Conductor : public QObject, public QGraphicsPathItem {
|
||||
Diagram *diagram() const;
|
||||
ConductorTextItem *textItem() const;
|
||||
void updatePath(const QRectF & = QRectF());
|
||||
|
||||
//This method do nothing, it's only made to be used with Q_PROPERTY
|
||||
//It's used to anim the path when is change
|
||||
void updatePathAnimate(const int = 1) {updatePath();}
|
||||
int fakePath() {return 1;}
|
||||
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
|
||||
Reference in New Issue
Block a user