Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef QMITKHOTKEYLINEEDIT_H_
00020 #define QMITKHOTKEYLINEEDIT_H_
00021
00022 #include <QLineEdit>
00023 #include <QKeySequence>
00024
00025 #include "QmitkExtExports.h"
00026
00027 class QmitkExt_EXPORT QmitkHotkeyLineEdit : public QLineEdit
00028 {
00029 Q_OBJECT
00030
00031 public:
00032 static const std::string TOOLTIP;
00033
00034 QmitkHotkeyLineEdit(QWidget* parent = 0);
00035 QmitkHotkeyLineEdit(const QKeySequence& _QKeySequence, QWidget* parent = 0);
00036 QmitkHotkeyLineEdit(const QString& _QString, QWidget* parent = 0);
00037
00038 virtual void SetKeySequence(const QKeySequence& _QKeySequence);
00039 virtual void SetKeySequence(const QString& _QKeySequenceAsString);
00040 virtual QKeySequence GetKeySequence();
00041 virtual QString GetKeySequenceAsString();
00042 bool Matches( QKeyEvent * event );
00043 protected slots:
00044 void LineEditTextChanged(const QString &);
00045 protected:
00046 virtual void keyPressEvent ( QKeyEvent * event );
00047 void Init();
00048 protected:
00049 QKeySequence m_KeySequence;
00050
00051 };
00052
00053 #endif