ui: added context menu option to copy a graph-node's name
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user