ui: added context menu option to copy a graph-node's name

This commit is contained in:
malte_langkabel
2017-01-19 12:01:08 +01:00
parent 0cdddb616d
commit 212c0e71fa
3 changed files with 60 additions and 9 deletions
+7
View File
@@ -8,6 +8,7 @@
#include <memory>
class QTimer;
class QtGraphNode;
class QtGraphicsView
: public QGraphicsView
@@ -20,6 +21,8 @@ public:
float getZoomFactor() const;
void setAppZoomFactor(float appZoomFactor);
QtGraphNode* getNodeAtCursorPosition() const;
void ensureVisibleAnimated(const QRectF& rect, int xmargin = 50, int ymargin = 50);
protected:
@@ -41,6 +44,7 @@ private slots:
void stopTimer();
void exportGraph();
void copyNodeName();
private:
bool moves() const;
@@ -59,10 +63,13 @@ private:
bool m_right;
bool m_shift;
std::string m_clipboardNodeName;
std::shared_ptr<QTimer> m_timer;
std::shared_ptr<QTimer> m_timerStopper;
QAction* m_exportGraphAction;
QAction* m_copyNodeNameAction;
};
#endif // QT_GRAPHICS_VIEW_H