summaryrefslogtreecommitdiffstats
path: root/labb3/tiles/mainwindow.h
blob: cbecb7cc1ff8a1cb48b0694dff432e70e27685da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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