diff options
author | Treeki <treeki@gmail.com> | 2011-11-22 22:25:00 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-11-22 22:25:00 +0100 |
commit | 3acb4765f5f80f0354213c1e23b9a2565bcdb58c (patch) | |
tree | ce3b2986de80bc670f5fc11de5c7597512f099f2 /src/mapdata.py | |
parent | 7193760f2fbc2c0f4d911709cc942eefdee83e5b (diff) | |
download | koopatlas-3acb4765f5f80f0354213c1e23b9a2565bcdb58c.tar.gz koopatlas-3acb4765f5f80f0354213c1e23b9a2565bcdb58c.zip |
icons!
Diffstat (limited to '')
-rw-r--r-- | src/mapdata.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mapdata.py b/src/mapdata.py index 013e308..131c669 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -65,6 +65,8 @@ class KPTileLayer(KPLayer): self.objects = [] self.cache = ['DUMMY_FLAG'] self.updateCache() + + self.icon = KP.icon('LayerTile') def _visibilityChanged(self, value): for obj in self.objects: @@ -145,6 +147,8 @@ class KPDoodadLayer(KPLayer): def __init__(self): KPLayer.__init__(self) self.objects = [] + + self.icon = KP.icon('LayerObjects') def _visibilityChanged(self, value): for obj in self.objects: @@ -208,6 +212,8 @@ class KPPathLayer(KPLayer): KPLayer.__init__(self) self.nodes = [] self.paths = [] + + self.icon = KP.icon('LayerPath') def _visibilityChanged(self, value): for objList in (self.nodes, self.paths): @@ -267,6 +273,8 @@ class KPMap(object): if (role == Qt.DisplayRole or role == Qt.EditRole): return layer.name + elif role == Qt.DecorationRole: + return layer.icon elif role == Qt.CheckStateRole: return (Qt.Checked if layer.visible else Qt.Unchecked) |