-BasicBlockWidget::BasicBlockWidget(const QString& name)
- : x(-5), y(-20)
- , dx(270), dy(45)
- , name(name) {
- _widget.setGridStyle(Qt::NoPen);
- _widget.setMinimumHeight(_widget.rowHeight(0) + 10);
- _widget.setMaximumHeight(20);
- _widget.resizeColumnToContents(0);
- _widget.resizeColumnToContents(1);
- _widget.resizeColumnToContents(2);
- _widget.updateGeometry();
- _widget.setMaximumWidth(260);
- _widget.setColumnCount(3);
- _widget.verticalHeader()->hide();
- _widget.horizontalHeader()->hide();
- dx = _widget.rowHeight(0) + 20;
- if (dx < 270) dx = 270;
+BasicBlockWidget::BasicBlockWidget(const QString& name, BasicBlock * block,
+ Mainwindow * mainwindow)
+ : width(270), height(45), name(name)
+ , _widget("", this), _table(NULL)
+ , block(block), mainwindow(mainwindow) {
+ next[0] = NULL; next[1] = NULL;
+ _widget.setPos(5, 20);
+ _widget.setTextInteractionFlags(Qt::TextSelectableByMouse|
+ Qt::LinksAccessibleByMouse);
+
+ if (width < 250) width = 250;