From 821b07a3187b9a11b5d5678f0c3ad2f28689f9e8 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 5 Sep 2016 04:38:59 +0200 Subject: Use enums in TorrentWidget Revamp gatherData() to use Enums for colums, roles and data. --- torrentwidget.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'torrentwidget.h') diff --git a/torrentwidget.h b/torrentwidget.h index 4a354ce..aa3d977 100644 --- a/torrentwidget.h +++ b/torrentwidget.h @@ -20,6 +20,10 @@ class TorrentDisplay; class TorrentWidget : public QWidget { Q_OBJECT public: + enum CustomRoles { PresentRole = Qt::UserRole + 1, FullPathRole = Qt::UserRole + 2 }; + enum { ColumnCount = 3 }; + enum Columns { IconColumn = 0, NameColumn = 1, CreatedColumn = 2 }; + enum Present { NotPresent = 0, Present = 1 }; TorrentWidget(QWidget *parent = 0); QToolBar *toolBar() { return mToolBar; } QMenuBar *menuBar() { return mMenuBar; } -- cgit v1.2.3-70-g09d2