📄 commandline.h
字号:
#ifndef __COMMANDLINE_H__#define __COMMANDLINE_H__#include <qwidget.h>class QTextEdit;class QLineEdit;class QComboBox;namespace gui {/** Class representing command window<br> The window allow editation of command and show output of previously executed commands*/class CommandLine : public QWidget { Q_OBJECTpublic: CommandLine(QWidget *parent=0); void setAutoCompleter(const QStringList &words); ~CommandLine();public slots: void addCommand(const QString &command); void addError(const QString &message); void addString(const QString &str); void addStringHtml(const QString &str); void clearWindow(); void execute();signals: /** Signal emitted when command is executed from this command window */ void commandExecuted(QString);private: void moveCursorToEnd();private: /** Console widget */ QTextEdit *out; /** Commandline widget */ QLineEdit *cmd; /** History widget */ QComboBox *history;};} // namespace gui#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -