1 /*************************************************************************** 2 * * 3 * This program is free software; you can redistribute it and/or modify * 4 * it under the terms of the GNU General Public License as published by * 5 * the Free Software Foundation; either version 2 of the License, or * 6 * (at your option) any later version. * 7 * * 8 * Copyright (C) 2007 by Javier Goday <jgoday@gmail.com> * 9 * Copyright (C) 2009 by Matthias Fuchs <mat69@gmx.net> * 10 * * 11 * This program is distributed in the hope that it will be useful, * 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 * GNU General Public License for more details. * 15 * * 16 * You should have received a copy of the GNU General Public License * 17 * along with this program; if not, write to the * 18 * Free Software Foundation, Inc., * 19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 20 ***************************************************************************/ 21 #ifndef KGETBARAPPLET_P_H 22 #define KGETBARAPPLET_P_H 23 24 #include <QGraphicsWidget> 25 #include <QHash> 26 27 namespace Plasma 28 { 29 class ScrollWidget; 30 } 31 32 class QGraphicsProxyWidget; 33 class QProgressBar; 34 35 class KGetBarApplet::Private : public QGraphicsWidget 36 { 37 Q_OBJECT 38 39 public: 40 explicit Private(QGraphicsWidget *parent = nullptr); 41 ~Private() override; 42 43 public Q_SLOTS: 44 void addTransfers(const QList<OrgKdeKgetTransferInterface*> &transfers); 45 void removeTransfers(const QList<OrgKdeKgetTransferInterface*> &transfers); 46 47 private Q_SLOTS: 48 void slotUpdateTransfer(int transferChange); 49 50 private: 51 struct Item 52 { 53 QGraphicsProxyWidget *proxy; 54 QProgressBar *progressBar; 55 }; 56 57 Plasma::ScrollWidget *m_scrollWidget; 58 QGraphicsWidget *m_containerWidget; 59 QGraphicsLinearLayout *m_containerLayout; 60 QHash<OrgKdeKgetTransferInterface*, Item*> m_items; 61 }; 62 63 #endif 64