setGlobalShortcut() for global shortcuts
svn path=/trunk/KDE/kdebase/workspace/; revision=568236
This commit is contained in:
parent
b5d2f22925
commit
bffa0d7909
1 changed files with 4 additions and 4 deletions
|
@ -1,19 +1,19 @@
|
||||||
#ifndef NOSLOTS
|
#ifndef NOSLOTS
|
||||||
# define DEF2( name, descr, key, fnSlot ) \
|
# define DEF2( name, descr, key, fnSlot ) \
|
||||||
a = new KAction( i18n(descr), actionCollection, name ); \
|
a = new KAction( i18n(descr), actionCollection, name ); \
|
||||||
a->setShortcut(KShortcut(key)); \
|
a->setGlobalShortcut(KShortcut(key)); \
|
||||||
connect(a, SIGNAL(triggered(bool)), SLOT(fnSlot))
|
connect(a, SIGNAL(triggered(bool)), SLOT(fnSlot))
|
||||||
# define DEF( name, key, fnSlot ) \
|
# define DEF( name, key, fnSlot ) \
|
||||||
a = new KAction( i18n(name), actionCollection, name ); \
|
a = new KAction( i18n(name), actionCollection, name ); \
|
||||||
a->setShortcut(KShortcut(key)); \
|
a->setGlobalShortcut(KShortcut(key)); \
|
||||||
connect(a, SIGNAL(triggered(bool)), SLOT(fnSlot))
|
connect(a, SIGNAL(triggered(bool)), SLOT(fnSlot))
|
||||||
#else
|
#else
|
||||||
# define DEF2( name, descr, key, fnSlot ) \
|
# define DEF2( name, descr, key, fnSlot ) \
|
||||||
a = new KAction( i18n(descr), actionCollection, name ); \
|
a = new KAction( i18n(descr), actionCollection, name ); \
|
||||||
a->setShortcut(KShortcut(key));
|
a->setGlobalShortcut(KShortcut(key));
|
||||||
# define DEF( name, key, fnSlot ) \
|
# define DEF( name, key, fnSlot ) \
|
||||||
a = new KAction( i18n(name), actionCollection, name ); \
|
a = new KAction( i18n(name), actionCollection, name ); \
|
||||||
a->setShortcut(KShortcut(key));
|
a->setGlobalShortcut(KShortcut(key));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// some shortcuts have Tarzan-speech like names, they need extra normal human descriptions with DEF2()
|
// some shortcuts have Tarzan-speech like names, they need extra normal human descriptions with DEF2()
|
||||||
|
|
Loading…
Reference in a new issue