Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
1.0 KB
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2016 Jouni Pentikäinen <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef _KIS_ANIMATION_CURVE_CHANNEL_LIST_DELEGATE_H
#define _KIS_ANIMATION_CURVE_CHANNEL_LIST_DELEGATE_H

#include <qstyleditemdelegate.h>

class KisAnimCurvesChannelDelegate : public QStyledItemDelegate
{
public:
    KisAnimCurvesChannelDelegate(QObject *parent);

    QSize sizeHint(const QStyleOptionViewItem &styleOption, const QModelIndex &index) const override;
    bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override;
    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;

private:
    void paintNodeBackground( const QStyleOptionViewItem &option, QPainter *painter, const QColor& nodeColor) const;
    void soloChannelVisibility( QAbstractItemModel *model,  const QModelIndex &index );
    void showAllChannels(QAbstractItemModel *model , const QModelIndex &nodeIndex);
};

#endif