diff options
| author | Krzysztof Starecki <krzysztof.starecki@gmail.com> | 2018-12-30 22:13:15 +0100 |
|---|---|---|
| committer | Krzysztof Starecki <krzysztof.starecki@gmail.com> | 2018-12-30 22:13:15 +0100 |
| commit | c11ff7e2db09514304cef35a650aa3fbef27dd16 (patch) | |
| tree | 52a514445448ca847016e795da66ef7d099d313b /src/downloadlistwidget.h | |
| parent | cfb941082e27925279535cade18d2b3c912c8930 (diff) | |
Add icon for incomplete download info, add download progress delegate
Diffstat (limited to 'src/downloadlistwidget.h')
| -rw-r--r-- | src/downloadlistwidget.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/downloadlistwidget.h b/src/downloadlistwidget.h index 0c17de87..c19e4473 100644 --- a/src/downloadlistwidget.h +++ b/src/downloadlistwidget.h @@ -21,11 +21,14 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #define DOWNLOADLISTWIDGET_H
#include "downloadmanager.h"
+#include "downloadlistsortproxy.h"
#include <QWidget>
#include <QItemDelegate>
#include <QLabel>
#include <QProgressBar>
#include <QTreeView>
+#include <QStyledItemDelegate>
+
namespace Ui {
class DownloadListWidget;
@@ -33,6 +36,21 @@ namespace Ui { class DownloadManager;
+class DownloadProgressDelegate : public QStyledItemDelegate
+{
+ Q_OBJECT
+
+public:
+ DownloadProgressDelegate(DownloadManager *manager, DownloadListSortProxy *sortProxy, QWidget *parent = 0) : QStyledItemDelegate(parent), m_Manager(manager), m_SortProxy(sortProxy) {}
+
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const override;
+
+private:
+ DownloadManager *m_Manager;
+ DownloadListSortProxy *m_SortProxy;
+};
+
class DownloadListWidget : public QTreeView
{
Q_OBJECT
|
