Fix and install smb2rdc action
[kdenetwork.git] / kget / plasma / applet / barchart.h
blobaaf472bc87851b3a6792fd437aedb8b69e63aae4
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. *
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 ***************************************************************************/
21 #ifndef BARCHART_H
22 #define BARCHART_H
24 #include "transfergraph.h"
26 #include <QMap>
28 #define MAX_DOWNLOADS_PER_PAGE 5
30 namespace Plasma {
31 class BoxLayout;
32 class ProgressBar;
33 class Label;
34 class PushButton;
36 class QString;
38 class BarChart : public TransferGraph
40 Q_OBJECT
42 public:
43 BarChart(Plasma::Applet *parent);
44 ~BarChart();
46 void setTransfers(const QVariantMap &transfers);
48 public slots:
49 void nextPage();
50 void previousPage();
52 private slots:
53 void populate();
55 private:
56 void clear();
58 private:
59 Plasma::BoxLayout *m_layout;
60 Plasma::BoxLayout *m_pagerLayout;
61 Plasma::PushButton *m_nextPageButton;
62 Plasma::PushButton *m_previousPageButton;
63 Plasma::Label *m_totalSizeLabel;
64 Plasma::Label *m_pageLabel;
65 QMap <QString, Plasma::ProgressBar *> m_progressBars;
67 int m_actualPage;
70 #endif