File indexing completed on 2024-04-28 15:29:43
0001 /* 0002 SPDX-FileCopyrightText: 2006-2009 Aaron Seigo <aseigo@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef ABSTRACTRUNNER_P_H 0008 #define ABSTRACTRUNNER_P_H 0009 0010 #include <QReadWriteLock> 0011 #include <QRegularExpression> 0012 0013 #include <KPluginMetaData> 0014 0015 #if KRUNNER_BUILD_DEPRECATED_SINCE(5, 73) 0016 #include <Plasma/DataEngineConsumer> 0017 #endif 0018 0019 namespace Plasma 0020 { 0021 class AbstractRunner; 0022 0023 class AbstractRunnerPrivate 0024 #if KRUNNER_BUILD_DEPRECATED_SINCE(5, 73) 0025 : public DataEngineConsumer 0026 #endif 0027 { 0028 public: 0029 AbstractRunnerPrivate(AbstractRunner *r); 0030 ~AbstractRunnerPrivate(); 0031 void init(); 0032 void init(const KPluginMetaData &pluginMetaData); 0033 #if KRUNNER_BUILD_DEPRECATED_SINCE(5, 72) && KSERVICE_BUILD_DEPRECATED_SINCE(5, 0) 0034 void init(const KService::Ptr service); 0035 #endif 0036 #if KRUNNER_BUILD_DEPRECATED_SINCE(5, 77) 0037 void init(const QString &path); 0038 #endif 0039 AbstractRunner::Priority priority; 0040 #if KRUNNER_BUILD_DEPRECATED_SINCE(5, 81) 0041 AbstractRunner::Speed speed; 0042 #endif 0043 RunnerContext::Types blackListed; 0044 KPluginMetaData runnerDescription; 0045 AbstractRunner *runner; 0046 int fastRuns; 0047 QReadWriteLock speedLock; 0048 QHash<QString, QAction *> actions; 0049 QList<RunnerSyntax> syntaxes; 0050 RunnerSyntax *defaultSyntax; 0051 bool hasRunOptions : 1; 0052 bool suspendMatching : 1; 0053 int minLetterCount = 0; 0054 QRegularExpression matchRegex; 0055 bool hasMatchRegex = false; 0056 bool hasUniqueResults = false; 0057 bool hasWeakResults = false; 0058 }; 0059 0060 } // namespace Plasma 0061 #endif