diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:18:44 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:18:44 +0000 |
| commit | 368f5331a7641772aa7e0cd1feea57d09a394a36 (patch) | |
| tree | b421ac60cc6eb726896ea268ea24e47fc4ce7c88 /SampleDownloader/DirectoryDelegate.hpp | |
| parent | 71c717edc92fa771c857b3c2e5ed65f523f68f90 (diff) | |
| parent | 37f727ac0746fd85504aa46c1f023c09b3eff33a (diff) | |
Update upstream source from tag 'upstream/1.8.0+repack'
Update to upstream version '1.8.0+repack'
with Debian dir a83ef78cb70a32d1211871fdc08f3ffa295e45a8
Diffstat (limited to 'SampleDownloader/DirectoryDelegate.hpp')
| -rw-r--r-- | SampleDownloader/DirectoryDelegate.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/SampleDownloader/DirectoryDelegate.hpp b/SampleDownloader/DirectoryDelegate.hpp new file mode 100644 index 00000000..65dfd001 --- /dev/null +++ b/SampleDownloader/DirectoryDelegate.hpp @@ -0,0 +1,30 @@ +#ifndef DIRECTORY_DELEGATE_HPP__ +#define DIRECTORY_DELEGATE_HPP__ + +#include <QStyledItemDelegate> + +class QObject; +class QStyleOptionVoew; +class QModelIndex; +class QPainter; + +// +// Styled item delegate that renders a progress bar in column #1 +// +// model column #1 DisplayRole is the progress in bytes +// model column #1 UserRole is the expected number of bytes +// +class DirectoryDelegate final + : public QStyledItemDelegate +{ +public: + explicit DirectoryDelegate (QObject * parent = nullptr) + : QStyledItemDelegate {parent} + { + } + + void paint (QPainter * painter, QStyleOptionViewItem const& option + , QModelIndex const& index) const override; +}; + +#endif |
