- Added AlertWaiter and QBittorentSession
[qtrapids] / src / gui / SeedView.h
1 /***************************************************************************
2  *   Copyright (C) 2009 by Lassi Väätämöinen   *
3  *   lassi.vaatamoinen@ixonos.com   *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
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  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20 #ifndef SEEDVIEW_H
21 #define SEEDVIEW_H
22
23 #include <QTreeWidget>
24
25 /**
26         @author Lassi Väätämöinen <lassi.vaatamoinen@ixonos.com>
27 */
28 class SeedView : public QTreeWidget
29 {
30 Q_OBJECT
31         public:
32     SeedView(QWidget* parent);
33
34     ~SeedView();
35
36         private:
37                         // Name
38                 // Size
39                 // Status
40                 // UP speed
41                 // Seeds/Leechers
42                 // Connected peers
43                 // total uploaded
44                 // ratio 
45 };
46
47 /**
48         @class DownloadViewItem
49         @brief Represents one item row of DownloadView
50  */
51 class SeedViewItem : public QTreeWidgetItem {
52         
53         public:
54                 
55                 SeedViewItem(QTreeWidget* parent, int type) : 
56                         QTreeWidgetItem(parent, type = QTreeWidgetItem::UserType) {};
57                 
58                 SeedViewItem(const QStringList& strings, int type = QTreeWidgetItem::UserType ) : 
59                         QTreeWidgetItem (strings, type = Type) {};
60                 
61                 
62                 /// @return An item comprising of string list, suitable for QTableView
63                 /// header.
64                 static SeedViewItem *getHeaderItem()
65                 {
66                         SeedViewItem *item  
67                                 = new SeedViewItem(QStringList()
68                                         << "Name" 
69                                         << "Size" << "Status" 
70                                         << "Progress" << "UL speed" << "Seeds/Leechers"
71                                         << "Conn. peers"
72                                         << "Ratio");
73
74                         return item;
75                 }
76
77                 /// @todo QTorrentHandle as one hidden column
78 };
79
80 #endif