7#ifndef PLASMA_RUNNERSYNTAX_H
8#define PLASMA_RUNNERSYNTAX_H
13#include "krunner_export.h"
17class RunnerSyntaxPrivate;
51 RunnerSyntax(
const QString &exampleQuery,
const QString &description);
61 explicit RunnerSyntax(
const QStringList &exampleQueries,
const QString &description);
75#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 106)
85 KRUNNER_DEPRECATED_VERSION(5, 106,
"Use constructor taking example query QStringList")
86 void addExampleQuery(const QString &exampleQuery);
94#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 76)
102 KRUNNER_DEPRECATED_VERSION(5, 76,
"The descriptions should be directly set when creating the example query. Use exampleQueries() instead.")
103 QStringList exampleQueriesWithTermDescription() const;
106#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 106)
112 KRUNNER_DEPRECATED_VERSION(5, 106,
"This should only be set when constructing the syntax")
113 void setDescription(const QString &description);
122#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 76)
131 KRUNNER_DEPRECATED_VERSION(
134 "Set the description directly when creating the example query. Use <my query description> instead of :q: when creating the string")
135 void setSearchTermDescription(const QString &description);
138#if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 76)
143 KRUNNER_DEPRECATED_VERSION(5, 76,
"Feature is obsolete, the search term description should be set inside of the example query directly")
144 QString searchTermDescription() const;
148 std::unique_ptr<RunnerSyntaxPrivate>
const d;
153#if !KRUNNER_ENABLE_DEPRECATED_SINCE(5, 91)
Definition runnersyntax.h:42
RunnerSyntax(const QStringList &exampleQueries, const QString &description)
Constructs a syntax object.
QStringList exampleQueries() const
QString description() const
RunnerSyntax(const QString &exampleQuery, const QString &description)
Constructs a simple syntax object.
RunnerSyntax & operator=(const RunnerSyntax &rhs)
Assignment operator.
RunnerSyntax(const RunnerSyntax &other)
Copy constructor.