Mercurial > minori
diff include/gui/pages/torrents.h @ 230:2f5a9247e501
torrents: implement download button
erg
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sat, 13 Jan 2024 09:42:02 -0500 |
parents | 01d259b9c89f |
children | 4d461ef7d424 |
line wrap: on
line diff
--- a/include/gui/pages/torrents.h Wed Jan 10 21:23:57 2024 -0500 +++ b/include/gui/pages/torrents.h Sat Jan 13 09:42:02 2024 -0500 @@ -5,6 +5,9 @@ #include <QFrame> #include <QAbstractListModel> #include <QSortFilterProxyModel> +#include <QItemSelection> + +class QTreeView; class TorrentsPageListSortFilter final : public QSortFilterProxyModel { Q_OBJECT @@ -46,6 +49,7 @@ Qt::ItemFlags flags(const QModelIndex& index) const override; QByteArray DownloadTorrentList(); + void DownloadTorrents(QItemSelection selection); void ParseFeedDescription(const std::string& description, Torrent& torrent); void ParseTorrentList(const QByteArray& ba); void RefreshTorrentList(); @@ -68,11 +72,13 @@ public: TorrentsPage(QWidget* parent = nullptr); + void DownloadSelection(); void Refresh(); private: TorrentsPageListModel* model = nullptr; TorrentsPageListSortFilter* sort_model = nullptr; + QTreeView* treeview = nullptr; }; #endif // __gui__pages__torrents_h