• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
kglobalaccel_x11.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef _KGLOBALACCEL_X11_H
21 #define _KGLOBALACCEL_X11_H
22 
23 #include <tqmap.h>
24 #include <tqwidget.h>
25 
26 #include "kaccelbase.h"
27 #include "kkeyserver_x11.h"
28 #include "kshortcut.h"
29 
33 class KGlobalAccelPrivate : public TQWidget, public KAccelBase
34 {
35  friend class KGlobalAccel;
36  Q_OBJECT
37  public:
38  KGlobalAccelPrivate();
39  virtual ~KGlobalAccelPrivate();
40 
41  virtual void setEnabled( bool bEnabled );
42 
43  virtual bool emitSignal( Signal signal );
44  virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key );
45  virtual bool connectKey( const KKeyServer::Key& key );
46  virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key );
47  virtual bool disconnectKey( const KKeyServer::Key& key );
48 
49  protected:
54  class CodeMod
55  {
56  public:
60  uchar code;
64  uint mod;
65 
69  bool operator < ( const CodeMod& b ) const
70  {
71  if( code < b.code ) return true;
72  if( code == b.code && mod < b.mod ) return true;
73  return false;
74  }
75  };
76  typedef TQMap<CodeMod, KAccelAction*> CodeModMap;
77 
78  CodeModMap m_rgCodeModToAction;
79 
83  bool grabKey( const KKeyServer::Key&, bool bGrab, KAccelAction* );
84 
92  virtual bool x11Event( XEvent* );
93  void x11MappingNotify();
94  bool x11KeyPress( const XEvent *pEvent );
95  void activate( KAccelAction* pAction, const KKeySequence& seq );
96  virtual bool isEnabledInternal() const;
97  static void blockShortcuts( bool block );
98  void disableBlocking( bool disable );
99  void suspend( bool s );
100 
101  protected slots:
102  void slotActivated( int iAction );
103  void fakeKeyPressed(unsigned int keyCode);
104  private:
105  bool m_blocked;
106  bool m_blockingDisabled;
107  bool m_suspended;
108 };
109 
110 #endif // _KGLOBALACCEL_X11_H
KKeySequence
A KKeySequence object holds a sequence of up to 4 keys.
Definition: kshortcut.h:288
KKeyServer::Key
Represents a key press.
Definition: kkeyserver_x11.h:137
KGlobalAccel
KGlobalAccel allows you to have global accelerators that are independent of the focused window...
Definition: kglobalaccel.h:45
KGlobalAccel::setEnabled
void setEnabled(bool bEnabled)
Enables or disables the KGlobalAccel.
Definition: kglobalaccel.cpp:65

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.11
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |