nodeview: allow users to place a node on an edge to automatically connect it
between the two nodes UI convenience. Edge highlights when the cursor is in range to perform this action.
This commit is contained in:
@@ -68,6 +68,13 @@ public:
|
||||
*/
|
||||
void SetConnected(bool c);
|
||||
|
||||
/**
|
||||
* @brief Set highlighted state
|
||||
*
|
||||
* Changes color of edge.
|
||||
*/
|
||||
void SetHighlighted(bool e);
|
||||
|
||||
protected:
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
|
||||
|
||||
@@ -77,6 +84,9 @@ private:
|
||||
int edge_width_;
|
||||
|
||||
bool connected_;
|
||||
|
||||
bool highlighted_;
|
||||
|
||||
};
|
||||
|
||||
#endif // NODEEDGEITEM_H
|
||||
|
||||
Reference in New Issue
Block a user