diff options
author | Arno <arno@disconnect.de> | 2016-08-19 17:51:10 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2016-08-19 17:51:10 +0200 |
commit | 8ab990b7c6fb5348b09f451878a80e2c70695876 (patch) | |
tree | 8a90c848308c09e729d9256a6af921abfeb786b3 /torrentdisplay.h | |
parent | cead61f9598302a83fa72e99f82f7bfa2c0b19cb (diff) | |
download | ShemovCleaner-8ab990b7c6fb5348b09f451878a80e2c70695876.tar.gz ShemovCleaner-8ab990b7c6fb5348b09f451878a80e2c70695876.tar.bz2 ShemovCleaner-8ab990b7c6fb5348b09f451878a80e2c70695876.zip |
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.
Diffstat (limited to 'torrentdisplay.h')
-rw-r--r-- | torrentdisplay.h | 27 |
1 files changed, 27 insertions, 0 deletions
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 <QDialog> + +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<QVariant> data); + + private: + QLineEdit *mCreated; + QLineEdit *mCreatedBy; + QLineEdit *mEncoding; + QLineEdit *mPieceLength; + QStandardItemModel *mFileModel; + QTreeView *mFileView; + QStandardItemModel *mAnnounceModel; + QTreeView *mAnnounceView; +}; + +#endif // TORRENTDISPLAY_H |