blob: 750c7437208df6573f06a6e08f85be2c4ae124a5 (
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
27
28
29
30
31
32
33
34
|
#ifndef GUI_VIEWMARKINGSCROLLBAR_H
#define GUI_VIEWMARKINGSCROLLBAR_H
#include <QColor>
#include <QModelIndex>
#include <QPaintEvent>
#include <QScrollBar>
#include <QTreeView>
namespace GUI
{
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
//
[[nodiscard]] virtual QColor color(const QModelIndex& index) const;
protected:
QTreeView* m_View;
private:
int m_Role;
};
} // namespace GUI
#endif // GUI_VIEWMARKINGSCROLLBAR_H
|