X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fnicklistwidget.h;h=79caf35075300c51200502d04d263b4ad68caddb;hb=4faeafb743766b345d5cadc5289840a981413853;hp=d58735f7f3d3700808ff7a7409162744753c68c9;hpb=d28b9ec38b6ea0bc473200fc2f1e65abd1b56bd6;p=quassel.git diff --git a/src/qtui/nicklistwidget.h b/src/qtui/nicklistwidget.h index d58735f7..79caf350 100644 --- a/src/qtui/nicklistwidget.h +++ b/src/qtui/nicklistwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -22,34 +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 - Q_PROPERTY(uint currentBuffer READ currentBuffer WRITE setCurrentBuffer); // FIXME BufferId - public: NickListWidget(QWidget *parent = 0); public slots: - BufferId currentBuffer() const; - void setCurrentBuffer(BufferId bufferId); - void reset(); - + 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; - BufferId _currentBuffer; - + + QDockWidget *dock() const; +}; + + +// ============================== +// NickList Dock +// ============================== +class NickListDock : public QDockWidget { + Q_OBJECT + +public: + NickListDock(const QString &title, QWidget *parent = 0); + // ~NickListDock(); + + // virtual bool event(QEvent *event); }; #endif