aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/graphicsview.h
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/graphicsview.h')
-rw-r--r--qtmips_gui/graphicsview.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/qtmips_gui/graphicsview.h b/qtmips_gui/graphicsview.h
new file mode 100644
index 0000000..6b16d40
--- /dev/null
+++ b/qtmips_gui/graphicsview.h
@@ -0,0 +1,20 @@
+#ifndef GRAPHICSVIEW_H
+#define GRAPHICSVIEW_H
+
+#include <QGraphicsView>
+#include <QGraphicsScene>
+
+class GraphicsView : public QGraphicsView {
+public:
+ GraphicsView(QWidget *parent);
+
+ void setScene(QGraphicsScene *scene);
+
+protected:
+ void resizeEvent(QResizeEvent *event);
+
+private:
+ void update_scale();
+};
+
+#endif // GRAPHICSVIEW_H