Changeset 13537 for branches/OMEdit/OMEditGUI/CornerItem.h
- Timestamp:
- 2012-10-20T20:27:24+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OMEdit/OMEditGUI/CornerItem.h
r13405 r13537 44 44 #include "Component.h" 45 45 46 class ShapeAnnotation;47 46 class Component; 48 class Component_OMC;49 47 class GraphicsScene; 50 48 class GraphicsView; 51 52 class RectangleCornerItem : public QObject, public QGraphicsItem53 {54 Q_OBJECT55 Q_INTERFACES(QGraphicsItem)56 private:57 QRectF mRectangle;58 QPen mPen;59 QPen mActivePen;60 QPen mHoverPen;61 bool mItemClicked;62 QPointF mClickPos;63 int mConnectedPointIndex;64 public:65 RectangleCornerItem(qreal x, qreal y, int connectedPointIndex, ShapeAnnotation *pParent = 0);66 void setActive();67 void setPassive();68 void setHovered();69 QRectF boundingRect() const;70 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);71 72 ShapeAnnotation *mpShapeAnnotation;73 signals:74 void itemMoved(int index, QPointF point);75 void itemClicked();76 void itemUnClicked();77 void itemPositionUpdate();78 protected:79 virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);80 virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);81 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);82 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);83 QVariant itemChange(GraphicsItemChange change, const QVariant &value);84 };85 49 86 50 //This class is the black or red boxes that appears around a selected item or items so the user can scale or rotate
Note: See TracChangeset
for help on using the changeset viewer.