File indexing completed on 2024-05-12 05:38:20
0001 /* 0002 SPDX-FileCopyrightText: 2008 David Edmundson <kde@davidedmundson.co.uk> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <KFilePlacesModel> 0010 #include <KRunner/AbstractRunner> 0011 0012 class PlacesRunner : public KRunner::AbstractRunner 0013 { 0014 Q_OBJECT 0015 0016 public: 0017 PlacesRunner(QObject *parent, const KPluginMetaData &metaData); 0018 0019 void match(KRunner::RunnerContext &context) override; 0020 void run(const KRunner::RunnerContext &context, const KRunner::QueryMatch &action) override; 0021 void init() override; 0022 0023 private: 0024 Q_INVOKABLE void openDevice(const QString &udi); 0025 KFilePlacesModel *m_places = nullptr; 0026 QString m_pendingUdi; 0027 };