X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fnicklistwidget.h;h=2da05a967b3a26f3f26cfe1fe3d3be9e6a9d7d07;hp=05f3235bdf40d0adc5c824b2156910c88da1c702;hb=9ced25191b84390d1867cf3ee19f5aec741795a8;hpb=d6b056e936ec441258d291b7a8af7b83f9f53016 diff --git a/src/qtui/nicklistwidget.h b/src/qtui/nicklistwidget.h index 05f3235b..2da05a96 100644 --- a/src/qtui/nicklistwidget.h +++ b/src/qtui/nicklistwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * 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 * @@ -22,26 +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 *); - void reset(); + 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