34 lines
891 B
C++
34 lines
891 B
C++
#ifndef MYCUSTOMGRAPHICSITEM_H
|
|
#define MYCUSTOMGRAPHICSITEM_H
|
|
|
|
#include <QObject>
|
|
#include <QWidget>
|
|
#include <QMouseEvent>
|
|
#include <QGraphicsScene>
|
|
#include <QGraphicsRectItem>
|
|
#include <QGraphicsSceneMouseEvent>
|
|
#include <QRect>
|
|
#include <QPainter>
|
|
#include <QPolygon>
|
|
#include <QList>
|
|
#include <QTransform>
|
|
|
|
|
|
class CMyCustomGraphicsItem : public QObject , public QGraphicsItemGroup
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit CMyCustomGraphicsItem(QObject *parent = nullptr);
|
|
|
|
// void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
|
// void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
|
// void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
|
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
|
void wheelEvent(QGraphicsSceneWheelEvent *event);
|
|
signals:
|
|
void doubleclick(QGraphicsSceneMouseEvent *event);
|
|
public slots:
|
|
};
|
|
|
|
#endif // MYCUSTOMGRAPHICSITEM_H
|