summaryrefslogtreecommitdiffstats
path: root/pacman-c++/main.cpp
blob: cceb8f50e84bc994715e34287553f71c12a720f5 (plain)
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
#include "actor.h"
#include "pixmapitem.h"
#include <QtCore>
#include <QtGui>

int main(int argc, char **argv)
{
  QApplication app(argc, argv);

  QGraphicsScene scene(0, 0, 300, 300);
  scene.setBackgroundBrush(Qt::black);

  Actor *actor1 = new Actor(Actor::Player1);
  scene.addItem(actor1);

  QGraphicsView window(&scene);
  window.setFrameStyle(0);
  window.setAlignment(Qt::AlignLeft | Qt::AlignTop);
  window.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
  window.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

  window.resize(300, 300);
  window.show();

  qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));

  return app.exec();
}