-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtorrenttabledelegate.h
More file actions
30 lines (22 loc) · 920 Bytes
/
Copy pathtorrenttabledelegate.h
File metadata and controls
30 lines (22 loc) · 920 Bytes
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
#pragma once
#ifndef TORRENTTABLEDELEGATE_H
#define TORRENTTABLEDELEGATE_H
#include <QStyledItemDelegate>
class TorrentTableDelegate final : public QStyledItemDelegate
{
Q_OBJECT
Q_DISABLE_COPY(TorrentTableDelegate)
public:
/*! Inherit constructors. */
using QStyledItemDelegate::QStyledItemDelegate;
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const final;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const final;
private:
void paintSelectedItem(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
void paintProgressBar(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
};
#endif // TORRENTTABLEDELEGATE_H