KMdiMainFrm Class Reference
Base class for all your special main frames. More...
#include <kmdimainfrm.h>
Collaboration diagram for KMdiMainFrm:

Public Types | |
enum | ExistsAs { DocumentView, ToolView, AnyView } |
Public Slots | |
KMdiChildView * | createWrapper (QWidget *view, const QString &name, const QString &shortName) |
virtual void | addWindow (KMdiChildView *pView, int flags=KMdi::StandardAdd) |
void | addWindow (KMdiChildView *pView, int flags, int index) |
virtual void | addWindow (KMdiChildView *pView, QPoint pos, int flags=KMdi::StandardAdd) |
virtual void | addWindow (KMdiChildView *pView, QRect rectNormal, int flags=KMdi::StandardAdd) |
virtual KMdiToolViewAccessor * | addToolWindow (QWidget *pWnd, KDockWidget::DockPosition pos=KDockWidget::DockNone, QWidget *pTargetWnd=0L, int percent=50, const QString &tabToolTip=0, const QString &tabCaption=0) |
virtual void | deleteToolWindow (QWidget *pWnd) |
virtual void | deleteToolWindow (KMdiToolViewAccessor *accessor) |
KMdiToolViewAccessor * | createToolWindow () |
virtual void | removeWindowFromMdi (KMdiChildView *pWnd) |
virtual void | closeWindow (KMdiChildView *pWnd, bool layoutTaskBar=true) |
virtual void | slot_toggleTaskBar () |
virtual void | attachWindow (KMdiChildView *pWnd, bool bShow=true, bool bAutomaticResize=false) |
virtual void | detachWindow (KMdiChildView *pWnd, bool bShow=true) |
virtual void | childWindowCloseRequest (KMdiChildView *pWnd) |
virtual void | closeAllViews () |
virtual void | iconifyAllViews () |
virtual void | closeActiveView () |
virtual void | switchToToplevelMode () |
virtual void | finishToplevelMode () |
virtual void | switchToChildframeMode () |
virtual void | finishChildframeMode () |
virtual void | switchToTabPageMode () |
virtual void | finishTabPageMode () |
virtual void | switchToIDEAlMode () |
virtual void | finishIDEAlMode (bool full=true) |
void | setIDEAlModeStyle (int flags) KDE_DEPRECATED |
void | setToolviewStyle (int flags) |
bool | isViewTaskBarOn () |
virtual void | showViewTaskBar () |
virtual void | hideViewTaskBar () |
virtual void | fillWindowMenu () |
virtual void | cascadeWindows () |
virtual void | cascadeMaximized () |
virtual void | expandVertical () |
virtual void | expandHorizontal () |
virtual void | tilePragma () |
virtual void | tileAnodine () |
virtual void | tileVertically () |
virtual void | setFrameDecorOfAttachedViews (int frameDecor) |
virtual void | setEnableMaximizedChildFrmMode (bool bEnable) |
virtual void | activateNextWin () |
virtual void | activatePrevWin () |
virtual void | activateFirstWin () |
virtual void | activateLastWin () |
virtual void | activateView (int index) |
void | prevToolViewInDock () |
void | nextToolViewInDock () |
Signals | |
void | lastChildFrmClosed () |
void | lastChildViewClosed () |
void | leftTopLevelMode () |
void | childViewIsDetachedNow (QWidget *) |
void | collapseOverlapContainers () |
void | mdiModeHasBeenChangedTo (KMdi::MdiMode) |
void | viewActivated (KMdiChildView *) |
void | viewDeactivated (KMdiChildView *) |
void | toggleTop () |
void | toggleLeft () |
void | toggleRight () |
void | toggleBottom () |
Public Member Functions | |
KMdiMainFrm (QWidget *parentWidget, const char *name="", KMdi::MdiMode mdiMode=KMdi::ChildframeMode, WFlags flags=WType_TopLevel|WDestructiveClose) | |
void | setStandardMDIMenuEnabled (bool showModeMenu=true) |
void | setManagedDockPositionModeEnabled (bool enabled) |
bool | isInMaximizedChildFrmMode () |
KMdi::MdiMode | mdiMode () |
KMdiChildView * | activeWindow () |
virtual QPopupMenu * | taskBarPopup (KMdiChildView *pWnd, bool bIncludeWindowPopup=false) |
virtual QPopupMenu * | windowPopup (KMdiChildView *pWnd, bool bIncludeTaskbarPopup=true) |
virtual void | applyOptions () |
KMdiChildView * | findWindow (const QString &caption) |
bool | windowExists (KMdiChildView *pWnd, ExistsAs as) |
virtual bool | event (QEvent *e) |
virtual void | setSysButtonsAtMenuPosition () |
virtual int | taskBarHeight () |
virtual void | setUndockPositioningOffset (QPoint offset) |
KMdiIterator< KMdiChildView * > * | createIterator () |
void | deleteIterator (KMdiIterator< KMdiChildView * > *pIt) |
QPopupMenu * | windowMenu () const |
virtual void | setBackgroundColor (const QColor &c) |
virtual void | setBackgroundPixmap (const QPixmap &pm) |
void | setDefaultChildFrmSize (const QSize &sz) |
QSize | defaultChildFrmSize () |
virtual void | setMinimumSize (int minw, int minh) |
int | childFrameModeHeight () |
virtual void | setMenuForSDIModeSysButtons (KMenuBar *menuBar=0) |
void | fakeSDIApplication () |
bool | isFakingSDIApplication () const |
virtual bool | eventFilter (QObject *obj, QEvent *e) |
void | findRootDockWidgets (QPtrList< KDockWidget > *pRootDockWidgetList, QValueList< QRect > *pPositionList) |
void | setSwitching (const bool switching) |
bool | switching (void) const |
Static Public Member Functions | |
static int | frameDecorOfAttachedViews () |
Protected Slots | |
virtual void | activateView (KMdiChildView *pWnd) |
virtual void | taskbarButtonRightClicked (KMdiChildView *pWnd) |
void | switchOffMaximizeModeForMenu (KMdiChildFrm *oldChild) |
void | updateSysButtonConnections (KMdiChildFrm *oldChild, KMdiChildFrm *newChild) |
void | windowMenuItemActivated (int id) |
void | dockMenuItemActivated (int id) |
void | popupWindowMenu (QPoint p) |
void | dragEndTimeOut () |
void | closeViewButtonPressed () |
Protected Member Functions | |
virtual void | resizeEvent (QResizeEvent *) |
virtual void | createTaskBar () |
virtual void | createMdiManager () |
void | blockClearingOfWindowMenu (bool bBlocked) |
void | findToolViewsDockedToMain (QPtrList< KDockWidget > *list, KDockWidget::DockPosition dprtmw) |
void | dockToolViewsIntoContainers (QPtrList< KDockWidget > &widgetsToReparent, KDockWidget *container) |
QStringList | prepareIdealToTabs (KDockWidget *container) |
void | idealToolViewsToStandardTabs (QStringList widgetNames, KDockWidget::DockPosition pos, int sizee) |
KMdi::TabWidgetVisibility | tabWidgetVisibility () |
void | setTabWidgetVisibility (KMdi::TabWidgetVisibility) |
KTabWidget * | tabWidget () const |
Protected Attributes | |
KMdi::MdiMode | m_mdiMode |
KMdiChildArea * | m_pMdi |
KMdiTaskBar * | m_pTaskBar |
QPtrList< KMdiChildView > * | m_pDocumentViews |
QMap< QWidget *, KMdiToolViewAccessor * > * | m_pToolViews |
KMdiChildView * | m_pCurrentWindow |
QPopupMenu * | m_pWindowPopup |
QPopupMenu * | m_pTaskBarPopup |
QPopupMenu * | m_pWindowMenu |
QPopupMenu * | m_pDockMenu |
QPopupMenu * | m_pMdiModeMenu |
QPopupMenu * | m_pPlacingMenu |
KMenuBar * | m_pMainMenuBar |
QPixmap * | m_pUndockButtonPixmap |
QPixmap * | m_pMinButtonPixmap |
QPixmap * | m_pRestoreButtonPixmap |
QPixmap * | m_pCloseButtonPixmap |
QToolButton * | m_pUndock |
QToolButton * | m_pMinimize |
QToolButton * | m_pRestore |
QToolButton * | m_pClose |
QPoint | m_undockPositioningOffset |
bool | m_bMaximizedChildFrmMode |
int | m_oldMainFrmHeight |
int | m_oldMainFrmMinHeight |
int | m_oldMainFrmMaxHeight |
bool | m_bSDIApplication |
KDockWidget * | m_pDockbaseAreaOfDocumentViews |
QDomDocument * | m_pTempDockSession |
bool | m_bClearingOfWindowMenuBlocked |
QTimer * | m_pDragEndTimer |
bool | m_bSwitching |
KDockWidget * | m_leftContainer |
KDockWidget * | m_rightContainer |
KDockWidget * | m_topContainer |
KDockWidget * | m_bottomContainer |
Static Protected Attributes | |
static KMdi::FrameDecor | m_frameDecoration = KMdi::KDELook |
Friends | |
class | KMdiChildView |
class | KMdiTaskBar |
class | KMdiToolViewAccessor |
Detailed Description
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.
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 KMdiChildView.
- General usage
class MyMainWindow : public KMdiMainFrm { .... };
to define your main window class and
MyMainWindow mainframe;
qApp->setMainWidget(&mainframe);
mainframe->addWindow(view1); // put it under MDI control
mainframe->addWindow(view2);
when you wish to use your main window class. The above example also adds a few windows to the frame.
KMdiMainFrm will provide the "Window" menu needed in common MDI applications. Just insert it in your main menu:
if ( !isFakingSDIApplication() ) { menuBar()->insertItem( i18n( "&Window" ), windowMenu() ); }
To synchronize the positions of the MDI control buttons inserted in your mainmenu:
void B_MainModuleWidget::initMenuBar() { setMenuForSDIModeSysButtons( menuBar() ); } ... void B_MainModuleWidget::resizeEvent ( QResizeEvent *e ) { KMdiMainFrm::resizeEvent( e ); setSysButtonsAtMenuPosition(); }
- Dynamic mode switching
The MDI mode can be gotten using mdiMode(). If you need to fake the look of an SDI application use fakeSDIApplication() to fake it and isFakingSDIApplication() to query whether or not an SDI interface is being faked.
You can dynamically change the shape of the attached MDI views using setFrameDecorOfAttachedViews().
Additionally, here's a hint how to restore the mainframe's settings from config file:
// 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);
- Managing views
- tilePragma() - Tile the windows and allow them to overlap
- tileAnodine() - Tile the windows but don't allow them to overlap
- tileVertically() - Tile the windows vertically
- cascadeWindows() - cascade windows
- cascadeMaximized() - cascade windows and maximize their viewing area
- expandVertical() - expand all the windows to use the most amount of vertical space
- expandHorizontal() - expand all the windows to use the most amount of horizontal space
activateView(KMdiChildView*) and activateView(int index) 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.
Use detachWindow() and attachWindow() for docking the MDI views to desktop and back.
Connect accels of your program with activatePrevWin(), activateNextWin() and activateView(int index).
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.
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 closeWindow(). Otherwise the mainframe class will not get noticed about the deleted view and a dangling pointer will remain in the MDI control. The closeWindow() or the removeWindowFromMdi() method is for that issue. The difference is closeWindow() deletes the view object. So if your application wants to control that by itself, call removeWindowFromMdi() and call delete by yourself. See also KMdiChildView::closeEvent() for that issue.
Here's an example how you can suggest things for the adding of views to the MDI control via flags:
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));
Definition at line 239 of file kmdimainfrm.h.
Member Function Documentation
|
Control whether or not the standard MDI menu is displayed when a context menu is displayed.
Definition at line 275 of file kmdimainfrm.cpp. References mdiModeHasBeenChangedTo(). |
|
Returns whether the application's MDI views are in maximized state or not.
Definition at line 313 of file kmdimainfrm.h. |
|
Returns the MDI mode. This can be one of the enumerations KMdi::MdiMode. Definition at line 318 of file kmdimainfrm.h. Referenced by detachWindow(). |
|
Returns the focused attached MDI view.
Definition at line 956 of file kmdimainfrm.cpp. Referenced by activateFirstWin(), activateLastWin(), activateNextWin(), activatePrevWin(), closeViewButtonPressed(), and eventFilter(). |
|
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. Definition at line 990 of file kmdimainfrm.cpp. References QPopupMenu::clear(), QPopupMenu::insertItem(), QPopupMenu::insertSeparator(), and windowPopup(). Referenced by taskbarButtonRightClicked(), and windowPopup(). |
|
Returns a popup menu with only a title "Window". You can fill it with own operations entries on the MDI view. This popup menu is inserted as last menu item in taskBarPopup() . Definition at line 978 of file kmdimainfrm.cpp. References QPopupMenu::clear(), QPopupMenu::insertItem(), QPopupMenu::insertSeparator(), and taskBarPopup(). Referenced by taskBarPopup(). |
|
Called in the constructor (forces a resize of all MDI views).
Definition at line 340 of file kmdimainfrm.cpp. References QWidget::height(), QWidget::resize(), and QWidget::width(). |
|
Returns the KMdiChildView belonging to the given caption string.
Definition at line 944 of file kmdimainfrm.cpp. |
|
Returns whether this MDI child view is under MDI control (using addWindow() ) or not.
Definition at line 962 of file kmdimainfrm.cpp. References QMap::contains(), and QPtrList::findRef(). Referenced by addWindow(). |
|
Catches certain Qt events and processes it here. Currently, here this catches only the KMdiViewCloseEvent (a KMdi user event) which is sent from itself in childWindowCloseRequest() right after a KMdiChildView::closeEvent() . The reason for this event to itself is simple: It just wants to break the function call stack. It continues the processing with calling closeWindow() . You see, a close() is translated to a closeWindow() . 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. This method calls QMainWindow::event , additionally. Definition at line 1123 of file kmdimainfrm.cpp. References closeWindow(), QTimer::isActive(), QApplication::sendEvent(), QTimer::start(), and QTimer::stop(). |
|
If there's a main menubar given, it will create the 4 maximize mode buttons there (undock, minimize, restore, close).
Definition at line 2265 of file kmdimainfrm.cpp. References frameDecorOfAttachedViews(). Referenced by setMenuForSDIModeSysButtons(). |
|
Returns the height of the taskbar.
Definition at line 378 of file kmdimainfrm.h. |
|
Sets an offset value that is used on detachWindow() . The undocked window is visually moved on the desktop by this offset. Definition at line 384 of file kmdimainfrm.h. Referenced by switchToToplevelMode(). |
|
If you don't want to know about the inner structure of the KMdi system, you can use this iterator to handle with the MDI view list in a more abstract way. The iterator hides what special data structure is used in KMdi. Definition at line 392 of file kmdimainfrm.h. Referenced by activateFirstWin(), activateLastWin(), activateNextWin(), and activatePrevWin(). |
|
Deletes an KMdiIterator created in the KMdi library (needed for the windows dll problem).
Definition at line 407 of file kmdimainfrm.h. |
|
Returns a popup menu that contains the MDI controlled view list. Additionally, this menu provides some placing actions for these views. Usually, you insert this popup menu in your main menubar as "Window" menu. Definition at line 417 of file kmdimainfrm.h. |
|
Sets a background color for the MDI view area widget.
Definition at line 422 of file kmdimainfrm.h. |
|
Sets a background pixmap for the MDI view area widget.
Definition at line 427 of file kmdimainfrm.h. |
|
Sets a size that is used as the default size for a newly to the MDI system added KMdiChildView . By default this size is 600x400. So all non-resized added MDI views appear in that size. Definition at line 433 of file kmdimainfrm.h. |
|
Returns the default size for a newly added KMdiChildView. See setDefaultChildFrmSize() . Definition at line 438 of file kmdimainfrm.h. Referenced by detachWindow(). |
|
Do nothing when in Toplevel mode.
Definition at line 411 of file kmdimainfrm.cpp. |
|
Returns the Childframe mode height of this. Makes only sense when in Toplevel mode. Definition at line 448 of file kmdimainfrm.h. |
|
Tells the MDI system a QMenu where it can insert buttons for the system menu, undock, minimize, restore actions. If no such menu is given, KMdi simply overlays the buttons at the upper right-hand side of the main widget. Definition at line 2192 of file kmdimainfrm.cpp. References frameDecorOfAttachedViews(), QToolButton::setAutoRaise(), and setSysButtonsAtMenuPosition(). Referenced by setFrameDecorOfAttachedViews(). |
|
Definition at line 460 of file kmdimainfrm.h. Referenced by setEnableMaximizedChildFrmMode(), setMenuForSDIModeSysButtons(), setSysButtonsAtMenuPosition(), and updateSysButtonConnections(). |
|
An SDI application user interface is faked:
Definition at line 2837 of file kmdimainfrm.cpp. |
|
Definition at line 473 of file kmdimainfrm.h. Referenced by popupWindowMenu(). |
|
these are quite some assumptions: The key combination uses exactly one modifier key The WIN button in KDE is the meta button in Qt Definition at line 1169 of file kmdimainfrm.cpp. References activeWindow(), KMdiChildArea::focusTopChild(), KMdiChildView::isAttached(), QWidget::isHidden(), QFocusEvent::reason(), setSwitching(), KMdiChildArea::topChild(), and KMdiChildView::updateTimeStamp(). |
|
find the root dockwidgets and store their geometry
Definition at line 1277 of file kmdimainfrm.cpp. References QPtrListIterator::current(), QWidget::isTopLevel(), QPoint::x(), and QPoint::y(). Referenced by switchToChildframeMode(), and switchToToplevelMode(). |
|
We're switching something.
Definition at line 479 of file kmdimainfrm.h. Referenced by eventFilter(). |
|
addWindow demands a KMdiChildView. This method wraps every QWidget in such an object and this way you can put every widget under MDI control. Definition at line 420 of file kmdimainfrm.cpp. References QBoxLayout::addWidget(), QWidget::icon(), QWidget::reparent(), KMdiChildView::setCaption(), QWidget::setIcon(), KMdiChildView::setTabCaption(), and KMdiChildView::trackIconAndCaptionChanges(). |
|
Adds a KMdiChildView to the MDI system. The main frame takes control of it.
Definition at line 443 of file kmdimainfrm.cpp. Referenced by addWindow(). |
|
Adds a KMdiChildView to the MDI system. The main frame takes control of it.
Definition at line 448 of file kmdimainfrm.cpp. 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(). |
|
Adds a KMdiChildView to the MDI system. The main frame takes control of it.
Definition at line 541 of file kmdimainfrm.cpp. References addWindow(). |
|
Adds a KMdiChildView to the MDI system. The main frame takes control of it.
Definition at line 531 of file kmdimainfrm.cpp. References addWindow(). |
|
Usually called from addWindow() when adding a tool view window. It reparents the given widget as toplevel and stay-on-top on the application's main widget. Definition at line 570 of file kmdimainfrm.cpp. References QMap::insert(), and QRect::topLeft(). Referenced by addWindow(). |
|
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.
Definition at line 552 of file kmdimainfrm.cpp. |
|
Removes a KMdiChildView from the MDI system and from the main frame`s control. The caller is responsible for deleting the view. If the view is not deleted it will be reparented to 0 Definition at line 732 of file kmdimainfrm.cpp. 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(). |
|
Removes a KMdiChildView from the MDI system and from the main frame`s control. Note: The view will be deleted! Definition at line 832 of file kmdimainfrm.cpp. 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(). Referenced by event(). |
|
Switches the KMdiTaskBar on and off.
Definition at line 389 of file kmdimainfrm.cpp. References KMdiTaskBar::isSwitchedOn(), and KMdiTaskBar::switchOn(). |
|
Makes a main frame controlled undocked KMdiChildView docked. Doesn't work on KMdiChildView which aren't added to the MDI system. Use addWindow() for that. Definition at line 607 of file kmdimainfrm.cpp. 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(). Referenced by addWindow(), dockMenuItemActivated(), removeWindowFromMdi(), and switchToChildframeMode(). |
|
Makes a docked KMdiChildView undocked. The view window still remains under the main frame's MDI control. Definition at line 666 of file kmdimainfrm.cpp. 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(). Referenced by addWindow(), dockMenuItemActivated(), and removeWindowFromMdi(). |
|
Someone wants that the MDI view to be closed. This method sends a KMdiViewCloseEvent to itself to break the function call stack. See also event() . Definition at line 1117 of file kmdimainfrm.cpp. References QApplication::postEvent(). Referenced by addWindow(), and removeWindowFromMdi(). |
|
Close all views.
Definition at line 1239 of file kmdimainfrm.cpp. References QValueList::append(), QValueList::begin(), QValueList::end(), QPtrList::first(), and QPtrList::next(). Referenced by fillWindowMenu(). |
|
Iconfiy all views.
Definition at line 1258 of file kmdimainfrm.cpp. Referenced by fillWindowMenu(). |
|
Closes the view of the active (topchild) window.
Definition at line 1269 of file kmdimainfrm.cpp. References QWidget::close(). |
|
Undocks all view windows (unix-like).
Definition at line 1347 of file kmdimainfrm.cpp. References QValueList::begin(), QPtrList::count(), QValueList::end(), findRootDockWidgets(), mdiModeHasBeenChangedTo(), setUndockPositioningOffset(), and QPtrListIterator::toFirst(). Referenced by fillWindowMenu(). |
|
Docks all view windows (Windows-like).
Definition at line 1459 of file kmdimainfrm.cpp. References attachWindow(), QPtrList::count(), findRootDockWidgets(), KMdiChildView::isAttached(), KMdiChildView::isToolView(), leftTopLevelMode(), mdiModeHasBeenChangedTo(), KMdiChildView::show(), and QPtrListIterator::toFirst(). Referenced by attachWindow(), and fillWindowMenu(). |
|
Docks all view windows (Windows-like).
Definition at line 1605 of file kmdimainfrm.cpp. References closeViewButtonPressed(), QObject::connect(), QPtrList::count(), mdiModeHasBeenChangedTo(), QWidget::setFocus(), and KMdiTaskBar::switchOn(). Referenced by fillWindowMenu(), and setToolviewStyle(). |
|
Docks all view windows. Toolviews use dockcontainers Definition at line 1826 of file kmdimainfrm.cpp. References closeViewButtonPressed(), QObject::connect(), QPtrList::count(), mdiModeHasBeenChangedTo(), QWidget::setFocus(), and KMdiTaskBar::switchOn(). Referenced by fillWindowMenu(), and setToolviewStyle(). |
|
Sets the appearance of the IDEAl mode. See KMultiTabBar styles for the first 3 bits.
Definition at line 1741 of file kmdimainfrm.cpp. Referenced by setToolviewStyle(). |
|
Sets the appearance of the toolview tabs.
Definition at line 1773 of file kmdimainfrm.cpp. References QMap::begin(), QMap::end(), setIDEAlModeStyle(), switchToIDEAlMode(), and switchToTabPageMode(). |
|
Shows the view taskbar.
Definition at line 2538 of file kmdimainfrm.cpp. References KMdiTaskBar::isSwitchedOn(). |
|
Shows the view taskbar. This should be connected with your "View" menu. Definition at line 2547 of file kmdimainfrm.cpp. References KMdiTaskBar::switchOn(). |
|
Hides the view taskbar. This should be connected with your "View" menu. Definition at line 2554 of file kmdimainfrm.cpp. References KMdiTaskBar::switchOn(). |
|
|
Cascades the windows without resizing them.
Definition at line 666 of file kmdimainfrm.h. Referenced by fillWindowMenu(). |
|
Cascades the windows resizing them to the maximum available size.
Definition at line 671 of file kmdimainfrm.h. Referenced by fillWindowMenu(). |
|
Maximizes only in vertical direction.
Definition at line 676 of file kmdimainfrm.h. Referenced by fillWindowMenu(). |
|
Maximizes only in horizontal direction.
Definition at line 681 of file kmdimainfrm.h. Referenced by fillWindowMenu(). |
|
Tile Pragma.
Definition at line 686 of file kmdimainfrm.h. Referenced by fillWindowMenu(). |
|
Tile Anodine.
Definition at line 691 of file kmdimainfrm.h. Referenced by fillWindowMenu(). |
|
Tile Vertically.
Definition at line 696 of file kmdimainfrm.h. Referenced by fillWindowMenu(). |
|
Sets the decoration of the window frame of docked (attached) MDI views.
Definition at line 2805 of file kmdimainfrm.cpp. References QPtrListIterator::current(), KMdiChildView::isAttached(), KMdiChildView::isToolView(), KMdiChildView::mdiParent(), KMdiChildFrm::redecorateButtons(), and setMenuForSDIModeSysButtons(). |
|
If in Childframe mode, we can switch between maximized or restored shown MDI views.
Definition at line 2426 of file kmdimainfrm.cpp. References QObject::connect(), frameDecorOfAttachedViews(), KMdiChildFrm::icon(), KMdiChildFrm::m_pClient, KMdiChildView::restore(), KMdiChildFrm::state(), switchOffMaximizeModeForMenu(), KMdiChildFrm::systemMenu(), and KMdiChildArea::topChild(). Referenced by createMdiManager(). |
|
Activates the next open view.
Definition at line 2302 of file kmdimainfrm.cpp. References activateView(), activeWindow(), and createIterator(). |
|
Activates the previous open view.
Definition at line 2326 of file kmdimainfrm.cpp. References activateView(), activeWindow(), and createIterator(). |
|
Activates the view first viewed concerning to the access time.
Definition at line 2350 of file kmdimainfrm.cpp. References activateView(), activeWindow(), QMap::begin(), createIterator(), QMap::end(), QMap::find(), KMdiChildView::getTimeStamp(), and QMap::insert(). |
|
Activates the view last viewed concerning to the access time.
Definition at line 2383 of file kmdimainfrm.cpp. References activateView(), activeWindow(), QMap::begin(), createIterator(), QMap::end(), QMap::find(), KMdiChildView::getTimeStamp(), and QMap::insert(). |
|
Activates the view with the tab page index (TabPage mode only).
Definition at line 2412 of file kmdimainfrm.cpp. References KMdiChildView::activate(), QPtrList::first(), and QPtrList::next(). Referenced by activateFirstWin(), activateLastWin(), activateNextWin(), activatePrevWin(), addWindow(), detachWindow(), removeWindowFromMdi(), taskbarButtonRightClicked(), and windowMenuItemActivated(). |
|
Creates a new MDI taskbar (showing the MDI views as taskbar entries) and shows it.
Definition at line 383 of file kmdimainfrm.cpp. |
|
Creates the MDI view area and connects some signals and slots with the KMdiMainFrm widget.
Definition at line 365 of file kmdimainfrm.cpp. References QObject::connect(), lastChildFrmClosed(), popupWindowMenu(), setEnableMaximizedChildFrmMode(), switchOffMaximizeModeForMenu(), and updateSysButtonConnections(). |
|
prevents fillWindowMenu() from m_pWindowMenu->clear(). You have to care for it by yourself. This is useful if you want to add some actions in your overridden fillWindowMenu() method. Definition at line 757 of file kmdimainfrm.h. |
|
Get tabwidget visibility.
Definition at line 2919 of file kmdimainfrm.cpp. References KMdiDocumentViewTabWidget::tabWidgetVisibility(). |
|
Set tabwidget visibility.
Definition at line 2927 of file kmdimainfrm.cpp. References KMdiDocumentViewTabWidget::setTabWidgetVisibility(). |
|
Returns the tabwidget used in IDEAl and Tabbed modes. Returns 0 in other modes. Definition at line 2933 of file kmdimainfrm.cpp. |
|
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 1060 of file kmdimainfrm.cpp. References collapseOverlapContainers(), KMdiChildView::m_bInterruptActivation, KMdiChildView::m_bMainframesActivateViewIsPending, KMdiTaskBar::setActiveButton(), KMdiChildArea::setTopChild(), and KMdiChildArea::topChild(). |
|
Activates the MDI view (see activateView() ) and popups the taskBar popup menu (see taskBarPopup() ).
Definition at line 1110 of file kmdimainfrm.cpp. References activateView(), QPopupMenu::popup(), and taskBarPopup(). |
|
Turns the system buttons for maximize mode (SDI mode) off, and disconnects them.
Definition at line 2480 of file kmdimainfrm.cpp. References QObject::disconnect(). Referenced by createMdiManager(), and setEnableMaximizedChildFrmMode(). |
|
Reconnects the system buttons form maximize mode (SDI mode) with the new child frame.
Definition at line 2503 of file kmdimainfrm.cpp. References QObject::connect(), QObject::disconnect(), and frameDecorOfAttachedViews(). Referenced by createMdiManager(). |
|
Usually called when the user clicks an MDI view item in the "Window" menu.
Definition at line 2735 of file kmdimainfrm.cpp. References activateView(), QPtrList::at(), KMdiChildView::isAttached(), KMdiChildView::isMinimized(), KMdiChildFrm::m_pClient, KMdiChildView::minimize(), and KMdiChildArea::topChild(). Referenced by addWindow(), and removeWindowFromMdi(). |
|
Usually called when the user clicks an MDI view item in the sub-popup menu "Docking" of the "Window" menu.
Definition at line 2761 of file kmdimainfrm.cpp. References QPtrList::at(), attachWindow(), detachWindow(), KMdiChildView::isAttached(), KMdiChildView::isMinimized(), and KMdiChildView::minimize(). Referenced by addWindow(), and removeWindowFromMdi(). |
|
Popups the "Window" menu. See also windowPopup() . Definition at line 2783 of file kmdimainfrm.cpp. References isFakingSDIApplication(), and QPopupMenu::popup(). Referenced by createMdiManager(). |
|
The timer for main widget moving has elapsed -> send drag end to all concerned views.
Definition at line 2792 of file kmdimainfrm.cpp. References QPtrList::current(), QPtrList::first(), QPtrList::next(), and QApplication::sendEvent(). |
|
internally used to handle click on view close button (TabPage mode, only)
Definition at line 2845 of file kmdimainfrm.cpp. References activeWindow(), and QWidget::close(). Referenced by switchToIDEAlMode(), and switchToTabPageMode(). |
|
Signals the last attached KMdiChildView has been closed.
Referenced by createMdiManager(). |
|
Signals the last KMdiChildView (that is under MDI control) has been closed.
Referenced by closeWindow(), and removeWindowFromMdi(). |
|
Signals that the Toplevel mode has been left.
Referenced by switchToChildframeMode(). |
|
Signals that a child view has been detached (undocked to desktop).
Referenced by addWindow(), and detachWindow(). |
|
Signals we need to collapse the overlapped containers.
Referenced by activateView(). |
|
Signals the MDI mode has been changed.
Referenced by setStandardMDIMenuEnabled(), switchToChildframeMode(), switchToIDEAlMode(), switchToTabPageMode(), and switchToToplevelMode(). |
The documentation for this class was generated from the following files: