File indexing completed on 2024-12-22 04:14:52

0001 /*
0002  *  SPDX-FileCopyrightText: 2015 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #include "NodeViewVisibilityDelegate.h"
0008 
0009 #include "kis_node_view_color_scheme.h"
0010 
0011 
0012 NodeViewVisibilityDelegate::NodeViewVisibilityDelegate(QObject *parent)
0013     : QAbstractItemDelegate(parent)
0014 {
0015 }
0016 
0017 NodeViewVisibilityDelegate::~NodeViewVisibilityDelegate()
0018 {
0019 }
0020 
0021 void NodeViewVisibilityDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
0022 {
0023     Q_UNUSED(painter);
0024     Q_UNUSED(option);
0025     Q_UNUSED(index);
0026 }
0027 
0028 QSize NodeViewVisibilityDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
0029 {
0030     Q_UNUSED(index);
0031 
0032     KisNodeViewColorScheme scm;
0033     return QSize(option.rect.width(), scm.rowHeight());
0034 }