This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
* Free Software Foundation, Inc., *
|
* Free Software Foundation, Inc., *
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "guiwrapper.h"
|
#include "guiwrapper.h"
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@@ -25,14 +26,13 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
GuiWrapper::GuiWrapper(mainWindowImpl* w) : myW(w)
|
GuiWrapper::GuiWrapper() : myLog(0), myW(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Am Ende soll GuiWrapper mainWindowImpl
|
|
||||||
// myW = new mainWindowImpl();
|
|
||||||
// myW->show();
|
|
||||||
|
|
||||||
// Jetzt muss myW erstmal aus Session kommen!
|
myW = new mainWindowImpl;
|
||||||
|
myW->show();
|
||||||
|
|
||||||
|
|
||||||
myLog = new Log(myW);
|
myLog = new Log(myW);
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
#ifndef GUIWRAPPER_H
|
#ifndef GUIWRAPPER_H
|
||||||
#define GUIWRAPPER_H
|
#define GUIWRAPPER_H
|
||||||
|
|
||||||
|
#include <qapplication.h>
|
||||||
|
|
||||||
#include <guiinterface.h>
|
#include <guiinterface.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -32,7 +34,7 @@ class Log;
|
|||||||
class GuiWrapper : public GuiInterface
|
class GuiWrapper : public GuiInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GuiWrapper(mainWindowImpl*);
|
GuiWrapper();
|
||||||
|
|
||||||
~GuiWrapper();
|
~GuiWrapper();
|
||||||
|
|
||||||
@@ -81,8 +83,9 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
mainWindowImpl *myW;
|
|
||||||
Log *myLog;
|
Log *myLog;
|
||||||
|
mainWindowImpl *myW;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-11
@@ -17,14 +17,9 @@
|
|||||||
* Free Software Foundation, Inc., *
|
* Free Software Foundation, Inc., *
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
|
|
||||||
//wenn die Interfaces fertig sind werden die folgenden beiden includes nicht mehr gebraucht
|
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
#include "mainwindowimpl.h"
|
|
||||||
|
|
||||||
#include "guiwrapper.h"
|
#include "guiwrapper.h"
|
||||||
|
|
||||||
class GuiWrapper;
|
class GuiWrapper;
|
||||||
@@ -37,12 +32,7 @@ int main( int argc, char **argv )
|
|||||||
QApplication a( argc, argv );
|
QApplication a( argc, argv );
|
||||||
Q_INIT_RESOURCE(deck);
|
Q_INIT_RESOURCE(deck);
|
||||||
|
|
||||||
//wenn die Interfaces fertig sind werden die folgenden beiden Objekte nicht mehr gebraucht da sie von GuiWrapper und EngineWrapper erstellt werden.
|
GuiInterface *myGuiInterface = new GuiWrapper();
|
||||||
|
|
||||||
mainWindowImpl *myW = new mainWindowImpl;
|
|
||||||
myW->show();
|
|
||||||
|
|
||||||
GuiInterface *myGuiInterface = new GuiWrapper(myW);
|
|
||||||
|
|
||||||
|
|
||||||
Session theFirst(myGuiInterface);
|
Session theFirst(myGuiInterface);
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ Session::Session(GuiInterface* g) : actualGame(0), myGui(g)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// myW = new mainWindowImpl();
|
|
||||||
// a.setMainWidget( w );
|
|
||||||
// myW->show();
|
|
||||||
// Session an mainwindowimpl bergeben
|
// Session an mainwindowimpl bergeben
|
||||||
myGui->setSession(this);
|
myGui->setSession(this);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user