diff options
author | Colin Noga <Tempus@chronometry.ca> | 2011-12-03 02:08:17 -0600 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2011-12-03 02:08:17 -0600 |
commit | bd62c887e956b658d3ec1b47099fa07882386d1f (patch) | |
tree | 8f839153a85e4a714985f9248de11f1645bcf19e /src/ui.py | |
parent | 3bdc780bd3eaa204b1df5d5e6727a876d5967401 (diff) | |
download | koopatlas-bd62c887e956b658d3ec1b47099fa07882386d1f.tar.gz koopatlas-bd62c887e956b658d3ec1b47099fa07882386d1f.zip |
Fixed up some UI stuff, added animation presets to make life easier for animations
Diffstat (limited to '')
-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) |