mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Fix transfer list architecture
Model returns string for DisplayRole. Text alignment is set by Model (using TextAlignmentRole). Delegate performs custom painting only where necessary (i.e. for Progress bar).
This commit is contained in:
@@ -35,11 +35,6 @@ class QModelIndex;
|
||||
class QPainter;
|
||||
class QStyleOptionViewItem;
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
enum class TorrentState;
|
||||
}
|
||||
|
||||
class TransferListDelegate : public QItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -49,9 +44,6 @@ public:
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
QWidget *createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
|
||||
private:
|
||||
QString getStatusString(const BitTorrent::TorrentState state) const;
|
||||
};
|
||||
|
||||
#endif // TRANSFERLISTDELEGATE_H
|
||||
|
||||
Reference in New Issue
Block a user