KRunner 5.109.0
|
#include <KRunner/RunnerSyntax>
Public Member Functions | |
RunnerSyntax (const QString &exampleQuery, const QString &description) | |
Constructs a simple syntax object. | |
RunnerSyntax (const QStringList &exampleQueries, const QString &description) | |
Constructs a syntax object. | |
RunnerSyntax (const RunnerSyntax &other) | |
Copy constructor. | |
QString | description () const |
QStringList | exampleQueries () const |
RunnerSyntax & | operator= (const RunnerSyntax &rhs) |
Assignment operator. | |
Represents a query prototype that the runner accepts. These can be created and registered with AbstractRunner::addSyntax(Syntax &) to allow applications to show to the user what the runner is currently capable of doing.
Lets say the runner has a trigger word and then the user can type anything after that. In that case you could use ":q:" as a placeholder, which will get expanded to i18n("search term") and be put in brackets.
But if the query the user has to enter is sth. specific like a program, url or file you should use a custom placeholder to make it easier to understand.
Plasma::RunnerSyntax::RunnerSyntax | ( | const QString & | exampleQuery, |
const QString & | description | ||
) |
Constructs a simple syntax object.
exampleQuery | See the class description for examples and placeholder conventions. |
description | A description of what the described syntax does from the user's point of view. |
|
explicit |
Constructs a syntax object.
exampleQuery | See the class description for examples and placeholder conventions. |
description | A description of what the described syntax does from the user's point of view. |
Plasma::RunnerSyntax::RunnerSyntax | ( | const RunnerSyntax & | other | ) |
Copy constructor.
QString Plasma::RunnerSyntax::description | ( | ) | const |
QStringList Plasma::RunnerSyntax::exampleQueries | ( | ) | const |
RunnerSyntax & Plasma::RunnerSyntax::operator= | ( | const RunnerSyntax & | rhs | ) |
Assignment operator.