summaryrefslogtreecommitdiffstats
path: root/kdesktop/kdesktopbindings.cpp
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
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kdesktop/kdesktopbindings.cpp
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.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/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/kdesktopbindings.cpp')
-rw-r--r--kdesktop/kdesktopbindings.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/kdesktop/kdesktopbindings.cpp b/kdesktop/kdesktopbindings.cpp
new file mode 100644
index 000000000..c50eb7c30
--- /dev/null
+++ b/kdesktop/kdesktopbindings.cpp
@@ -0,0 +1,47 @@
+#ifndef NOSLOTS
+# define DEF( name, key3, key4, fnSlot ) \
+ keys->insert( name, i18n(name), QString::null, key3, key4, this, SLOT(fnSlot) )
+# define DEF2( name, key3, key4, receiver, slot ) \
+ keys->insert( name, i18n(name), QString::null, key3, key4, receiver, slot );
+#else
+# define DEF( name, key3, key4, fnSlot ) \
+ keys->insert( name, i18n(name), QString::null, key3, key4 )
+# define DEF2( name, key3, key4, receiver, slot ) \
+ keys->insert( name, i18n(name), QString::null, key3, key4 )
+#endif
+#define WIN KKey::QtWIN
+
+ keys->insert( "Program:kdesktop", i18n("Desktop") );
+
+#ifndef NOSLOTS
+ if (kapp->authorize("run_command"))
+ {
+#endif
+ DEF( I18N_NOOP("Run Command"), ALT+Qt::Key_F2, WIN+Qt::Key_Return, slotExecuteCommand() );
+#ifndef NOSLOTS
+ }
+#endif
+ DEF( I18N_NOOP("Show Taskmanager"), CTRL+Qt::Key_Escape, WIN+CTRL+Qt::Key_Pause, slotShowTaskManager() );
+ DEF( I18N_NOOP("Show Window List"), ALT+Qt::Key_F5, WIN+Qt::Key_0, slotShowWindowList() );
+ DEF( I18N_NOOP("Switch User"), ALT+CTRL+Qt::Key_Insert, WIN+Qt::Key_Insert, slotSwitchUser() );
+#ifndef NOSLOTS
+ if (kapp->authorize("lock_screen"))
+ {
+#endif
+ DEF2( I18N_NOOP("Lock Session"), ALT+CTRL+Qt::Key_L, WIN+Qt::Key_ScrollLock, KRootWm::self(), SLOT(slotLock()) );
+#ifndef NOSLOTS
+ }
+ if (kapp->authorize("logout"))
+ {
+#endif
+ DEF( I18N_NOOP("Log Out"), ALT+CTRL+Qt::Key_Delete, WIN+Qt::Key_Escape, slotLogout() );
+ DEF( I18N_NOOP("Log Out Without Confirmation"), ALT+CTRL+SHIFT+Qt::Key_Delete, WIN+SHIFT+Qt::Key_Escape, slotLogoutNoCnf() );
+ DEF( I18N_NOOP("Halt without Confirmation"), ALT+CTRL+SHIFT+Qt::Key_PageDown, WIN+CTRL+SHIFT+Qt::Key_PageDown, slotHaltNoCnf() );
+ DEF( I18N_NOOP("Reboot without Confirmation"), ALT+CTRL+SHIFT+Qt::Key_PageUp, WIN+CTRL+SHIFT+Qt::Key_PageUp, slotRebootNoCnf() );
+#ifndef NOSLOTS
+ }
+#endif
+
+#undef DEF
+#undef DEF2
+#undef WIN