mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-03-14 02:57:45 +01:00
34 lines
704 B
C++
34 lines
704 B
C++
#ifndef GRAPHICSSCENE_H
|
|
#define GRAPHICSSCENE_H
|
|
|
|
#include <QGraphicsScene>
|
|
#include <QGraphicsItem>
|
|
#include "tooltip.h"
|
|
|
|
class GraphicsItem : public QGraphicsItem
|
|
{
|
|
public:
|
|
GraphicsItem(QGraphicsItem *parent = 0) : QGraphicsItem(parent) {}
|
|
|
|
virtual ToolTip info() const = 0;
|
|
int type() const {return QGraphicsItem::UserType + 1;}
|
|
};
|
|
|
|
class GraphicsScene : public QGraphicsScene
|
|
{
|
|
public:
|
|
GraphicsScene(QObject *parent = 0) : QGraphicsScene(parent) {}
|
|
|
|
public slots:
|
|
void clear();
|
|
|
|
protected:
|
|
void helpEvent(QGraphicsSceneHelpEvent *event);
|
|
|
|
private:
|
|
QList<QGraphicsItem *> itemsAtPosition(const QPoint &screenPos,
|
|
const QPointF &scenePos, QWidget *widget) const;
|
|
};
|
|
|
|
#endif // GRAPHICSSCENE_H
|