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. * @brief setDialog set dialog when user want change tool option.

View File

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

View File

@ -97,7 +97,10 @@ VToolSpline::VToolSpline(VPattern *doc, VContainer *data, quint32 id, const QStr
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VToolSpline::~VToolSpline() 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. * @brief setDialog set dialog when user want change tool option.

View File

@ -40,20 +40,21 @@ class VToolSplinePath:public VAbstractSpline
public: public:
VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation,
QGraphicsItem * parent = nullptr); QGraphicsItem * parent = nullptr);
virtual void setDialog(); virtual ~VToolSplinePath();
static VToolSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); virtual void setDialog();
static VToolSplinePath *Create(const quint32 _id, VSplinePath *path, const QString &color, static VToolSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data);
VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, static VToolSplinePath *Create(const quint32 _id, VSplinePath *path, const QString &color,
const Source &typeCreation); VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse,
static const QString ToolType; const Source &typeCreation);
static void UpdatePathPoint(VPattern *doc, QDomNode& node, const VSplinePath &path); static const QString ToolType;
virtual int type() const {return Type;} static void UpdatePathPoint(VPattern *doc, QDomNode& node, const VSplinePath &path);
enum { Type = UserType + static_cast<int>(Tool::SplinePath)}; virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::SplinePath)};
VSplinePath getSplinePath()const; VSplinePath getSplinePath()const;
void setSplinePath(const VSplinePath &splPath); void setSplinePath(const VSplinePath &splPath);
virtual void ShowVisualization(bool show); virtual void ShowVisualization(bool show);
signals: signals:
/** /**
* @brief RefreshLine refresh control line. * @brief RefreshLine refresh control line.

View File

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

View File

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

View File

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

View File

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