ui: styled nodes in graph view
This change styles the nodes in the QtGraphView. Since Stylesheets can't be applied to QGraphicsItems, the style implementation was done in the source files. The containers for public/protected/private nodes are now subclassed from QtGraphNode as QtGraphNodeAccess, including a helper class QtAccessArrow for indicating the opened/colapsed state.
This commit is contained in:
@@ -36,7 +36,7 @@ GraphView* GraphController::getView()
|
||||
|
||||
void GraphController::createDummyGraphForTokenIds(const std::vector<Id>& tokenIds)
|
||||
{
|
||||
const GraphLayouter::LayoutFunction layoutFunction = &GraphLayouter::layoutSimpleRing;
|
||||
const GraphLayouter::LayoutFunction layoutFunction = &GraphLayouter::layoutSimpleRaster;
|
||||
|
||||
GraphView* view = getView();
|
||||
if (!view)
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
struct DummyEdge;
|
||||
struct DummyNode;
|
||||
class Graph;
|
||||
class GraphEdge;
|
||||
class GraphNode;
|
||||
|
||||
class GraphView : public View
|
||||
{
|
||||
@@ -29,13 +27,6 @@ public:
|
||||
const std::vector<DummyEdge>& edges) = 0;
|
||||
|
||||
virtual void clear() = 0;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<Graph> m_graph;
|
||||
std::vector<Id> m_activeTokenIds;
|
||||
|
||||
std::list<std::shared_ptr<GraphNode> > m_nodes;
|
||||
std::list<std::weak_ptr<GraphEdge> > m_edges;
|
||||
};
|
||||
|
||||
#endif // GRAPH_VIEW_H
|
||||
@@ -34,25 +34,9 @@ public:
|
||||
|
||||
virtual void removeOutEdge(GraphEdge* edge) = 0;
|
||||
|
||||
virtual std::list<std::shared_ptr<GraphNode> > getSubNodes() const = 0;
|
||||
virtual void addSubNode(const std::shared_ptr<GraphNode>& node) = 0;
|
||||
|
||||
virtual void notifyParentMoved() = 0;
|
||||
|
||||
virtual void hideContent() = 0;
|
||||
virtual void showContent() = 0;
|
||||
|
||||
virtual void hide() = 0;
|
||||
virtual void show() = 0;
|
||||
|
||||
virtual bool isHidden() = 0;
|
||||
virtual bool contentIsHidden() = 0;
|
||||
|
||||
virtual unsigned int getOutEdgeCount() const = 0;
|
||||
virtual unsigned int getInEdgeCount() const = 0;
|
||||
|
||||
virtual unsigned int getEdgeAndActiveCountRecursive() const = 0;
|
||||
|
||||
protected:
|
||||
const Node* m_data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user