/***************************************************************************
- * 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 *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef _NICKMODEL_H_
-#define _NICKMODEL_H_
+#ifndef NICKMODEL_H
+#define NICKMODEL_H
-#include <QAbstractItemModel>
+#include <QSortFilterProxyModel>
-class IrcChannel;
+class NetworkModel;
-/*
-//! Represents a single IrcUser within a NickTreeModel.
-class NickTreeItem : public TreeItem {
- Q_OBJECT
-
- public:
- NickTreeItem(IrcUser *ircuser, TreeItem *parent = 0);
-
- //virtual QVariant data(int column, int row) const;
-
- private:
+// This is proxymodel is purely for the sorting right now
+// the old nickmodel is stored for future reference in /devnotes
-};
-
-//! Represents a group of nicks, such as Ops, Voiced etc.
-class NickTreeGroupItem : public TreeItem {
+//! This ProxyModel can be used on top of a NickModel in order to provide a sorted nicklist and to hide unused categories.
+class NickModel : public QSortFilterProxyModel {
Q_OBJECT
public:
- NickTreeGroupItem(const QString &title, TreeItem *parent = 0);
-
- //virtual QVariant data(int column, int row) const;
-
- private:
-
-};
-*/
-
-//! Represents the IrcUsers in a given IrcChannel.
-class NickModel : public QAbstractItemModel {
- Q_OBJECT
-
- public:
- NickModel(IrcChannel *);
- virtual ~NickModel();
-
- private:
-
-
+ NickModel(NetworkModel *parent = 0);
};
#endif