File indexing completed on 2025-01-05 04:35:36
0001 /* 0002 SPDX-License-Identifier: GPL-2.0-or-later 0003 SPDX-FileCopyrightText: 2020 Harald Sitter <sitter@kde.org> 0004 */ 0005 0006 #pragma once 0007 0008 #include <PackageKit/Daemon> 0009 #include <PackageKit/Transaction> 0010 0011 class SambaInstaller : public QObject 0012 { 0013 Q_OBJECT 0014 Q_PROPERTY(bool installing READ isInstalling NOTIFY installingChanged) 0015 Q_PROPERTY(bool installed READ isInstalled NOTIFY installedChanged) 0016 Q_PROPERTY(bool failed READ hasFailed NOTIFY failedChanged) 0017 public: 0018 using QObject::QObject; 0019 0020 public Q_SLOTS: 0021 void install(); 0022 bool isInstalling() const; 0023 bool hasFailed() const; 0024 0025 static bool isInstalled(); 0026 0027 Q_SIGNALS: 0028 void installingChanged(); 0029 void installedChanged(); 0030 void failedChanged(); 0031 0032 private Q_SLOTS: 0033 void packageFinished(PackageKit::Transaction::Exit status); 0034 0035 private: 0036 void setFailed(bool failed); // **un**sets installing if it is set as well 0037 void setInstalling(bool installing); // **un**sets failed if set 0038 0039 bool m_installing = false; 0040 bool m_failed = false; 0041 };