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

void QextMdiChildView::activate (  ) 

This method does the same as focusInEvent(). That's why it is a replacement for the setFocus() call. It makes sense if you for instance want to focus (I mean raise and activate) this view although the real focus is in another toplevel widget. focusInEvent() will never get called in that case and your setFocus() call for this widget would fail without any effect. Use this method with caution, it always raises the view and pushes the taskbar button. Also when the focus is still on another MDI view in the same toplevel window where this is located!

Definition at line 408 of file qextmdichildview.cpp.

References activated(), focusInEventOccurs(), m_bInterruptActivation, m_bMainframesActivateViewIsPending, m_firstFocusableChildWidget, and m_focusedChildWidget.

Referenced by QextMdiMainFrm::activateView(), QextMdiMainFrm::closeWindow(), eventFilter(), QextMdiChildFrm::eventFilter(), focusInEvent(), QextMdiChildArea::focusTopChild(), QextMdiMainFrm::removeWindowFromMdi(), QextMdiChildArea::tileAllInternal(), QextMdiChildArea::tileAnodine(), and QextMdiChildArea::tileVertically().

   // avoid circularity
   static bool s_bActivateIsPending = FALSE;
   if(s_bActivateIsPending) {
   s_bActivateIsPending = TRUE;

   // raise the view and push the taskbar button
   if(!m_bMainframesActivateViewIsPending) {
     emit focusInEventOccurs( this);

   // if this method was called directly, check if the mainframe wants that we interrupt
   if(m_bInterruptActivation) {
      m_bInterruptActivation = FALSE;
   else {
      if(!m_bFocusInEventIsPending) {
      //qDebug("QextMdiChildView::activate() called!");
      emit activated(this);

   if(m_focusedChildWidget != 0L) {
   else {
      if(m_firstFocusableChildWidget != 0L) {
         m_focusedChildWidget = m_firstFocusableChildWidget;
   s_bActivateIsPending = FALSE;

Generated by  Doxygen 1.6.0   Back to index