mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
23 lines
473 B
C++
23 lines
473 B
C++
|
#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
|