diff options
Diffstat (limited to 'pacman-c++')
| -rw-r--r-- | pacman-c++/client.cpp | 6 | ||||
| -rw-r--r-- | pacman-c++/mainwidget.cpp | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/pacman-c++/client.cpp b/pacman-c++/client.cpp index 736de35..a5cb7c5 100644 --- a/pacman-c++/client.cpp +++ b/pacman-c++/client.cpp | |||
| @@ -2,6 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | Client::Client() | 3 | Client::Client() |
| 4 | { | 4 | { |
| 5 | QAction *quitAction = new QAction("E&xit", this); | ||
| 6 | connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); | ||
| 7 | |||
| 8 | QMenu *fileMenu = menuBar()->addMenu("File"); | ||
| 9 | fileMenu->addAction(quitAction); | ||
| 10 | |||
| 5 | mainWidget = new MainWidget(); | 11 | mainWidget = new MainWidget(); |
| 6 | setCentralWidget(mainWidget); | 12 | setCentralWidget(mainWidget); |
| 7 | } | 13 | } |
diff --git a/pacman-c++/mainwidget.cpp b/pacman-c++/mainwidget.cpp index 1179a81..9d7fb14 100644 --- a/pacman-c++/mainwidget.cpp +++ b/pacman-c++/mainwidget.cpp | |||
| @@ -9,14 +9,10 @@ MainWidget::MainWidget() | |||
| 9 | { | 9 | { |
| 10 | QVBoxLayout *layout = new QVBoxLayout(this); | 10 | QVBoxLayout *layout = new QVBoxLayout(this); |
| 11 | 11 | ||
| 12 | //QLabel *lbl = new QLabel("da kommt da spielstand hin"); | ||
| 13 | //layout->addWidget(lbl); | ||
| 14 | |||
| 15 | //scoreBox->setLayout(scoreLayout); | ||
| 16 | QHBoxLayout *m_scoreLayout = new QHBoxLayout(); | 12 | QHBoxLayout *m_scoreLayout = new QHBoxLayout(); |
| 17 | 13 | ||
| 18 | for (unsigned int i=1; i<4; ++i) { | 14 | for (unsigned int i=1; i<4; ++i) { |
| 19 | QGroupBox *scoreBoxI = new QGroupBox(QString("Player %1").arg(i), this); | 15 | QGroupBox *scoreBoxI = new QGroupBox(QString("Spieler %1").arg(i), this); |
| 20 | m_scoreLayout->addWidget(scoreBoxI); | 16 | m_scoreLayout->addWidget(scoreBoxI); |
| 21 | 17 | ||
| 22 | QGridLayout *playerLayout = new QGridLayout(); | 18 | QGridLayout *playerLayout = new QGridLayout(); |
| @@ -25,13 +21,11 @@ MainWidget::MainWidget() | |||
| 25 | playerLayout->addWidget( new QLabel("Rundenpunkte:", this), 0, 0); | 21 | playerLayout->addWidget( new QLabel("Rundenpunkte:", this), 0, 0); |
| 26 | playerLayout->addWidget( new QLabel("Gesamtpunkte:", this), 1, 0); | 22 | playerLayout->addWidget( new QLabel("Gesamtpunkte:", this), 1, 0); |
| 27 | 23 | ||
| 28 | playerLayout->addWidget( new QLabel("100", this), 0, 1); | 24 | playerLayout->addWidget( new QLabel("", this), 0, 1); |
| 29 | playerLayout->addWidget( new QLabel("1000", this), 1, 1); | 25 | playerLayout->addWidget( new QLabel("", this), 1, 1); |
| 30 | 26 | ||
| 31 | m_playerScoreLayouts.append(playerLayout); | 27 | m_playerScoreLayouts.append(playerLayout); |
| 32 | } | 28 | } |
| 33 | |||
| 34 | //layout->addWidget(scoreBox); | ||
| 35 | 29 | ||
| 36 | m_scene = new QGraphicsScene(0, 0, 500, 500, this); | 30 | m_scene = new QGraphicsScene(0, 0, 500, 500, this); |
| 37 | m_scene->setBackgroundBrush(Qt::black); | 31 | m_scene->setBackgroundBrush(Qt::black); |
