X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fnicklistwidget.h;h=c5e9b8ecda4d2015277e5ea5687087ad76e4f83a;hp=579d8fbf564d32ca59708d9ca216b422de47d85f;hb=7a67b37e12ae8c1e7b0eea2063e071fda8ba8aee;hpb=e671e9da1edaab37ec403f575979f9a92a766e9a diff --git a/src/qtui/nicklistwidget.h b/src/qtui/nicklistwidget.h index 579d8fbf..c5e9b8ec 100644 --- a/src/qtui/nicklistwidget.h +++ b/src/qtui/nicklistwidget.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 * @@ -22,25 +22,56 @@ #define _NICKLISTWIDGET_H_ #include "ui_nicklistwidget.h" +#include "abstractitemview.h" +#include "buffermodel.h" + +#include "types.h" #include +#include class Buffer; class NickView; +class QDockWidget; -class NickListWidget : public QWidget { +class NickListWidget : public AbstractItemView { Q_OBJECT - public: - NickListWidget(QWidget *parent = 0); +public: + NickListWidget(QWidget *parent = 0); + +public slots: + void showWidget(bool visible); + +protected: + virtual QSize sizeHint() const; + +protected slots: + virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); + virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end); + +private slots: + void removeBuffer(BufferId bufferId); + +private: + Ui::NickListWidget ui; + QHash nickViews; - public slots: - void setBuffer(Buffer *); + QDockWidget *dock() const; +}; + + +// ============================== +// NickList Dock +// ============================== +class NickListDock : public QDockWidget { + Q_OBJECT - private: - Ui::NickListWidget ui; - QHash nickViews; +public: + NickListDock(const QString &title, QWidget *parent = 0); + // ~NickListDock(); + // virtual bool event(QEvent *event); }; #endif