2019-09-29 22:30:32 -07:00
|
|
|
#include "quam/project.h"
|
|
|
|
|
|
|
|
#include <QAbstractItemModel>
|
|
|
|
#include <QErrorMessage>
|
|
|
|
#include <QMdiArea>
|
|
|
|
#include <QSortFilterProxyModel>
|
|
|
|
|
2019-10-04 10:37:34 -07:00
|
|
|
Project::Project(ArcDir &&arc, QErrorMessage *errors, QMdiArea *parent) :
|
2019-09-29 22:30:32 -07:00
|
|
|
QMdiSubWindow{parent},
|
|
|
|
Ui::Project{},
|
2019-10-04 10:37:34 -07:00
|
|
|
m_arc{std::move(arc)},
|
|
|
|
m_errors{errors},
|
|
|
|
m_model{new ArcModel{&m_arc, this}},
|
|
|
|
m_sorter{new QSortFilterProxyModel{this}}
|
2019-09-29 22:30:32 -07:00
|
|
|
{
|
|
|
|
auto widget = new QWidget(this);
|
|
|
|
setupUi(widget);
|
|
|
|
setWidget(widget);
|
|
|
|
setAttribute(Qt::WA_DeleteOnClose);
|
|
|
|
showMaximized();
|
2019-10-04 10:37:34 -07:00
|
|
|
|
|
|
|
m_sorter->setSourceModel(m_model);
|
|
|
|
tableView->setModel(m_sorter);
|
2019-09-29 22:30:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
Project::~Project() {
|
|
|
|
}
|
|
|
|
|
|
|
|
// EOF
|