summaryrefslogtreecommitdiffstats
path: root/labb3/tiles/mainwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'labb3/tiles/mainwindow.h')
-rw-r--r--labb3/tiles/mainwindow.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/labb3/tiles/mainwindow.h b/labb3/tiles/mainwindow.h
new file mode 100644
index 0000000..cbecb7c
--- /dev/null
+++ b/labb3/tiles/mainwindow.h
@@ -0,0 +1,35 @@
+/*
+ * TDDD86 Tiles
+ * This file contains the declaration of the mainwindow class.
+ * See mainwindow.cpp for implementation of each member.
+ * Your code should work properly with an unmodified version of this file.
+ */
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QGraphicsView>
+#include <QGraphicsScene>
+#include <QMouseEvent>
+#include "TileList.h"
+
+class MainWindow : public QGraphicsView
+{
+ Q_OBJECT
+public:
+ explicit MainWindow(QWidget *parent = 0);
+
+signals:
+
+public slots:
+ void mousePressEvent(QMouseEvent *e);
+ void keyPressEvent(QKeyEvent *k);
+
+private:
+ void addRandomTile(TileList& tlist);
+
+ QGraphicsScene* scene;
+ TileList tlist;
+};
+
+#endif // MAINWINDOW_H