comparison include/gui/pages/torrents.h @ 118:39521c47c7a3

*: another huge megacommit, SORRY The torrents page works a lot better now Added the edit option to the anime list right click menu Vectorized currently playing files Available player and extensions are now loaded at runtime from files in (dotpath)/players.json and (dotpath)/extensions.json These paths are not permanent and will likely be moved to (dotpath)/recognition ... ... ...
author Paper <mrpapersonic@gmail.com>
date Tue, 07 Nov 2023 23:40:54 -0500
parents ab191e28e69d
children 01d259b9c89f
comparison
equal deleted inserted replaced
117:2c1b6782e1d0 118:39521c47c7a3
3 3
4 #include "core/torrent.h" 4 #include "core/torrent.h"
5 #include <QFrame> 5 #include <QFrame>
6 #include <QAbstractListModel> 6 #include <QAbstractListModel>
7 #include <QSortFilterProxyModel> 7 #include <QSortFilterProxyModel>
8
9 class TorrentModelItem : public Torrent {
10 public:
11 bool GetChecked() const { return _checked; };
12 void SetChecked(bool checked) { _checked = checked; };
13
14 private:
15 bool _checked = false;
16 };
17 8
18 class TorrentsPageListSortFilter final : public QSortFilterProxyModel { 9 class TorrentsPageListSortFilter final : public QSortFilterProxyModel {
19 Q_OBJECT 10 Q_OBJECT
20 11
21 public: 12 public:
57 QByteArray DownloadTorrentList(); 48 QByteArray DownloadTorrentList();
58 void ParseTorrentList(const QByteArray& ba); 49 void ParseTorrentList(const QByteArray& ba);
59 void RefreshTorrentList(); 50 void RefreshTorrentList();
60 51
61 private: 52 private:
53 class TorrentModelItem : public Torrent {
54 public:
55 bool GetChecked() const { return _checked; };
56 void SetChecked(bool checked) { _checked = checked; };
57
58 private:
59 bool _checked = false;
60 };
61
62 std::vector<TorrentModelItem> list; 62 std::vector<TorrentModelItem> list;
63 }; 63 };
64 64
65 class TorrentsPage final : public QFrame { 65 class TorrentsPage final : public QFrame {
66 Q_OBJECT 66 Q_OBJECT