Changeset View
Changeset View
Standalone View
Standalone View
testprovider/testdoxdelegate.h
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include <QtWidgets/QItemDelegate> | 24 | #include <QtWidgets/QItemDelegate> | ||
25 | #include <KColorScheme> | 25 | #include <KColorScheme> | ||
26 | 26 | | |||
27 | class TestDoxDelegate : public QItemDelegate | 27 | class TestDoxDelegate : public QItemDelegate | ||
28 | { | 28 | { | ||
29 | 29 | | |||
30 | public: | 30 | public: | ||
31 | explicit TestDoxDelegate(QObject* parent = 0); | 31 | explicit TestDoxDelegate(QObject* parent = nullptr); | ||
32 | virtual ~TestDoxDelegate(); | 32 | ~TestDoxDelegate() override; | ||
33 | virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; | 33 | void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; | ||
34 | 34 | | |||
35 | private: | 35 | private: | ||
36 | void highlight(QStyleOptionViewItem& option, const KStatefulBrush& brush, bool bold = true) const; | 36 | void highlight(QStyleOptionViewItem& option, const KStatefulBrush& brush, bool bold = true) const; | ||
37 | 37 | | |||
38 | KStatefulBrush failBrush; | 38 | KStatefulBrush failBrush; | ||
39 | KStatefulBrush passBrush; | 39 | KStatefulBrush passBrush; | ||
40 | }; | 40 | }; | ||
41 | 41 | | |||
42 | #endif // TESTDOXDELEGATE_H | 42 | #endif // TESTDOXDELEGATE_H |