Files
pilotclient/src/blackgui/userview.cpp
Klaus Basan 247e045288 refs #195, view classes for
* ATC station
* keyboard key
* server
* status message
* users
* aircrafts
2014-04-28 20:35:26 +02:00

26 lines
826 B
C++

#include "userview.h"
#include <QHeaderView>
using namespace BlackMisc;
namespace BlackGui
{
CUserView::CUserView(QWidget *parent) : CViewBase(parent)
{
this->m_model = new CUserListModel(CUserListModel::UserDetailed, this);
this->setModel(this->m_model); // via QTableView
this->m_model->setSortColumnByPropertyIndex(BlackMisc::Network::CUser::IndexRealName);
if (this->m_model->hasValidSortColumn())
this->horizontalHeader()->setSortIndicator(
this->m_model->getSortColumn(),
this->m_model->getSortOrder());
this->horizontalHeader()->setStretchLastSection(true);
}
void CUserView::setUserMode(CUserListModel::UserMode userMode)
{
Q_ASSERT(this->m_model);
this->m_model->setUserMode(userMode);
}
}