Changeset View
Changeset View
Standalone View
Standalone View
templates/runner/src/%{APPNAMELC}.cpp
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> | ||||
3 | | ||||
4 | This library is free software; you can redistribute it and/or | ||||
5 | modify it under the terms of the GNU Lesser General Public | ||||
6 | License as published by the Free Software Foundation; either | ||||
7 | version 2.1 of the License, or (at your option) any later version. | ||||
8 | | ||||
9 | This library is distributed in the hope that it will be useful, | ||||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
12 | Lesser General Public License for more details. | ||||
13 | | ||||
14 | You should have received a copy of the GNU Lesser General Public | ||||
15 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
16 | */ | ||||
17 | | ||||
18 | #include "%{APPNAMELC}.h" | ||||
19 | | ||||
20 | // KF | ||||
21 | #include <KLocalizedString> | ||||
22 | | ||||
23 | %{APPNAME}::%{APPNAME}(QObject *parent, const QVariantList &args) | ||||
24 | : Plasma::AbstractRunner(parent, args) | ||||
25 | { | ||||
26 | setObjectName("%{APPNAME}"); | ||||
27 | } | ||||
28 | | ||||
29 | %{APPNAME}::~%{APPNAME}() | ||||
30 | { | ||||
31 | } | ||||
32 | | ||||
33 | | ||||
34 | void %{APPNAME}::match(Plasma::RunnerContext &context) | ||||
35 | { | ||||
36 | const QString term = context.query(); | ||||
37 | if (term.length() < 3) { | ||||
38 | return; | ||||
39 | } | ||||
40 | | ||||
41 | // TODO | ||||
42 | } | ||||
43 | | ||||
44 | void %{APPNAME}::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) | ||||
45 | { | ||||
46 | Q_UNUSED(context) | ||||
47 | Q_UNUSED(match) | ||||
48 | | ||||
49 | // TODO | ||||
50 | } | ||||
51 | | ||||
52 | K_EXPORT_PLASMA_RUNNER(%{APPNAMELC}, %{APPNAME}) | ||||
53 | | ||||
54 | // needed for the QObject subclass declared as part of K_EXPORT_PLASMA_RUNNER | ||||
55 | #include "%{APPNAMELC}.moc" |