Plasma5Support

hotplugengine.h
1/*
2 SPDX-FileCopyrightText: 2007 Menard Alexis <darktears31@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QObject>
10
11#include <Plasma5Support/DataEngine>
12#include <Plasma5Support/Service>
13
14#include <Solid/Predicate>
15
16class KDirWatch;
17
18/**
19 * This class is connected with solid, filter devices and provide signal with source for applet in Plasma
20 */
22{
24
25public:
27 ~HotplugEngine() override;
28 void init();
29 Plasma5Support::Service *serviceForSource(const QString &source) override;
30
31protected Q_SLOTS:
32 void onDeviceAdded(const QString &udi);
33 void onDeviceRemoved(const QString &udi);
34
35private:
36 void handleDeviceAdded(Solid::Device &dev, bool added = true);
37 void findPredicates();
38 QStringList predicatesForDevice(Solid::Device &device) const;
39 QVariantList actionsForPredicates(const QStringList &predicates) const;
40
41private Q_SLOTS:
42 void processNextStartupDevice();
43 void updatePredicates(const QString &path);
44
45private:
49 Solid::Predicate m_encryptedPredicate;
50 KDirWatch *m_dirWatch;
51};
This class is connected with solid, filter devices and provide signal with source for applet in Plasm...
Plasma5Support::Service * serviceForSource(const QString &source) override
Data provider for plasmoids (Plasma plugins)
Definition dataengine.h:45
This class provides a generic API for write access to settings or services.
Definition service.h:78
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.