src/gui/widgets/qtoolbar.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   181     if (!rect.isNull())
   181     if (!rect.isNull())
   182         q->setGeometry(rect);
   182         q->setGeometry(rect);
   183 
   183 
   184     if (visible)
   184     if (visible)
   185         q->show();
   185         q->show();
       
   186 
       
   187     if (floating != wasFloating)
       
   188         emit q->topLevelChanged(floating);
   186 }
   189 }
   187 
   190 
   188 void QToolBarPrivate::initDrag(const QPoint &pos)
   191 void QToolBarPrivate::initDrag(const QPoint &pos)
   189 {
   192 {
   190     Q_Q(QToolBar);
   193     Q_Q(QToolBar);
   391 }
   394 }
   392 
   395 
   393 void QToolBarPrivate::unplug(const QRect &_r)
   396 void QToolBarPrivate::unplug(const QRect &_r)
   394 {
   397 {
   395     Q_Q(QToolBar);
   398     Q_Q(QToolBar);
   396     layout->setExpanded(false, false);
       
   397     QRect r = _r;
   399     QRect r = _r;
   398     r.moveTopLeft(q->mapToGlobal(QPoint(0, 0)));
   400     r.moveTopLeft(q->mapToGlobal(QPoint(0, 0)));
   399     setWindowState(true, true, r);
   401     setWindowState(true, true, r);
       
   402     layout->setExpanded(false);
   400 }
   403 }
   401 
   404 
   402 void QToolBarPrivate::plug(const QRect &r)
   405 void QToolBarPrivate::plug(const QRect &r)
   403 {
   406 {
   404     setWindowState(false, false, r);
   407     setWindowState(false, false, r);
   514     \a toolButtonStyle parameter holds the toolbar's new tool button
   517     \a toolButtonStyle parameter holds the toolbar's new tool button
   515     style.
   518     style.
   516 
   519 
   517     \sa toolButtonStyle QMainWindow::toolButtonStyle
   520     \sa toolButtonStyle QMainWindow::toolButtonStyle
   518 */
   521 */
       
   522 
       
   523 /*!
       
   524     \since 4.6
       
   525 
       
   526     \fn void QToolBar::topLevelChanged(bool topLevel)
       
   527 
       
   528     This signal is emitted when the \l floating property changes.
       
   529     The \a topLevel parameter is true if the toolbar is now floating;
       
   530     otherwise it is false.
       
   531 
       
   532     \sa isWindow()
       
   533 */
       
   534 
   519 
   535 
   520 /*!
   536 /*!
   521     Constructs a QToolBar with the given \a parent.
   537     Constructs a QToolBar with the given \a parent.
   522 */
   538 */
   523 QToolBar::QToolBar(QWidget *parent)
   539 QToolBar::QToolBar(QWidget *parent)