X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fnicklistwidget.h;h=f1292d4616b1b71f15498a1c0d1fd53334719c77;hp=18f966aa5b3c3071fc27701964bb2fd789d51b76;hb=e38846f054ad1766f2e91992a57bbaffd33c7c06;hpb=982359db5545edf340a246cd13dfcdc9bf2ccf33 diff --git a/src/qtui/nicklistwidget.h b/src/qtui/nicklistwidget.h index 18f966aa..f1292d46 100644 --- a/src/qtui/nicklistwidget.h +++ b/src/qtui/nicklistwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,69 +15,73 @@ * 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_ -#include "ui_nicklistwidget.h" +#include +#include + #include "abstractitemview.h" #include "buffermodel.h" - #include "types.h" -#include -#include +#include "ui_nicklistwidget.h" 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 = nullptr); public slots: - void showWidget(bool visible); + void showWidget(bool visible); + void setVisible(bool visible) override; signals: - void nickSelectionChanged(const QModelIndexList &); + void nickSelectionChanged(const QModelIndexList&); protected: - virtual QSize sizeHint() const; - virtual void hideEvent(QHideEvent *); - virtual void showEvent(QShowEvent *); + 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& current, const QModelIndex& previous) override; + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override; -private slots: - void removeBuffer(BufferId bufferId); - void nickSelectionChanged(); +private: + void removeBuffer(BufferId bufferId); + void onNickSelectionChanged(); 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 = nullptr); + // ~NickListDock(); + + void setLocked(bool locked); - // virtual bool event(QEvent *event); + // virtual bool event(QEvent *event); }; #endif