File indexing completed on 2024-05-12 05:37:09
0001 /* 0002 SPDX-FileCopyrightText: 2008 Alain Boyer <alainboyer@gmail.com> 0003 SPDX-FileCopyrightText: 2009 Matthieu Gallien <matthieu_gallien@yahoo.fr> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only 0006 */ 0007 0008 #pragma once 0009 0010 // Qt 0011 #include <QMenu> 0012 0013 // own 0014 #include "statusnotifieritemsource.h" 0015 0016 // plasma 0017 #include <Plasma5Support/ServiceJob> 0018 0019 /** 0020 * Task Job 0021 */ 0022 class StatusNotifierItemJob : public Plasma5Support::ServiceJob 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 StatusNotifierItemJob(StatusNotifierItemSource *source, const QString &operation, QMap<QString, QVariant> ¶meters, QObject *parent = nullptr); 0028 ~StatusNotifierItemJob() override; 0029 0030 protected: 0031 void start() override; 0032 0033 private Q_SLOTS: 0034 void activateCallback(bool success); 0035 void contextMenuReady(QMenu *menu); 0036 0037 private: 0038 void performJob(); 0039 StatusNotifierItemSource *m_source; 0040 };