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