SelectionEditorFactory + ItemModel + ItemModelFactory combination is working

in new EditTableWidget

(EditTableWidget is very much WIP)
This commit is contained in:
eelke 2018-12-15 20:27:40 +01:00
parent e44f73166f
commit 742fd0a4d3
19 changed files with 419 additions and 80 deletions

View file

@ -1,25 +1,27 @@
#ifndef PARAMTYPEDELEGATE_H
#define PARAMTYPEDELEGATE_H
#include <QStyledItemDelegate>
//#include <QStyledItemDelegate>
#include "PgLabItemDelegate.h"
class TypeSelectionItemModel;
/** Item delegate for supplying a combobox for selected the parameter type in
* the parameter list.
*/
class ParamTypeDelegate : public QStyledItemDelegate {
class ParamTypeDelegate : public PgLabItemDelegate {
Q_OBJECT
public:
ParamTypeDelegate();
~ParamTypeDelegate();
~ParamTypeDelegate() override;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
void setTypeSelectionModel(TypeSelectionItemModel* model);
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const override;
void setTypeSelectionModel(TypeSelectionItemModel* model);
private:
TypeSelectionItemModel* m_typeSelectionModel = nullptr;