kdecore Library API Documentation

kglobalaccel_x11.h

00001 #ifndef _KGLOBALACCEL_X11_H
00002 #define _KGLOBALACCEL_X11_H
00003 
00004 #include <qmap.h>
00005 #include <qwidget.h>
00006 
00007 #include "kaccelbase.h"
00008 #include "kkeyserver_x11.h"
00009 #include "kshortcut.h"
00010 
00014 class KGlobalAccelPrivate : public QWidget, public KAccelBase
00015 {
00016     friend class KGlobalAccel;
00017     Q_OBJECT
00018  public:
00019     KGlobalAccelPrivate();
00020     virtual ~KGlobalAccelPrivate();
00021 
00022     virtual void setEnabled( bool );
00023 
00024     virtual bool emitSignal( Signal );
00025     virtual bool connectKey( KAccelAction&, const KKeyServer::Key& );
00026     virtual bool connectKey( const KKeyServer::Key& );
00027     virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& );
00028     virtual bool disconnectKey( const KKeyServer::Key& );
00029 
00030  protected:
00035     class CodeMod
00036     {
00037      public:
00041         uchar code;
00045         uint mod;
00046     
00050         bool operator < ( const CodeMod& b ) const
00051         {
00052             if( code < b.code ) return true;
00053             if( code == b.code && mod < b.mod ) return true;
00054             return false;
00055         }
00056     };
00057     typedef QMap<CodeMod, KAccelAction*> CodeModMap;
00058 
00059     CodeModMap m_rgCodeModToAction;
00060 
00064     bool grabKey( const KKeyServer::Key&, bool bGrab, KAccelAction* );
00065 
00073     virtual bool x11Event( XEvent* );
00074     void x11MappingNotify();
00075     bool x11KeyPress( const XEvent *pEvent );
00076     void activate( KAccelAction* pAction, const KKeySequence& seq );
00077 
00078  protected slots:
00079     void slotActivated( int iAction );
00080 };
00081 
00082 #endif // _KGLOBALACCEL_X11_H
KDE Logo
This file is part of the documentation for kdecore Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Nov 27 13:41:14 2004 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003