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 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write to the * 17 * Free Software Foundation, Inc., * 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 19 ***************************************************************************/ 20 #ifndef KGETPANELBAR_P_H 21 #define KGETPANELBAR_P_H 22 23 #include <plasma/dialog.h> 24 #include <QList> 25 #include <QMap> 26 #include "transfer_interface.h" 27 28 class QProgressBar; 29 class QGridLayout; 30 31 class KGetPanelBar::Private : public Plasma::Dialog 32 { 33 Q_OBJECT 34 public: 35 Private(QWidget * parent = nullptr); 36 ~Private(); 37 dialogLayout()38 QGridLayout *dialogLayout() { 39 return m_dialogLayout; 40 }; 41 42 public Q_SLOTS: 43 void transfersAdded(const QList<OrgKdeKgetTransferInterface*> &transfers); 44 void transfersRemoved(const QList<OrgKdeKgetTransferInterface*> &transfers); 45 void update(); 46 void clear(); 47 48 Q_SIGNALS: 49 void progressBarChanged(int value); 50 51 private: 52 QProgressBar *m_bar; 53 QGridLayout *m_dialogLayout; 54 QWidget *m_widget; 55 56 QMap<OrgKdeKgetTransferInterface*, QProgressBar*> m_transfers; 57 }; 58 59 #endif 60