~ubuntu-branches/ubuntu/wily/udj-desktop-client/wily

« back to all changes in this revision

Viewing changes to src/ParticipantsView.cpp

  • Committer: Package Import Robot
  • Author(s): Nathan Handler
  • Date: 2012-11-14 15:29:07 UTC
  • mfrom: (1.2.1) (4.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20121114152907-8uj9bwcima77vu28
Tags: 0.6.3-1
* New upstream release
* debian/copyright: Add stanzas for new upstream files
* debian/rules:
  - Do not install ./usr/share/doc/udj/UDJ.1
  - Remove /usr/share/doc/udj directory if it is empty
* debian/control:
  - Bump Standards-Version to 3.9.4 (no changes)
  - Use my @debian.org address for the Maintainer field

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * Copyright 2011 Kurtis L. Nusbaum
 
3
 * 
 
4
 * This file is part of UDJ.
 
5
 * 
 
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.
 
10
 * 
 
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.
 
15
 * 
 
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/>.
 
18
 */
 
19
 
 
20
#include "ParticipantsView.hpp"
 
21
#include "ParticipantsModel.hpp"
 
22
#include <QStandardItemModel>
 
23
#include <QHeaderView>
 
24
 
 
25
 
 
26
namespace UDJ{
 
27
 
 
28
 
 
29
ParticipantsView::ParticipantsView(DataStore* dataStore, QWidget* parent):
 
30
  QTableView(parent),
 
31
  dataStore(dataStore)
 
32
{
 
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);
 
39
  configureHeaders();
 
40
}
 
41
 
 
42
void ParticipantsView::configureHeaders(){
 
43
  setColumnHidden(0, true);
 
44
  horizontalHeader()->setResizeMode(QHeaderView::Stretch);
 
45
  verticalHeader()->hide();
 
46
}
 
47
 
 
48
 
 
49
} //end namesapce UDJ