X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fnicklistwidget.h;h=e73f6e2a760c9fe2cb51094ebbca673f4f2c6027;hp=c5e9b8ecda4d2015277e5ea5687087ad76e4f83a;hb=bd0b31b38c8111206ce630dbeac7a6c19bdb8a6e;hpb=7a67b37e12ae8c1e7b0eea2063e071fda8ba8aee diff --git a/src/qtui/nicklistwidget.h b/src/qtui/nicklistwidget.h index c5e9b8ec..e73f6e2a 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-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,11 +15,11 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _NICKLISTWIDGET_H_ -#define _NICKLISTWIDGET_H_ +#ifndef NICKLISTWIDGET_H_ +#define NICKLISTWIDGET_H_ #include "ui_nicklistwidget.h" #include "abstractitemview.h" @@ -34,44 +34,53 @@ class Buffer; class NickView; class QDockWidget; -class NickListWidget : public AbstractItemView { - Q_OBJECT +class NickListWidget : public AbstractItemView +{ + Q_OBJECT public: - NickListWidget(QWidget *parent = 0); + NickListWidget(QWidget *parent = 0); public slots: - void showWidget(bool visible); + void showWidget(bool visible); + +signals: + void nickSelectionChanged(const QModelIndexList &); protected: - virtual QSize sizeHint() const; + QSize sizeHint() const override; + void hideEvent(QHideEvent *) override; + void showEvent(QShowEvent *) override; protected slots: - virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); - virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end); + void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override; + void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end) override; private slots: - void removeBuffer(BufferId bufferId); - + void removeBuffer(BufferId bufferId); + void nickSelectionChanged(); + private: - Ui::NickListWidget ui; - QHash nickViews; + Ui::NickListWidget ui; + QHash nickViews; - QDockWidget *dock() const; + QDockWidget *dock() const; }; // ============================== // NickList Dock // ============================== -class NickListDock : public QDockWidget { - Q_OBJECT +class NickListDock : public QDockWidget +{ + Q_OBJECT public: - NickListDock(const QString &title, QWidget *parent = 0); - // ~NickListDock(); + NickListDock(const QString &title, QWidget *parent = 0); + // ~NickListDock(); - // virtual bool event(QEvent *event); + // virtual bool event(QEvent *event); }; + #endif