KRunner::RunnerSyntax
#include <KRunner/RunnerSyntax>
Public Member Functions | |
RunnerSyntax (const QString &exampleQuery, const QString &description) | |
RunnerSyntax (const QStringList &exampleQueries, const QString &description) | |
RunnerSyntax (const RunnerSyntax &other) | |
QString | description () const |
QStringList | exampleQueries () const |
RunnerSyntax & | operator= (const RunnerSyntax &rhs) |
Detailed Description
Represents a query prototype that the runner accepts.
These can be created and registered with AbstractRunner::addSyntax 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.
Definition at line 40 of file runnersyntax.h.
Constructor & Destructor Documentation
◆ RunnerSyntax() [1/3]
|
inlineexplicit |
Constructs a RunnerSyntax with one example query.
- Parameters
-
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.
Definition at line 49 of file runnersyntax.h.
◆ RunnerSyntax() [2/3]
|
explicit |
Constructs a RunnerSyntax with multiple example queries.
- Parameters
-
exampleQueries 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. This description should be true for all example queries. In case they differ, consider using multiple syntaxes.
- Since
- 5.106
Definition at line 40 of file runnersyntax.cpp.
◆ RunnerSyntax() [3/3]
|
explicit |
Definition at line 46 of file runnersyntax.cpp.
Member Function Documentation
◆ description()
QString KRunner::RunnerSyntax::description | ( | ) | const |
- Returns
- the user visible description of what the syntax does
Definition at line 64 of file runnersyntax.cpp.
◆ exampleQueries()
QStringList KRunner::RunnerSyntax::exampleQueries | ( | ) | const |
- Returns
- the example queries associated with this Syntax object
Definition at line 59 of file runnersyntax.cpp.
◆ operator=()
RunnerSyntax & KRunner::RunnerSyntax::operator= | ( | const RunnerSyntax & | rhs | ) |
Definition at line 53 of file runnersyntax.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.