3 * \file CustomizedWidgets.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
13 #ifndef CUSTOMIZEDWIDGETS_H
14 #define CUSTOMIZEDWIDGETS_H
17 #include "KeySequence.h"
23 * A lineedit for inputting shortcuts
25 class ShortcutLineEdit : public QLineEdit {
28 ShortcutLineEdit(QWidget * parent);
30 bool eventFilter(QObject*, QEvent* e );
31 lyx::KeySequence const getKeySequence() const;
33 bool event(QEvent* e);
34 void keyPressEvent(QKeyEvent * e);
36 void appendToSequence(QKeyEvent * e);
37 lyx::KeySequence keysequence_;
43 * A lineedit that displays a hint message when there is no
44 * text and not under focus.
46 class SearchLineEdit : public QLineEdit {
49 QString const hintMessage() const;
50 SearchLineEdit(QWidget * parent) : QLineEdit(parent) {}
52 void focusInEvent(QFocusEvent * e);
53 void focusOutEvent(QFocusEvent * e);
57 #endif // CUSTOMIZEDWIDGETS_H