removing some debug messages
[quassel.git] / src / uisupport / nickview.cpp
1 /***************************************************************************
2  *   Copyright (C) 2005-07 by the Quassel IRC Team                         *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20
21 #include "nickview.h"
22 #include "nickmodel.h"
23
24 #include <QHeaderView>
25
26 NickView::NickView(QWidget *parent) : QTreeView(parent) {
27   setGeometry(0, 0, 30, 30);
28   //setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
29
30   setIndentation(10);
31   header()->hide();
32   header()->hideSection(1);
33   setAnimated(true);
34   setSortingEnabled(true);
35   sortByColumn(0, Qt::AscendingOrder);
36
37   filteredModel = new FilteredNickModel(this);
38   QTreeView::setModel(filteredModel);
39 }
40
41 NickView::~NickView() {
42
43
44 }
45
46 void NickView::setModel(NickModel *model) {
47   filteredModel->setSourceModel(model);
48   expandAll();
49 }