summaryrefslogtreecommitdiff
path: root/src/main.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main.py27
1 files changed, 15 insertions, 12 deletions
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_()