blob: 549b3db143e842bb062c19d6a556ab39d7b7d7aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#ifndef TORRENTWIDGET_H
#define TORRENTWIDGET_H
#include <QMainWindow>
#include <QItemSelection>
#include <QString>
#include <QContextMenuEvent>
class QPushButton;
class QLineEdit;
class QTreeView;
class QStandardItemModel;
class QLabel;
class QToolBar;
class QMenuBar;
class FileSorter;
class TorrentDisplay;
class TorrentWidget : public QWidget {
Q_OBJECT
public:
TorrentWidget(QWidget *parent = 0);
QToolBar *toolBar() { return mToolBar; }
QMenuBar *menuBar() { return mMenuBar; }
TorrentDisplay *torrentDisplay() { return mTorrentDisplay; }
QTreeView *torrentFileView() { return mFileView; }
~TorrentWidget();
signals:
void statusMessage(const QString &msg);
void selectionCountChanged(const QString &msg);
public slots:
void selectDir();
void copyToClipboard();
void gatherData();
void deleteFiles();
void moveFiles();
void torrentInfo();
void searchFile();
void fileSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
protected:
virtual void contextMenuEvent(QContextMenuEvent *e);
private:
void setupGui();
void readHeaderData();
void writeHeaderData();
void readSettings();
void writeSettings();
QLineEdit *mDir;
QPushButton *mSelDir;
QLineEdit *mSearchTorrents;
QPushButton *mDoSearchTorrents;
QString mExt;
QStandardItemModel *mModel;
FileSorter *mProxy;
QTreeView *mFileView;
TorrentDisplay *mTorrentDisplay;
QToolBar *mToolBar;
QMenuBar *mMenuBar;
};
#endif // TORRENTWIDGET_H
|