43 lines
671 B
C++
Executable File
43 lines
671 B
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Item Delegate class to show On/Off switch buttons.
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Filip Biedziak, NLE, 2020-08-10
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QStyledItemDelegate>
|
|
|
|
|
|
namespace NGL
|
|
{
|
|
class INGLLogger;
|
|
}
|
|
|
|
|
|
namespace EffectManagement
|
|
{
|
|
|
|
class SwitchItemDelegate
|
|
: public QStyledItemDelegate
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SwitchItemDelegate(QObject *parent = nullptr);
|
|
|
|
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
|
|
private:
|
|
static const QIcon s_iconOn;
|
|
static const QIcon s_iconOff;
|
|
|
|
NGL::INGLLogger &m_logger;
|
|
|
|
}; // SwitchItemDelegate
|
|
|
|
} // namespace EffectManagement
|