ui: Show namespace label on left side of graph nodes
* Added arrow indicating namespace and package name on left side of node * Show namespace label when hovering arrow * Activate namespace when clicking label * New design for namespace nodes
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#ifndef QT_GRAPH_NODE_QUALIFIER_H
|
||||
#define QT_GRAPH_NODE_QUALIFIER_H
|
||||
|
||||
#include <QGraphicsPolygonItem>
|
||||
#include <QGraphicsRectItem>
|
||||
|
||||
#include "qt/view/graphElements/QtGraphNode.h"
|
||||
|
||||
class QtGraphNodeQualifier
|
||||
: public QtGraphNode
|
||||
{
|
||||
public:
|
||||
QtGraphNodeQualifier(const NameHierarchy& name);
|
||||
virtual ~QtGraphNodeQualifier();
|
||||
|
||||
// QtGraphNode implementation
|
||||
virtual bool isQualifierNode() const;
|
||||
|
||||
virtual bool setPosition(const Vec2i& pos);
|
||||
|
||||
virtual void onClick();
|
||||
virtual void updateStyle();
|
||||
|
||||
protected:
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
|
||||
|
||||
private:
|
||||
const NameHierarchy m_qualifierName;
|
||||
|
||||
QGraphicsRectItem* m_background;
|
||||
QGraphicsRectItem* m_leftBorder;
|
||||
QGraphicsPolygonItem* m_rightArrow;
|
||||
QGraphicsPolygonItem* m_rightArrowSmall;
|
||||
QGraphicsSimpleTextItem* m_name;
|
||||
|
||||
Vec2i m_pos;
|
||||
};
|
||||
|
||||
#endif // QT_GRAPH_NODE_QUALIFIER_H
|
||||
Reference in New Issue
Block a user