summaryrefslogtreecommitdiff
path: root/src/main.py
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-11-22 22:25:00 +0100
committerTreeki <treeki@gmail.com>2011-11-22 22:25:00 +0100
commit3acb4765f5f80f0354213c1e23b9a2565bcdb58c (patch)
treece3b2986de80bc670f5fc11de5c7597512f099f2 /src/main.py
parent7193760f2fbc2c0f4d911709cc942eefdee83e5b (diff)
downloadkoopatlas-3acb4765f5f80f0354213c1e23b9a2565bcdb58c.tar.gz
koopatlas-3acb4765f5f80f0354213c1e23b9a2565bcdb58c.zip
icons!
Diffstat (limited to '')
-rw-r--r--src/main.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main.py b/src/main.py
index 1d53521..1ef7039 100644
--- a/src/main.py
+++ b/src/main.py
@@ -18,4 +18,20 @@ class KP:
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