mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
Brand new torrent model for the transfer list
This commit is contained in:
@@ -38,9 +38,9 @@
|
||||
class QStandardItemModel;
|
||||
class QSortFilterProxyModel;
|
||||
class QBtSession;
|
||||
class QTimer;
|
||||
class TransferListDelegate;
|
||||
class MainWindow;
|
||||
class TorrentModel;
|
||||
|
||||
enum TorrentFilter {FILTER_ALL, FILTER_DOWNLOADING, FILTER_COMPLETED, FILTER_PAUSED, FILTER_ACTIVE, FILTER_INACTIVE};
|
||||
|
||||
@@ -51,13 +51,9 @@ public:
|
||||
TransferListWidget(QWidget *parent, MainWindow *main_window, QBtSession* BTSession);
|
||||
~TransferListWidget();
|
||||
int getNbTorrents() const;
|
||||
QStandardItemModel* getSourceModel() const;
|
||||
TorrentModel* getSourceModel() const;
|
||||
|
||||
public slots:
|
||||
void refreshList(bool force=false);
|
||||
void addTorrent(QTorrentHandle& h);
|
||||
void pauseTorrent(QTorrentHandle &h);
|
||||
void setFinished(QTorrentHandle &h);
|
||||
void setSelectionLabel(QString label);
|
||||
void setRefreshInterval(int t);
|
||||
void setSelectedTorrentsLocation();
|
||||
@@ -73,7 +69,6 @@ public slots:
|
||||
void decreasePrioSelectedTorrents();
|
||||
void topPrioSelectedTorrents();
|
||||
void bottomPrioSelectedTorrents();
|
||||
void buySelectedTorrents() const;
|
||||
void copySelectedMagnetURIs() const;
|
||||
void openSelectedTorrentsFolder() const;
|
||||
void recheckSelectedTorrents();
|
||||
@@ -102,41 +97,28 @@ protected:
|
||||
QStringList getSelectedTorrentsHashes() const;
|
||||
|
||||
protected slots:
|
||||
int updateTorrent(int row);
|
||||
void deleteTorrent(QString hash);
|
||||
void deleteTorrent(int row, bool refresh_list=true);
|
||||
void pauseTorrent(int row, bool refresh_list=true);
|
||||
void resumeTorrent(int row, bool refresh_list=true);
|
||||
void torrentDoubleClicked(const QModelIndex& index);
|
||||
bool loadHiddenColumns();
|
||||
void saveHiddenColumns() const;
|
||||
void displayListMenu(const QPoint&);
|
||||
void updateMetadata(QTorrentHandle &h);
|
||||
void currentChanged(const QModelIndex& current, const QModelIndex&);
|
||||
void resumeTorrent(QTorrentHandle &h);
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
void toggleSelectedTorrentsSuperSeeding() const;
|
||||
#endif
|
||||
void toggleSelectedTorrentsSequentialDownload() const;
|
||||
void toggleSelectedFirstLastPiecePrio() const;
|
||||
void askNewLabelForSelection();
|
||||
void setRowColor(int row, QColor color);
|
||||
|
||||
signals:
|
||||
void currentTorrentChanged(QTorrentHandle &h);
|
||||
void torrentStatusUpdate(uint nb_downloading, uint nb_seeding, uint nb_active, uint nb_inactive, uint nb_paused);
|
||||
void torrentAdded(QModelIndex index);
|
||||
void torrentAboutToBeRemoved(QModelIndex index);
|
||||
void torrentChangedLabel(QString old_label, QString new_label);
|
||||
|
||||
private:
|
||||
TransferListDelegate *listDelegate;
|
||||
QStandardItemModel *listModel;
|
||||
TorrentModel *listModel;
|
||||
QSortFilterProxyModel *nameFilterModel;
|
||||
QSortFilterProxyModel *statusFilterModel;
|
||||
QSortFilterProxyModel *labelFilterModel;
|
||||
QBtSession* BTSession;
|
||||
QTimer *refreshTimer;
|
||||
MainWindow *main_window;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user