#include <albert/inputhistory.h>
Input history class.
Stores input strings and provides a search iterator.
|
| InputHistory (const QString &path={}) |
|
| ~InputHistory () override |
|
Q_INVOKABLE void | add (const QString &str) |
| Add text to history search.
|
|
Q_INVOKABLE QString | next (const QString &pattern=QString{}) |
| Get next history item matching the pattern.
|
|
Q_INVOKABLE QString | prev (const QString &pattern=QString{}) |
| Get previous history item matching the pattern.
|
|
Q_INVOKABLE void | resetIterator () |
| Reset history search.
|
|
◆ InputHistory()
albert::InputHistory::InputHistory |
( |
const QString & |
path = {} | ) |
|
◆ ~InputHistory()
albert::InputHistory::~InputHistory |
( |
| ) |
|
|
override |
◆ add()
Q_INVOKABLE void albert::InputHistory::add |
( |
const QString & |
str | ) |
|
Add text to history search.
Skips empty strings and drops duplicates.
- Parameters
-
◆ next()
Q_INVOKABLE QString albert::InputHistory::next |
( |
const QString & |
pattern = QString{} | ) |
|
Get next history item matching the pattern.
- Parameters
-
pattern | A pattern used to filter the history items. |
- Returns
- The next history item matching the pattern or empty string.
◆ prev()
Q_INVOKABLE QString albert::InputHistory::prev |
( |
const QString & |
pattern = QString{} | ) |
|
Get previous history item matching the pattern.
- Parameters
-
pattern | A pattern used to filter the history items. |
- Returns
- The previous history item matching the pattern or empty string.
◆ resetIterator()
Q_INVOKABLE void albert::InputHistory::resetIterator |
( |
| ) |
|
The documentation for this class was generated from the following file: