29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
#ifndef WIZARDBUSTABLEDELEGATE_H
|
|
#define WIZARDBUSTABLEDELEGATE_H
|
|
|
|
#include <QStyledItemDelegate>
|
|
|
|
class WizardBusTableDelegate : public QStyledItemDelegate
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
WizardBusTableDelegate(QObject *parent = nullptr);
|
|
~WizardBusTableDelegate();
|
|
|
|
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option,const QModelIndex& index) const override;
|
|
|
|
//bool eventFilter(QObject* obj, QEvent* event) override;
|
|
|
|
void setEditorData(QWidget* editor, const QModelIndex& index) const override;
|
|
|
|
void setModelData(QWidget* editor, QAbstractItemModel* model,const QModelIndex& index) const override;
|
|
|
|
bool editorEvent(QEvent* event, QAbstractItemModel* model,
|
|
const QStyleOptionViewItem& option, const QModelIndex& index) override;
|
|
//void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
|
signals:
|
|
void editingFinished(const QModelIndex &index, const QString &value) const;
|
|
};
|
|
|
|
#endif // WIZARDBUSTABLEDELEGATE_H
|