kaccelprivate.h00001 #ifndef __KACCELPRIVATE_H
00002 #define __KACCELPRIVATE_H
00003
00004 #include "kkeyserver_x11.h"
00005 #include <qtimer.h>
00006
00007 class KAccelAction;
00008
00012 class KDECORE_EXPORT KAccelPrivate : public QObject, public KAccelBase
00013 {
00014 Q_OBJECT
00015 public:
00016 KAccel* m_pAccel;
00017 QWidget* m_pWatch;
00018 QMap<int, int> m_mapIDToKey;
00019 QMap<int, KAccelAction*> m_mapIDToAction;
00020 QTimer m_timerShowMenu;
00021
00022 KAccelPrivate( KAccel* pParent, QWidget* pWatch );
00023
00024 virtual void setEnabled( bool bEnabled );
00025
00026 bool setEnabled( const QString& sAction, bool bEnable );
00027
00028 virtual bool removeAction( const QString& sAction );
00029
00030 virtual bool emitSignal( KAccelBase::Signal signal );
00031 virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key );
00032 virtual bool connectKey( const KKeyServer::Key& key );
00033 virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key );
00034 virtual bool disconnectKey( const KKeyServer::Key& key );
00035
00036 signals:
00037 void menuItemActivated();
00038 void menuItemActivated(KAccelAction*);
00039
00040 private:
00041 #ifndef Q_WS_WIN
00042 void emitActivatedSignal(KAccelAction*);
00043 #endif
00044
00045 private slots:
00046 void slotKeyPressed( int id );
00047 void slotShowMenu();
00048 void slotMenuActivated( int iAction );
00049
00050 bool eventFilter( QObject* pWatched, QEvent* pEvent );
00051 };
00052
00053 #endif // !__KACCELPRIVATE_H
|