This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "guiwrapper.h"
|
||||
|
||||
#include "log.h"
|
||||
@@ -25,14 +26,13 @@
|
||||
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);
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef GUIWRAPPER_H
|
||||
#define GUIWRAPPER_H
|
||||
|
||||
#include <qapplication.h>
|
||||
|
||||
#include <guiinterface.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
@@ -32,7 +34,7 @@ class Log;
|
||||
class GuiWrapper : public GuiInterface
|
||||
{
|
||||
public:
|
||||
GuiWrapper(mainWindowImpl*);
|
||||
GuiWrapper();
|
||||
|
||||
~GuiWrapper();
|
||||
|
||||
@@ -81,8 +83,9 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
mainWindowImpl *myW;
|
||||
|
||||
Log *myLog;
|
||||
mainWindowImpl *myW;
|
||||
|
||||
|
||||
};
|
||||
|
||||
+1
-11
@@ -17,14 +17,9 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <qapplication.h>
|
||||
|
||||
//wenn die Interfaces fertig sind werden die folgenden beiden includes nicht mehr gebraucht
|
||||
#include "session.h"
|
||||
#include "mainwindowimpl.h"
|
||||
|
||||
#include "guiwrapper.h"
|
||||
|
||||
class GuiWrapper;
|
||||
@@ -37,12 +32,7 @@ int main( int argc, char **argv )
|
||||
QApplication a( argc, argv );
|
||||
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.
|
||||
|
||||
mainWindowImpl *myW = new mainWindowImpl;
|
||||
myW->show();
|
||||
|
||||
GuiInterface *myGuiInterface = new GuiWrapper(myW);
|
||||
GuiInterface *myGuiInterface = new GuiWrapper();
|
||||
|
||||
|
||||
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
|
||||
myGui->setSession(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user