refs #195, view classes for

* ATC station
* keyboard key
* server
* status message
* users
* aircrafts
This commit is contained in:
Klaus Basan
2014-04-20 18:26:44 +02:00
parent c1ad4c8271
commit 247e045288
12 changed files with 301 additions and 0 deletions

25
src/blackgui/userview.cpp Normal file
View File

@@ -0,0 +1,25 @@
#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);
}
}