2019-12-26 20:51:55 +00:00
|
|
|
#ifndef BOOLTOGGGLEDELEGATE_H
|
|
|
|
#define BOOLTOGGGLEDELEGATE_H
|
|
|
|
|
2020-08-01 14:14:30 +00:00
|
|
|
#include "core/CutterCommon.h"
|
|
|
|
|
2019-12-26 20:51:55 +00:00
|
|
|
#include <QStyledItemDelegate>
|
|
|
|
|
2020-08-01 14:14:30 +00:00
|
|
|
class CUTTER_EXPORT BoolTogggleDelegate : public QStyledItemDelegate
|
2019-12-26 20:51:55 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
BoolTogggleDelegate(QObject *parent = nullptr);
|
|
|
|
|
2021-01-24 14:50:13 +00:00
|
|
|
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
|
2019-12-26 20:51:55 +00:00
|
|
|
const QModelIndex &index) const override;
|
|
|
|
|
|
|
|
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option,
|
|
|
|
const QModelIndex &index) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BOOLTOGGGLEDELEGATE_H
|