Follow project coding style. Issue #2192.

This commit is contained in:
Chocobo1
2016-01-24 17:15:39 +08:00
parent 325ba48601
commit a56b745429
2 changed files with 226 additions and 219 deletions

View File

@@ -41,21 +41,21 @@ QT_END_NAMESPACE
// Defines for download list list columns
class TransferListDelegate: public QItemDelegate {
Q_OBJECT
class TransferListDelegate: public QItemDelegate
{
Q_OBJECT
public:
TransferListDelegate(QObject *parent);
~TransferListDelegate();
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const;
// Reimplementing sizeHint() because the 'name' column contains text+icon.
// When that WHOLE column goes out of view(eg user scrolls horizontally)
// the rows shrink if the text's height is smaller than the icon's height.
// This happens because icon from the 'name' column is no longer drawn.
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
TransferListDelegate(QObject *parent);
~TransferListDelegate();
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const;
// Reimplementing sizeHint() because the 'name' column contains text+icon.
// When that WHOLE column goes out of view(eg user scrolls horizontally)
// the rows shrink if the text's height is smaller than the icon's height.
// This happens because icon from the 'name' column is no longer drawn.
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
};
#endif // TRANSFERLISTDELEGATE_H