QCAD
Open Source 2D CAD
RCommandLine.h
Go to the documentation of this file.
1 
20 #ifndef RCOMMANDLINE_H_
21 #define RCOMMANDLINE_H_
22 
23 #include "gui_global.h"
24 
25 #include <QEvent>
26 #include <QLineEdit>
27 #include <QMetaType>
28 #include <QStringList>
29 
34 class QCADGUI_EXPORT RCommandLine: public QLineEdit {
35 
36 Q_OBJECT
37 
38 signals:
39  void clearHistory();
40  void multiLinePaste();
41  void commandConfirmed(const QString& command);
42  void completeCommand(const QString& command);
43  void escape();
44 
45 public:
46  RCommandLine(QWidget* parent = 0);
47  QString getLastCommand();
48  void appendCommand(const QString& cmd);
49  QStringList getHistory() const;
50  void setHistory(QStringList& h);
51 
52 protected:
53  virtual void keyPressEvent(QKeyEvent* event);
54  virtual bool event(QEvent* event);
55 
56 private:
57  QStringList history;
58  QStringList::iterator it;
59 };
60 
62 
63 #endif
Copyright (c) 2011-2016 by Andrew Mustun.
Definition: RCommandLine.h:34
QStringList::iterator it
Definition: RCommandLine.h:58
#define QCADGUI_EXPORT
Definition: gui_global.h:10
Q_DECLARE_METATYPE(RMath *)
QStringList history
Definition: RCommandLine.h:57