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

QPopupMenu * QextMdiMainFrm::taskBarPopup ( QextMdiChildView pWnd,
bool  bIncludeWindowPopup = FALSE 
) [virtual]

Returns a popup menu filled according to the MDI view state. You can override this method to insert additional entries there. The popup menu is usually popuped when the user clicks with the right mouse button on a taskbar entry. The default entries are: Undock/Dock, Restore/Maximize/Minimize, Close and an empty sub-popup ( windowPopup() ) menu called Operations.

Reimplemented in KBear.

Definition at line 725 of file qextmdimainfrm.cpp.

References QextMdiChildView::isAttached(), QextMdiChildView::isMaximized(), and QextMdiChildView::isMinimized().

Referenced by taskbarButtonRightClicked(), KBear::taskBarPopup(), and windowPopup().

{
   //returns the g_pTaskBarPopup filled according to the QextMdiChildView state
   m_pTaskBarPopup->clear();
   if(pWnd->isAttached()){
      m_pTaskBarPopup->insertItem(tr("Undock"),pWnd,SLOT(detach()));
      m_pTaskBarPopup->insertSeparator();
      if(pWnd->isMinimized() || pWnd->isMaximized())
         m_pTaskBarPopup->insertItem(tr("Restore"),pWnd,SLOT(restore()));
      if(!pWnd->isMaximized())m_pTaskBarPopup->insertItem(tr("Maximize"),pWnd,SLOT(maximize()));
      if(!pWnd->isMinimized())m_pTaskBarPopup->insertItem(tr("Minimize"),pWnd,SLOT(minimize()));
   } else m_pTaskBarPopup->insertItem(tr("Dock"),pWnd,SLOT(attach()));
   m_pTaskBarPopup->insertSeparator();
   m_pTaskBarPopup->insertItem(tr("Close"),pWnd,SLOT(close()));
   // the window has a view...get the window popup
/* changed by kbjorn
   m_pTaskBarPopup->insertSeparator();
   m_pTaskBarPopup->insertItem(tr("Operations"),windowPopup(pWnd,FALSE));  //alvoid recursion
*/
      return m_pTaskBarPopup;
}


Generated by  Doxygen 1.6.0   Back to index