Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into newLoggers
Browse files Browse the repository at this point in the history
Conflicts:
	userinterface/header/mainwindow.h
	userinterface/header/spielbrett.h
	userinterface/header/uiexec.h
	userinterface/header/window.h
	userinterface/source/mainwindow.cpp
	userinterface/source/spielbrett.cpp
	userinterface/source/uiexec.cpp
	userinterface/source/window.cpp
  • Loading branch information
OEtzi007 authored and OEtzi007 committed Mar 3, 2014
2 parents ea48044 + 334fe47 commit 8a45346
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 13 deletions.
4 changes: 4 additions & 0 deletions userinterface/header/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "uiexec.h"
#include "window.h"

class QToolBar;

class MainWindow : QMainWindow
{
public:
Expand All @@ -12,6 +14,8 @@ class MainWindow : QMainWindow
UIEXEC* myGameExe;
Window* wp;
QToolBar* myToolBar;
private slots:
void newGame(bool isTrue);
};

#endif // MAINWINDOW_H
5 changes: 5 additions & 0 deletions userinterface/header/spielbrett.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@

#include <QWidget>
#include <QColor>
<<<<<<< HEAD
#include "../../game/header/Constants.h"
#include "../../game/header/State.h"
=======
#include "Konstant.h"
#include "State.h"
>>>>>>> refs/remotes/origin/master
#include "window.h"

class Window;
Expand Down
18 changes: 18 additions & 0 deletions userinterface/header/uiexec.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef UIEXEC_H
#define UIEXEC_H
#include "window.h"
<<<<<<< HEAD
#include "../../game/header/Constants.h"
#include "../../game/header/Board.h"
#include "../../logger/header/SimulationLogger.h"
Expand All @@ -14,6 +15,23 @@ class UIEXEC {
Board* board;
SimulationLogger* simulation;
void doTheMagic();
=======
#include"Konstant.h"
#include"Brett.h"
#include"Game.h"
#include <QString>


class UIEXEC
{

public:
UIEXEC();
Window* wp;
Brett* board;
Game* game1;
void doTheMagic();
>>>>>>> refs/remotes/origin/master

};

Expand Down
1 change: 1 addition & 0 deletions userinterface/header/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Q_OBJECT

friend class Spielbrett;
friend class UIEXEC;
friend class MainWindow;
public:
Window(SimulationLogger* game = 0);
void setsimulationp(SimulationLogger* game);
Expand Down
11 changes: 7 additions & 4 deletions userinterface/source/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

MainWindow::MainWindow()
{
myGameExe = new UIEXEC;
wp = new Window(myGameExe->simulation);

myGameExe = new UIEXEC;
wp = new Window(myGameExe->game1);
myGameExe->doTheMagic();
setCentralWidget(wp);
showMaximized();
myToolBar = addToolBar(tr("Test"));
// connect(wp->newGameButton, SIGNAL(toggled(bool)), this, SLOT(newGame(bool))));

//myToolBar = new QToolBar();
showMaximized();
}
6 changes: 3 additions & 3 deletions userinterface/source/spielbrett.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <cmath>
#include "../header/QKonstanten.h"

const QPen thinPen(Qt::darkGray, 1);
const QPen thinRedPen(Qt::red, 1);
const QPen fatPen(Qt::black, 4);
const QPen thinPen(Qt::darkGray,1,Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
const QPen thinRedPen(Qt::red, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
const QPen fatPen(Qt::black, 4, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
const double sL = 30.2;

enum Farbart {
Expand Down
2 changes: 1 addition & 1 deletion userinterface/source/uiexec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void UIEXEC::doTheMagic() {
/**
window implementation
*/
Board* board = new Board;
board = new Board;
board->Ausgabe();
std::vector<AI*> players;
players.push_back(new testKI(P_YELLOW));
Expand Down
10 changes: 5 additions & 5 deletions userinterface/source/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ Window::Window(SimulationLogger *game) :
toolBoxLabel->setFont(font);
vektorSpinBox = new QSpinBox;
showTownsCheckBox = new QCheckBox;
vektorSpinBox->setRange(0,
simulationp->gameList[0]->roundList[0]->moveList.size()); //TODO more spinboxes
newGameButton = new QPushButton(tr("New Game"));
vektorSpinBox->setRange(0, gamep->zustandsListe.size());
vektorSpinBox->setWrapping(false);
vektorSpinBox->setSuffix(tr(". Zustand"));
counterLCD = new QLCDNumber;
counterLCD->setDigitCount(4);
counterLCD->display(9999);
counterLCD->setDigitCount(2);
counterLCD->display(99);
spielbrett = new Spielbrett(this);

/**
Layout-Design
*/
Expand All @@ -52,6 +51,7 @@ Window::Window(SimulationLogger *game) :
toolLayout->addRow(toolBoxLabel);
toolLayout->addRow(tr("Geladener Zustand:"), vektorSpinBox);
toolLayout->addRow(tr("Zeige Staedte:"), showTownsCheckBox);
toolLayout->addRow(newGameButton);
pointsLayout->addRow(tr("KI 1:"), player1);
pointsLayout->addRow(tr("KI 2:"), player2);
setLayout(mainLayout);
Expand Down

0 comments on commit 8a45346

Please sign in to comment.