File indexing completed on 2024-04-28 13:25:33

0001 /*
0002     SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef COLORCMBBOXITEMDELEGATE_H
0007 #define COLORCMBBOXITEMDELEGATE_H
0008 
0009 #include "../patternwidget.h"
0010 
0011 // Qt
0012 #include <QAbstractItemDelegate>
0013 
0014 namespace Latte {
0015 namespace Settings {
0016 namespace Details {
0017 namespace Delegate {
0018 
0019 class ColorCmbBoxItem : public QAbstractItemDelegate
0020 {
0021     Q_OBJECT
0022 public:
0023     ColorCmbBoxItem(QObject *parent = 0);
0024     ~ColorCmbBoxItem();
0025 
0026     void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
0027     QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
0028 
0029 private:
0030     Widget::PatternWidget *m_pattern{nullptr};
0031 };
0032 
0033 }
0034 }
0035 }
0036 }
0037 
0038 #endif