projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SQL-Queries are now stored in a resource. The bashscript
[quassel.git]
/
src
/
uisupport
/
nickview.cpp
diff --git
a/src/uisupport/nickview.cpp
b/src/uisupport/nickview.cpp
index
26a345d
..
b892292
100644
(file)
--- a/
src/uisupport/nickview.cpp
+++ b/
src/uisupport/nickview.cpp
@@
-1,11
+1,11
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-0
7 by the Quassel IRC Team
*
+ * Copyright (C) 2005-0
8 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 *
* 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 *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
@@
-21,12
+21,22
@@
#include "nickview.h"
#include "nickmodel.h"
#include "nickview.h"
#include "nickmodel.h"
+#include <QHeaderView>
+#include <QDebug>
NickView::NickView(QWidget *parent) : QTreeView(parent) {
setGeometry(0, 0, 30, 30);
//setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
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() {
@@
-35,5
+45,12
@@
NickView::~NickView() {
}
void NickView::setModel(NickModel *model) {
}
void NickView::setModel(NickModel *model) {
- QTreeView::setModel(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?
+}
+