summaryrefslogtreecommitdiffstats
path: root/superkaramba/examples/openCloseTheme
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/openCloseTheme
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/openCloseTheme')
-rw-r--r--superkaramba/examples/openCloseTheme/1.py22
-rw-r--r--superkaramba/examples/openCloseTheme/1.theme2
-rw-r--r--superkaramba/examples/openCloseTheme/2.theme2
3 files changed, 26 insertions, 0 deletions
diff --git a/superkaramba/examples/openCloseTheme/1.py b/superkaramba/examples/openCloseTheme/1.py
new file mode 100644
index 0000000..26281aa
--- /dev/null
+++ b/superkaramba/examples/openCloseTheme/1.py
@@ -0,0 +1,22 @@
+import dcop
+import dcopext
+import karamba
+from qt import QString, QCString
+
+def closeTheme(theme):
+ dc = dcop.DCOPClient()
+ dc.attach()
+ dc.registerAs('sk_script')
+ apps = dc.registeredApplications()
+ for app in apps:
+ s = str(app)
+ if s[:12] == 'superkaramba':
+ d = dcopext.DCOPApp(s, dc)
+ d.KarambaIface.closeTheme(theme)
+
+def initWidget(widget):
+ karamba.openTheme('2.theme')
+
+def widgetClicked(widget, x, y, button):
+ closeTheme('1')
+
diff --git a/superkaramba/examples/openCloseTheme/1.theme b/superkaramba/examples/openCloseTheme/1.theme
new file mode 100644
index 0000000..5184f0a
--- /dev/null
+++ b/superkaramba/examples/openCloseTheme/1.theme
@@ -0,0 +1,2 @@
+KARAMBA x=200 y=50 w=100 h=20 INTERVAL=1000 LOCKED=true
+TEXT x=0 Y=0 w=300 h=20 value="Theme 1"
diff --git a/superkaramba/examples/openCloseTheme/2.theme b/superkaramba/examples/openCloseTheme/2.theme
new file mode 100644
index 0000000..7298850
--- /dev/null
+++ b/superkaramba/examples/openCloseTheme/2.theme
@@ -0,0 +1,2 @@
+KARAMBA x=200 y=100 w=100 h=20 INTERVAL=1000 LOCKED=true
+TEXT x=0 Y=0 w=300 h=20 value="Theme2"