A QGraphicsScene that holds QGraphicsItems for diagrams.
More...
#include <qtDiagramScene.h>
|
using | Superclass = QGraphicsScene |
|
|
void | drawBackground (QPainter *painter, const QRectF &rect) override |
| Draw a cross-hatched grid for the background.
|
|
|
static QPointF | snapToGrid (const qreal &x, const qreal &y, const qreal &resolution=1.0) |
| Snaps the given x and y coordinate to the next available top left grid point. More...
|
|
A QGraphicsScene that holds QGraphicsItems for diagrams.
Diagrams are node+arc schematic figures whose items are maintained by qtDiagramGenerator instances.
◆ computeLayout
bool smtk::extension::qtDiagramScene::computeLayout |
( |
const std::unordered_set< qtBaseNode * > & |
nodes, |
|
|
const std::unordered_set< qtBaseArc * > & |
arcs |
|
) |
| |
|
slot |
Compute a layout of the nodes and arcs passed into this method.
This uses graphviz to perform the layout and returns true on success.
◆ snapToGrid()
QPointF smtk::extension::qtDiagramScene::snapToGrid |
( |
const qreal & |
x, |
|
|
const qreal & |
y, |
|
|
const qreal & |
resolution = 1.0 |
|
) |
| |
|
staticprotected |
Snaps the given x and y coordinate to the next available top left grid point.
Optionally, the grid can be scaled with the resolution parameter.
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/smtk/checkouts/latest/smtk/extension/qt/diagram/qtDiagramScene.h
- /home/docs/checkouts/readthedocs.org/user_builds/smtk/checkouts/latest/smtk/extension/qt/diagram/qtDiagramScene.cxx