X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fverticaldock.h;h=e6e6e13279898c4b8a5e6b11e3b9883456d18110;hp=33e684e5b12a8b2efb8041ca03a1bc4ace200441;hb=f9efdde7f3a6004af8f834c409cfa6ae1d877692;hpb=6ffaa82b95c0be603b9f94688c435bdcf6129230 diff --git a/src/qtui/verticaldock.h b/src/qtui/verticaldock.h index 33e684e5..e6e6e132 100644 --- a/src/qtui/verticaldock.h +++ b/src/qtui/verticaldock.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005/06 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,7 +15,7 @@ * 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 VERTICALDOCKTITLE_H @@ -24,31 +24,47 @@ #include #include -class VerticalDockTitle : public QWidget { - Q_OBJECT +class VerticalDockTitle : public QWidget +{ + Q_OBJECT public: - VerticalDockTitle(QDockWidget *parent); - virtual ~VerticalDockTitle(); + VerticalDockTitle(QDockWidget *parent); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + QSize sizeHint() const override; + QSize minimumSizeHint() const override; + void show(bool show_); protected: - virtual void paintEvent(QPaintEvent *event); + void paintEvent(QPaintEvent *event) override; + +private: + bool _show; +}; + + +class EmptyDockTitle : public QWidget +{ + Q_OBJECT + +public: + inline EmptyDockTitle(QDockWidget *parent) : QWidget(parent) {} + + inline QSize sizeHint() const override { return {0, 0}; } }; -class VerticalDock : public QDockWidget { - Q_OBJECT + +class VerticalDock : public QDockWidget +{ + Q_OBJECT public: - VerticalDock(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0); - VerticalDock(QWidget *parent = 0, Qt::WindowFlags flags = 0); - virtual ~VerticalDock(); + VerticalDock(const QString &title, QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr); + VerticalDock(QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr); - void setDefaultTitleWidget(); + void showTitle(bool show); + void setDefaultTitleWidget(); }; #endif // VERTICALDOCKTITLE_H -