from common import * class KP: @staticmethod def run(): KP.app = QtGui.QApplication(sys.argv) KP.app.settings = QtCore.QSettings('Koopatlas', 'Newer Team') from mapdata import KPMap KP.map = KPMap() from ui import KPMainWindow KP.mainWindow = KPMainWindow() KP.mainWindow.show() KP.app.exec_() @classmethod def icon(cls, name): try: cache = cls.iconCache except AttributeError: cache = {} cls.iconCache = cache try: return cache[name] except KeyError: icon = QtGui.QIcon('Resources/%s.png' % name) cache[name] = icon return icon