1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 00:32:49 +00:00
OpenMW/apps/opencs/view/world/globals.cpp
2012-11-26 12:29:22 +01:00

26 lines
694 B
C++

#include "globals.hpp"
#include <QTableView>
#include <QHeaderView>
#include <QSortFilterProxyModel>
#include "../../model/world/data.hpp"
CSVWorld::Globals::Globals (const CSMWorld::UniversalId& id, CSMWorld::Data& data)
: SubView (id)
{
QTableView *table = new QTableView();
setWidget (table);
QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel (this);
proxyModel->setSourceModel (data.getTableModel (id));
table->setModel (proxyModel);
table->horizontalHeader()->setResizeMode (QHeaderView::Interactive);
table->verticalHeader()->hide();
table->setSortingEnabled (true);
/// \todo make initial layout fill the whole width of the table
}