| 20 | #include "IPProcessGrid.h" |
| 21 | |
| 22 | IPProcessGrid::IPProcessGrid(QWidget *parent) : QGraphicsView(parent) |
| 23 | { |
| 24 | _scene = new IPProcessGridScene(this); |
| 25 | |
| 26 | setScene(_scene); |
| 27 | setAlignment(Qt::AlignLeft | Qt::AlignTop); |
| 28 | setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); |
| 29 | setViewportUpdateMode(QGraphicsView::FullViewportUpdate); |
| 30 | //setCacheMode(QGraphicsView::CacheBackground); |
| 31 | centerOn(0,0); |
| 32 | |
| 33 | setDragMode(QGraphicsView::RubberBandDrag); |
| 34 | setMouseTracking(true); |
| 35 | |
| 36 | _scale = 1.0; |
| 37 | |
| 38 | _isRunning = false; |
| 39 | _isSequenceRunning = true; |
| 40 | |
| 41 | _currentStep = NULL; |
| 42 | |
| 43 | _stopExecution = false; |
| 44 | |
| 45 | _sequenceCount = 0; |
| 46 | _sequenceIndex = 0; |
| 47 | _lastSequenceIndex = 0; |
| 48 | |
| 49 | _lastProcessSuccess = false; |
| 50 | |
| 51 | _updateNeeded = true; |
| 52 | |
| 53 | _thread = NULL; |
| 54 | |
| 55 | // add a dummy object to allow correct placement of new objects with drag&drop |
| 56 | scene()->addItem(new QGraphicsRectItem(0,0,0,0)); |
| 57 | |
| 58 | connect(_scene, &QGraphicsScene::sceneRectChanged, this, &IPProcessGrid::sceneRectChanged); |
| 59 | } |
| 60 | |
| 61 | bool IPProcessGrid::sortTreeDepthLessThan(IPProcessStep* s1, IPProcessStep* s2) |
| 62 | { |
nothing calls this directly
no outgoing calls
no test coverage detected