refs #227, view/model for client class

* model
* view
* and GUI component which now encapsulates the user table view
This commit is contained in:
Klaus Basan
2014-05-06 13:23:47 +02:00
parent 31b83e0f1e
commit 4686da4827
7 changed files with 296 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#include "clientview.h"
#include <QHeaderView>
using namespace BlackMisc;
namespace BlackGui
{
CClientView::CClientView(QWidget *parent) : CViewBase(parent)
{
this->m_model = new CClientListModel(this);
this->setModel(this->m_model); // via QTableView
this->m_model->setSortColumnByPropertyIndex(BlackMisc::Network::CClient::IndexRealName);
if (this->m_model->hasValidSortColumn())
this->horizontalHeader()->setSortIndicator(
this->m_model->getSortColumn(),
this->m_model->getSortOrder());
this->horizontalHeader()->setStretchLastSection(true);
}
}