QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
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 <QLineEdit>
26#include <QMetaType>
27#include <QStringList>
28
33class QCADGUI_EXPORT RCommandLine: public QLineEdit {
34
35Q_OBJECT
36
37signals:
39 void commandConfirmed(const QString& command);
40 void completeCommand(const QString& command);
41 void escape();
42
43public:
44 RCommandLine(QWidget* parent = 0);
45 QString getLastCommand();
46 void appendCommand(const QString& cmd);
47 QStringList getHistory() const;
48 void setHistory(QStringList& h);
49 void triggerCommand(const QString& cmd) {
50 emit commandConfirmed(cmd);
51 }
52
53public slots:
54 void paste();
55
56protected:
57 virtual void keyPressEvent(QKeyEvent* event);
58 virtual bool event(QEvent* event);
59
60private:
61 QStringList history;
62 QStringList::iterator it;
63};
64
66
67#endif
Q_DECLARE_METATYPE(RMath *)
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RCommandLine.h:33
void clearHistory()
void triggerCommand(const QString &cmd)
Definition RCommandLine.h:49
QStringList history
Definition RCommandLine.h:61
void completeCommand(const QString &command)
void commandConfirmed(const QString &command)
QStringList::iterator it
Definition RCommandLine.h:62
void paste(void docSource, void diDestination, void offset, void scale, void rotation, void flipHorizontal, void flipVertical, void toCurrentLayer, void overwriteLayers, void overwriteBlocks)
Pastes the given document into the current document or into the second given document.
Definition simple_modify.js:34
#define QCADGUI_EXPORT
Definition gui_global.h:10