kshortcutdialog.h
00001 #ifndef _KSHORTCUTDIALOG_H
00002 #define _KSHORTCUTDIALOG_H
00003
00004 #include <qlabel.h>
00005 #include <kdialog.h>
00006 #include <kshortcut.h>
00007
00008 class QCheckBox;
00009 class QRadioButton;
00010
00011 class KShortcutBox : public QLabel
00012 {
00013 Q_OBJECT
00014 public:
00015 KShortcutBox( const KKeySequence& seq, QWidget* parent = 0, const char* name = 0 );
00016
00017 const KKeySequence& seq() const { return m_seq; }
00018 void setSeq( const KKeySequence& );
00019
00020 protected:
00021 KKeySequence m_seq;
00022 };
00023
00024 class KShortcutDialog : public KDialog
00025 {
00026 Q_OBJECT
00027 public:
00028 KShortcutDialog( const KShortcut& cut, bool bQtShortcut, QWidget* parent = 0, const char* name = 0 );
00029 ~KShortcutDialog();
00030
00031 const KShortcut& cut() const { return m_cut; }
00032
00033 protected:
00034 bool m_bQtShortcut;
00035 bool m_bGrabKeyboardOnFocusIn;
00036 bool m_bKeyboardGrabbed;
00037 KShortcut m_cut;
00038 QRadioButton* m_prbSeq[2];
00039 KShortcutBox* m_peditSeq[2];
00040 QCheckBox* m_pcbMultiKey[2];
00041 QPushButton* m_pcmdOK;
00042 QPushButton* m_pcmdCancel;
00043 QCheckBox* m_pcbAutoClose;
00044 uint m_iSeq;
00045 uint m_iKey;
00046
00047 void selectSeq( uint );
00048 void clearSeq( uint );
00049
00050 protected slots:
00051 void slotSeq0Selected();
00052 void slotSeq1Selected();
00053 void slotClearSeq0();
00054 void slotClearSeq1();
00055
00056 virtual void accept();
00057
00058 private:
00059 void initGUI();
00060 #ifdef Q_WS_X11
00061 virtual bool x11Event( XEvent *pEvent );
00062 void x11EventKeyPress( XEvent *pEvent );
00063 #endif
00064
00065 protected:
00066 virtual void virtual_hook( int id, void* data );
00067 private:
00068 class KShortcutDialogPrivate* d;
00069 };
00070
00071 #endif // !_KSHORTCUTDIALOG_H
This file is part of the documentation for kdelibs Version 3.1.0.