From 8ab990b7c6fb5348b09f451878a80e2c70695876 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 19 Aug 2016 17:51:10 +0200 Subject: Added torrent support The BEncode parser is loosely based on this: https://github.com/jif/Bencode/blob/master/bencode.cpp Not perfect, but enough to display all the essential data in the shiny new TorrentDisplay dialog. --- torrentdisplay.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 torrentdisplay.h (limited to 'torrentdisplay.h') diff --git a/torrentdisplay.h b/torrentdisplay.h new file mode 100644 index 0000000..6305335 --- /dev/null +++ b/torrentdisplay.h @@ -0,0 +1,27 @@ +#ifndef TORRENTDISPLAY_H +#define TORRENTDISPLAY_H + +#include + +class QLineEdit; +class QStandardItemModel; +class QTreeView; + +class TorrentDisplay : public QDialog { + Q_OBJECT + public: + explicit TorrentDisplay(QWidget *parent = 0, Qt::WindowFlags f = 0); + void setData(const QList data); + + private: + QLineEdit *mCreated; + QLineEdit *mCreatedBy; + QLineEdit *mEncoding; + QLineEdit *mPieceLength; + QStandardItemModel *mFileModel; + QTreeView *mFileView; + QStandardItemModel *mAnnounceModel; + QTreeView *mAnnounceView; +}; + +#endif // TORRENTDISPLAY_H -- cgit v1.2.3-70-g09d2