Miscellaneous changes. Including a copy action.
This commit is contained in:
parent
242f5464df
commit
4a2c6cc396
19 changed files with 147 additions and 43 deletions
|
|
@ -1,15 +1,17 @@
|
|||
#include "paramtypedelegate.h"
|
||||
#include "ParamTypeDelegate.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include "TypeSelectionItemModel.h"
|
||||
|
||||
ParamTypeDelegate::ParamTypeDelegate()
|
||||
: m_typeSelectionModel(new TypeSelectionItemModel)
|
||||
{}
|
||||
|
||||
ParamTypeDelegate::~ParamTypeDelegate()
|
||||
{}
|
||||
|
||||
void ParamTypeDelegate::setTypeSelectionModel(TypeSelectionItemModel* model)
|
||||
{
|
||||
delete m_typeSelectionModel;
|
||||
m_typeSelectionModel = model;
|
||||
}
|
||||
|
||||
QWidget *ParamTypeDelegate::createEditor(QWidget *parent,
|
||||
|
|
@ -18,12 +20,16 @@ QWidget *ParamTypeDelegate::createEditor(QWidget *parent,
|
|||
|
||||
{
|
||||
QWidget *w = nullptr;
|
||||
// if (index.data().canConvert<StarRating>()) {
|
||||
QComboBox *cmbbx = new QComboBox(parent);
|
||||
cmbbx->setModel(m_typeSelectionModel);
|
||||
w = cmbbx;
|
||||
// } else {
|
||||
// w = QStyledItemDelegate::createEditor(parent, option, index);
|
||||
// }
|
||||
|
||||
QComboBox *cmbbx = new QComboBox(parent);
|
||||
cmbbx->setModel(m_typeSelectionModel);
|
||||
w = cmbbx;
|
||||
|
||||
// ...
|
||||
// m_ComboBox->setView(m_ColumnView);
|
||||
// m_ComboBox->view()->setCornerWidget(new QSizeGrip(m_ColumnView));
|
||||
// m_ComboBox->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
// ...
|
||||
|
||||
return w;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue