Make filepriorities working...
[kdenetwork.git] / kget / transfer-plugins / bittorrent / btfiletreeview.h
blob63bc2f93ceb6fe68f759fbd99b543fb575cac063
1 /* This file is part of the KDE project
3 Copyright (C) 2007 Lukas Appelhans <l.appelhans@gmx.de>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9 */
11 #ifndef BTFILETREEVIEW_H
12 #define BTFILETREEVIEW_H
14 #include "iwfiletreemodel.h"
16 #include <QTreeView>
18 #include <util/constants.h>
21 class KMenu;
23 namespace bt
25 class TorrentInterface;
26 class TorrentControl;
29 class BTFileTreeView : public QTreeView
31 Q_OBJECT
32 public:
33 BTFileTreeView(bt::TorrentInterface *tc, QWidget * parent);
35 private slots:
36 void contextMenuEvent(QContextMenuEvent * e);
37 void open();
38 void downloadFirst();
39 void downloadLast();
40 void downloadNormal();
41 void doNotDownload();
42 void deleteFiles();
44 private:
45 void changePriority(bt::Priority newpriority);
47 kt::IWFileTreeModel *fileTreeModel;
48 bt::TorrentInterface *m_tc;
50 KMenu *contextMenu;
52 QAction* open_action;
53 QAction* download_first_action;
54 QAction* download_normal_action;
55 QAction* download_last_action;
56 QAction* dnd_action;
57 QAction* delete_action;
59 QString preview_path;
62 #endif