summaryrefslogtreecommitdiffstats
path: root/torrentwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'torrentwidget.h')
-rw-r--r--torrentwidget.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/torrentwidget.h b/torrentwidget.h
new file mode 100644
index 0000000..b1f33bb
--- /dev/null
+++ b/torrentwidget.h
@@ -0,0 +1,64 @@
+#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; }
+ ~TorrentWidget();
+
+ signals:
+ void statusMessage(const QString &msg);
+ void selectionCountChanged(const QString &msg);
+
+ public slots:
+ void selectDir();
+ void gatherData();
+ void deleteFiles();
+ void moveFiles();
+ void torrentInfo();
+ void searchFile();
+
+ protected:
+ virtual void contextMenuEvent(QContextMenuEvent *e);
+
+ private slots:
+ void fileSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
+
+ 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