Skip to content
Snippets Groups Projects
Commit 51aa7a73 authored by Tim Huppertz's avatar Tim Huppertz
Browse files

Added turn button.

parent 31d3282a
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ class Deskoala(plasmascript.Applet):
self.show_mood()
self.buttons = QGraphicsLinearLayout(Qt.Vertical, self.layout)
for b in [("feed", self.feed)]:
for b in [("feed", self.feed), ("turn", self.turn)]:
button = Plasma.PushButton(self.applet)
button.setImage("/home/mitroman/Python/desKoala/contents/images/button_" + b[0] + ".gif")
self.connect(button, SIGNAL("clicked()"), b[1])
......@@ -80,15 +80,10 @@ class Deskoala(plasmascript.Applet):
def feed(self):
self.koala.feed()
self.show_mood()
''' def paintInterface(self, painter, option, rect):
painter.save()
painter.setPen(Qt.white)
pixmap = QPixmap("contents/images/koala_" + self.koala.get_mood() + ".gif")
painter.drawPixmap(20, 20, pixmap)
painter.restore()
'''
def turn(self):
self.koala.turn()
self.show_mood()
def CreateApplet(parent):
return Deskoala(parent)
contents/images/button_turn.gif

689 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment