mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-15 14:19:59 +01:00
forget files from previous comit
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5407 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -64,6 +64,14 @@ void QetGraphicsItem::setPos(qreal x, qreal y) {
|
|||||||
setPos(QPointF(x, y));
|
setPos(QPointF(x, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief QetGraphicsItem::state
|
||||||
|
* @return the current state of this item
|
||||||
|
*/
|
||||||
|
QET::GraphicsItemState QetGraphicsItem::state() const {
|
||||||
|
return m_state;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief QetGraphicsItem::mousePressEvent
|
* @brief QetGraphicsItem::mousePressEvent
|
||||||
*handle the mouse click
|
*handle the mouse click
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#define QETGRAPHICSITEM_H
|
#define QETGRAPHICSITEM_H
|
||||||
|
|
||||||
#include <QGraphicsObject>
|
#include <QGraphicsObject>
|
||||||
|
#include "qet.h"
|
||||||
|
|
||||||
class Diagram;
|
class Diagram;
|
||||||
|
|
||||||
@@ -42,6 +43,8 @@ class QetGraphicsItem : public QGraphicsObject
|
|||||||
virtual void editProperty () {}
|
virtual void editProperty () {}
|
||||||
virtual QString name ()const {return QString("");}
|
virtual QString name ()const {return QString("");}
|
||||||
|
|
||||||
|
QET::GraphicsItemState state() const;
|
||||||
|
|
||||||
//protected method
|
//protected method
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *e) override;
|
void mousePressEvent(QGraphicsSceneMouseEvent *e) override;
|
||||||
@@ -54,6 +57,7 @@ class QetGraphicsItem : public QGraphicsObject
|
|||||||
bool first_move_;
|
bool first_move_;
|
||||||
bool snap_to_grid_;
|
bool snap_to_grid_;
|
||||||
QPointF mouse_to_origin_movement_;
|
QPointF mouse_to_origin_movement_;
|
||||||
|
QET::GraphicsItemState m_state = QET:: GIOK;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user