From 870cf5ad6f121e3a0f69c7f1645dad59eded416b Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 3 Nov 2011 05:16:37 +0100 Subject: current broken progress --- src/main.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/main.py') diff --git a/src/main.py b/src/main.py index ba1ff2c..927c970 100644 --- a/src/main.py +++ b/src/main.py @@ -1,16 +1,19 @@ -from PyQt4 import QtCore, QtGui -import sys - +from common import * from ui import KPMainWindow -def run_koopatlas(): - global Koopatlas - Koopatlas = KPApplication(sys.argv) - Koopatlas.run() +class KP: + @staticmethod + def newMap(): + KP.map = KPMap() + + @staticmethod + def run(): + KP.app = QtGui.QApplication(sys.argv) + + KP.newMap() + + KP.mainWindow = KPMainWindow() + KP.mainWindow.show() -class KPApplication(QtGui.QApplication): - def run(self): - self.mainWindow = KPMainWindow() - self.mainWindow.show() - self.exec_() + KP.app.exec_() -- cgit v1.2.3