mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
20 lines
695 B
C++
20 lines
695 B
C++
#include "keyboardkeyview.h"
|
|
#include <QHeaderView>
|
|
|
|
using namespace BlackMisc;
|
|
|
|
namespace BlackGui
|
|
{
|
|
CKeyboardKeyView::CKeyboardKeyView(QWidget *parent) : CViewBase(parent)
|
|
{
|
|
this->m_model = new CKeyboardKeyListModel(this);
|
|
this->setModel(this->m_model); // via QTableView
|
|
this->m_model->setSortColumnByPropertyIndex(BlackMisc::Hardware::CKeyboardKey::IndexFunctionAsString);
|
|
if (this->m_model->hasValidSortColumn())
|
|
this->horizontalHeader()->setSortIndicator(
|
|
this->m_model->getSortColumn(),
|
|
this->m_model->getSortOrder());
|
|
this->setItemDelegate(new BlackGui::CKeyboardKeyItemDelegate(this));
|
|
}
|
|
}
|