summaryrefslogtreecommitdiff
path: root/src/viewmarkingscrollbar.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/viewmarkingscrollbar.h')
-rw-r--r--src/viewmarkingscrollbar.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/viewmarkingscrollbar.h b/src/viewmarkingscrollbar.h
index 12a297d1..01b5a8c0 100644
--- a/src/viewmarkingscrollbar.h
+++ b/src/viewmarkingscrollbar.h
@@ -1,21 +1,25 @@
#ifndef VIEWMARKINGSCROLLBAR_H
#define VIEWMARKINGSCROLLBAR_H
+#include <QTreeView>
#include <QScrollBar>
-#include <QAbstractItemModel>
class ViewMarkingScrollBar : public QScrollBar
{
public:
- static const int DEFAULT_ROLE = Qt::UserRole + 42;
-public:
- ViewMarkingScrollBar(QAbstractItemModel *model, QWidget *parent = 0, int role = DEFAULT_ROLE);
+ ViewMarkingScrollBar(QTreeView* view, int role);
+
protected:
- virtual void paintEvent(QPaintEvent *event);
+ void paintEvent(QPaintEvent *event) override;
+
+ // retrieve the color of the marker for the given index
+ //
+ virtual QColor color(const QModelIndex& index) const;
+
private:
- QAbstractItemModel *m_Model;
- int m_Role;
+ QTreeView* m_view;
+ int m_role;
};