Skip to content

Instantly share code, notes, and snippets.

@KT-Yeh
Last active August 29, 2015 14:02
Show Gist options
  • Save KT-Yeh/4ff4b9ed92f164b39fa6 to your computer and use it in GitHub Desktop.
Save KT-Yeh/4ff4b9ed92f164b39fa6 to your computer and use it in GitHub Desktop.
#ifndef GAME_H
#define GAME_H
#include <QWidget>
#include <QPainter>
#include <QTimer>
#include <QPaintEvent>
#include <QKeyEvent>
#include "Man.h"
class Game : public QWidget {
Q_OBJECT
public:
Game(QWidget *parent = 0);
public slots:
void RefreshFrame();
protected:
virtual void paintEvent(QPaintEvent *event);
virtual void keyPressEvent(QKeyEvent *event);
virtual void keyReleaseEvent(QKeyEvent *event);
private:
QTimer *timer;
Man *man;
};
#endif // GAME_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment