mirror-chatterino2/src/widgets/helper/RegExpItemDelegate.hpp
kornes 07dd8c560b
Prevent user from entering incorrect characters in Live Notifications channels list (#3715)
Co-authored-by: Sidd <iProdigy@users.noreply.github.com>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2022-05-08 10:27:25 +00:00

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