27 lines
499 B
C++
27 lines
499 B
C++
#ifndef HISTORYLINEEDIT_H
|
|
#define HISTORYLINEEDIT_H
|
|
|
|
#include <QtGui>
|
|
#include <QLineEdit>
|
|
|
|
class HistoryLineEdit : public QLineEdit
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit HistoryLineEdit(QWidget* parent = 0);
|
|
void keyPressEvent(QKeyEvent* event);
|
|
void addLineToHistory(QString parLine);
|
|
void setFocus();
|
|
|
|
signals:
|
|
void keyPressed(int parKey);
|
|
|
|
private:
|
|
QList<QString> mCmdHistory;
|
|
int mCmdIndex;
|
|
bool bSixPressed;
|
|
|
|
};
|
|
|
|
#endif // HISTORYLINEEDIT_H
|