summaryrefslogtreecommitdiffstats
path: root/kdecore/kaccelprivate.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /kdecore/kaccelprivate.h
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kaccelprivate.h')
-rw-r--r--kdecore/kaccelprivate.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/kdecore/kaccelprivate.h b/kdecore/kaccelprivate.h
new file mode 100644
index 000000000..7938aca0c
--- /dev/null
+++ b/kdecore/kaccelprivate.h
@@ -0,0 +1,53 @@
+#ifndef __KACCELPRIVATE_H
+#define __KACCELPRIVATE_H
+
+#include "kkeyserver_x11.h"
+#include <qtimer.h>
+
+class KAccelAction;
+
+/**
+ * @internal
+ */
+class KDECORE_EXPORT KAccelPrivate : public QObject, public KAccelBase
+{
+ Q_OBJECT
+ public:
+ KAccel* m_pAccel;
+ QWidget* m_pWatch;
+ QMap<int, int> m_mapIDToKey;
+ QMap<int, KAccelAction*> m_mapIDToAction;
+ QTimer m_timerShowMenu;
+
+ KAccelPrivate( KAccel* pParent, QWidget* pWatch );
+
+ virtual void setEnabled( bool bEnabled );
+
+ bool setEnabled( const QString& sAction, bool bEnable );
+
+ virtual bool removeAction( const QString& sAction );
+
+ virtual bool emitSignal( KAccelBase::Signal signal );
+ virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key );
+ virtual bool connectKey( const KKeyServer::Key& key );
+ virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key );
+ virtual bool disconnectKey( const KKeyServer::Key& key );
+
+ signals:
+ void menuItemActivated();
+ void menuItemActivated(KAccelAction*);
+
+ private:
+#ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
+ void emitActivatedSignal(KAccelAction*);
+#endif
+
+ private slots:
+ void slotKeyPressed( int id );
+ void slotShowMenu();
+ void slotMenuActivated( int iAction );
+
+ bool eventFilter( QObject* pWatched, QEvent* pEvent ); // virtual method from QObject
+};
+
+#endif // !__KACCELPRIVATE_H