diff options
author | J-P Nurmi <jpnurmi@gmail.com> | 2009-10-01 18:41:44 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-12-08 11:16:03 (GMT) |
commit | e1c515f73eca4e85211fffc718b3d9e27f21eb19 (patch) | |
tree | 9209182ae72f8a2e02cd95377ad439aba79ff484 /src/gui/widgets | |
parent | 0c9aa0cc58e3cf3f477024b35291b407be059c01 (diff) | |
download | Qt-e1c515f73eca4e85211fffc718b3d9e27f21eb19.zip Qt-e1c515f73eca4e85211fffc718b3d9e27f21eb19.tar.gz Qt-e1c515f73eca4e85211fffc718b3d9e27f21eb19.tar.bz2 |
Added QToolBar::visibilityChanged(bool) signal.
Reviewed-By: Thierry
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qtoolbar.cpp | 9 | ||||
-rw-r--r-- | src/gui/widgets/qtoolbar.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp index 58a3d28..47c4698 100644 --- a/src/gui/widgets/qtoolbar.cpp +++ b/src/gui/widgets/qtoolbar.cpp @@ -534,6 +534,14 @@ void QToolBarPrivate::plug(const QRect &r) /*! + \fn void QToolBar::visibilityChanged(bool visible) + \since 4.7 + + This signal is emitted when the toolbar becomes \a visible (or + invisible). This happens when the widget is hidden or shown. +*/ + +/*! Constructs a QToolBar with the given \a parent. */ QToolBar::QToolBar(QWidget *parent) @@ -1123,6 +1131,7 @@ bool QToolBar::event(QEvent *event) // fallthrough intended case QEvent::Show: d->toggleViewAction->setChecked(event->type() == QEvent::Show); + emit visibilityChanged(event->type() == QEvent::Show); #if defined(Q_WS_MAC) if (toolbarInUnifiedToolBar(this)) { // I can static_cast because I did the qobject_cast in the if above, therefore diff --git a/src/gui/widgets/qtoolbar.h b/src/gui/widgets/qtoolbar.h index a1a24f0..9712637 100644 --- a/src/gui/widgets/qtoolbar.h +++ b/src/gui/widgets/qtoolbar.h @@ -143,6 +143,7 @@ Q_SIGNALS: void iconSizeChanged(const QSize &iconSize); void toolButtonStyleChanged(Qt::ToolButtonStyle toolButtonStyle); void topLevelChanged(bool topLevel); + void visibilityChanged(bool visible); protected: void actionEvent(QActionEvent *event); |