File indexing completed on 2024-06-16 04:16:03
0001 /* 0002 * SPDX-FileCopyrightText: 2016 Jouni Pentikäinen <joupent@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef _KIS_ANIMATION_CURVE_CHANNEL_LIST_DELEGATE_H 0008 #define _KIS_ANIMATION_CURVE_CHANNEL_LIST_DELEGATE_H 0009 0010 #include <qstyleditemdelegate.h> 0011 0012 class KisAnimCurvesChannelDelegate : public QStyledItemDelegate 0013 { 0014 public: 0015 KisAnimCurvesChannelDelegate(QObject *parent); 0016 0017 QSize sizeHint(const QStyleOptionViewItem &styleOption, const QModelIndex &index) const override; 0018 bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override; 0019 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; 0020 0021 private: 0022 void paintNodeBackground( const QStyleOptionViewItem &option, QPainter *painter, const QColor& nodeColor) const; 0023 void soloChannelVisibility( QAbstractItemModel *model, const QModelIndex &index ); 0024 void showAllChannels(QAbstractItemModel *model , const QModelIndex &nodeIndex); 0025 }; 0026 0027 #endif