Logo Search packages:      
Sourcecode: kbear version File versions  Download package

void QextMdiMainFrm::activateView ( QextMdiChildView pWnd  )  [protected, virtual, slot]

Sets the focus to this MDI view, raises it, activates its taskbar button and updates the system buttons in the main menubar when in maximized (Maximize mode).

Definition at line 747 of file qextmdimainfrm.cpp.

References QextMdiChildView::activate(), QextMdiChildView::isAttached(), QextMdiChildView::m_bInterruptActivation, QextMdiChildView::m_bMainframesActivateViewIsPending, QextMdiChildView::mdiParent(), QextMdiChildView::raise(), QextMdiChildFrm::raiseAndActivate(), QextMdiTaskBar::setActiveButton(), QextMdiChildArea::setTopChild(), and QextMdiChildArea::topChild().

{
   pWnd->m_bMainframesActivateViewIsPending = TRUE;

       bool bActivateNecessary = TRUE;
   if (m_pCurrentWindow != pWnd) {
      m_pCurrentWindow = pWnd;
   }
   else {
      bActivateNecessary = FALSE;
                  // if this method is called as answer to view->activate(),
                  // interrupt it because it's not necessary
      pWnd->m_bInterruptActivation = TRUE;
   }

   if (m_pTaskBar) {
      m_pTaskBar->setActiveButton(pWnd);
   }

   if (m_mdiMode == QextMdi::TabPageMode) {
      makeWidgetDockVisible(pWnd);
      m_pDockbaseOfTabPage = (KDockWidget*) pWnd->parentWidget();
   }
   else {
      if (pWnd->isAttached()) {
         if (bActivateNecessary && (m_pMdi->topChild() == pWnd->mdiParent())) {
            pWnd->activate();
         }
         pWnd->mdiParent()->raiseAndActivate();
      }
      if (!pWnd->isAttached()) {
                         if (bActivateNecessary)
               pWnd->activate();
         m_pMdi->setTopChild(0L); // lose focus in the mainframe window
         if (!pWnd->isActiveWindow()) {
            pWnd->setActiveWindow();
         }
         pWnd->raise();
//         if (!pWnd->hasFocus()) {
//            pWnd->setFocus();
//         }
      }
   }
   pWnd->m_bMainframesActivateViewIsPending = FALSE;
}


Generated by  Doxygen 1.6.0   Back to index