mirror-chatterino2/scrollbar.h
2017-01-11 18:52:09 +01:00

29 lines
535 B
C++

#ifndef SCROLLBAR_H
#define SCROLLBAR_H
#include <functional>
#include "QMutex"
#include "QWidget"
#include "scrollbarhighlight.h"
class ScrollBar : public QWidget
{
Q_OBJECT
public:
ScrollBar(QWidget *parent = 0);
~ScrollBar();
void removeHighlightsWhere(std::function<bool(ScrollBarHighlight &)> func);
void addHighlight(ScrollBarHighlight *highlight);
private:
QMutex mutex;
ScrollBarHighlight *highlights = NULL;
void paintEvent(QPaintEvent *);
QRect thumbRect;
};
#endif // SCROLLBAR_H