valentina/widgets/vmaingraphicsscene.h

29 lines
748 B
C
Raw Normal View History

2013-07-03 14:29:26 +02:00
#ifndef VMAINGRAPHICSSCENE_H
#define VMAINGRAPHICSSCENE_H
#include <QGraphicsScene>
#include <QGraphicsView>
2013-07-03 14:29:26 +02:00
#include <QGraphicsSceneMouseEvent>
#include "options.h"
2013-07-25 14:00:51 +02:00
2013-07-03 14:29:26 +02:00
class VMainGraphicsScene : public QGraphicsScene
{
Q_OBJECT
public:
VMainGraphicsScene();
VMainGraphicsScene(const QRectF & sceneRect, QObject * parent = 0);
2013-07-25 14:00:51 +02:00
public slots:
void ChoosedItem(qint64 id, Scene::Type type);
2013-08-20 12:26:02 +02:00
void RemoveTool(QGraphicsItem *tool);
protected:
2013-07-03 14:29:26 +02:00
void mouseMoveEvent(QGraphicsSceneMouseEvent* event);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
signals:
void mouseMove(QPointF scenePos);
void mousePress(QPointF scenePos);
2013-07-25 14:00:51 +02:00
void ChoosedObject(qint64 id, Scene::Type type);
2013-07-03 14:29:26 +02:00
};
#endif // VMAINGRAPHICSSCENE_H