From 956e64019183f453c857726f78c6e9e66f94bd57 Mon Sep 17 00:00:00 2001 From: Tim Huppertz <mitroman@naturalnet.de> Date: Sun, 12 May 2013 00:50:29 +0200 Subject: [PATCH] Added tooltips. --- contents/code/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contents/code/main.py b/contents/code/main.py index 12f31a1..8dd99b6 100644 --- a/contents/code/main.py +++ b/contents/code/main.py @@ -204,14 +204,15 @@ class Deskoala(plasmascript.Applet): self.buttons = [] for g in [ - [("feed", self.feed), ("turn", self.turn), ("excercise", self.excercise), ("brush", self.brush), ("soap", self.soap)], - [("medicine", self.medicine), ("bonbon", self.bonbon), ("hug", self.hug), ("walk", self.walk), ("sleep", self.sleep)] + [("feed", self.feed, "Feed the animal"), ("turn", self.turn, "Make the animal happy by turning upside down"), ("excercise", self.excercise, "Make sports with the animal"), ("brush", self.brush, "Brush the animal's teeth"), ("soap", self.soap, "Wash the animal")], + [("medicine", self.medicine, "Heal the animal"), ("bonbon", self.bonbon, "Give the animal a bonbon"), ("hug", self.hug, "Hug the animal"), ("walk", self.walk, "Take the animal for a walk"), ("sleep", self.sleep, "Let the animal sleep")] ]: buttons = QGraphicsLinearLayout(Qt.Vertical, self.layout) for b in g: button = Plasma.PushButton(self.applet) button.setImage(self.package().filePath('images', 'button_' + b[0] + '.gif')) + button.setToolTip(b[2]) self.connect(button, SIGNAL("clicked()"), b[1]) buttons.addItem(button) -- GitLab