Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
desKoala
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nik | Klampfradler
desKoala
Commits
51aa7a73
Commit
51aa7a73
authored
11 years ago
by
Tim Huppertz
Browse files
Options
Downloads
Patches
Plain Diff
Added turn button.
parent
31d3282a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contents/code/main.py
+5
-10
5 additions, 10 deletions
contents/code/main.py
contents/images/button_turn.gif
+0
-0
0 additions, 0 deletions
contents/images/button_turn.gif
with
5 additions
and
10 deletions
contents/code/main.py
+
5
−
10
View file @
51aa7a73
...
...
@@ -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
)
This diff is collapsed.
Click to expand it.
contents/images/button_turn.gif
0 → 100644
+
0
−
0
View file @
51aa7a73
689 B
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment