| # kdecore Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# 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
    00015 class CodeMod
    00016 {
    00017  public:
    00021         uchar code;
    00025         uint mod;
    00026
    00030         bool operator < ( const CodeMod& b ) const
    00031         {
    00032                 if( code < b.code ) return true;
    00033                 if( code == b.code && mod < b.mod ) return true;
    00034                 return false;
    00035         }
    00036 };
    00037 typedef QMap<CodeMod, KAccelAction*> CodeModMap;
    00038
    00042 class KGlobalAccelPrivate : public QWidget, public KAccelBase
    00043 {
    00044         friend class KGlobalAccel;
    00045         Q_OBJECT
    00046  public:
    00047         KGlobalAccelPrivate();
    00048         virtual ~KGlobalAccelPrivate();
    00049
    00050         virtual void setEnabled( bool );
    00051
    00052         virtual bool emitSignal( Signal );
    00053         virtual bool connectKey( KAccelAction&, const KKeyServer::Key& );
    00054         virtual bool connectKey( const KKeyServer::Key& );
    00055         virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& );
    00056         virtual bool disconnectKey( const KKeyServer::Key& );
    00057
    00058  signals:
    00059         void activated();
    00060         void activated( int );
    00061         void activated( const QString& sAction, const QString& sDesc, const KKeySequence& seq );
    00062
    00063  protected:
    00064         CodeModMap m_rgCodeModToAction;
    00065
    00069         bool grabKey( const KKeyServer::Key&, bool bGrab, KAccelAction* );
    00070
    00078         virtual bool x11Event( XEvent* );
    00079         void x11MappingNotify();
    00080         bool x11KeyPress( const XEvent *pEvent );
    00081         void activate( KAccelAction* pAction, const KKeySequence& seq );
    00082
    00083  protected slots:
    00084         void slotActivated( int iAction );
    00085 };
    00086
    00087 #endif // _KGLOBALACCEL_X11_H

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:46:31 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001