File indexing completed on 2024-05-05 05:37:10
0001 /* 0002 * SPDX-FileCopyrightText: 2008 Aaron Seigo <aseigo@kde.org> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef SERVICEVIEWER_H 0008 #define SERVICEVIEWER_H 0009 0010 #include "ui_serviceviewer.h" 0011 #include <QDialog> 0012 0013 class KJob; 0014 class QPushButton; 0015 0016 namespace Plasma5Support 0017 { 0018 class DataEngine; 0019 class Service; 0020 } // namespace Plasma5Support 0021 0022 class ServiceViewer : public QDialog, public Ui::ServiceViewer 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 ServiceViewer(Plasma5Support::DataEngine *engine, const QString &m_source, QWidget *parent = nullptr); 0028 ~ServiceViewer() override; 0029 0030 private: 0031 void updateJobCount(int numberOfJobs); 0032 0033 private Q_SLOTS: 0034 void updateOperations(); 0035 void startOperation(); 0036 void operationSelected(const QString &operation); 0037 void operationResult(KJob *job); 0038 void engineDestroyed(); 0039 0040 private: 0041 Plasma5Support::DataEngine *m_engine; 0042 Plasma5Support::Service *m_service; 0043 QString m_source; 0044 int m_operationCount; 0045 QPushButton *m_operationButton; 0046 }; 0047 0048 #endif