File indexing completed on 2024-05-19 04:03:21

0001 /*
0002     SPDX-FileCopyrightText: 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef SOLID_AC_PLUGGED_JOB_H
0008 #define SOLID_AC_PLUGGED_JOB_H
0009 
0010 #include <Solid/Job>
0011 
0012 #include "solid_export.h"
0013 
0014 namespace Solid
0015 {
0016 class AcPluggedJobPrivate;
0017 class SOLID_EXPORT AcPluggedJob : public Job
0018 {
0019     Q_OBJECT
0020     Q_PROPERTY(bool plugged READ isPlugged NOTIFY result)
0021 
0022 public:
0023     explicit AcPluggedJob(QObject *parent = nullptr);
0024 
0025     bool isPlugged() const;
0026 
0027 private Q_SLOTS:
0028     void doStart() override;
0029 
0030     /**
0031      * We have to re-declare the signal because
0032      * if not, Q_PROPERTY wouldn't work.
0033      */
0034 Q_SIGNALS:
0035     void result(Solid::Job *);
0036 
0037 private:
0038     Q_DECLARE_PRIVATE(AcPluggedJob)
0039 };
0040 } // Solid namespace
0041 #endif // SOLID_AC_PLUGGED_JOB_H