2
* Copyright 2011 Kurtis L. Nusbaum
4
* This file is part of UDJ.
6
* UDJ is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 2 of the License, or
9
* (at your option) any later version.
11
* UDJ is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with UDJ. If not, see <http://www.gnu.org/licenses/>.
20
#include "ParticipantsView.hpp"
21
#include "ParticipantsModel.hpp"
22
#include <QStandardItemModel>
23
#include <QHeaderView>
29
ParticipantsView::ParticipantsView(DataStore* dataStore, QWidget* parent):
33
setFocusPolicy(Qt::TabFocus);
34
setEditTriggers(QAbstractItemView::NoEditTriggers);
35
participantsModel = new ParticipantsModel(dataStore, this);
36
setModel(participantsModel);
37
setSelectionBehavior(QAbstractItemView::SelectRows);
38
setSelectionMode(QAbstractItemView::ContiguousSelection);
42
void ParticipantsView::configureHeaders(){
43
setColumnHidden(0, true);
44
horizontalHeader()->setResizeMode(QHeaderView::Stretch);
45
verticalHeader()->hide();