summaryrefslogtreecommitdiff
path: root/src/viewmarkingscrollbar.h
blob: 3ffd4e974a4ec69ac57edacb99ec78725d280116 (plain)
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
#ifndef VIEWMARKINGSCROLLBAR_H
#define VIEWMARKINGSCROLLBAR_H

#include <QTreeView>
#include <QScrollBar>


class ViewMarkingScrollBar : public QScrollBar
{
public:
  ViewMarkingScrollBar(QTreeView* view, int role);

protected:
  void paintEvent(QPaintEvent *event) override;

  // retrieve the color of the marker for the given index
  //
  virtual QColor color(const QModelIndex& index) const;

private:
  QTreeView* m_view;
  int m_role;
};


#endif // VIEWMARKINGSCROLLBAR_H