File indexing completed on 2024-04-21 15:24:20
0001 /* 0002 SPDX-FileCopyrightText: 2012 Miha Čančula <miha@noughmad.eu> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef TESTDOXDELEGATE_H 0008 #define TESTDOXDELEGATE_H 0009 0010 #include <QItemDelegate> 0011 #include <KColorScheme> 0012 0013 class TestDoxDelegate : public QItemDelegate 0014 { 0015 0016 public: 0017 explicit TestDoxDelegate(QObject* parent = nullptr); 0018 ~TestDoxDelegate() override; 0019 void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; 0020 0021 private: 0022 void highlight(QStyleOptionViewItem& option, const KStatefulBrush& brush, bool bold = true) const; 0023 0024 KStatefulBrush failBrush; 0025 KStatefulBrush passBrush; 0026 }; 0027 0028 #endif // TESTDOXDELEGATE_H