pgLab/pglablib/AbstractModelFactory.h
eelke e44f73166f SelectionEditorFactory for creating combobox selections for use in QTableView.
TypeSelectionItemModelFactory to use the TypeSelectionItemModel with above factory.
2018-12-15 15:28:33 +01:00

19 lines
422 B
C++

#ifndef ABSTRACTMODELFACTORY_H
#define ABSTRACTMODELFACTORY_H
#include <QObject>
class QAbstractItemModel;
class AbstractModelFactory: public QObject {
Q_OBJECT
public:
using QObject::QObject;
/// Create instance of a model
///
/// \param parent Will be passed to the constructor of the model.
virtual QAbstractItemModel* createModel(QObject *parent = nullptr) const = 0;
};
#endif // ABSTRACTMODELFACTORY_H