setGlobalShortcut() for global shortcuts

svn path=/trunk/KDE/kdebase/workspace/; revision=568236
This commit is contained in:
Luboš Luňák 2006-07-31 15:16:07 +00:00
parent b5d2f22925
commit bffa0d7909

View file

@ -1,19 +1,19 @@
#ifndef NOSLOTS
# define DEF2( name, descr, key, fnSlot ) \
a = new KAction( i18n(descr), actionCollection, name ); \
a->setShortcut(KShortcut(key)); \
a->setGlobalShortcut(KShortcut(key)); \
connect(a, SIGNAL(triggered(bool)), SLOT(fnSlot))
# define DEF( name, key, fnSlot ) \
a = new KAction( i18n(name), actionCollection, name ); \
a->setShortcut(KShortcut(key)); \
a->setGlobalShortcut(KShortcut(key)); \
connect(a, SIGNAL(triggered(bool)), SLOT(fnSlot))
#else
# define DEF2( name, descr, key, fnSlot ) \
a = new KAction( i18n(descr), actionCollection, name ); \
a->setShortcut(KShortcut(key));
a->setGlobalShortcut(KShortcut(key));
# define DEF( name, key, fnSlot ) \
a = new KAction( i18n(name), actionCollection, name ); \
a->setShortcut(KShortcut(key));
a->setGlobalShortcut(KShortcut(key));
#endif
// some shortcuts have Tarzan-speech like names, they need extra normal human descriptions with DEF2()