X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fnickmodel.h;h=2dc3574212a1b1eea92498172dd89fba7b544945;hp=313c67811758246a80b60296bbcc95728067ef73;hb=a9b3edc811552b39dafb8fb01699490e5bcfb014;hpb=b173301cf898a31c19835f0512883b3ac15cdf55 diff --git a/src/client/nickmodel.h b/src/client/nickmodel.h index 313c6781..2dc35742 100644 --- a/src/client/nickmodel.h +++ b/src/client/nickmodel.h @@ -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 * @@ -18,52 +18,22 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef _NICKMODEL_H_ -#define _NICKMODEL_H_ +#ifndef NICKMODEL_H +#define NICKMODEL_H -#include +#include -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