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 handleShortestModulePathToView();
150 void handleQueryShortestPathGate();
151 void handleQueryShortestPathModule();
152 void handleSelectOutputs();
153 void handleSelectInputs();
155 void handleAddModuleToView();
156 void handleAddGateToView();
158 void handleAddSuccessorToView();
159 void handleAddPredecessorToView();
160 void handleAddCommonSuccessorToView();
161 void handleAddCommonPredecessorToView();
162 void handleHighlightSuccessor();
163 void handleHighlightPredecessor();
164 void handleSuccessorDistance();
165 void handlePredecessorDistance();
166 void handleCancelPickMode();
167 void handlePluginContextContributionTriggered();
168 void selectedNodeToItem();
188 enum SearchAction {PredecessorGate, SuccessorGate, SuccessorModule};
192 void updateMatrix(
const int delta);
194 void toggleAntialiasing();
198 void addSuccessorToView(
int maxLevel,
bool succ);
199 void addCommonSuccessorToView(
int maxLevel,
bool succ);
201 void dragPan(
float dpx,
float dpy);
214 LayouterPoint closestLayouterPoint(qreal scene_pos,
int default_spacing,
int min_index,
QVector<qreal> sections)
const;
216 #ifdef GUI_DEBUG_GRID
217 void debugShowLayouterGridpos(
const QPoint& mouse_pos);
218 void debugDrawLayouterGridpos(
QPainter* painter);
220 bool mDebugGridposEnable =
true;
227 bool mMinimapEnabled;
230 bool mGridClustersEnabled;
233 DragController* mDragController;
240 qreal mZoomFactorBase;
246 template <
typename Func1>
247 void recursionLevelMenu(
QMenu* menu,
bool succ, Func1 slot,
bool addUnlimited=
false)
249 QString s = succ ?
"successors" :
"predecessors";
250 const char* txt[] = {
"All %1",
"Depth 1 (direct %1)",
"Depth 2",
251 "Depth 3",
"Depth 4",
"Depth 5",
nullptr};
252 for (
int inx = 1; txt[inx]; inx++)
266 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 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 handleShortestPath(u32 idFrom, Node nodeTo)
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