35 #include <QGraphicsView>
48 namespace graph_widget_constants
145 void conditionalUpdate();
146 void handleIsolationViewAction();
147 void adjustMinScale();
148 void handleAddCommentAction();
150 void handleFoldParentSingle();
151 void handleFoldParentAll();
152 void handleUnfoldSingleAction();
153 void handleUnfoldAllAction();
155 void handleShortestPathToView();
156 void handleQueryShortestPathGate();
157 void handleQueryShortestPathModule();
158 void handleSelectOutputs();
159 void handleSelectInputs();
161 void handleAddModuleToView();
162 void handleAddGateToView();
164 void handleAddSuccessorToView();
165 void handleAddPredecessorToView();
166 void handleAddCommonSuccessorToView();
167 void handleAddCommonPredecessorToView();
168 void handleHighlightSuccessor();
169 void handleHighlightPredecessor();
170 void handleSuccessorDistance();
171 void handlePredecessorDistance();
172 void handleCancelPickMode();
173 void handlePluginContextContributionTriggered();
174 void selectedNodeToItem();
194 enum SearchAction {PredecessorGate, SuccessorGate, PredecessorModule, SuccessorModule};
198 void updateMatrix(
const int delta);
200 void toggleAntialiasing();
204 void addSuccessorToView(
int maxLevel,
bool succ);
205 void addCommonSuccessorToView(
int maxLevel,
bool succ);
207 void dragPan(
float dpx,
float dpy);
223 LayouterPoint closestLayouterPoint(qreal scene_pos,
int default_spacing,
int min_index,
QVector<qreal> sections)
const;
225 #ifdef GUI_DEBUG_GRID
226 void debugShowLayouterGridpos(
const QPoint& mouse_pos);
227 void debugDrawLayouterGridpos(
QPainter* painter);
229 bool mDebugGridposEnable =
true;
236 bool mMinimapEnabled;
239 bool mGridClustersEnabled;
242 DragController* mDragController;
249 qreal mZoomFactorBase;
255 template <
typename Func1>
256 void recursionLevelMenu(
QMenu* menu,
bool succ, Func1 slot,
bool addUnlimited=
false)
258 QString s = succ ?
"successors" :
"predecessors";
259 const char* txt[] = {
"All %1",
"Depth 1 (direct %1)",
"Depth 2",
260 "Depth 3",
"Depth 4",
"Depth 5",
nullptr};
261 for (
int inx = 1; txt[inx]; inx++)
275 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