aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview.h
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-05 23:42:36 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-05 23:42:36 +0100
commitca97f1bd709a154f73c9e28f8a50c5b409baab3e (patch)
tree1d399d75108e214871657086fc514f7896516871 /qtmips_gui/coreview.h
parent09aca1674915d5e2bc4287336d7d52c83b51342d (diff)
downloadqtmips-ca97f1bd709a154f73c9e28f8a50c5b409baab3e.tar.gz
qtmips-ca97f1bd709a154f73c9e28f8a50c5b409baab3e.tar.bz2
qtmips-ca97f1bd709a154f73c9e28f8a50c5b409baab3e.zip
Fix how we handle scale of GraphicView
That widget is seriously buggy.. grr
Diffstat (limited to 'qtmips_gui/coreview.h')
-rw-r--r--qtmips_gui/coreview.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/qtmips_gui/coreview.h b/qtmips_gui/coreview.h
index fddcafe..52b98ee 100644
--- a/qtmips_gui/coreview.h
+++ b/qtmips_gui/coreview.h
@@ -14,8 +14,11 @@ class CoreView : public QGraphicsView {
public:
CoreView(QWidget *parent);
-private:
+protected:
void resizeEvent(QResizeEvent *event);
+private:
+ const int scene_width = 800, scene_height = 800;
+ void update_scale();
};
class CoreViewScene : public QGraphicsScene {