File indexing completed on 2024-05-05 17:45:03

0001 /*
0002     SPDX-FileCopyrightText: 2007 Teemu Rytilahti <tpr@iki.fi>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-only
0005 */
0006 
0007 #pragma once
0008 
0009 #include <KRunner/AbstractRunner>
0010 #include <KServiceAction>
0011 
0012 class WebshortcutRunner : public Plasma::AbstractRunner
0013 {
0014     Q_OBJECT
0015 
0016 public:
0017     WebshortcutRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
0018     ~WebshortcutRunner() override;
0019 
0020     void match(Plasma::RunnerContext &context) override;
0021     void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) override;
0022 
0023 private Q_SLOTS:
0024     void loadSyntaxes();
0025     void configurePrivateBrowsingActions();
0026 
0027 private:
0028     Plasma::QueryMatch m_match;
0029     bool m_filterBeforeRun;
0030 
0031     QChar m_delimiter;
0032     QString m_lastFailedKey;
0033     QString m_lastKey;
0034     QString m_lastProvider;
0035     QRegularExpression m_regex;
0036 
0037     KServiceAction m_privateAction;
0038 
0039     Plasma::RunnerContext m_lastUsedContext;
0040     QString m_defaultKey;
0041 };