35 #include <QGraphicsView>
45 namespace graph_widget_constants
138 void conditionalUpdate();
139 void handleIsolationViewAction();
140 void adjustMinScale();
141 void handleAddCommentAction();
143 void handleFoldParentSingle();
144 void handleFoldParentAll();
145 void handleUnfoldSingleAction();
146 void handleUnfoldAllAction();
148 void handleShortestPathToView();
149 void handleQueryShortestPathGate();
150 void handleQueryShortestPathModule();
151 void handleSelectOutputs();
152 void handleSelectInputs();
154 void handleAddModuleToView();
155 void handleAddGateToView();
157 void handleAddSuccessorToView();
158 void handleAddPredecessorToView();
159 void handleAddCommonSuccessorToView();
160 void handleAddCommonPredecessorToView();
161 void handleHighlightSuccessor();
162 void handleHighlightPredecessor();
163 void handleSuccessorDistance();
164 void handlePredecessorDistance();
165 void handleCancelPickMode();
166 void handlePluginContextContributionTriggered();
167 void selectedNodeToItem();
187 enum SearchAction {PredecessorGate, SuccessorGate, PredecessorModule, SuccessorModule};
191 void updateMatrix(
const int delta);
193 void toggleAntialiasing();
197 void addSuccessorToView(
int maxLevel,
bool succ);
198 void addCommonSuccessorToView(
int maxLevel,
bool succ);
200 void dragPan(
float dpx,
float dpy);
213 LayouterPoint closestLayouterPoint(qreal scene_pos,
int default_spacing,
int min_index,
QVector<qreal> sections)
const;
215 #ifdef GUI_DEBUG_GRID
216 void debugShowLayouterGridpos(
const QPoint& mouse_pos);
217 void debugDrawLayouterGridpos(
QPainter* painter);
219 bool mDebugGridposEnable =
true;
226 bool mMinimapEnabled;
229 bool mGridClustersEnabled;
232 DragController* mDragController;
239 qreal mZoomFactorBase;
245 template <
typename Func1>
246 void recursionLevelMenu(
QMenu* menu,
bool succ, Func1 slot,
bool addUnlimited=
false)
248 QString s = succ ?
"successors" :
"predecessors";
249 const char* txt[] = {
"All %1",
"Depth 1 (direct %1)",
"Depth 2",
250 "Depth 3",
"Depth 4",
"Depth 5",
nullptr};
251 for (
int inx = 1; txt[inx]; inx++)
265 static const QString sAssignToGrouping;
A view to display the rendered graph (needs a GraphicsScene).
void handleRemoveFromView()
void keyPressEvent(QKeyEvent *event) override
void dragLeaveEvent(QDragLeaveEvent *event) override
void setGridType(GraphicsScene::GridType gridType)
void dropEvent(QDropEvent *event) override
void wheelEvent(QWheelEvent *event) override
void setPanModifier(Qt::KeyboardModifier panModifier)
Qt::KeyboardModifier panModifier()
void keyReleaseEvent(QKeyEvent *event) override
void viewportCenterZoom(const qreal factor)
void handleShortestPathToGrouping(u32 idFrom, Node nodeTo, bool forwardDirection)
void setDragModifier(Qt::KeyboardModifier dragModifier)
GraphGraphicsView(GraphWidget *parent)
void paintEvent(QPaintEvent *event) override
void moduleDoubleClicked(u32 id)
void mouseMoveEvent(QMouseEvent *event) override
Qt::KeyboardModifier dragModifier()
void resizeEvent(QResizeEvent *event) override
void handleFoldModuleShortcut()
GraphicsScene::GridType gridType()
void dragEnterEvent(QDragEnterEvent *event) override
void triggerTerminatePicker()
void mouseDoubleClickEvent(QMouseEvent *event) override
void mouseReleaseEvent(QMouseEvent *event) override
void mousePressEvent(QMouseEvent *event) override
void handleUnfoldModuleShortcut()
void drawForeground(QPainter *painter, const QRectF &rect) override
void gentleZoom(const qreal factor)
void dragMoveEvent(QDragMoveEvent *event) override
GraphGraphicsViewNeighborSelector(u32 orig, bool pickSuc, QObject *parent=nullptr)
void handleGatesPicked(const QSet< u32 > &gats) override
Superclass for all graphic items used ins the GraphicsScene. It contains information about the underl...
The Node class object represents a module or a gate.
void setData(const QVariant &userData)
void triggered(bool checked)
virtual bool event(QEvent *event) override
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const const