]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/CustomizedWidgets.h
do what the FIXME suggested
[lyx.git] / src / frontends / qt4 / CustomizedWidgets.h
index dde9cf0bea8b328822490492bcd00d0586656ad7..6b3226c3e4f20821ca0d6ec6a6879bd057a5a7d8 100644 (file)
 #ifndef CUSTOMIZEDWIDGETS_H
 #define CUSTOMIZEDWIDGETS_H
 
-#include <QEvent>
-#include <QCloseEvent>
 #include <QLineEdit>
+#include "KeySequence.h"
+
+class QEvent;
+class QKeyEvent;
+
+namespace lyx {
+namespace frontend {
 
 /**
  * A lineedit for inputting shortcuts
 class ShortcutLineEdit : public QLineEdit {
        Q_OBJECT
 public:
-       ShortcutLineEdit(QWidget * parent) : QLineEdit(parent) {}
+       ShortcutLineEdit(QWidget * parent);
+       void reset();
+       bool eventFilter(QObject*, QEvent* e );
+       lyx::KeySequence const getKeySequence() const;
 protected Q_SLOTS:
-       void keyPressEvent(QKeyEvent * e);
        bool event(QEvent* e);
+       void keyPressEvent(QKeyEvent * e);
+private:
+       void appendToSequence(QKeyEvent * e);
+       lyx::KeySequence keysequence_;
+       bool has_cursor_;
 };
 
-
-/**
-  * A lineedit that displays a hint message when there is no
-  * text and not under focus.
-  */
-class SearchLineEdit : public QLineEdit {
-       Q_OBJECT
-public:
-       QString const hintMessage();
-       SearchLineEdit(QWidget * parent) : QLineEdit(parent) {}
-protected Q_SLOTS:
-       void focusInEvent(QFocusEvent * e);
-       void focusOutEvent(QFocusEvent * e);
-};
-
+} // namespace frontend
+} // namespace lyx
 
 #endif // CUSTOMIZEDWIDGETS_H