mirror-chatterino2/src/widgets/helper/RegExpItemDelegate.hpp

23 lines
473 B
C++
Raw Normal View History

#pragma once
#include <QRegularExpression>
#include <QStyledItemDelegate>
namespace chatterino {
class RegExpItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
RegExpItemDelegate(QObject *parent, QRegularExpression regexp);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
private:
const QRegularExpression regexp_;
};
} // namespace chatterino