X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fuisupport%2Fnickview.cpp;h=fe4b9e76b640733e2e411f32abe2af61a29f0903;hb=50706d89d4d60e258ebb6873d3778383621898e4;hp=7d9545cd6ed4479cca12fe2381203e6c5ff3090c;hpb=7795adca52f35204f8c354da6fcc5d8e8ee35531;p=quassel.git diff --git a/src/uisupport/nickview.cpp b/src/uisupport/nickview.cpp index 7d9545cd..fe4b9e76 100644 --- a/src/uisupport/nickview.cpp +++ b/src/uisupport/nickview.cpp @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by the Quassel IRC Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -19,15 +19,38 @@ ***************************************************************************/ #include "nickview.h" +#include "nickmodel.h" + +#include +#include NickView::NickView(QWidget *parent) : QTreeView(parent) { + setGeometry(0, 0, 30, 30); + //setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + + setIndentation(10); + header()->hide(); + header()->hideSection(1); + setAnimated(true); + setSortingEnabled(true); + sortByColumn(0, Qt::AscendingOrder); + +// filteredModel = new FilteredNickModel(this); +// QTreeView::setModel(filteredModel); +} +NickView::~NickView() { } -NickView::~NickView() { - +// void NickView::setModel(NickModel *model) { +// filteredModel->setSourceModel(model); +// expandAll(); +// } +void NickView::rowsInserted(const QModelIndex &index, int start, int end) { + QTreeView::rowsInserted(index, start, end); + expandAll(); // FIXME We need to do this more intelligently. Maybe a pimped TreeView? }