Resolved Issue #272. Show that user can move workpiece.

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2015-12-02 21:33:42 +02:00
parent 6cd674ec0f
commit 75a4acaea7
2 changed files with 19 additions and 0 deletions

View File

@ -113,6 +113,7 @@ VToolDetail::VToolDetail(VAbstractPattern *doc, VContainer *data, const quint32
qApp->getUndoStack()->endMacro(); qApp->getUndoStack()->endMacro();
} }
} }
setAcceptHoverEvents(true);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -405,6 +406,21 @@ void VToolDetail::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
QGraphicsItem::mouseReleaseEvent(event); QGraphicsItem::mouseReleaseEvent(event);
} }
//---------------------------------------------------------------------------------------------------------------------
void VToolDetail::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
Q_UNUSED(event);
QApplication::setOverrideCursor(QCursor(cursorArrowOpenHand, 1, 1));
}
////---------------------------------------------------------------------------------------------------------------------
void VToolDetail::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
Q_UNUSED(event);
//Disable cursor-arrow-openhand
QApplication::restoreOverrideCursor();
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief contextMenuEvent handle context menu events. * @brief contextMenuEvent handle context menu events.

View File

@ -94,10 +94,13 @@ protected:
virtual void RefreshDataInFile() Q_DECL_OVERRIDE; virtual void RefreshDataInFile() Q_DECL_OVERRIDE;
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE; virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE;
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE; virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE;
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE; virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE;
virtual void RemoveReferens() Q_DECL_OVERRIDE; virtual void RemoveReferens() Q_DECL_OVERRIDE;
virtual void keyReleaseEvent(QKeyEvent * event) Q_DECL_OVERRIDE; virtual void keyReleaseEvent(QKeyEvent * event) Q_DECL_OVERRIDE;
virtual void SetVisualization() Q_DECL_OVERRIDE {} virtual void SetVisualization() Q_DECL_OVERRIDE {}
private: private:
Q_DISABLE_COPY(VToolDetail) Q_DISABLE_COPY(VToolDetail)
/** @brief dialog dialog options. */ /** @brief dialog dialog options. */