diff options
Diffstat (limited to 'superkaramba/examples/openCloseTheme/1.py')
-rw-r--r-- | superkaramba/examples/openCloseTheme/1.py | 22 |
1 files changed, 22 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') + |