diff options
Diffstat (limited to 'src/ui.py')
-rw-r--r-- | src/ui.py | 37 |
1 files changed, 18 insertions, 19 deletions
@@ -46,12 +46,6 @@ class KPLayerList(QtGui.QWidget): def toggleAnimatingScene(self): self.playPaused.emit() - if self.actPlayPause.text() == 'Play': - self.actPlayPause.setIcon(KP.icon('AStop')) - self.actPlayPause.setText('Stop') - else: - self.actPlayPause.setIcon(KP.icon('APlay')) - self.actPlayPause.setText('Play') def setButtonStates(self): index = self.selectedLayerIndex() @@ -192,21 +186,21 @@ class KPDoodadSelector(QtGui.QWidget): KP.map.removeDoodad(doodad) - def addDoodad(self, image, name): - # TODO: REMOVE - """Takes a name and a QPixmap and turns it into an icon, then goes ahead and makes a doodad. - Doodads are QListWidget items with an index number as Qt.UserRole #32.""" + # def addDoodad(self, image, name): + # # TODO: REMOVE + # """Takes a name and a QPixmap and turns it into an icon, then goes ahead and makes a doodad. + # Doodads are QListWidget items with an index number as Qt.UserRole #32.""" - doodie = QtGui.QListWidgetItem(QtGui.QIcon(image), name) - # !! - doodie.setSizeHint(QtCore.QSize(128,128)) - doodie.setData(32, self.nextIndex) - doodie.setToolTip(name) - doodie.setTextAlignment(Qt.AlignBottom | Qt.AlignHCenter) + # doodie = QtGui.QListWidgetItem(QtGui.QIcon(image), name) + # # !! + # doodie.setSizeHint(QtCore.QSize(128,128)) + # doodie.setData(32, self.nextIndex) + # doodie.setToolTip(name) + # doodie.setTextAlignment(Qt.AlignBottom | Qt.AlignHCenter) - self.doodadList.addItem(doodie) - self.nextIndex += 1 + # self.doodadList.addItem(doodie) + # self.nextIndex += 1 def addDoodadFromFile(self): @@ -404,6 +398,11 @@ class KPMainWindow(QtGui.QMainWindow): def __init__(self): QtGui.QMainWindow.__init__(self) + self.setWindowTitle('Koopatlas') + self.setWindowIcon(QtGui.QIcon('Resources/Koopatlas.png')) + self.setIconSize(QtCore.QSize(16, 16)) + + self.scene = KPMapScene() self.editor = KPEditorWidget(self.scene) @@ -645,7 +644,7 @@ class KPMainWindow(QtGui.QMainWindow): item, ok = QtGui.QInputDialog.getItem(self, "QInputDialog.getItem()", "Choose a Screenshot Source:", items, 0, False) if ok and item: - fn = QtGui.QFileDialog.getSaveFileName(self, 'Choose a new filename', '/untitled.png', 'Portable Network Graphics (*.png)') + fn = QtGui.QFileDialog.getSaveFileName(self, 'Choose a new filename', 'untitled.png', 'Portable Network Graphics (*.png)') if fn == '': return fn = unicode(fn) |