quake-tools/source/quam/project.cc

30 lines
607 B
C++
Raw Normal View History

#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) :
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}}
{
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);
}
Project::~Project() {
}
// EOF