2007-04-04 05:36:55 +04:00
|
|
|
/*
|
|
|
|
* Bittorrent Client using Qt4 and libtorrent.
|
|
|
|
* Copyright (C) 2006 Christophe Dumez
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* Contact : chris@qbittorrent.org
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SEEDING_H
|
|
|
|
#define SEEDING_H
|
|
|
|
|
|
|
|
#include "ui_seeding.h"
|
|
|
|
#include "bittorrent.h"
|
|
|
|
#include "DLListDelegate.h"
|
|
|
|
#include <QStandardItemModel>
|
|
|
|
|
|
|
|
class FinishedTorrents : public QWidget, public Ui::seeding{
|
|
|
|
Q_OBJECT
|
|
|
|
private:
|
2007-04-04 16:01:32 +04:00
|
|
|
QObject *parent;
|
2007-04-04 05:36:55 +04:00
|
|
|
bittorrent *BTSession;
|
|
|
|
DLListDelegate *finishedListDelegate;
|
|
|
|
QStringList finishedSHAs;
|
|
|
|
QStandardItemModel *finishedListModel;
|
2007-04-04 16:01:32 +04:00
|
|
|
unsigned int nbFinished;
|
2007-04-04 05:36:55 +04:00
|
|
|
|
|
|
|
public:
|
2007-04-04 16:01:32 +04:00
|
|
|
FinishedTorrents(QObject *parent, bittorrent *BTSession);
|
|
|
|
~FinishedTorrents();
|
|
|
|
// Methods
|
|
|
|
QStringList getFinishedSHAs();
|
2007-04-04 16:52:50 +04:00
|
|
|
QTreeView* getFinishedList();
|
|
|
|
QStandardItemModel* getFinishedListModel();
|
2007-04-04 16:01:32 +04:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void addFinishedSHA(QString sha);
|
|
|
|
void updateFinishedList();
|
|
|
|
void deleteFromFinishedList(QString hash);
|
2007-04-04 16:52:50 +04:00
|
|
|
void showProperties(const QModelIndex &index);
|
|
|
|
void propertiesSelection();
|
2007-04-04 17:12:11 +04:00
|
|
|
void displayFinishedListMenu(const QPoint&);
|
2007-04-04 16:01:32 +04:00
|
|
|
void setRowColor(int row, const QString& color);
|
2007-04-04 05:36:55 +04:00
|
|
|
|
2007-04-10 14:11:36 +04:00
|
|
|
protected slots:
|
|
|
|
void on_actionSet_upload_limit_triggered();
|
|
|
|
|
2007-04-04 05:36:55 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|