equal
deleted
inserted
replaced
531 \sa isWindow() |
531 \sa isWindow() |
532 */ |
532 */ |
533 |
533 |
534 |
534 |
535 /*! |
535 /*! |
|
536 \fn void QToolBar::visibilityChanged(bool visible) |
|
537 \since 4.7 |
|
538 |
|
539 This signal is emitted when the toolbar becomes \a visible (or |
|
540 invisible). This happens when the widget is hidden or shown. |
|
541 */ |
|
542 |
|
543 /*! |
536 Constructs a QToolBar with the given \a parent. |
544 Constructs a QToolBar with the given \a parent. |
537 */ |
545 */ |
538 QToolBar::QToolBar(QWidget *parent) |
546 QToolBar::QToolBar(QWidget *parent) |
539 : QWidget(*new QToolBarPrivate, parent, 0) |
547 : QWidget(*new QToolBarPrivate, parent, 0) |
540 { |
548 { |
1120 if (!isHidden()) |
1128 if (!isHidden()) |
1121 break; |
1129 break; |
1122 // fallthrough intended |
1130 // fallthrough intended |
1123 case QEvent::Show: |
1131 case QEvent::Show: |
1124 d->toggleViewAction->setChecked(event->type() == QEvent::Show); |
1132 d->toggleViewAction->setChecked(event->type() == QEvent::Show); |
|
1133 emit visibilityChanged(event->type() == QEvent::Show); |
1125 #if defined(Q_WS_MAC) |
1134 #if defined(Q_WS_MAC) |
1126 if (toolbarInUnifiedToolBar(this)) { |
1135 if (toolbarInUnifiedToolBar(this)) { |
1127 // I can static_cast because I did the qobject_cast in the if above, therefore |
1136 // I can static_cast because I did the qobject_cast in the if above, therefore |
1128 // we must have a QMainWindowLayout here. |
1137 // we must have a QMainWindowLayout here. |
1129 QMainWindowLayout *mwLayout = static_cast<QMainWindowLayout *>(parentWidget()->layout()); |
1138 QMainWindowLayout *mwLayout = static_cast<QMainWindowLayout *>(parentWidget()->layout()); |