#ifndef EXDATAVIEWDELEGATE_H #define EXDATAVIEWDELEGATE_H #include #include class QAbstractButton; class SchemeBar : public QDialog { Q_OBJECT public: SchemeBar(const QString &lLabel, const QString &rLabel, const QStringList &vlist, QWidget *parent = nullptr); private slots: void barClicked(QAbstractButton *btn); signals: void setValue(QString val); private: QString leftLabel; QString rightLabel; QStringList barValueList; }; class EXDataTableComboDelegate : public QStyledItemDelegate { public: explicit EXDataTableComboDelegate(QObject *parent = nullptr); QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override; void setEditorData(QWidget *editor, const QModelIndex &index) const override; void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override; void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override; private: QStringList m_items; }; #endif // EXDATAVIEWDELEGATE_H