ui: Hide nodes and edges from graph via context menu action or Alt + Click (issue #472)

* show all context menu actions, but disable unavailable
* added hide action to undo redo stack
This commit is contained in:
Eberhard Graether
2017-11-26 12:54:42 +01:00
parent 9e7e9176cb
commit 0d5c19db00
21 changed files with 402 additions and 87 deletions
+8
View File
@@ -9,6 +9,7 @@
#include "utility/types.h"
class QTimer;
class QtGraphEdge;
class QtGraphNode;
class QtGraphicsView
@@ -25,6 +26,7 @@ public:
void setSceneRect(const QRectF& rect);
QtGraphNode* getNodeAtCursorPosition() const;
QtGraphEdge* getEdgeAtCursorPosition() const;
void ensureVisibleAnimated(const QRectF& rect, int xmargin = 50, int ymargin = 50);
@@ -56,6 +58,8 @@ private slots:
void exportGraph();
void copyNodeName();
void hideNode();
void hideEdge();
void bookmarkNode();
void zoomInPressed();
@@ -81,6 +85,8 @@ private:
bool m_shift;
std::string m_clipboardNodeName;
Id m_hideNodeId;
Id m_hideEdgeId;
Id m_bookmarkNodeId;
std::shared_ptr<QTimer> m_timer;
@@ -89,6 +95,8 @@ private:
QAction* m_exportGraphAction;
QAction* m_copyNodeNameAction;
QAction* m_hideNodeAction;
QAction* m_hideEdgeAction;
QAction* m_bookmarkNodeAction;
QPushButton* m_zoomState;