.TH "KMdiMainFrm" kde3 "11 Jun 2005" "Version Version 3.4.1" "kmdi Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KMdiMainFrm \- Base class for all your special main frames.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kmdimainfrm.h>\fP
.PP
Inherits DockMainWindow.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBExistsAs\fP { \fBDocumentView\fP, \fBToolView\fP, \fBAnyView\fP }"
.br
.in -1c
.SS "Public Slots"

.in +1c
.ti -1c
.RI "\fBKMdiChildView\fP * \fBcreateWrapper\fP (\fBQWidget\fP *view, const \fBQString\fP &name, const \fBQString\fP &shortName)"
.br
.ti -1c
.RI "virtual void \fBaddWindow\fP (\fBKMdiChildView\fP *pView, int flags=KMdi::StandardAdd)"
.br
.ti -1c
.RI "void \fBaddWindow\fP (\fBKMdiChildView\fP *pView, int flags, int index)"
.br
.ti -1c
.RI "virtual void \fBaddWindow\fP (\fBKMdiChildView\fP *pView, \fBQPoint\fP pos, int flags=KMdi::StandardAdd)"
.br
.ti -1c
.RI "virtual void \fBaddWindow\fP (\fBKMdiChildView\fP *pView, \fBQRect\fP rectNormal, int flags=KMdi::StandardAdd)"
.br
.ti -1c
.RI "virtual KMdiToolViewAccessor * \fBaddToolWindow\fP (\fBQWidget\fP *pWnd, KDockWidget::DockPosition pos=KDockWidget::DockNone, \fBQWidget\fP *pTargetWnd=0L, int percent=50, const \fBQString\fP &tabToolTip=0, const \fBQString\fP &tabCaption=0)"
.br
.ti -1c
.RI "virtual void \fBdeleteToolWindow\fP (\fBQWidget\fP *pWnd)"
.br
.ti -1c
.RI "virtual void \fBdeleteToolWindow\fP (KMdiToolViewAccessor *accessor)"
.br
.ti -1c
.RI "KMdiToolViewAccessor * \fBcreateToolWindow\fP ()"
.br
.ti -1c
.RI "virtual void \fBremoveWindowFromMdi\fP (\fBKMdiChildView\fP *pWnd)"
.br
.ti -1c
.RI "virtual void \fBcloseWindow\fP (\fBKMdiChildView\fP *pWnd, bool layoutTaskBar=true)"
.br
.ti -1c
.RI "virtual void \fBslot_toggleTaskBar\fP ()"
.br
.ti -1c
.RI "virtual void \fBattachWindow\fP (\fBKMdiChildView\fP *pWnd, bool bShow=true, bool bAutomaticResize=false)"
.br
.ti -1c
.RI "virtual void \fBdetachWindow\fP (\fBKMdiChildView\fP *pWnd, bool bShow=true)"
.br
.ti -1c
.RI "virtual void \fBchildWindowCloseRequest\fP (\fBKMdiChildView\fP *pWnd)"
.br
.ti -1c
.RI "virtual void \fBcloseAllViews\fP ()"
.br
.ti -1c
.RI "virtual void \fBiconifyAllViews\fP ()"
.br
.ti -1c
.RI "virtual void \fBcloseActiveView\fP ()"
.br
.ti -1c
.RI "virtual void \fBswitchToToplevelMode\fP ()"
.br
.ti -1c
.RI "virtual void \fBfinishToplevelMode\fP ()"
.br
.ti -1c
.RI "virtual void \fBswitchToChildframeMode\fP ()"
.br
.ti -1c
.RI "virtual void \fBfinishChildframeMode\fP ()"
.br
.ti -1c
.RI "virtual void \fBswitchToTabPageMode\fP ()"
.br
.ti -1c
.RI "virtual void \fBfinishTabPageMode\fP ()"
.br
.ti -1c
.RI "virtual void \fBswitchToIDEAlMode\fP ()"
.br
.ti -1c
.RI "virtual void \fBfinishIDEAlMode\fP (bool full=true)"
.br
.ti -1c
.RI "void \fBsetIDEAlModeStyle\fP (int flags) KDE_DEPRECATED"
.br
.ti -1c
.RI "void \fBsetToolviewStyle\fP (int flags)"
.br
.ti -1c
.RI "bool \fBisViewTaskBarOn\fP ()"
.br
.ti -1c
.RI "virtual void \fBshowViewTaskBar\fP ()"
.br
.ti -1c
.RI "virtual void \fBhideViewTaskBar\fP ()"
.br
.ti -1c
.RI "virtual void \fBfillWindowMenu\fP ()"
.br
.ti -1c
.RI "virtual void \fBcascadeWindows\fP ()"
.br
.ti -1c
.RI "virtual void \fBcascadeMaximized\fP ()"
.br
.ti -1c
.RI "virtual void \fBexpandVertical\fP ()"
.br
.ti -1c
.RI "virtual void \fBexpandHorizontal\fP ()"
.br
.ti -1c
.RI "virtual void \fBtilePragma\fP ()"
.br
.ti -1c
.RI "virtual void \fBtileAnodine\fP ()"
.br
.ti -1c
.RI "virtual void \fBtileVertically\fP ()"
.br
.ti -1c
.RI "virtual void \fBsetFrameDecorOfAttachedViews\fP (int frameDecor)"
.br
.ti -1c
.RI "virtual void \fBsetEnableMaximizedChildFrmMode\fP (bool bEnable)"
.br
.ti -1c
.RI "virtual void \fBactivateNextWin\fP ()"
.br
.ti -1c
.RI "virtual void \fBactivatePrevWin\fP ()"
.br
.ti -1c
.RI "virtual void \fBactivateFirstWin\fP ()"
.br
.ti -1c
.RI "virtual void \fBactivateLastWin\fP ()"
.br
.ti -1c
.RI "virtual void \fBactivateView\fP (int index)"
.br
.ti -1c
.RI "void \fBprevToolViewInDock\fP ()"
.br
.ti -1c
.RI "void \fBnextToolViewInDock\fP ()"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBlastChildFrmClosed\fP ()"
.br
.ti -1c
.RI "void \fBlastChildViewClosed\fP ()"
.br
.ti -1c
.RI "void \fBleftTopLevelMode\fP ()"
.br
.ti -1c
.RI "void \fBchildViewIsDetachedNow\fP (\fBQWidget\fP *)"
.br
.ti -1c
.RI "void \fBcollapseOverlapContainers\fP ()"
.br
.ti -1c
.RI "void \fBmdiModeHasBeenChangedTo\fP (KMdi::MdiMode)"
.br
.ti -1c
.RI "void \fBviewActivated\fP (\fBKMdiChildView\fP *)"
.br
.ti -1c
.RI "void \fBviewDeactivated\fP (\fBKMdiChildView\fP *)"
.br
.ti -1c
.RI "void \fBtoggleTop\fP ()"
.br
.ti -1c
.RI "void \fBtoggleLeft\fP ()"
.br
.ti -1c
.RI "void \fBtoggleRight\fP ()"
.br
.ti -1c
.RI "void \fBtoggleBottom\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKMdiMainFrm\fP (\fBQWidget\fP *parentWidget, const char *name='', KMdi::MdiMode mdiMode=KMdi::ChildframeMode, WFlags flags=WType_TopLevel|WDestructiveClose)"
.br
.ti -1c
.RI "void \fBsetStandardMDIMenuEnabled\fP (bool showModeMenu=true)"
.br
.ti -1c
.RI "void \fBsetManagedDockPositionModeEnabled\fP (bool enabled)"
.br
.ti -1c
.RI "bool \fBisInMaximizedChildFrmMode\fP ()"
.br
.ti -1c
.RI "KMdi::MdiMode \fBmdiMode\fP ()"
.br
.ti -1c
.RI "\fBKMdiChildView\fP * \fBactiveWindow\fP ()"
.br
.ti -1c
.RI "virtual \fBQPopupMenu\fP * \fBtaskBarPopup\fP (\fBKMdiChildView\fP *pWnd, bool bIncludeWindowPopup=false)"
.br
.ti -1c
.RI "virtual \fBQPopupMenu\fP * \fBwindowPopup\fP (\fBKMdiChildView\fP *pWnd, bool bIncludeTaskbarPopup=true)"
.br
.ti -1c
.RI "virtual void \fBapplyOptions\fP ()"
.br
.ti -1c
.RI "\fBKMdiChildView\fP * \fBfindWindow\fP (const \fBQString\fP &caption)"
.br
.ti -1c
.RI "bool \fBwindowExists\fP (\fBKMdiChildView\fP *pWnd, ExistsAs as)"
.br
.ti -1c
.RI "virtual bool \fBevent\fP (\fBQEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBsetSysButtonsAtMenuPosition\fP ()"
.br
.ti -1c
.RI "virtual int \fBtaskBarHeight\fP ()"
.br
.ti -1c
.RI "virtual void \fBsetUndockPositioningOffset\fP (\fBQPoint\fP offset)"
.br
.ti -1c
.RI "KMdiIterator< \fBKMdiChildView\fP * > * \fBcreateIterator\fP ()"
.br
.ti -1c
.RI "void \fBdeleteIterator\fP (KMdiIterator< \fBKMdiChildView\fP * > *pIt)"
.br
.ti -1c
.RI "\fBQPopupMenu\fP * \fBwindowMenu\fP () const "
.br
.ti -1c
.RI "virtual void \fBsetBackgroundColor\fP (const \fBQColor\fP &c)"
.br
.ti -1c
.RI "virtual void \fBsetBackgroundPixmap\fP (const \fBQPixmap\fP &pm)"
.br
.ti -1c
.RI "void \fBsetDefaultChildFrmSize\fP (const \fBQSize\fP &sz)"
.br
.ti -1c
.RI "\fBQSize\fP \fBdefaultChildFrmSize\fP ()"
.br
.ti -1c
.RI "virtual void \fBsetMinimumSize\fP (int minw, int minh)"
.br
.ti -1c
.RI "int \fBchildFrameModeHeight\fP ()"
.br
.ti -1c
.RI "virtual void \fBsetMenuForSDIModeSysButtons\fP (KMenuBar *menuBar=0)"
.br
.ti -1c
.RI "void \fBfakeSDIApplication\fP ()"
.br
.ti -1c
.RI "bool \fBisFakingSDIApplication\fP () const "
.br
.ti -1c
.RI "virtual bool \fBeventFilter\fP (\fBQObject\fP *obj, \fBQEvent\fP *e)"
.br
.ti -1c
.RI "void \fBfindRootDockWidgets\fP (\fBQPtrList\fP< KDockWidget > *pRootDockWidgetList, \fBQValueList\fP< \fBQRect\fP > *pPositionList)"
.br
.ti -1c
.RI "void \fBsetSwitching\fP (const bool switching)"
.br
.ti -1c
.RI "bool \fBswitching\fP (void) const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static int \fBframeDecorOfAttachedViews\fP ()"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "virtual void \fBactivateView\fP (\fBKMdiChildView\fP *pWnd)"
.br
.ti -1c
.RI "virtual void \fBtaskbarButtonRightClicked\fP (\fBKMdiChildView\fP *pWnd)"
.br
.ti -1c
.RI "void \fBswitchOffMaximizeModeForMenu\fP (\fBKMdiChildFrm\fP *oldChild)"
.br
.ti -1c
.RI "void \fBupdateSysButtonConnections\fP (\fBKMdiChildFrm\fP *oldChild, \fBKMdiChildFrm\fP *newChild)"
.br
.ti -1c
.RI "void \fBwindowMenuItemActivated\fP (int id)"
.br
.ti -1c
.RI "void \fBdockMenuItemActivated\fP (int id)"
.br
.ti -1c
.RI "void \fBpopupWindowMenu\fP (\fBQPoint\fP p)"
.br
.ti -1c
.RI "void \fBdragEndTimeOut\fP ()"
.br
.ti -1c
.RI "void \fBcloseViewButtonPressed\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBresizeEvent\fP (\fBQResizeEvent\fP *)"
.br
.ti -1c
.RI "virtual void \fBcreateTaskBar\fP ()"
.br
.ti -1c
.RI "virtual void \fBcreateMdiManager\fP ()"
.br
.ti -1c
.RI "void \fBblockClearingOfWindowMenu\fP (bool bBlocked)"
.br
.ti -1c
.RI "void \fBfindToolViewsDockedToMain\fP (\fBQPtrList\fP< KDockWidget > *list, KDockWidget::DockPosition dprtmw)"
.br
.ti -1c
.RI "void \fBdockToolViewsIntoContainers\fP (\fBQPtrList\fP< KDockWidget > &widgetsToReparent, KDockWidget *container)"
.br
.ti -1c
.RI "\fBQStringList\fP \fBprepareIdealToTabs\fP (KDockWidget *container)"
.br
.ti -1c
.RI "void \fBidealToolViewsToStandardTabs\fP (\fBQStringList\fP widgetNames, KDockWidget::DockPosition pos, int sizee)"
.br
.ti -1c
.RI "KMdi::TabWidgetVisibility \fBtabWidgetVisibility\fP ()"
.br
.ti -1c
.RI "void \fBsetTabWidgetVisibility\fP (KMdi::TabWidgetVisibility)"
.br
.ti -1c
.RI "KTabWidget * \fBtabWidget\fP () const "
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "KMdi::MdiMode \fBm_mdiMode\fP"
.br
.ti -1c
.RI "\fBKMdiChildArea\fP * \fBm_pMdi\fP"
.br
.ti -1c
.RI "\fBKMdiTaskBar\fP * \fBm_pTaskBar\fP"
.br
.ti -1c
.RI "\fBQPtrList\fP< \fBKMdiChildView\fP > * \fBm_pDocumentViews\fP"
.br
.ti -1c
.RI "\fBQMap\fP< \fBQWidget\fP *, KMdiToolViewAccessor * > * \fBm_pToolViews\fP"
.br
.ti -1c
.RI "\fBKMdiChildView\fP * \fBm_pCurrentWindow\fP"
.br
.ti -1c
.RI "\fBQPopupMenu\fP * \fBm_pWindowPopup\fP"
.br
.ti -1c
.RI "\fBQPopupMenu\fP * \fBm_pTaskBarPopup\fP"
.br
.ti -1c
.RI "\fBQPopupMenu\fP * \fBm_pWindowMenu\fP"
.br
.ti -1c
.RI "\fBQPopupMenu\fP * \fBm_pDockMenu\fP"
.br
.ti -1c
.RI "\fBQPopupMenu\fP * \fBm_pMdiModeMenu\fP"
.br
.ti -1c
.RI "\fBQPopupMenu\fP * \fBm_pPlacingMenu\fP"
.br
.ti -1c
.RI "KMenuBar * \fBm_pMainMenuBar\fP"
.br
.ti -1c
.RI "\fBQPixmap\fP * \fBm_pUndockButtonPixmap\fP"
.br
.ti -1c
.RI "\fBQPixmap\fP * \fBm_pMinButtonPixmap\fP"
.br
.ti -1c
.RI "\fBQPixmap\fP * \fBm_pRestoreButtonPixmap\fP"
.br
.ti -1c
.RI "\fBQPixmap\fP * \fBm_pCloseButtonPixmap\fP"
.br
.ti -1c
.RI "\fBQToolButton\fP * \fBm_pUndock\fP"
.br
.ti -1c
.RI "\fBQToolButton\fP * \fBm_pMinimize\fP"
.br
.ti -1c
.RI "\fBQToolButton\fP * \fBm_pRestore\fP"
.br
.ti -1c
.RI "\fBQToolButton\fP * \fBm_pClose\fP"
.br
.ti -1c
.RI "\fBQPoint\fP \fBm_undockPositioningOffset\fP"
.br
.ti -1c
.RI "bool \fBm_bMaximizedChildFrmMode\fP"
.br
.ti -1c
.RI "int \fBm_oldMainFrmHeight\fP"
.br
.ti -1c
.RI "int \fBm_oldMainFrmMinHeight\fP"
.br
.ti -1c
.RI "int \fBm_oldMainFrmMaxHeight\fP"
.br
.ti -1c
.RI "bool \fBm_bSDIApplication\fP"
.br
.ti -1c
.RI "KDockWidget * \fBm_pDockbaseAreaOfDocumentViews\fP"
.br
.ti -1c
.RI "\fBQDomDocument\fP * \fBm_pTempDockSession\fP"
.br
.ti -1c
.RI "bool \fBm_bClearingOfWindowMenuBlocked\fP"
.br
.ti -1c
.RI "\fBQTimer\fP * \fBm_pDragEndTimer\fP"
.br
.ti -1c
.RI "bool \fBm_bSwitching\fP"
.br
.ti -1c
.RI "KDockWidget * \fBm_leftContainer\fP"
.br
.ti -1c
.RI "KDockWidget * \fBm_rightContainer\fP"
.br
.ti -1c
.RI "KDockWidget * \fBm_topContainer\fP"
.br
.ti -1c
.RI "KDockWidget * \fBm_bottomContainer\fP"
.br
.in -1c
.SS "Static Protected Attributes"

.in +1c
.ti -1c
.RI "static KMdi::FrameDecor \fBm_frameDecoration\fP = KMdi::KDELook"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKMdiChildView\fP"
.br
.ti -1c
.RI "class \fBKMdiTaskBar\fP"
.br
.ti -1c
.RI "class \fBKMdiToolViewAccessor\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Base class for all your special main frames. 

It contains the child frame area (QMainWindow's central widget) and a child view taskbar for switching the MDI views. Most methods are virtual functions for later overriding.
.PP
Basically, this class provides functionality for docking/undocking view windows and manages the taskbar. Usually a developer will only need to know about this class and \fBKMdiChildView\fP.
.PP
\fBGeneral usage\fP.RS 4

.RE
.PP
Your program mainwidget should inherit KMdiMainFrm. Then usually you'll just need \fBaddWindow()\fP and \fBremoveWindowFromMdi()\fP to control the views. 
.PP
.nf
        class MyMainWindow : public KMdiMainFrm
        { .... };

.fi
.PP
.PP
to define your main window class and
.PP
.PP
.nf
        MyMainWindow mainframe;
        qApp->setMainWidget(&mainframe);
        mainframe->addWindow(view1); // put it under MDI control
        mainframe->addWindow(view2);
.fi
.PP
.PP
when you wish to use your main window class. The above example also adds a few windows to the frame.
.PP
KMdiMainFrm will provide the 'Window' menu needed in common MDI applications. Just insert it in your main menu:
.PP
.PP
.nf
        if ( !isFakingSDIApplication() )
        {
            menuBar()->insertItem( i18n( '&Window' ), windowMenu() );
        }
.fi
.PP
.PP
To synchronize the positions of the MDI control buttons inserted in your mainmenu: 
.PP
.nf
        void B_MainModuleWidget::initMenuBar()
        {
            setMenuForSDIModeSysButtons( menuBar() );
        }
        ...
        void B_MainModuleWidget::resizeEvent ( QResizeEvent *e )
        {
            KMdiMainFrm::resizeEvent( e );
            setSysButtonsAtMenuPosition();
        }

.fi
.PP
.PP
\fBDynamic mode switching\fP.RS 4

.RE
.PP
Dynamic switching of the MDI mode can be done via the following functions:
.IP "\(bu" 2
\fBswitchToChildframeMode()\fP
.IP "\(bu" 2
\fBswitchToToplevelMode()\fP
.IP "\(bu" 2
\fBswitchToTabPageMode()\fP
.IP "\(bu" 2
\fBswitchToIDEAlMode()\fP
.PP
.PP
The MDI mode can be gotten using \fBmdiMode()\fP. If you need to fake the look of an SDI application use \fBfakeSDIApplication()\fP to fake it and \fBisFakingSDIApplication()\fP to query whether or not an SDI interface is being faked.
.PP
You can dynamically change the shape of the attached MDI views using \fBsetFrameDecorOfAttachedViews()\fP.
.PP
Additionally, here's a hint how to restore the mainframe's settings from config file: 
.PP
.nf
    // restore MDI mode (toplevel, childframe, tabpage)
    int mdiMode = config->readIntEntry( 'mainmodule session', 'MDI mode', KMdi::ChildframeMode);
    switch (mdiMode) {
    case KMdi::ToplevelMode:
       {
          int childFrmModeHt = config->readIntEntry( 'mainmodule session', 'Childframe mode height', desktop()->height() - 50);
          mainframe->resize( m_pMdiMainFrm->width(), childFrmModeHt);
          mainframe->switchToToplevelMode();
       }
       break;
    case KMdi::ChildframeMode:
       break;
    case KMdi::TabPageMode:
       {
          int childFrmModeHt = m_pCfgFileManager->readIntEntry( 'mainmodule session', 'Childframe mode height', desktop()->height() - 50);
          mainframe->resize( m_pMdiMainFrm->width(), childFrmModeHt);
          mainframe->switchToTabPageMode();
       }
       break;
    default:
       break;
    }

    // restore a possible maximized Childframe mode
    bool maxChildFrmMode = config->readBoolEntry( 'mainmodule session', 'maximized childframes', true);
    mainframe->setEnableMaximizedChildFrmMode(maxChildFrmMode);

.fi
.PP
 The maximized-Childframe mode means that currently all views are maximized in Childframe mode's application desktop.
.PP
\fBManaging views\fP.RS 4

.RE
.PP
This class provides placing algorithms in Childframe mode. The following is a list of the window placement functions
.IP "\(bu" 2
\fBtilePragma()\fP - Tile the windows and allow them to overlap
.IP "\(bu" 2
\fBtileAnodine()\fP - Tile the windows but don't allow them to overlap
.IP "\(bu" 2
\fBtileVertically()\fP - Tile the windows vertically
.IP "\(bu" 2
\fBcascadeWindows()\fP - cascade windows
.IP "\(bu" 2
\fBcascadeMaximized()\fP - cascade windows and maximize their viewing area
.IP "\(bu" 2
\fBexpandVertical()\fP - expand all the windows to use the most amount of vertical space
.IP "\(bu" 2
\fBexpandHorizontal()\fP - expand all the windows to use the most amount of horizontal space
.PP
.PP
\fBactivateView(KMdiChildView*)\fP and \fBactivateView(int index)\fP set the appropriate MDI child view as the active one. It will be raised, will get an active MDI frame and will get the focus. Call activeView() to find out what the current MDI view is.
.PP
Use \fBdetachWindow()\fP and \fBattachWindow()\fP for docking the MDI views to desktop and back.
.PP
Connect accels of your program with \fBactivatePrevWin()\fP, \fBactivateNextWin()\fP and \fBactivateView(int index)\fP.
.PP
Note: KMdiChildViews can be added in 2 meanings: Either as a normal child view (usually containing user document views) or as a tool-view (usually containing status, info or control widgets). The tool-views can be added as floating dockwidgets or as stay-on-top desktop windows in tool style.
.PP
Also, pay attention to the fact that when you click on the close button of MDI views that their close event should be redirected to \fBcloseWindow()\fP. Otherwise the mainframe class will not get noticed about the deleted view and a dangling pointer will remain in the MDI control. The \fBcloseWindow()\fP or the \fBremoveWindowFromMdi()\fP method is for that issue. The difference is \fBcloseWindow()\fP deletes the view object. So if your application wants to control that by itself, call \fBremoveWindowFromMdi()\fP and call delete by yourself. See also \fBKMdiChildView::closeEvent()\fP for that issue.
.PP
Here's an example how you can suggest things for the adding of views to the MDI control via flags: 
.PP
.nf
        m_mapOfMdiWidgets.insert( pWnd, mh );
        unsigned int mdiFlags = KMdi::StandardAdd;
    
        if ( !show )
            mdiFlags |= KMdi::Hide;
    
        if ( !attach )
            mdiFlags |= KMdi::Detach;
    
        if ( minimize )
            mdiFlags |= KMdi::Minimize;
    
        if ( bToolWindow)
            mdiFlags |= KMdi::ToolWindow;
 
        if ( m_pMdiMainFrm->isFakingSDIApplication() )
        {
            if ( attach ) //fake an SDI app
                mdiFlags |= KMdi::Maximize;
        }
        else
        {
            m_pMdiMainFrm->addWindow( pWnd, QPoint(20, 20), KMdi::AddWindowFlags(mdiFlags));
            return;
        }
        m_pMdiMainFrm->addWindow( pWnd, KMdi::AddWindowFlags(mdiFlags));

.fi
.PP
 
.PP
Definition at line 239 of file kmdimainfrm.h.
.SH "Member Function Documentation"
.PP 
.SS "void KMdiMainFrm::setStandardMDIMenuEnabled (bool showModeMenu = \fCtrue\fP)"
.PP
Control whether or not the standard MDI menu is displayed when a context menu is displayed. 
.PP
Definition at line 275 of file kmdimainfrm.cpp.
.PP
References mdiModeHasBeenChangedTo().
.SS "bool KMdiMainFrm::isInMaximizedChildFrmMode ()\fC [inline]\fP"
.PP
Returns whether the application's MDI views are in maximized state or not. 
.PP

.PP
Definition at line 313 of file kmdimainfrm.h.
.SS "KMdi::MdiMode KMdiMainFrm::mdiMode ()\fC [inline]\fP"
.PP
Returns the MDI mode. 
.PP
This can be one of the enumerations KMdi::MdiMode.
.PP
Definition at line 318 of file kmdimainfrm.h.
.PP
Referenced by detachWindow().
.SS "\fBKMdiChildView\fP * KMdiMainFrm::activeWindow ()"
.PP
Returns the focused attached MDI view. 
.PP

.PP
Definition at line 956 of file kmdimainfrm.cpp.
.PP
Referenced by activateFirstWin(), activateLastWin(), activateNextWin(), activatePrevWin(), closeViewButtonPressed(), and eventFilter().
.SS "\fBQPopupMenu\fP * KMdiMainFrm::taskBarPopup (\fBKMdiChildView\fP * pWnd, bool bIncludeWindowPopup = \fCfalse\fP)\fC [virtual]\fP"
.PP
Returns a popup menu filled according to the MDI view state. 
.PP
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 ( \fBwindowPopup()\fP ) menu called Operations.
.PP
Definition at line 990 of file kmdimainfrm.cpp.
.PP
References QPopupMenu::clear(), QPopupMenu::insertItem(), QPopupMenu::insertSeparator(), and windowPopup().
.PP
Referenced by taskbarButtonRightClicked(), and windowPopup().
.SS "\fBQPopupMenu\fP * KMdiMainFrm::windowPopup (\fBKMdiChildView\fP * pWnd, bool bIncludeTaskbarPopup = \fCtrue\fP)\fC [virtual]\fP"
.PP
Returns a popup menu with only a title 'Window'. 
.PP
You can fill it with own operations entries on the MDI view. This popup menu is inserted as last menu item in \fBtaskBarPopup()\fP .
.PP
Definition at line 978 of file kmdimainfrm.cpp.
.PP
References QPopupMenu::clear(), QPopupMenu::insertItem(), QPopupMenu::insertSeparator(), and taskBarPopup().
.PP
Referenced by taskBarPopup().
.SS "void KMdiMainFrm::applyOptions ()\fC [virtual]\fP"
.PP
Called in the constructor (forces a resize of all MDI views). 
.PP
Definition at line 340 of file kmdimainfrm.cpp.
.PP
References QWidget::height(), QWidget::resize(), and QWidget::width().
.SS "\fBKMdiChildView\fP * KMdiMainFrm::findWindow (const \fBQString\fP & caption)"
.PP
Returns the \fBKMdiChildView\fP belonging to the given caption string. 
.PP

.PP
Definition at line 944 of file kmdimainfrm.cpp.
.SS "bool KMdiMainFrm::windowExists (\fBKMdiChildView\fP * pWnd, ExistsAs as)"
.PP
Returns whether this MDI child view is under MDI control (using \fBaddWindow()\fP ) or not. 
.PP

.PP
Definition at line 962 of file kmdimainfrm.cpp.
.PP
References QMap::contains(), and QPtrList::findRef().
.PP
Referenced by addWindow().
.SS "bool KMdiMainFrm::event (\fBQEvent\fP * e)\fC [virtual]\fP"
.PP
Catches certain \fBQt\fP events and processes it here. 
.PP
Currently, here this catches only the \fBKMdiViewCloseEvent\fP (a \fBKMdi\fP user event) which is sent from itself in \fBchildWindowCloseRequest()\fP right after a \fBKMdiChildView::closeEvent()\fP . The reason for this event to itself is simple: It just wants to break the function call stack. It continues the processing with calling \fBcloseWindow()\fP . You see, a close() is translated to a \fBcloseWindow()\fP . It is necessary that the main frame has to start an MDI view close action because it must remove the MDI view from MDI control, additionally.
.PP
This method calls QMainWindow::event , additionally.
.PP
Definition at line 1123 of file kmdimainfrm.cpp.
.PP
References closeWindow(), QTimer::isActive(), QApplication::sendEvent(), QTimer::start(), and QTimer::stop().
.SS "void KMdiMainFrm::setSysButtonsAtMenuPosition ()\fC [virtual]\fP"
.PP
If there's a main menubar given, it will create the 4 maximize mode buttons there (undock, minimize, restore, close). 
.PP

.PP
Definition at line 2265 of file kmdimainfrm.cpp.
.PP
References frameDecorOfAttachedViews().
.PP
Referenced by setMenuForSDIModeSysButtons().
.SS "virtual int KMdiMainFrm::taskBarHeight ()\fC [inline, virtual]\fP"
.PP
Returns the height of the taskbar. 
.PP

.PP
Definition at line 378 of file kmdimainfrm.h.
.SS "virtual void KMdiMainFrm::setUndockPositioningOffset (\fBQPoint\fP offset)\fC [inline, virtual]\fP"
.PP
Sets an offset value that is used on \fBdetachWindow()\fP . 
.PP
The undocked window is visually moved on the desktop by this offset.
.PP
Definition at line 384 of file kmdimainfrm.h.
.PP
Referenced by switchToToplevelMode().
.SS "KMdiIterator<\fBKMdiChildView\fP*>* KMdiMainFrm::createIterator ()\fC [inline]\fP"
.PP
If you don't want to know about the inner structure of the \fBKMdi\fP system, you can use this iterator to handle with the MDI view list in a more abstract way. 
.PP
The iterator hides what special data structure is used in \fBKMdi\fP.
.PP
Definition at line 392 of file kmdimainfrm.h.
.PP
Referenced by activateFirstWin(), activateLastWin(), activateNextWin(), and activatePrevWin().
.SS "void KMdiMainFrm::deleteIterator (KMdiIterator< \fBKMdiChildView\fP * > * pIt)\fC [inline]\fP"
.PP
Deletes an KMdiIterator created in the \fBKMdi\fP library (needed for the windows dll problem). 
.PP

.PP
Definition at line 407 of file kmdimainfrm.h.
.SS "\fBQPopupMenu\fP* KMdiMainFrm::windowMenu () const\fC [inline]\fP"
.PP
Returns a popup menu that contains the MDI controlled view list. 
.PP
Additionally, this menu provides some placing actions for these views. Usually, you insert this popup menu in your main menubar as 'Window' menu.
.PP
Definition at line 417 of file kmdimainfrm.h.
.SS "virtual void KMdiMainFrm::setBackgroundColor (const \fBQColor\fP & c)\fC [inline, virtual]\fP"
.PP
Sets a background color for the MDI view area widget. 
.PP

.PP
Definition at line 422 of file kmdimainfrm.h.
.SS "virtual void KMdiMainFrm::setBackgroundPixmap (const \fBQPixmap\fP & pm)\fC [inline, virtual]\fP"
.PP
Sets a background pixmap for the MDI view area widget. 
.PP

.PP
Definition at line 427 of file kmdimainfrm.h.
.SS "void KMdiMainFrm::setDefaultChildFrmSize (const \fBQSize\fP & sz)\fC [inline]\fP"
.PP
Sets a size that is used as the default size for a newly to the MDI system added \fBKMdiChildView\fP . 
.PP
By default this size is 600x400. So all non-resized added MDI views appear in that size.
.PP
Definition at line 433 of file kmdimainfrm.h.
.SS "\fBQSize\fP KMdiMainFrm::defaultChildFrmSize ()\fC [inline]\fP"
.PP
Returns the default size for a newly added \fBKMdiChildView\fP. 
.PP
See \fBsetDefaultChildFrmSize()\fP .
.PP
Definition at line 438 of file kmdimainfrm.h.
.PP
Referenced by detachWindow().
.SS "void KMdiMainFrm::setMinimumSize (int minw, int minh)\fC [virtual]\fP"
.PP
Do nothing when in Toplevel mode. 
.PP
Definition at line 411 of file kmdimainfrm.cpp.
.SS "int KMdiMainFrm::childFrameModeHeight ()\fC [inline]\fP"
.PP
Returns the Childframe mode height of this. 
.PP
Makes only sense when in Toplevel mode.
.PP
Definition at line 448 of file kmdimainfrm.h.
.SS "void KMdiMainFrm::setMenuForSDIModeSysButtons (KMenuBar * menuBar = \fC0\fP)\fC [virtual]\fP"
.PP
Tells the MDI system a QMenu where it can insert buttons for the system menu, undock, minimize, restore actions. 
.PP
If no such menu is given, \fBKMdi\fP simply overlays the buttons at the upper right-hand side of the main widget.
.PP
Definition at line 2192 of file kmdimainfrm.cpp.
.PP
References frameDecorOfAttachedViews(), QToolButton::setAutoRaise(), and setSysButtonsAtMenuPosition().
.PP
Referenced by setFrameDecorOfAttachedViews().
.SS "static int KMdiMainFrm::frameDecorOfAttachedViews ()\fC [inline, static]\fP"
.PP
\fBReturns:\fP
.RS 4
the decoration of the window frame of docked (attached) MDI views
.RE
.PP

.PP
Definition at line 460 of file kmdimainfrm.h.
.PP
Referenced by setEnableMaximizedChildFrmMode(), setMenuForSDIModeSysButtons(), setSysButtonsAtMenuPosition(), and updateSysButtonConnections().
.SS "void KMdiMainFrm::fakeSDIApplication ()"
.PP
An SDI application user interface is faked: 
.PD 0

.IP "\(bu" 2
an opened view is always maximized 
.IP "\(bu" 2
buttons for maximized childframe mode aren't inserted in the main menubar 
.IP "\(bu" 2
taskbar and windowmenu are not created/updated. 
.PP

.PP
Definition at line 2837 of file kmdimainfrm.cpp.
.SS "bool KMdiMainFrm::isFakingSDIApplication () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
if we are faking an SDI application (\fBfakeSDIApplication()\fP)
.RE
.PP

.PP
Definition at line 473 of file kmdimainfrm.h.
.PP
Referenced by popupWindowMenu().
.SS "bool KMdiMainFrm::eventFilter (\fBQObject\fP * obj, \fBQEvent\fP * e)\fC [virtual]\fP"
.PP
these are quite some assumptions: The key combination uses exactly one modifier key The WIN button in KDE is the meta button in \fBQt\fP 
.PP
Definition at line 1169 of file kmdimainfrm.cpp.
.PP
References activeWindow(), KMdiChildArea::focusTopChild(), KMdiChildView::isAttached(), QWidget::isHidden(), QFocusEvent::reason(), setSwitching(), KMdiChildArea::topChild(), and KMdiChildView::updateTimeStamp().
.SS "void KMdiMainFrm::findRootDockWidgets (\fBQPtrList\fP< KDockWidget > * rootDockWidgetList, \fBQValueList\fP< \fBQRect\fP > * positionList)"
.PP
find the root dockwidgets and store their geometry 
.PP
Definition at line 1277 of file kmdimainfrm.cpp.
.PP
References QPtrListIterator::current(), QWidget::isTopLevel(), QPoint::x(), and QPoint::y().
.PP
Referenced by switchToChildframeMode(), and switchToToplevelMode().
.SS "void KMdiMainFrm::setSwitching (const bool switching)\fC [inline]\fP"
.PP
We're switching something. 
.PP
Definition at line 479 of file kmdimainfrm.h.
.PP
Referenced by eventFilter().
.SS "\fBKMdiChildView\fP * KMdiMainFrm::createWrapper (\fBQWidget\fP * view, const \fBQString\fP & name, const \fBQString\fP & shortName)\fC [slot]\fP"
.PP
addWindow demands a \fBKMdiChildView\fP. 
.PP
This method wraps every \fBQWidget\fP in such an object and this way you can put every widget under MDI control.
.PP
Definition at line 420 of file kmdimainfrm.cpp.
.PP
References QBoxLayout::addWidget(), QWidget::icon(), QWidget::reparent(), KMdiChildView::setCaption(), QWidget::setIcon(), KMdiChildView::setTabCaption(), and KMdiChildView::trackIconAndCaptionChanges().
.SS "void KMdiMainFrm::addWindow (\fBKMdiChildView\fP * pView, int flags = \fCKMdi::StandardAdd\fP)\fC [virtual, slot]\fP"
.PP
Adds a \fBKMdiChildView\fP to the MDI system. 
.PP
The main frame takes control of it. 
.PP
\fBParameters:\fP
.RS 4
\fIflags\fP the flags for the view such as: 
.PD 0

.IP "\(bu" 2
whether the view should be attached or detached. 
.IP "\(bu" 2
whether the view should be shown or hidden 
.IP "\(bu" 2
whether the view should be maximized, minimized or restored (normalized) 
.IP "\(bu" 2
whether the view should be added as tool view (stay-on-top and toplevel) or added as document-type view.
.PP
.RE
.PP

.PP
Definition at line 443 of file kmdimainfrm.cpp.
.PP
Referenced by addWindow().
.SS "void KMdiMainFrm::addWindow (\fBKMdiChildView\fP * pView, int flags, int index)\fC [slot]\fP"
.PP
Adds a \fBKMdiChildView\fP to the MDI system. 
.PP
The main frame takes control of it. 
.PP
\fBParameters:\fP
.RS 4
\fIindex\fP the index of the tab we should insert the new tab after. If index == -1 then the tab will just be appended to the end. Using this parameter in childview mode has no effect. 
.br
\fIflags\fP You can specify here whether: 
.PD 0

.IP "\(bu" 2
the view should be attached or detached. 
.IP "\(bu" 2
shown or hidden 
.IP "\(bu" 2
maximized, minimized or restored (normalized) 
.IP "\(bu" 2
added as tool view (stay-on-top and toplevel) or added as document-type view. 
.PP
.RE
.PP
\fBSince:\fP
.RS 4
3.3
.RE
.PP

.PP
Definition at line 448 of file kmdimainfrm.cpp.
.PP
References activateView(), addToolWindow(), KMdiTaskBar::addWinButton(), QPtrList::append(), attachWindow(), childViewIsDetachedNow(), childWindowCloseRequest(), QObject::connect(), detachWindow(), dockMenuItemActivated(), KMdiChildArea::getCascadePoint(), QPtrList::insert(), KMdiDocumentViewTabWidget::insertTab(), QWidget::move(), QWidget::setEnabled(), windowExists(), and windowMenuItemActivated().
.SS "void KMdiMainFrm::addWindow (\fBKMdiChildView\fP * pView, \fBQPoint\fP pos, int flags = \fCKMdi::StandardAdd\fP)\fC [virtual, slot]\fP"
.PP
Adds a \fBKMdiChildView\fP to the MDI system. 
.PP
The main frame takes control of it. 
.PP
\fBParameters:\fP
.RS 4
\fIpos\fP move the child view to the specified position 
.br
\fIflags\fP the flags for the view such as: 
.PD 0

.IP "\(bu" 2
whether the view should be attached or detached. 
.IP "\(bu" 2
whether the view should be shown or hidden 
.IP "\(bu" 2
whether the view should be maximized, minimized or restored (normalized) 
.IP "\(bu" 2
whether the view should be added as tool view (stay-on-top and toplevel) or added as document-type view.
.PP
.RE
.PP

.PP
Definition at line 541 of file kmdimainfrm.cpp.
.PP
References addWindow().
.SS "void KMdiMainFrm::addWindow (\fBKMdiChildView\fP * pView, \fBQRect\fP rectNormal, int flags = \fCKMdi::StandardAdd\fP)\fC [virtual, slot]\fP"
.PP
Adds a \fBKMdiChildView\fP to the MDI system. 
.PP
The main frame takes control of it. 
.PP
\fBParameters:\fP
.RS 4
\fIrectNormal\fP Sets the geometry for this child view 
.br
\fIflags\fP the flags for the view such as: 
.PD 0

.IP "\(bu" 2
whether the view should be attached or detached. 
.IP "\(bu" 2
whether the view should be shown or hidden 
.IP "\(bu" 2
whether the view should be maximized, minimized or restored (normalized) 
.IP "\(bu" 2
whether the view should be added as tool view (stay-on-top and toplevel) or added as document-type view.
.PP
.RE
.PP

.PP
Definition at line 531 of file kmdimainfrm.cpp.
.PP
References addWindow().
.SS "KMdiToolViewAccessor * KMdiMainFrm::addToolWindow (\fBQWidget\fP * pWnd, KDockWidget::DockPosition pos = \fCKDockWidget::DockNone\fP, \fBQWidget\fP * pTargetWnd = \fC0L\fP, int percent = \fC50\fP, const \fBQString\fP & tabToolTip = \fC0\fP, const \fBQString\fP & tabCaption = \fC0\fP)\fC [virtual, slot]\fP"
.PP
Usually called from \fBaddWindow()\fP when adding a tool view window. 
.PP
It reparents the given widget as toplevel and stay-on-top on the application's main widget.
.PP
Definition at line 570 of file kmdimainfrm.cpp.
.PP
References QMap::insert(), and QRect::topLeft().
.PP
Referenced by addWindow().
.SS "KMdiToolViewAccessor * KMdiMainFrm::createToolWindow ()\fC [slot]\fP"
.PP
Using this method you have to use the setWidget method of the access object, and it is very recommendet, that you use the widgetContainer() method for the parent of your newly created widget. 
.PP
Definition at line 552 of file kmdimainfrm.cpp.
.SS "void KMdiMainFrm::removeWindowFromMdi (\fBKMdiChildView\fP * pWnd)\fC [virtual, slot]\fP"
.PP
Removes a \fBKMdiChildView\fP from the MDI system and from the main frame`s control. 
.PP
The caller is responsible for deleting the view. If the view is not deleted it will be reparented to 0
.PP
Definition at line 732 of file kmdimainfrm.cpp.
.PP
References KMdiChildView::activate(), activateView(), attachWindow(), childWindowCloseRequest(), QTabWidget::count(), KMdiChildArea::destroyChildButNotItsView(), detachWindow(), QObject::disconnect(), dockMenuItemActivated(), KMdiTaskBar::getButton(), KMdiChildArea::getVisibleChildCount(), lastChildViewClosed(), KMdiChildView::m_bToolView, KMdiChildFrm::m_pClient, QTabWidget::page(), KMdiTaskBar::removeWinButton(), KMdiChildArea::topChild(), and windowMenuItemActivated().
.SS "void KMdiMainFrm::closeWindow (\fBKMdiChildView\fP * pWnd, bool layoutTaskBar = \fCtrue\fP)\fC [virtual, slot]\fP"
.PP
Removes a \fBKMdiChildView\fP from the MDI system and from the main frame`s control. 
.PP
Note: The view will be deleted!
.PP
Definition at line 832 of file kmdimainfrm.cpp.
.PP
References KMdiChildView::activate(), QTabWidget::count(), QPtrList::count(), QPtrList::current(), KMdiChildArea::destroyChild(), KMdiChildArea::getVisibleChildCount(), QPtrList::last(), lastChildViewClosed(), KMdiChildFrm::m_pClient, QTabWidget::page(), QPtrList::removeRef(), KMdiTaskBar::removeWinButton(), and KMdiChildArea::topChild().
.PP
Referenced by event().
.SS "void KMdiMainFrm::slot_toggleTaskBar ()\fC [virtual, slot]\fP"
.PP
Switches the \fBKMdiTaskBar\fP on and off. 
.PP

.PP
Definition at line 389 of file kmdimainfrm.cpp.
.PP
References KMdiTaskBar::isSwitchedOn(), and KMdiTaskBar::switchOn().
.SS "void KMdiMainFrm::attachWindow (\fBKMdiChildView\fP * pWnd, bool bShow = \fCtrue\fP, bool bAutomaticResize = \fCfalse\fP)\fC [virtual, slot]\fP"
.PP
Makes a main frame controlled undocked \fBKMdiChildView\fP docked. 
.PP
Doesn't work on \fBKMdiChildView\fP which aren't added to the MDI system. Use \fBaddWindow()\fP for that.
.PP
Definition at line 607 of file kmdimainfrm.cpp.
.PP
References KMdiChildFrm::captionHeight(), QRect::height(), KMdiChildFrm::m_pClient, KMdiChildArea::manageChild(), QApplication::sendEvent(), QApplication::sendPostedEvents(), KMdiChildFrm::setClient(), KMdiChildFrm::setRestoreGeometry(), switchToChildframeMode(), KMdiChildArea::topChild(), QRect::width(), QWidget::x(), QPoint::x(), QWidget::y(), and QPoint::y().
.PP
Referenced by addWindow(), dockMenuItemActivated(), removeWindowFromMdi(), and switchToChildframeMode().
.SS "void KMdiMainFrm::detachWindow (\fBKMdiChildView\fP * pWnd, bool bShow = \fCtrue\fP)\fC [virtual, slot]\fP"
.PP
Makes a docked \fBKMdiChildView\fP undocked. 
.PP
The view window still remains under the main frame's MDI control.
.PP
Definition at line 666 of file kmdimainfrm.cpp.
.PP
References activateView(), KMdiChildFrm::caption(), childViewIsDetachedNow(), QPtrList::count(), defaultChildFrmSize(), KMdiChildArea::destroyChildButNotItsView(), KMdiChildArea::getCascadePoint(), KMdiChildFrm::icon(), mdiMode(), KMdiChildView::mdiParent(), KMdiChildFrm::setIcon(), QWidget::size(), KMdiChildFrm::unsetClient(), and KMdiChildView::youAreDetached().
.PP
Referenced by addWindow(), dockMenuItemActivated(), and removeWindowFromMdi().
.SS "void KMdiMainFrm::childWindowCloseRequest (\fBKMdiChildView\fP * pWnd)\fC [virtual, slot]\fP"
.PP
Someone wants that the MDI view to be closed. 
.PP
This method sends a \fBKMdiViewCloseEvent\fP to itself to break the function call stack. See also \fBevent()\fP .
.PP
Definition at line 1117 of file kmdimainfrm.cpp.
.PP
References QApplication::postEvent().
.PP
Referenced by addWindow(), and removeWindowFromMdi().
.SS "void KMdiMainFrm::closeAllViews ()\fC [virtual, slot]\fP"
.PP
Close all views. 
.PP
Definition at line 1239 of file kmdimainfrm.cpp.
.PP
References QValueList::append(), QValueList::begin(), QValueList::end(), QPtrList::first(), and QPtrList::next().
.PP
Referenced by fillWindowMenu().
.SS "void KMdiMainFrm::iconifyAllViews ()\fC [virtual, slot]\fP"
.PP
Iconfiy all views. 
.PP
Definition at line 1258 of file kmdimainfrm.cpp.
.PP
Referenced by fillWindowMenu().
.SS "void KMdiMainFrm::closeActiveView ()\fC [virtual, slot]\fP"
.PP
Closes the view of the active (topchild) window. 
.PP
Definition at line 1269 of file kmdimainfrm.cpp.
.PP
References QWidget::close().
.SS "void KMdiMainFrm::switchToToplevelMode ()\fC [virtual, slot]\fP"
.PP
Undocks all view windows (unix-like). 
.PP
Definition at line 1347 of file kmdimainfrm.cpp.
.PP
References QValueList::begin(), QPtrList::count(), QValueList::end(), findRootDockWidgets(), mdiModeHasBeenChangedTo(), setUndockPositioningOffset(), and QPtrListIterator::toFirst().
.PP
Referenced by fillWindowMenu().
.SS "void KMdiMainFrm::switchToChildframeMode ()\fC [virtual, slot]\fP"
.PP
Docks all view windows (Windows-like). 
.PP
Definition at line 1459 of file kmdimainfrm.cpp.
.PP
References attachWindow(), QPtrList::count(), findRootDockWidgets(), KMdiChildView::isAttached(), KMdiChildView::isToolView(), leftTopLevelMode(), mdiModeHasBeenChangedTo(), KMdiChildView::show(), and QPtrListIterator::toFirst().
.PP
Referenced by attachWindow(), and fillWindowMenu().
.SS "void KMdiMainFrm::switchToTabPageMode ()\fC [virtual, slot]\fP"
.PP
Docks all view windows (Windows-like). 
.PP
Definition at line 1605 of file kmdimainfrm.cpp.
.PP
References closeViewButtonPressed(), QObject::connect(), QPtrList::count(), mdiModeHasBeenChangedTo(), QWidget::setFocus(), and KMdiTaskBar::switchOn().
.PP
Referenced by fillWindowMenu(), and setToolviewStyle().
.SS "void KMdiMainFrm::switchToIDEAlMode ()\fC [virtual, slot]\fP"
.PP
Docks all view windows. 
.PP
Toolviews use dockcontainers
.PP
Definition at line 1826 of file kmdimainfrm.cpp.
.PP
References closeViewButtonPressed(), QObject::connect(), QPtrList::count(), mdiModeHasBeenChangedTo(), QWidget::setFocus(), and KMdiTaskBar::switchOn().
.PP
Referenced by fillWindowMenu(), and setToolviewStyle().
.SS "void KMdiMainFrm::setIDEAlModeStyle (int flags)\fC [slot]\fP"
.PP
Sets the appearance of the IDEAl mode. 
.PP
See KMultiTabBar styles for the first 3 bits. 
.PP
\fBDeprecated\fP
.RS 4
use \fBsetToolviewStyle(int flags)\fP instead 
.RE
.PP

.PP
Definition at line 1741 of file kmdimainfrm.cpp.
.PP
Referenced by setToolviewStyle().
.SS "void KMdiMainFrm::setToolviewStyle (int flags)\fC [slot]\fP"
.PP
Sets the appearance of the toolview tabs. 
.PP
\fBParameters:\fP
.RS 4
\fIflags\fP See \fBKMdi::ToolviewStyle\fP. 
.RE
.PP
\fBSince:\fP
.RS 4
3.3
.RE
.PP

.PP
Definition at line 1773 of file kmdimainfrm.cpp.
.PP
References QMap::begin(), QMap::end(), setIDEAlModeStyle(), switchToIDEAlMode(), and switchToTabPageMode().
.SS "bool KMdiMainFrm::isViewTaskBarOn ()\fC [slot]\fP"
.PP
Shows the view taskbar. 
.PP
\fBReturns:\fP
.RS 4
if the view taskbar should be shown if there are MDI views
.RE
.PP

.PP
Definition at line 2538 of file kmdimainfrm.cpp.
.PP
References KMdiTaskBar::isSwitchedOn().
.SS "void KMdiMainFrm::showViewTaskBar ()\fC [virtual, slot]\fP"
.PP
Shows the view taskbar. 
.PP
This should be connected with your 'View' menu.
.PP
Definition at line 2547 of file kmdimainfrm.cpp.
.PP
References KMdiTaskBar::switchOn().
.SS "void KMdiMainFrm::hideViewTaskBar ()\fC [virtual, slot]\fP"
.PP
Hides the view taskbar. 
.PP
This should be connected with your 'View' menu.
.PP
Definition at line 2554 of file kmdimainfrm.cpp.
.PP
References KMdiTaskBar::switchOn().
.SS "void KMdiMainFrm::fillWindowMenu ()\fC [virtual, slot]\fP"
.PP
Update of the window menu contents. 
.PP

.PP
Definition at line 2561 of file kmdimainfrm.cpp.
.PP
References QValueList::begin(), KMdiChildView::caption(), cascadeMaximized(), cascadeWindows(), QPopupMenu::clear(), closeAllViews(), QPtrListIterator::current(), expandHorizontal(), expandVertical(), KMdiChildView::getTimeStamp(), iconifyAllViews(), QPopupMenu::idAt(), QValueList::insert(), QPopupMenu::insertItem(), QPopupMenu::insertSeparator(), KMdiChildView::isAttached(), QPtrList::isEmpty(), KMdiChildView::isMinimized(), KMdiChildView::isToolView(), QPopupMenu::setItemChecked(), QPopupMenu::setItemEnabled(), KMdiChildView::setWindowMenuID(), switchToChildframeMode(), switchToIDEAlMode(), switchToTabPageMode(), switchToToplevelMode(), tileAnodine(), tilePragma(), and tileVertically().
.SS "virtual void KMdiMainFrm::cascadeWindows ()\fC [inline, virtual, slot]\fP"
.PP
Cascades the windows without resizing them. 
.PP

.PP
Definition at line 666 of file kmdimainfrm.h.
.PP
Referenced by fillWindowMenu().
.SS "virtual void KMdiMainFrm::cascadeMaximized ()\fC [inline, virtual, slot]\fP"
.PP
Cascades the windows resizing them to the maximum available size. 
.PP

.PP
Definition at line 671 of file kmdimainfrm.h.
.PP
Referenced by fillWindowMenu().
.SS "virtual void KMdiMainFrm::expandVertical ()\fC [inline, virtual, slot]\fP"
.PP
Maximizes only in vertical direction. 
.PP

.PP
Definition at line 676 of file kmdimainfrm.h.
.PP
Referenced by fillWindowMenu().
.SS "virtual void KMdiMainFrm::expandHorizontal ()\fC [inline, virtual, slot]\fP"
.PP
Maximizes only in horizontal direction. 
.PP

.PP
Definition at line 681 of file kmdimainfrm.h.
.PP
Referenced by fillWindowMenu().
.SS "virtual void KMdiMainFrm::tilePragma ()\fC [inline, virtual, slot]\fP"
.PP
Tile Pragma. 
.PP
Definition at line 686 of file kmdimainfrm.h.
.PP
Referenced by fillWindowMenu().
.SS "virtual void KMdiMainFrm::tileAnodine ()\fC [inline, virtual, slot]\fP"
.PP
Tile Anodine. 
.PP
Definition at line 691 of file kmdimainfrm.h.
.PP
Referenced by fillWindowMenu().
.SS "virtual void KMdiMainFrm::tileVertically ()\fC [inline, virtual, slot]\fP"
.PP
Tile Vertically. 
.PP
Definition at line 696 of file kmdimainfrm.h.
.PP
Referenced by fillWindowMenu().
.SS "void KMdiMainFrm::setFrameDecorOfAttachedViews (int frameDecor)\fC [virtual, slot]\fP"
.PP
Sets the decoration of the window frame of docked (attached) MDI views. 
.PP
\fBDeprecated\fP
.RS 4
Will be removed in KDE 4 
.RE
.PP

.PP
Definition at line 2805 of file kmdimainfrm.cpp.
.PP
References QPtrListIterator::current(), KMdiChildView::isAttached(), KMdiChildView::isToolView(), KMdiChildView::mdiParent(), KMdiChildFrm::redecorateButtons(), and setMenuForSDIModeSysButtons().
.SS "void KMdiMainFrm::setEnableMaximizedChildFrmMode (bool enableMaxChildFrameMode)\fC [virtual, slot]\fP"
.PP
If in Childframe mode, we can switch between maximized or restored shown MDI views. 
.PP
Definition at line 2426 of file kmdimainfrm.cpp.
.PP
References QObject::connect(), frameDecorOfAttachedViews(), KMdiChildFrm::icon(), KMdiChildFrm::m_pClient, KMdiChildView::restore(), KMdiChildFrm::state(), switchOffMaximizeModeForMenu(), KMdiChildFrm::systemMenu(), and KMdiChildArea::topChild().
.PP
Referenced by createMdiManager().
.SS "void KMdiMainFrm::activateNextWin ()\fC [virtual, slot]\fP"
.PP
Activates the next open view. 
.PP
Definition at line 2302 of file kmdimainfrm.cpp.
.PP
References activateView(), activeWindow(), and createIterator().
.SS "void KMdiMainFrm::activatePrevWin ()\fC [virtual, slot]\fP"
.PP
Activates the previous open view. 
.PP
Definition at line 2326 of file kmdimainfrm.cpp.
.PP
References activateView(), activeWindow(), and createIterator().
.SS "void KMdiMainFrm::activateFirstWin ()\fC [virtual, slot]\fP"
.PP
Activates the view first viewed concerning to the access time. 
.PP

.PP
Definition at line 2350 of file kmdimainfrm.cpp.
.PP
References activateView(), activeWindow(), QMap::begin(), createIterator(), QMap::end(), QMap::find(), KMdiChildView::getTimeStamp(), and QMap::insert().
.SS "void KMdiMainFrm::activateLastWin ()\fC [virtual, slot]\fP"
.PP
Activates the view last viewed concerning to the access time. 
.PP

.PP
Definition at line 2383 of file kmdimainfrm.cpp.
.PP
References activateView(), activeWindow(), QMap::begin(), createIterator(), QMap::end(), QMap::find(), KMdiChildView::getTimeStamp(), and QMap::insert().
.SS "void KMdiMainFrm::activateView (int index)\fC [virtual, slot]\fP"
.PP
Activates the view with the tab page index (TabPage mode only). 
.PP
Definition at line 2412 of file kmdimainfrm.cpp.
.PP
References KMdiChildView::activate(), QPtrList::first(), and QPtrList::next().
.PP
Referenced by activateFirstWin(), activateLastWin(), activateNextWin(), activatePrevWin(), addWindow(), detachWindow(), removeWindowFromMdi(), taskbarButtonRightClicked(), and windowMenuItemActivated().
.SS "void KMdiMainFrm::createTaskBar ()\fC [protected, virtual]\fP"
.PP
Creates a new MDI taskbar (showing the MDI views as taskbar entries) and shows it. 
.PP

.PP
Definition at line 383 of file kmdimainfrm.cpp.
.SS "void KMdiMainFrm::createMdiManager ()\fC [protected, virtual]\fP"
.PP
Creates the MDI view area and connects some signals and slots with the KMdiMainFrm widget. 
.PP

.PP
Definition at line 365 of file kmdimainfrm.cpp.
.PP
References QObject::connect(), lastChildFrmClosed(), popupWindowMenu(), setEnableMaximizedChildFrmMode(), switchOffMaximizeModeForMenu(), and updateSysButtonConnections().
.SS "void KMdiMainFrm::blockClearingOfWindowMenu (bool bBlocked)\fC [inline, protected]\fP"
.PP
prevents \fBfillWindowMenu()\fP from m_pWindowMenu->clear(). 
.PP
You have to care for it by yourself. This is useful if you want to add some actions in your overridden \fBfillWindowMenu()\fP method.
.PP
Definition at line 757 of file kmdimainfrm.h.
.SS "KMdi::TabWidgetVisibility KMdiMainFrm::tabWidgetVisibility ()\fC [protected]\fP"
.PP
Get tabwidget visibility. 
.PP
Definition at line 2919 of file kmdimainfrm.cpp.
.PP
References KMdiDocumentViewTabWidget::tabWidgetVisibility().
.SS "void KMdiMainFrm::setTabWidgetVisibility (KMdi::TabWidgetVisibility)\fC [protected]\fP"
.PP
Set tabwidget visibility. 
.PP
Definition at line 2927 of file kmdimainfrm.cpp.
.PP
References KMdiDocumentViewTabWidget::setTabWidgetVisibility().
.SS "KTabWidget * KMdiMainFrm::tabWidget () const\fC [protected]\fP"
.PP
Returns the tabwidget used in IDEAl and Tabbed modes. 
.PP
Returns 0 in other modes. 
.PP
Definition at line 2933 of file kmdimainfrm.cpp.
.SS "void KMdiMainFrm::activateView (\fBKMdiChildView\fP * pWnd)\fC [protected, virtual, slot]\fP"
.PP
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). 
.PP

.PP
Definition at line 1060 of file kmdimainfrm.cpp.
.PP
References collapseOverlapContainers(), KMdiChildView::m_bInterruptActivation, KMdiChildView::m_bMainframesActivateViewIsPending, KMdiTaskBar::setActiveButton(), KMdiChildArea::setTopChild(), and KMdiChildArea::topChild().
.SS "void KMdiMainFrm::taskbarButtonRightClicked (\fBKMdiChildView\fP * pWnd)\fC [protected, virtual, slot]\fP"
.PP
Activates the MDI view (see \fBactivateView()\fP ) and popups the taskBar popup menu (see \fBtaskBarPopup()\fP ). 
.PP

.PP
Definition at line 1110 of file kmdimainfrm.cpp.
.PP
References activateView(), QPopupMenu::popup(), and taskBarPopup().
.SS "void KMdiMainFrm::switchOffMaximizeModeForMenu (\fBKMdiChildFrm\fP * oldChild)\fC [protected, slot]\fP"
.PP
Turns the system buttons for maximize mode (SDI mode) off, and disconnects them. 
.PP
Definition at line 2480 of file kmdimainfrm.cpp.
.PP
References QObject::disconnect().
.PP
Referenced by createMdiManager(), and setEnableMaximizedChildFrmMode().
.SS "void KMdiMainFrm::updateSysButtonConnections (\fBKMdiChildFrm\fP * oldChild, \fBKMdiChildFrm\fP * newChild)\fC [protected, slot]\fP"
.PP
Reconnects the system buttons form maximize mode (SDI mode) with the new child frame. 
.PP
Definition at line 2503 of file kmdimainfrm.cpp.
.PP
References QObject::connect(), QObject::disconnect(), and frameDecorOfAttachedViews().
.PP
Referenced by createMdiManager().
.SS "void KMdiMainFrm::windowMenuItemActivated (int id)\fC [protected, slot]\fP"
.PP
Usually called when the user clicks an MDI view item in the 'Window' menu. 
.PP

.PP
Definition at line 2735 of file kmdimainfrm.cpp.
.PP
References activateView(), QPtrList::at(), KMdiChildView::isAttached(), KMdiChildView::isMinimized(), KMdiChildFrm::m_pClient, KMdiChildView::minimize(), and KMdiChildArea::topChild().
.PP
Referenced by addWindow(), and removeWindowFromMdi().
.SS "void KMdiMainFrm::dockMenuItemActivated (int id)\fC [protected, slot]\fP"
.PP
Usually called when the user clicks an MDI view item in the sub-popup menu 'Docking' of the 'Window' menu. 
.PP

.PP
Definition at line 2761 of file kmdimainfrm.cpp.
.PP
References QPtrList::at(), attachWindow(), detachWindow(), KMdiChildView::isAttached(), KMdiChildView::isMinimized(), and KMdiChildView::minimize().
.PP
Referenced by addWindow(), and removeWindowFromMdi().
.SS "void KMdiMainFrm::popupWindowMenu (\fBQPoint\fP p)\fC [protected, slot]\fP"
.PP
Popups the 'Window' menu. 
.PP
See also \fBwindowPopup()\fP .
.PP
Definition at line 2783 of file kmdimainfrm.cpp.
.PP
References isFakingSDIApplication(), and QPopupMenu::popup().
.PP
Referenced by createMdiManager().
.SS "void KMdiMainFrm::dragEndTimeOut ()\fC [protected, slot]\fP"
.PP
The timer for main widget moving has elapsed -> send drag end to all concerned views. 
.PP

.PP
Definition at line 2792 of file kmdimainfrm.cpp.
.PP
References QPtrList::current(), QPtrList::first(), QPtrList::next(), and QApplication::sendEvent().
.SS "void KMdiMainFrm::closeViewButtonPressed ()\fC [protected, slot]\fP"
.PP
internally used to handle click on view close button (TabPage mode, only) 
.PP
Definition at line 2845 of file kmdimainfrm.cpp.
.PP
References activeWindow(), and QWidget::close().
.PP
Referenced by switchToIDEAlMode(), and switchToTabPageMode().
.SS "void KMdiMainFrm::lastChildFrmClosed ()\fC [signal]\fP"
.PP
Signals the last attached \fBKMdiChildView\fP has been closed. 
.PP
Referenced by createMdiManager().
.SS "void KMdiMainFrm::lastChildViewClosed ()\fC [signal]\fP"
.PP
Signals the last \fBKMdiChildView\fP (that is under MDI control) has been closed. 
.PP
Referenced by closeWindow(), and removeWindowFromMdi().
.SS "void KMdiMainFrm::leftTopLevelMode ()\fC [signal]\fP"
.PP
Signals that the Toplevel mode has been left. 
.PP
Referenced by switchToChildframeMode().
.SS "void KMdiMainFrm::childViewIsDetachedNow (\fBQWidget\fP *)\fC [signal]\fP"
.PP
Signals that a child view has been detached (undocked to desktop). 
.PP
Referenced by addWindow(), and detachWindow().
.SS "void KMdiMainFrm::collapseOverlapContainers ()\fC [signal]\fP"
.PP
Signals we need to collapse the overlapped containers. 
.PP
Referenced by activateView().
.SS "void KMdiMainFrm::mdiModeHasBeenChangedTo (KMdi::MdiMode)\fC [signal]\fP"
.PP
Signals the MDI mode has been changed. 
.PP
Referenced by setStandardMDIMenuEnabled(), switchToChildframeMode(), switchToIDEAlMode(), switchToTabPageMode(), and switchToToplevelMode().

.SH "Author"
.PP 
Generated automatically by Doxygen for kmdi Library from the source code.
