pgLab/pglablib/TypeSelectionItemModelFactory.cpp

16 lines
447 B
C++
Raw Normal View History

#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;
}