This class implements the history for the Python console. More...
#include <PythonConsole.h>
Public Member Functions | |
| void | append (const QString &inputLine) |
| ConsoleHistory () | |
| void | doScratch (void) |
| doScratch removes the tail of the history list, starting from the index marked lately. More... | |
| void | first () |
| bool | isEmpty () const |
| void | markScratch (void) |
| markScratch stores the current end index of the history list. More... | |
| bool | more () |
| bool | next () |
| next switches the history pointer to the next item. More... | |
| bool | prev (const QString &prefix=QString()) |
| prev switches the history pointer to the previous item. More... | |
| void | restart () |
| restart resets the history access to the latest item. More... | |
| const QString & | value () const |
| const QStringList & | values () const |
| ~ConsoleHistory () | |
This class implements the history for the Python console.
| ConsoleHistory::ConsoleHistory | ( | ) |
| ConsoleHistory::~ConsoleHistory | ( | ) |
| void ConsoleHistory::append | ( | const QString & | inputLine | ) |
Referenced by Gui::PythonConsole::keyPressEvent(), and Gui::PythonConsole::printStatement().
| void ConsoleHistory::doScratch | ( | void | ) |
doScratch removes the tail of the history list, starting from the index marked lately.
References restart().
| void ConsoleHistory::first | ( | ) |
| bool ConsoleHistory::isEmpty | ( | void | ) | const |
Referenced by Gui::PythonConsole::contextMenuEvent(), and Gui::PythonConsole::onCopyHistory().
| void ConsoleHistory::markScratch | ( | void | ) |
markScratch stores the current end index of the history list.
Note: with simply remembering a start index, it does not work to nest scratch regions. However, just replace the index keeping by a stack - in case this is be a concern.
| bool ConsoleHistory::more | ( | ) |
| bool ConsoleHistory::next | ( | ) |
next switches the history pointer to the next item.
While searching the next item, the routine respects the search prefix set by prev().
Referenced by Gui::PythonConsole::keyPressEvent().
| bool ConsoleHistory::prev | ( | const QString & | prefix = QString() | ) |
prev switches the history pointer to the previous item.
The optional parameter prefix allows to search the history selectively for commands that start with a certain character sequence.
| prefix | - prefix string for searching backwards in history, empty string by default |
Referenced by Gui::PythonConsole::keyPressEvent().
| void ConsoleHistory::restart | ( | void | ) |
restart resets the history access to the latest item.
Referenced by doScratch(), and Gui::PythonConsole::keyPressEvent().
| const QString & ConsoleHistory::value | ( | ) | const |
Referenced by PathScripts.PathProperty.Property::displayString(), PathScripts.PathProperty.PropertyQuantity::displayString(), PathScripts.PathSetupSheetOpPrototype.Property::displayString(), PathScripts.PathSetupSheetOpPrototype.PropertyQuantity::displayString(), Mod.PartDesign.WizardShaft.SegmentFunction.SegmentFunction::evaluate(), PathScripts.PathProperty.Property::getValue(), PathScripts.PathSetupSheetOpPrototype.Property::getValue(), Gui::PythonConsole::keyPressEvent(), Mod.PartDesign.WizardShaft.SegmentFunction.IntervalFunction::lowervalue(), PathScripts.PathProperty.Property::setValue(), and PathScripts.PathSetupSheetOpPrototype.Property::setValue().
| const QStringList & ConsoleHistory::values | ( | ) | const |
Referenced by Mod.PartDesign.WizardShaft.SegmentFunction.IntervalFunction::addInterval(), Gui::PythonConsole::createMimeDataFromSelection(), Gui::PythonConsole::onSaveHistoryAs(), ifc4.ifcstructuralloadconfiguration::validlistsize(), and Mod.PartDesign.WizardShaft.SegmentFunction.IntervalFunction::value().