summaryrefslogtreecommitdiffstats
path: root/superkaramba/examples/autoHide
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch)
tree8d927b7b47a90c4adb646482a52613f58acd6f8c /superkaramba/examples/autoHide
downloadtdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz
tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'superkaramba/examples/autoHide')
-rw-r--r--superkaramba/examples/autoHide/main.py62
-rw-r--r--superkaramba/examples/autoHide/main.theme42
-rw-r--r--superkaramba/examples/autoHide/pics/MSN-64x64.pngbin0 -> 6178 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/MSN-96x96.pngbin0 -> 11529 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_House-64x64.pngbin0 -> 4485 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_House-96x96.pngbin0 -> 7462 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Mail-64x64.pngbin0 -> 8572 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Mail-96x96.pngbin0 -> 15942 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Mozilla-64x64.pngbin0 -> 7373 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Mozilla-96x96.pngbin0 -> 13570 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Sherlock-64x64.pngbin0 -> 5635 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Sherlock-96x96.pngbin0 -> 10369 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Terminal-64x64.pngbin0 -> 3489 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_Terminal-96x96.pngbin0 -> 5985 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_iPhoto-64x64.pngbin0 -> 8036 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/Tux_iPhoto-96x96.pngbin0 -> 14876 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/bar3.pngbin0 -> 393 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/bar4.pngbin0 -> 310 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/calendar.pngbin0 -> 1950 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/ctrl center-64x64.pngbin0 -> 5582 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/ctrl center-96x96.pngbin0 -> 9770 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/iconbarback.pngbin0 -> 2475 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/label3.pngbin0 -> 300 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/label4.pngbin0 -> 256 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/osxbarback.pngbin0 -> 6463 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/osxbarbackBig.pngbin0 -> 6473 bytes
-rw-r--r--superkaramba/examples/autoHide/pics/pointer.pngbin0 -> 309 bytes
27 files changed, 104 insertions, 0 deletions
diff --git a/superkaramba/examples/autoHide/main.py b/superkaramba/examples/autoHide/main.py
new file mode 100644
index 0000000..85e2b37
--- /dev/null
+++ b/superkaramba/examples/autoHide/main.py
@@ -0,0 +1,62 @@
+#this import statement allows access to the karamba functions
+import karamba
+
+hidden = 0
+counter = 0
+
+def initWidget(widget):
+ global hidden
+ hidden = 0
+
+def widgetUpdated(widget):
+ global hidden
+ global counter
+ if hidden == 0:
+ counter = counter + 1
+
+ if (counter > 5):
+ hidden = 1
+ karamba.moveWidget(widget, 0, -210)
+
+
+#This gets called everytime our widget is clicked.
+#Notes:
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button clicked:
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetClicked(widget, x, y, button):
+ pass
+
+#This gets called everytime our widget is clicked.
+#Notes
+# widget = reference to our widget
+# x = x position (relative to our widget)
+# y = y position (relative to our widget)
+# botton = button being held:
+# 0 = No Mouse Button
+# 1 = Left Mouse Button
+# 2 = Middle Mouse Button
+# 3 = Right Mouse Button, but this will never happen
+# because the right mouse button brings up the
+# Karamba menu.
+def widgetMouseMoved(widget, x, y, button):
+ #Warning: Don't do anything too intensive here
+ #You don't want to run some complex piece of code everytime the mouse moves
+ global hidden
+ global counter
+ if (hidden==1):
+ karamba.moveWidget(widget, 0, 0)
+ hidden = 0
+ counter = 0
+
+
+
+# This will be printed when the widget loads.
+print "Loaded my python extension!"
+
diff --git a/superkaramba/examples/autoHide/main.theme b/superkaramba/examples/autoHide/main.theme
new file mode 100644
index 0000000..fd924dc
--- /dev/null
+++ b/superkaramba/examples/autoHide/main.theme
@@ -0,0 +1,42 @@
+KARAMBA X=0 Y=0 W=390 H=220 LOCKED=true INTERVAL=1000 ONTOP=false
+
+IMAGE X=0 Y=0 PATH="pics/calendar.png"
+
+<GROUP> X=10 Y=-15
+#CPU
+GRAPH X=5 Y=49 W=293 H=36 SENSOR=CPU POINTS=100 COLOR=100,100,100 INTERVAL=1000
+IMAGE X=0 Y=47 PATH="pics/label3.png"
+BAR X=0 Y=47 W=300 H=40 PATH="pics/bar3.png" SENSOR=CPU
+TEXT X=310 Y=56 SENSOR=CPU FORMAT="%v%" COLOR=200,200,200 FONTSIZE=10 FONT="arial" SHADOW=1
+
+#time
+TEXT X=2 Y=27 SENSOR=TIME COLOR=200,200,200 FONTSIZE=10 FONT="arial" SHADOW=1
+
+#date
+TEXT X=50 Y=31 SENSOR=TIME FORMAT="ddd d MMM" COLOR=180,180,180 FONTSIZE=8 FONT="arial"
+
+#mem
+IMAGE X=0 Y=97 PATH="pics/label3.png"
+BAR X=0 Y=97 W=300 H=40 PATH="pics/bar3.png" SENSOR=MEMORY INTERVAL=2000
+TEXT X=310 Y=106 SENSOR=MEMORY FORMAT="%fmMB" COLOR=200,200,200 FONTSIZE=10 FONT="arial" SHADOW=1
+
+
+#swap
+IMAGE X=0 Y=147 PATH="pics/label4.png"
+BAR X=0 Y=147 W=300 H=20 PATH="pics/bar4.png" SENSOR=MEMORY FORMAT="%us"
+TEXT X=310 Y=151 SENSOR=MEMORY FORMAT="%fsMB" COLOR=170,170,170 FONTSIZE=8 FONT="arial"
+
+
+#network
+GRAPH X=2 Y=179 W=296 H=36 SENSOR=NETWORK FORMAT="%in" POINTS=100 COLOR=100,100,100 MAX=250 INTERVAL=1000
+GRAPH X=2 Y=179 W=296 H=36 SENSOR=NETWORK FORMAT="%out" POINTS=100 COLOR=80,80,80 MAX=250
+IMAGE X=0 Y=177 PATH="pics/label3.png"
+BAR X=0 Y=177 W=300 H=40 PATH="pics/bar3.png" SENSOR=NETWORK FORMAT="%in" MAX=250
+BAR X=0 Y=177 W=300 H=40 PATH="pics/bar3.png" SENSOR=NETWORK FORAMT="%out" MAX=250
+TEXT X=310 Y=182 SENSOR=NETWORK COLOR=200,200,200 FORMAT="%inKBs" FONTSIZE=9 FONT="arial" DECIMALS=1
+TEXT X=310 Y=200 SENSOR=NETWORK COLOR=200,200,200 FORMAT="%outKBs" FONTSIZE=9 FONT="arial" DECIMALS=1
+
+#uptime
+TEXT X=240 Y=32 SENSOR=UPTIME COLOR=190,190,190 FONTSIZE=7 FONT="arial"
+
+</GROUP>
diff --git a/superkaramba/examples/autoHide/pics/MSN-64x64.png b/superkaramba/examples/autoHide/pics/MSN-64x64.png
new file mode 100644
index 0000000..3dc0e39
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/MSN-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/MSN-96x96.png b/superkaramba/examples/autoHide/pics/MSN-96x96.png
new file mode 100644
index 0000000..bf0f63a
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/MSN-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_House-64x64.png b/superkaramba/examples/autoHide/pics/Tux_House-64x64.png
new file mode 100644
index 0000000..c0b657e
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_House-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_House-96x96.png b/superkaramba/examples/autoHide/pics/Tux_House-96x96.png
new file mode 100644
index 0000000..dc217f3
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_House-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Mail-64x64.png b/superkaramba/examples/autoHide/pics/Tux_Mail-64x64.png
new file mode 100644
index 0000000..4e29c4d
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Mail-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Mail-96x96.png b/superkaramba/examples/autoHide/pics/Tux_Mail-96x96.png
new file mode 100644
index 0000000..9de2596
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Mail-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Mozilla-64x64.png b/superkaramba/examples/autoHide/pics/Tux_Mozilla-64x64.png
new file mode 100644
index 0000000..d2413cd
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Mozilla-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Mozilla-96x96.png b/superkaramba/examples/autoHide/pics/Tux_Mozilla-96x96.png
new file mode 100644
index 0000000..5f24afb
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Mozilla-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Sherlock-64x64.png b/superkaramba/examples/autoHide/pics/Tux_Sherlock-64x64.png
new file mode 100644
index 0000000..e883671
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Sherlock-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Sherlock-96x96.png b/superkaramba/examples/autoHide/pics/Tux_Sherlock-96x96.png
new file mode 100644
index 0000000..20628f1
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Sherlock-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Terminal-64x64.png b/superkaramba/examples/autoHide/pics/Tux_Terminal-64x64.png
new file mode 100644
index 0000000..066c318
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Terminal-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_Terminal-96x96.png b/superkaramba/examples/autoHide/pics/Tux_Terminal-96x96.png
new file mode 100644
index 0000000..5eedfe1
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_Terminal-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_iPhoto-64x64.png b/superkaramba/examples/autoHide/pics/Tux_iPhoto-64x64.png
new file mode 100644
index 0000000..9906efc
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_iPhoto-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/Tux_iPhoto-96x96.png b/superkaramba/examples/autoHide/pics/Tux_iPhoto-96x96.png
new file mode 100644
index 0000000..aa6450c
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/Tux_iPhoto-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/bar3.png b/superkaramba/examples/autoHide/pics/bar3.png
new file mode 100644
index 0000000..c6d4b9e
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/bar3.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/bar4.png b/superkaramba/examples/autoHide/pics/bar4.png
new file mode 100644
index 0000000..9e87bff
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/bar4.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/calendar.png b/superkaramba/examples/autoHide/pics/calendar.png
new file mode 100644
index 0000000..fc0e466
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/calendar.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/ctrl center-64x64.png b/superkaramba/examples/autoHide/pics/ctrl center-64x64.png
new file mode 100644
index 0000000..3c6d78f
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/ctrl center-64x64.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/ctrl center-96x96.png b/superkaramba/examples/autoHide/pics/ctrl center-96x96.png
new file mode 100644
index 0000000..43e7f3d
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/ctrl center-96x96.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/iconbarback.png b/superkaramba/examples/autoHide/pics/iconbarback.png
new file mode 100644
index 0000000..8a1f2f5
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/iconbarback.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/label3.png b/superkaramba/examples/autoHide/pics/label3.png
new file mode 100644
index 0000000..613ae17
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/label3.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/label4.png b/superkaramba/examples/autoHide/pics/label4.png
new file mode 100644
index 0000000..d6de907
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/label4.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/osxbarback.png b/superkaramba/examples/autoHide/pics/osxbarback.png
new file mode 100644
index 0000000..cb26088
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/osxbarback.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/osxbarbackBig.png b/superkaramba/examples/autoHide/pics/osxbarbackBig.png
new file mode 100644
index 0000000..07c6971
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/osxbarbackBig.png
Binary files differ
diff --git a/superkaramba/examples/autoHide/pics/pointer.png b/superkaramba/examples/autoHide/pics/pointer.png
new file mode 100644
index 0000000..379079a
--- /dev/null
+++ b/superkaramba/examples/autoHide/pics/pointer.png
Binary files differ