KMdiChildFrm Class Reference
Internal class. It's an MDI child frame widget. It contains a view widget and a frame caption. Usually you derive from its view. More...
#include <kmdichildfrm.h>
Inheritance diagram for KMdiChildFrm:

Public Types | |
enum | MdiWindowState { Normal, Maximized, Minimized } |
Public Slots | |
void | slot_resizeViaSystemMenu () |
Public Member Functions | |
KMdiChildFrm (KMdiChildArea *parent) | |
~KMdiChildFrm () | |
void | setClient (KMdiChildView *w, bool bAutomaticResize=false) |
void | unsetClient (QPoint positionOffset=QPoint(0, 0)) |
void | setIcon (const QPixmap &pxm) |
QPixmap * | icon () const |
void | enableClose (bool bEnable) |
void | setCaption (const QString &text) |
const QString & | caption () |
void | setState (MdiWindowState state, bool bAnimate=true) |
MdiWindowState | state () const |
QRect | mdiAreaContentsRect () const |
QRect | restoreGeometry () const |
void | setRestoreGeometry (const QRect &newRestGeo) |
void | updateRects () |
QPopupMenu * | systemMenu () const |
int | captionHeight () const |
void | redecorateButtons () |
bool | isInDrag () const |
bool | isInResize () const |
void | raiseAndActivate () |
virtual void | setMinimumSize (int minw, int minh) |
Public Attributes | |
KMdiChildView * | m_pClient |
Protected Slots | |
void | maximizePressed () |
void | restorePressed () |
void | minimizePressed () |
void | closePressed () |
void | undockPressed () |
void | showSystemMenu () |
Protected Member Functions | |
virtual void | resizeEvent (QResizeEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *e) |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | moveEvent (QMoveEvent *me) |
virtual void | leaveEvent (QEvent *) |
virtual bool | eventFilter (QObject *, QEvent *) |
void | resizeWindow (int resizeCorner, int x, int y) |
void | setResizeCursor (int resizeCorner) |
void | unsetResizeCursor () |
virtual void | switchToMinimizeLayout () |
void | doResize () |
void | doResize (bool captionOnly) |
void | linkChildren (QDict< FocusPolicy > *pFocPolDict) |
QDict< QWidget::FocusPolicy > * | unlinkChildren () |
int | getResizeCorner (int ax, int ay) |
Protected Attributes | |
KMdiChildArea * | m_pManager |
KMdiChildFrmCaption * | m_pCaption |
KMdiWin32IconButton * | m_pWinIcon |
QToolButton * | m_pUnixIcon |
QToolButton * | m_pMinimize |
QToolButton * | m_pMaximize |
QToolButton * | m_pClose |
QToolButton * | m_pUndock |
MdiWindowState | m_state |
QRect | m_restoredRect |
int | m_iResizeCorner |
int | m_iLastCursorCorner |
bool | m_bResizing |
bool | m_bDragging |
QPixmap * | m_pIconButtonPixmap |
QPixmap * | m_pMinButtonPixmap |
QPixmap * | m_pMaxButtonPixmap |
QPixmap * | m_pRestoreButtonPixmap |
QPixmap * | m_pCloseButtonPixmap |
QPixmap * | m_pUndockButtonPixmap |
int | m_windowMenuID |
QPopupMenu * | m_pSystemMenu |
QSize | m_oldClientMinSize |
QSize | m_oldClientMaxSize |
QLayout::ResizeMode | m_oldLayoutResizeMode |
QTime | m_timeMeasure |
Friends | |
class | KMdiChildArea |
class | KMdiChildFrmCaption |
Detailed Description
Internal class. It's an MDI child frame widget. It contains a view widget and a frame caption. Usually you derive from its view.
Definition at line 144 of file kmdichildfrm.h.
Constructor & Destructor Documentation
|
Creates a new KMdiChildFrm class.
Definition at line 102 of file kmdichildfrm.cpp. References closePressed(), KMdiChildFrmCaption::heightHint(), m_pSystemMenu, maximizePressed(), minimizePressed(), redecorateButtons(), setMinimumSize(), and undockPressed(). |
|
Delicato : destroys this KMdiChildFrm If a child is still here managed (no recreation was made) it is destroyed too.
Definition at line 172 of file kmdichildfrm.cpp. |
Member Function Documentation
|
Reparents the widget w to this KMdiChildFrm (if this is not already done) Installs an event filter to catch focus events. Resizes this mdi child in a way that the child fits perfectly in. Definition at line 653 of file kmdichildfrm.cpp. References KMdiChildFrmCaption::heightHint(), linkChildren(), KMdiChildArea::m_defaultChildFrmSize, setIcon(), KMdiChildView::setMaximumSize(), KMdiChildView::setMinimumSize(), and KMdiChildArea::topChild(). Referenced by KMdiMainFrm::attachWindow(). |
|
Reparents the client widget to 0 (desktop), moves with an offset from the original position Removes the event filter.
Definition at line 728 of file kmdichildfrm.cpp. References KMdiChildView::focusedChildWidget(), KMdiChildView::setFirstFocusableChildWidget(), KMdiChildView::setLastFocusableChildWidget(), KMdiChildView::setMaximumSize(), KMdiChildView::setMinimumSize(), and unlinkChildren(). Referenced by KMdiChildArea::destroyChildButNotItsView(), and KMdiMainFrm::detachWindow(). |
|
Sets the window icon pointer.
Definition at line 630 of file kmdichildfrm.cpp. References doResize(). Referenced by setClient(). |
|
Returns the child frame icon.
Definition at line 647 of file kmdichildfrm.cpp. Referenced by KMdiMainFrm::detachWindow(), KMdiChildFrmCaption::paintEvent(), redecorateButtons(), KMdiMainFrm::setEnableMaximizedChildFrmMode(), and KMdiMainFrm::updateSysButtonConnections(). |
|
Enables or disables the close button.
Definition at line 622 of file kmdichildfrm.cpp. |
|
Sets the caption of this window.
Definition at line 615 of file kmdichildfrm.cpp. References KMdiChildFrmCaption::setCaption(). Referenced by KMdiChildView::setCaption(), and KMdiChildView::youAreAttached(). |
|
Returns the caption of this mdi child. Cool to have it inline... Definition at line 233 of file kmdichildfrm.h. References KMdiChildFrmCaption::m_szCaption. Referenced by KMdiMainFrm::detachWindow(). |
|
Minimizes , Maximizes or restores the window.
Definition at line 455 of file kmdichildfrm.cpp. References KMdiChildArea::childMinimized(), KMdiChildFrmCaption::heightHint(), KMdiChildView::isMaximized(), m_pClient, KMdiChildView::m_stateChanged, minimizePressed(), restorePressed(), KMdiChildView::setMaximumSize(), KMdiChildView::setMinimumSize(), switchToMinimizeLayout(), and KMdiChildArea::topChild(). Referenced by KMdiChildArea::childMinimized(), KMdiChildArea::destroyChild(), KMdiChildArea::destroyChildButNotItsView(), KMdiChildArea::manageChild(), KMdiChildView::maximize(), maximizePressed(), KMdiChildView::minimize(), minimizePressed(), KMdiChildView::restore(), restorePressed(), KMdiChildArea::setTopChild(), and undockPressed(). |
|
Returns the current state of the window Cool to have it inline...
Definition at line 242 of file kmdichildfrm.h. Referenced by KMdiChildArea::destroyChild(), KMdiChildArea::destroyChildButNotItsView(), KMdiChildView::isMaximized(), KMdiChildView::isMinimized(), KMdiChildArea::layoutMinimizedChildren(), KMdiChildArea::manageChild(), KMdiMainFrm::setEnableMaximizedChildFrmMode(), KMdiChildView::setMaximumSize(), KMdiChildView::setMinimumSize(), and systemMenu(). |
|
Returns the inner client area of the parent of this (which is KMdiChildArea).
Definition at line 1269 of file kmdichildfrm.cpp. |
|
Returns the geometry that will be restored by calling restore().
Definition at line 601 of file kmdichildfrm.cpp. Referenced by KMdiChildView::restoreGeometry(). |
|
Sets the geometry that will be restored by calling restore().
Definition at line 608 of file kmdichildfrm.cpp. Referenced by KMdiMainFrm::attachWindow(), and KMdiChildView::setRestoreGeometry(). |
|
Forces updating the rects of the caption and so... It may be useful when setting the mdiCaptionFont of the MdiManager Definition at line 259 of file kmdichildfrm.h. References resizeEvent(). |
|
Returns the system menu.
Definition at line 1109 of file kmdichildfrm.cpp. References closePressed(), KMdiMainFrm::frameDecorOfAttachedViews(), m_pSystemMenu, maximizePressed(), minimizePressed(), restorePressed(), state(), and undockPressed(). Referenced by KMdiChildFrmCaption::mousePressEvent(), KMdiMainFrm::setEnableMaximizedChildFrmMode(), showSystemMenu(), and KMdiMainFrm::updateSysButtonConnections(). |
|
Returns the caption bar height.
Definition at line 267 of file kmdichildfrm.h. Referenced by KMdiMainFrm::attachWindow(), doResize(), eventFilter(), KMdiChildView::setMaximumSize(), and showSystemMenu(). |
|
sets new raise behavior and pixmaps of the buttons depending on the current decoration style
Definition at line 1199 of file kmdichildfrm.cpp. References KMdiMainFrm::frameDecorOfAttachedViews(), and icon(). Referenced by KMdiChildFrm(), and KMdiMainFrm::setFrameDecorOfAttachedViews(). |
|
returns the mouse state "In Drag"
Definition at line 276 of file kmdichildfrm.h. |
|
returns the mouse state "In Resize"
Definition at line 280 of file kmdichildfrm.h. |
|
Internally called from the signal focusInEventOccurs. It raises the MDI childframe to the top of all other MDI child frames and sets the focus on it. Definition at line 1090 of file kmdichildfrm.cpp. References KMdiChildFrmCaption::setActive(), and KMdiChildArea::setTopChild(). Referenced by KMdiMainFrm::activateView(). |
|
Sets the minimum size of the widget to w by h pixels. It extends it's base clase method in a way that the minimum size of the child area will be set additionally if the view is maximized. Definition at line 1099 of file kmdichildfrm.cpp. Referenced by KMdiChildFrm(), and KMdiChildView::setMinimumSize(). |
|
Reimplemented from its base class. Resizes the captionbar, relayouts the position of the system buttons, and calls resize for its embedded client KMdiChildView with the proper size Definition at line 887 of file kmdichildfrm.cpp. References doResize(). Referenced by updateRects(). |
|
Reimplemented from its base class. Detects if the mouse is on the edge of window and what resize cursor must be set. Calls KMdiChildFrm::resizeWindow if it is in m_bResizing. Definition at line 264 of file kmdichildfrm.cpp. References getResizeCorner(), resizeWindow(), and setResizeCursor(). |
|
Reimplemented from its base class. Colours the caption, raises the childfrm widget and turns to resize mode if it is on the edge (resize-sensitive area) Definition at line 184 of file kmdichildfrm.cpp. References getResizeCorner(), KMdiChildFrmCaption::setActive(), and KMdiChildArea::setTopChild(). |
|
Reimplemented from its base class. Sets a normal cursor and leaves the resize mode. Definition at line 208 of file kmdichildfrm.cpp. |
|
Reimplemented from its base class. give its child view the chance to notify a childframe move... that's why it sends a KMdiChildMovedEvent to the embedded KMdiChildView . Definition at line 287 of file kmdichildfrm.cpp. |
|
Reimplemented from its base class. If not in resize mode, it sets the mouse cursor to normal appearance. Definition at line 298 of file kmdichildfrm.cpp. References unsetResizeCursor(). |
|
Reimplemented from its base class. Additionally it catches
Definition at line 972 of file kmdichildfrm.cpp. References KMdiChildView::activate(), captionHeight(), closePressed(), KMdiChildFrmCaption::heightHint(), showSystemMenu(), unsetResizeCursor(), and KMdiChildView::updateTimeStamp(). |
|
Calculates the new geometry from the new mouse position given as parameters and calls KMdiChildFrm::setGeometry.
Definition at line 303 of file kmdichildfrm.cpp. References KMdiChildFrmCaption::heightHint(). Referenced by mouseMoveEvent(). |
|
Override the cursor appearance depending on the widget corner given as parameter.
Definition at line 224 of file kmdichildfrm.cpp. Referenced by mouseMoveEvent(). |
|
changes from the resize cursor to the normal (previous) cursor
Definition at line 253 of file kmdichildfrm.cpp. Referenced by eventFilter(), and leaveEvent(). |
|
That means to show a mini window showing the childframe's caption bar, only. It cannot be resized. Definition at line 1172 of file kmdichildfrm.cpp. References KMdiChildArea::layoutMinimizedChildren(), minimizePressed(), and restorePressed(). Referenced by setState(). |
|
Does the actual resize. Called from various places but from resizeEvent in general. Definition at line 892 of file kmdichildfrm.cpp. Referenced by resizeEvent(), setIcon(), and KMdiChildArea::setMdiCaptionFont(). |
|
Does the actual resize, like doResize() but skips resize of the client if captionOnly is true.
Definition at line 897 of file kmdichildfrm.cpp. References captionHeight(), KMdiMainFrm::frameDecorOfAttachedViews(), and KMdiChildFrmCaption::heightHint(). |
|
Handles a click on the Maximize button.
Definition at line 395 of file kmdichildfrm.cpp. References KMdiChildArea::nowMaximized(), and setState(). Referenced by KMdiChildFrm(), KMdiChildFrmCaption::mouseDoubleClickEvent(), and systemMenu(). |
|
Handles a click on the Restore (Normalize) button.
Definition at line 410 of file kmdichildfrm.cpp. References KMdiChildArea::nowMaximized(), and setState(). Referenced by KMdiChildArea::cascadeMaximized(), KMdiChildArea::cascadeWindows(), KMdiChildArea::expandHorizontal(), KMdiChildArea::expandVertical(), setState(), switchToMinimizeLayout(), systemMenu(), KMdiChildArea::tileAllInternal(), KMdiChildArea::tileAnodine(), and KMdiChildArea::tileVertically(). |
|
Handles a click on the Minimize button.
Definition at line 421 of file kmdichildfrm.cpp. References KMdiChildArea::nowMaximized(), and setState(). Referenced by KMdiChildFrm(), setState(), switchToMinimizeLayout(), and systemMenu(). |
|
Handles a click on the Close button.
Definition at line 436 of file kmdichildfrm.cpp. Referenced by eventFilter(), KMdiChildFrm(), and systemMenu(). |
|
Handles a click on the Undock (Detach) button.
Definition at line 444 of file kmdichildfrm.cpp. References KMdiChildView::detach(), and setState(). Referenced by KMdiChildFrm(), and systemMenu(). |
|
Shows a system menu for child frame windows.
Definition at line 1155 of file kmdichildfrm.cpp. References captionHeight(), KMdiMainFrm::frameDecorOfAttachedViews(), and systemMenu(). Referenced by eventFilter(). |
|
Restore the focus policies for _all_ widgets in the view using the list given as parameter. Install the event filter for all direct child widgets of this. (See KMdiChildFrm::eventFilter ) Definition at line 797 of file kmdichildfrm.cpp. Referenced by setClient(). |
|
Backups all focus policies of _all_ child widgets in the MDI childview since they get lost during a reparent. Remove all event filters for all direct child widgets of this. (See KMdiChildFrm::eventFilter ) Definition at line 840 of file kmdichildfrm.cpp. Referenced by unsetClient(). |
|
Calculates the corner id for the resize cursor. The return value can be tested for: KMDI_RESIZE_LEFT, KMDI_RESIZE_RIGHT, KMDI_RESIZE_TOP, KMDI_RESIZE_BOTTOM or an OR'd variant of them for the corners. Definition at line 379 of file kmdichildfrm.cpp. Referenced by mouseMoveEvent(), and mousePressEvent(). |
Member Data Documentation
|
Every child frame window has an temporary ID in the Window menu of the child area.
Definition at line 181 of file kmdichildfrm.h. |
|
Imitates a system menu for child frame windows.
Definition at line 185 of file kmdichildfrm.h. Referenced by KMdiChildFrm(), and systemMenu(). |
The documentation for this class was generated from the following files: