The CommandLineEdit class models the UI for the command line in a graphical script console.
More...
#include <commandlineedit.h>
|
void | signal_commandSubmitted (const std::string &) |
| signal_commandSubmitted is fired when a command is submitted by the user (e.g. after pressing return). More...
|
|
void | signal_historyStepped (const std::string &) |
| signal_historyStepped is fired when the user steps through the command line history (e.g. when pressing the up arrow). More...
|
|
|
| CommandLineEdit (QWidget *parent=nullptr) |
|
virtual | ~CommandLineEdit () |
|
void | clearHistory () |
| clearHistory Wipe the history of commands entered this session. More...
|
|
std::vector< std::string > | getHistory () const |
| getHistory Gets the history of commands entered this session, oldest first. More...
|
|
void | setHistory (const std::vector< std::string > &history) |
| setHistory Sets the history of commands. More...
|
|
void | setCompletionList (const std::vector< std::string > &completionList) |
| setCompletionList Sets the autocomplete list of commands. More...
|
|
The CommandLineEdit class models the UI for the command line in a graphical script console.
◆ CommandLineEdit()
geometrize::dialog::CommandLineEdit::CommandLineEdit |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
149 : QWidget(parent),
d{std::make_unique<CommandLineEdit::CommandLineEditImpl>(
this)}
◆ ~CommandLineEdit()
geometrize::dialog::CommandLineEdit::~CommandLineEdit |
( |
| ) |
|
|
virtual |
◆ changeEvent()
void geometrize::dialog::CommandLineEdit::changeEvent |
( |
QEvent * |
event | ) |
|
|
overrideprotected |
194 if (event->type() == QEvent::LanguageChange) {
195 d->onLanguageChange();
197 QWidget::changeEvent(event);
◆ clearHistory()
void geometrize::dialog::CommandLineEdit::clearHistory |
( |
| ) |
|
clearHistory Wipe the history of commands entered this session.
◆ focusNextPrevChild()
bool geometrize::dialog::CommandLineEdit::focusNextPrevChild |
( |
bool |
next | ) |
|
|
overrideprivatevirtual |
◆ getHistory()
std::vector< std::string > geometrize::dialog::CommandLineEdit::getHistory |
( |
| ) |
const |
getHistory Gets the history of commands entered this session, oldest first.
- Returns
- The history of commands entered this session.
169 return d->getHistory();
◆ keyPressEvent()
void geometrize::dialog::CommandLineEdit::keyPressEvent |
( |
QKeyEvent * |
e | ) |
|
|
overrideprivatevirtual |
159 d->keyPressEvent(e->key());
◆ mouseDoubleClickEvent()
void geometrize::dialog::CommandLineEdit::mouseDoubleClickEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprivatevirtual |
189 d->mouseDoubleClickEvent();
◆ setCompletionList()
void geometrize::dialog::CommandLineEdit::setCompletionList |
( |
const std::vector< std::string > & |
completionList | ) |
|
setCompletionList Sets the autocomplete list of commands.
- Parameters
-
completionList | The completion list to use. |
179 d->setCompletionList(completionList);
◆ setHistory()
void geometrize::dialog::CommandLineEdit::setHistory |
( |
const std::vector< std::string > & |
history | ) |
|
setHistory Sets the history of commands.
- Parameters
-
history | The command history to use. |
174 d->setHistory(history);
◆ signal_commandSubmitted
void geometrize::dialog::CommandLineEdit::signal_commandSubmitted |
( |
const std::string & |
| ) |
|
|
signal |
signal_commandSubmitted is fired when a command is submitted by the user (e.g. after pressing return).
◆ signal_historyStepped
void geometrize::dialog::CommandLineEdit::signal_historyStepped |
( |
const std::string & |
| ) |
|
|
signal |
signal_historyStepped is fired when the user steps through the command line history (e.g. when pressing the up arrow).
The documentation for this class was generated from the following files: