diff options
Diffstat (limited to '')
-rw-r--r-- | src/ui.py | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -201,16 +201,22 @@ class KPDoodadSelector(QtGui.QWidget): def getDoodad(self, index): """Retrieves a doodad by index""" + index = QtCore.QVariant(index) + widget = self.doodadList - for item in self.doodadList.items(): + for i in xrange(widget.count()): + item = widget.item(i) if item.data(32) == index: return item def getDoodadImage(self, index, width, height): """Retrieves a doodad pixmap by index""" + index = QtCore.QVariant(index) + widget = self.doodadList - for item in self.doodadList.items(): + for i in xrange(widget.count()): + item = widget.item(i) if item.data(32) == index: return item.icon().pixmap(width, height) @@ -221,14 +227,14 @@ class KPDoodadSelector(QtGui.QWidget): Image with doodad.icon().pixmap(doodad.icon().availableSizes()[0]) Index with doodad.data(32)""" + # TODO: FIX THIS return self.doodadList.items() @QtCore.pyqtSlot(QtGui.QListWidgetItem) def handleRowChanged(self, current): """Throws a signal emitting the current object when changed""" - - self.objChanged.emit(current.data(32), current) + self.objChanged.emit(current.data(32).toPyObject(), current) |