nodeview: updates to complete new context paradigm
This commit is contained in:
@@ -95,8 +95,12 @@ public:
|
||||
|
||||
static int DefaultItemBorder();
|
||||
|
||||
qreal DefaultItemHorizontalPadding() const;
|
||||
static QPointF NodeToScreenPoint(QPointF p, NodeViewCommon::FlowDirection direction);
|
||||
static QPointF ScreenToNodePoint(QPointF p, NodeViewCommon::FlowDirection direction);
|
||||
|
||||
static qreal DefaultItemHorizontalPadding(NodeViewCommon::FlowDirection dir);
|
||||
static qreal DefaultItemVerticalPadding(NodeViewCommon::FlowDirection dir);
|
||||
qreal DefaultItemHorizontalPadding() const;
|
||||
qreal DefaultItemVerticalPadding() const;
|
||||
|
||||
void AddEdge(NodeViewEdge* edge);
|
||||
@@ -111,6 +115,16 @@ public:
|
||||
|
||||
void SetHighlightedIndex(int index);
|
||||
|
||||
void SetPreventRemoving(bool e)
|
||||
{
|
||||
prevent_removing_ = e;
|
||||
}
|
||||
|
||||
bool GetPreventRemoving() const
|
||||
{
|
||||
return prevent_removing_;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
|
||||
|
||||
@@ -174,6 +188,8 @@ private:
|
||||
|
||||
QPointF cached_node_pos_;
|
||||
|
||||
bool prevent_removing_;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user