ui: Change mouse cursor to pointer on graph and code view contents (issue #715)
This commit is contained in:
@@ -563,6 +563,8 @@ void QtCodeField::setHoveredAnnotations(const std::vector<const Annotation*>& an
|
||||
|
||||
m_hoveredAnnotations = annotations;
|
||||
|
||||
viewport()->setCursor(annotations.size() ? Qt::PointingHandCursor : Qt::ArrowCursor);
|
||||
|
||||
if (annotations.size())
|
||||
{
|
||||
std::vector<Id> tokenIds;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "QtLineItemBase.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QCursor>
|
||||
#include <QPen>
|
||||
|
||||
QtLineItemBase::QtLineItemBase(QGraphicsItem* parent)
|
||||
@@ -12,6 +13,7 @@ QtLineItemBase::QtLineItemBase(QGraphicsItem* parent)
|
||||
, m_route(ROUTE_ANY)
|
||||
{
|
||||
this->setAcceptHoverEvents(true);
|
||||
this->setCursor(Qt::PointingHandCursor);
|
||||
}
|
||||
|
||||
QtLineItemBase::~QtLineItemBase()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "QtGraphEdge.h"
|
||||
|
||||
#include <QCursor>
|
||||
#include <QGraphicsSceneEvent>
|
||||
#include <QGraphicsItemGroup>
|
||||
|
||||
@@ -50,6 +51,8 @@ QtGraphEdge::QtGraphEdge(
|
||||
, m_mousePos(0.0f, 0.0f)
|
||||
, m_mouseMoved(false)
|
||||
{
|
||||
this->setCursor(Qt::PointingHandCursor);
|
||||
|
||||
if (m_direction == TokenComponentAggregation::DIRECTION_BACKWARD)
|
||||
{
|
||||
QtGraphNode* temp = m_owner;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "QtGraphNode.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QCursor>
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QGraphicsSceneEvent>
|
||||
@@ -42,6 +43,7 @@ void QtGraphNode::hideNode()
|
||||
QtGraphNode::QtGraphNode()
|
||||
{
|
||||
this->setPen(QPen(Qt::transparent));
|
||||
this->setCursor(Qt::PointingHandCursor);
|
||||
|
||||
m_text = new QGraphicsSimpleTextItem(this);
|
||||
m_rect = new QtRoundedRectItem(this);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "QtGraphNodeAccess.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QCursor>
|
||||
#include <QFontMetrics>
|
||||
#include <QPen>
|
||||
|
||||
@@ -19,6 +20,7 @@ QtGraphNodeAccess::QtGraphNodeAccess(AccessKind accessKind)
|
||||
{
|
||||
std::wstring accessString = TokenComponentAccess::getAccessString(m_accessKind);
|
||||
this->setName(accessString);
|
||||
this->setCursor(Qt::ArrowCursor);
|
||||
m_text->hide();
|
||||
|
||||
std::wstring iconFileName;
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#include "QtGraphNodeText.h"
|
||||
|
||||
#include <QCursor>
|
||||
|
||||
QtGraphNodeText::QtGraphNodeText(const std::wstring& name, int fontSizeDiff)
|
||||
: m_fontSizeDiff(fontSizeDiff)
|
||||
{
|
||||
this->setCursor(Qt::ArrowCursor);
|
||||
|
||||
setName(name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user