]> git.siccegge.de Git - frida/frida.git/blobdiff - src/gui/widgets/BasicBlockWidget.cxx
Change BasicBlockWidget and assume upperLeft is (0, 0) in local coordinates
[frida/frida.git] / src / gui / widgets / BasicBlockWidget.cxx
index 0164bdc9513d67e541a2415ae7aa8cb1f9117a1a..7b33fe0a17fe43f530519c8e3c1544bae375b0d2 100644 (file)
@@ -1,11 +1,10 @@
 #include "BasicBlockWidget.hxx"
 
 BasicBlockWidget::BasicBlockWidget(const QString& name, BasicBlock * block)
 #include "BasicBlockWidget.hxx"
 
 BasicBlockWidget::BasicBlockWidget(const QString& name, BasicBlock * block)
-       : x(-5), y(-20)
-       , dx(270), dy(45)
-       , name(name)
-       , block(block) {
+       : width(270), height(45)
+       , name(name), block(block) {
        next[0] = NULL; next[1] = NULL;
        next[0] = NULL; next[1] = NULL;
+    _widget.move(5, 20);
     _widget.setGridStyle(Qt::NoPen);
     _widget.setMinimumHeight(_widget.rowHeight(0) + 10);
     _widget.setMaximumHeight(20);
     _widget.setGridStyle(Qt::NoPen);
     _widget.setMinimumHeight(_widget.rowHeight(0) + 10);
     _widget.setMaximumHeight(20);
@@ -17,8 +16,8 @@ BasicBlockWidget::BasicBlockWidget(const QString& name, BasicBlock * block)
     _widget.setColumnCount(3);
     _widget.verticalHeader()->hide();
     _widget.horizontalHeader()->hide();
     _widget.setColumnCount(3);
     _widget.verticalHeader()->hide();
     _widget.horizontalHeader()->hide();
-    dx = _widget.rowHeight(0) + 20;
-    if (dx < 270) dx = 270;
+    width = _widget.rowHeight(0) + 20;
+    if (width < 270) width = 270;
 }
 
 void BasicBlockWidget::addItem(uint8_t* bytes, size_t num_bytes,
 }
 
 void BasicBlockWidget::addItem(uint8_t* bytes, size_t num_bytes,
@@ -59,7 +58,7 @@ void BasicBlockWidget::addItem(uint8_t* bytes, size_t num_bytes,
     _widget.setMaximumHeight(_widget.rowHeight(0) * (_widget.rowCount()) + 2);
 
 
     _widget.setMaximumHeight(_widget.rowHeight(0) * (_widget.rowCount()) + 2);
 
 
-    dy = _widget.rowHeight(0) * (_widget.rowCount()) + 25;
-    dx = column_width + 10;
-    if (dx < 270) dx = 270;
+    height = _widget.rowHeight(0) * (_widget.rowCount()) + 25;
+    width = column_width + 10;
+    if (width < 270) width = 270;
 }
 }