1#ifndef DAABSTRACTGRAPHICSSCENEACTION_H
2#define DAABSTRACTGRAPHICSSCENEACTION_H
3#include "DAGraphicsViewGlobal.h"
33 void setCursorPixmap(
const QPixmap& p);
41 static QPixmap svgToPixmap(
const QString& svgPath,
const QSize& size);
43 static QPointF topLeftPoint(
const QPointF& p1,
const QPointF& p2);
45 static QPointF bottomRightPoint(
const QPointF& p1,
const QPointF& p2);
47 static QSizeF pointRectSize(
const QPointF& p1,
const QPointF& p2);
51 virtual void beginActive();
53 virtual bool mousePressEvent(QGraphicsSceneMouseEvent* mouseEvent);
55 virtual bool mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent);
57 virtual bool mouseReleaseEvent(QGraphicsSceneMouseEvent* mouseEvent);
59 virtual void endAction();
63 QPixmap mCursorPixmap;
这是一个scene的动作,DAGraphicsScene支持持有一个动作,这个动作可以捕获scene的所有界面事件
Definition DAAbstractGraphicsSceneAction.h:22
这是带着undostack的GraphicsScene 此QGraphicsScene支持:
Definition DAGraphicsScene.h:30
序列化类都是带异常的,使用中需要处理异常
Definition AppMainWindow.cpp:44