This file is indexed.

/usr/include/KF5/KRunner/krunner/runnersyntax.h is in libkf5runner-dev 5.44.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
 *   Copyright 2009 Aaron Seigo <aseigo@kde.org>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Library General Public License as
 *   published by the Free Software Foundation; either version 2, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details
 *
 *   You should have received a copy of the GNU Library General Public
 *   License along with this program; if not, write to the
 *   Free Software Foundation, Inc.,
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef PLASMA_RUNNERSYNTAX_H
#define PLASMA_RUNNERSYNTAX_H

#include <QtCore/QStringList>

#include "krunner_export.h"

namespace Plasma
{

class RunnerSyntaxPrivate;
/**
 * @class RunnerSyntax runnersyntax.h <KRunner/RunnerSyntax>
 * @since 4.3
 *
 * 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
 */
class KRUNNER_EXPORT RunnerSyntax
{
    public:
        /**
         * Constructs a simple syntax object
         *
         * @param exampleQuery an example of the query, with :q: placed wherever
         *                   search term text might appear. e.g. if the runner
         *                   accepts "keyword some random text" then the value
         *                   of this parameter should be "keyword :q:"
         * @param descrition A description of what the described syntax does from
         *                 the user's point of view.
         */
        RunnerSyntax(const QString &exampleQuery, const QString &description);

        /**
         * Copy constructor
         */
        RunnerSyntax(const RunnerSyntax &other);

        ~RunnerSyntax();

        /**
         * Assignment operator
         */
        RunnerSyntax &operator=(const RunnerSyntax &rhs);

        /**
         * Adds a synonymous example query to this Syntax. Some runners may
         * accept multiple formulations of keywords to trigger the same behaviour.
         * This allows the runner to show these relationships by grouping the
         * example queries into one Syntax object
         *
         * @param exampleQuery an example of the query, with :q: placed wherever
         *                   search term text might appear. e.g. if the runner
         *                   accepts "keyword some random text" then the value
         *                   of this parameter should be "keyword :q:"
         */
        void addExampleQuery(const QString &exampleQuery);

        /**
         * @return the example queries associated with this Syntax object
         */
        QStringList exampleQueries() const;

        /**
         * @return the example queries associated with this Syntax object, with
         * the searchTermDescription replacing instances of :q:. Used for showing
         * the queries in the user interface.
         */
        QStringList exampleQueriesWithTermDescription() const;

        /**
         * Sets the description for the syntax, describing what it does from
         * the user's point of view.
         */
        void setDescription(const QString &description);

        /**
         * @return the description of what the syntax does from the user's
         *         point of view
         */
        QString description() const;

        /**
         * Sets the text that should be used to replace instances of :q:
         * in the text. By default this is the generic phrase "search term".
         * If the syntax expects a specific kind of input, it may be defined
         * here. A syntax used by a runner that changes the brightness of the display 
         * may set this to "brightness" for instance.
         */
        void setSearchTermDescription(const QString &description);

        /**
         * @return a description of the search term for this syntax
         */
        QString searchTermDescription() const;

    private:
        RunnerSyntaxPrivate *const d;
};

} // namespace Plasma

#endif // multiple inclusion guard