SelectionEditorFactory for creating combobox selections for use in QTableView.
TypeSelectionItemModelFactory to use the TypeSelectionItemModel with above factory.
This commit is contained in:
parent
f8d61b61f4
commit
e44f73166f
7 changed files with 138 additions and 0 deletions
15
pglablib/TypeSelectionItemModelFactory.cpp
Normal file
15
pglablib/TypeSelectionItemModelFactory.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include "TypeSelectionItemModelFactory.h"
|
||||
#include "TypeSelectionItemModel.h"
|
||||
|
||||
TypeSelectionItemModelFactory::TypeSelectionItemModelFactory(QObject *parent, std::shared_ptr<const PgTypeContainer> types)
|
||||
: AbstractModelFactory(parent)
|
||||
, m_types(types)
|
||||
{}
|
||||
|
||||
|
||||
QAbstractItemModel* TypeSelectionItemModelFactory::createModel(QObject *parent) const
|
||||
{
|
||||
auto model = new TypeSelectionItemModel(parent);
|
||||
model->setTypeList(m_types);
|
||||
return model;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue