// saveAction = new QAction(tr("&Save"), this);
exitAction = new QAction(tr("E&xit"), this);
- connect(openAction, SIGNAL(triggered()), this, SLOT(open()));
+ connect(openAction, SIGNAL(triggered()),
+ this, SLOT(open()));
// connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));
- connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(exitAction, SIGNAL(triggered()),
+ qApp, SLOT(quit()));
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(openAction);
Disassembler * dis = manager->getDisassembler();
BasicBlock * block = dis->getBasicBlock(fun->getStartAddress());
- local__add_basic_block(block, manager->getDisassembler(), blocks, scene, block->getStartAddress(), 100);
+ local__add_basic_block(block, manager->getDisassembler(), blocks, scene,
+ block->getStartAddress(), 100);
QGraphicsView * view = new QGraphicsView(scene);
w->addTab(view, "CFG");
widget->setFlag(QGraphicsItem::ItemIsMovable, true);
widget->moveBy(100*startx, block->getStartAddress() - starty);
- dis->printEachInstruction(block->getStartAddress(), block->getEndAddress(),
- [&](uint8_t* bytes, size_t byte_count, const std::string& line) {
+ dis->printEachInstruction(block->getStartAddress(),
+ block->getEndAddress(),
+ [&](uint8_t* bytes,
+ size_t byte_count,
+ const std::string& line) {
widget->addItem(bytes, byte_count, line.c_str() + 1);
});
}
std::array<QPointF, 3> getExits() const {
- return { { mapToScene(QPointF( width/3, height)),
- mapToScene(QPointF( width/2, height)),
- mapToScene(QPointF(2*width/3, height)) } };
+ return { { mapToScene(QPointF( width/3, height)),
+ mapToScene(QPointF( width/2, height)),
+ mapToScene(QPointF(2*width/3, height)) } };
}
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,