Disable cursor-arrow-openhand cursor before delete a item.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-04-29 20:02:03 +03:00
parent 05ec681136
commit 7e4aea059f
9 changed files with 48 additions and 13 deletions

View File

@ -68,6 +68,13 @@ VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id,
}
}
//---------------------------------------------------------------------------------------------------------------------
VToolSinglePoint::~VToolSinglePoint()
{
//Disable cursor-arrow-openhand
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setDialog set dialog when user want change tool option.

View File

@ -41,6 +41,7 @@ class VToolSinglePoint : public VToolPoint
public:
VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Source &typeCreation,
const QString &namePP, const QString &mPath, QGraphicsItem * parent = nullptr );
virtual ~VToolSinglePoint();
virtual void setDialog();
static const QString ToolType;
virtual int type() const {return Type;}

View File

@ -97,7 +97,10 @@ VToolSpline::VToolSpline(VPattern *doc, VContainer *data, quint32 id, const QStr
//---------------------------------------------------------------------------------------------------------------------
VToolSpline::~VToolSpline()
{}
{
//Disable cursor-arrow-openhand
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
}
//---------------------------------------------------------------------------------------------------------------------
/**

View File

@ -97,6 +97,13 @@ VToolSplinePath::VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, co
}
}
//---------------------------------------------------------------------------------------------------------------------
VToolSplinePath::~VToolSplinePath()
{
//Disable cursor-arrow-openhand
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setDialog set dialog when user want change tool option.

View File

@ -40,6 +40,7 @@ class VToolSplinePath:public VAbstractSpline
public:
VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation,
QGraphicsItem * parent = nullptr);
virtual ~VToolSplinePath();
virtual void setDialog();
static VToolSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data);
static VToolSplinePath *Create(const quint32 _id, VSplinePath *path, const QString &color,

View File

@ -69,6 +69,13 @@ VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePointP
controlLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
}
//---------------------------------------------------------------------------------------------------------------------
VControlPointSpline::~VControlPointSpline()
{
//Disable cursor-arrow-openhand
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
}
//---------------------------------------------------------------------------------------------------------------------
void VControlPointSpline::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{

View File

@ -42,6 +42,7 @@ class VControlPointSpline : public QObject, public QGraphicsEllipseItem
public:
VControlPointSpline(const qint32 &indexSpline, SplinePointPosition position, const QPointF &controlPoint,
const QPointF &splinePoint, QGraphicsItem * parent = nullptr);
virtual ~VControlPointSpline();
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Vis::ControlPointSpline)};

View File

@ -70,6 +70,13 @@ VGraphicsSimpleTextItem::VGraphicsSimpleTextItem( const QString & text, QGraphic
this->setAcceptHoverEvents(true);
}
//---------------------------------------------------------------------------------------------------------------------
VGraphicsSimpleTextItem::~VGraphicsSimpleTextItem()
{
//Disable cursor-arrow-openhand
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
}
//---------------------------------------------------------------------------------------------------------------------
void VGraphicsSimpleTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{

View File

@ -42,6 +42,7 @@ class VGraphicsSimpleTextItem : public QObject, public QGraphicsSimpleTextItem
public:
VGraphicsSimpleTextItem(QGraphicsItem *parent = nullptr);
VGraphicsSimpleTextItem( const QString & text, QGraphicsItem *parent = nullptr );
virtual ~VGraphicsSimpleTextItem();
qint32 FontSize()const;
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);