class QextMdiChildView

# class QextMdiChildView | Base class for all your special view windows. More...
Definition | `#include <include/qextmdichildview.h>`
Inherits | QWidget (unknown) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- QextMdiChildView ( const QString& caption, QWidget* parentWidget = 0L, const char* name = 0L, WFlags f=0)
- QextMdiChildView ( QWidget* parentWidget = 0L, const char* name = 0L, WFlags f=0)
- ~QextMdiChildView ()
- void activate ()
- void setFirstFocusableChildWidget (QWidget*)
- void setLastFocusableChildWidget (QWidget*)
- QWidget* focusedChildWidget ()
- bool isAttached () const
- const QString& caption () const
- const QString& tabCaption () const
- virtual void setCaption (const QString& szCaption)
- virtual void setTabCaption (const QString& caption)
- virtual void setMDICaption (const QString &caption)
- QextMdiChildFrm * mdiParent () const
- bool isMinimized () const
- bool isMaximized () const
- QRect internalGeometry () const
- void setInternalGeometry (const QRect& newGeomety)
- QRect externalGeometry () const
- void setExternalGeometry (const QRect& newGeomety)
- virtual QPixmap* myIconPtr ()
- virtual void minimize (bool bAnimate)
- virtual void maximize (bool bAnimate)
- QRect restoreGeometry ()
- void setRestoreGeometry (const QRect& newRestGeo)
- void removeEventFilterForAllChildren ()
- void setWindowMenuID ( int id)
- virtual void setMinimumSize ( int minw, int minh )
- virtual void setMaximumSize ( int maxw, int maxh )
- bool isToolView () const

#### Public Slots

- virtual void attach ()
- virtual void detach ()
- virtual void minimize ()
- virtual void maximize ()
- virtual void restore ()
- virtual void youAreAttached (QextMdiChildFrm *lpC)
- virtual void youAreDetached ()
- virtual void slot_clickedInWindowMenu ()
- virtual void slot_clickedInDockMenu ()
- virtual void show ()
- virtual void hide ()
- virtual void showMinimized ()
- virtual void showMaximized ()
- virtual void showNormal ()

#### Signals

- void attachWindow ( QextMdiChildView*,bool)
- void detachWindow ( QextMdiChildView*,bool)
- void focusInEventOccurs ( QextMdiChildView*)
- void gotFocus ( QextMdiChildView*)
- void activated ( QextMdiChildView*)
- void lostFocus ( QextMdiChildView*)
- void deactivated ( QextMdiChildView*)
- void childWindowCloseRequest ( QextMdiChildView*)
- void windowCaptionChanged ( const QString&)
- void tabCaptionChanged ( const QString&)
- void mdiParentNowMaximized (bool)
- void clickedInWindowMenu (int)
- void clickedInDockMenu (int)
- void isMaximizedNow ()
- void isMinimizedNow ()
- void isRestoredNow ()
- void isAttachedNow ()
- void isDetachedNow ()
- inline QextMdiChildFrm * mdiParent () const

#### Protected Methods

- virtual void closeEvent (QCloseEvent *e)
- virtual bool eventFilter (QObject *obj, QEvent *e)
- virtual void focusInEvent (QFocusEvent *e)
- virtual void focusOutEvent (QFocusEvent *e)
- virtual void resizeEvent (QResizeEvent *e)

#### Protected Slots

- void slot_childDestroyed ()

#### Protected Members

- QString m_szCaption
- QString m_sTabCaption
- QWidget* m_focusedChildWidget
- QWidget* m_firstFocusableChildWidget
- QWidget* m_lastFocusableChildWidget
- int m_windowMenuID
- bool m_stateChanged

#### Private Members

- friend class QextMdiMainFrm
- friend class QextMdiChildFrm
- bool m_bToolView
- bool m_bInterruptActivation
- bool m_bMainframesActivateViewIsPending
- bool m_bFocusInEventIsPending

## Detailed Description

Base class for all MDI view widgets. QextMDI stores additional information in this class to handle the attach/detach mechanism and such things.

All such windows 'lives' attached to a QextMdiChildFrm widget managed by QextMdiChildArea, or detached (managed by the window manager.) So remember that the QextMdiChildView::parent pointer may change, and may be 0L, too.

There are 2 possibilities for you to put your widgets under MDI control:

Either you inherit all the views from QextMdiChildView:

       class MyMdiWidget : public QextMdiChildView
       { .... };
       ...
       MyMdiWidget w;
       mainframe->addWindow(w, flags);

or you wrap them by a QextMdiChildView somehow like this:

     void DocViewMan::addQExtMDIFrame(QWidget* pNewView, bool bShow, const QPixmap& icon)
     {
       // cover it by a QextMDI childview and add that MDI system
       QextMdiChildView* pMDICover = new QextMdiChildView( pNewView->caption());
       pMDICover->setIcon(icon);
       m_MDICoverList.append( pMDICover);
       QBoxLayout* pLayout = new QHBoxLayout( pMDICover, 0, -1, "layout");
       pNewView->reparent( pMDICover, QPoint(0,0));
       pLayout->addWidget( pNewView);
       pMDICover->setName( pNewView->name());
       // captions
       QString shortName = pNewView->caption();
       int length = shortName.length();
       shortName = shortName.right(length - (shortName.findRev('/') +1));
       pMDICover->setTabCaption( shortName);
       pMDICover->setCaption(pNewView->caption());

       // fake a viewActivated to update the currentEditView/currentBrowserView pointers _before_ adding to MDI control
       slot_viewActivated( pMDICover);

       // take it under MDI mainframe control (note: this triggers also a setFocus())
       int flags;
       if (bShow) {
         flags = QextMdi::StandardAdd;
       }
       else {
         flags = QextMdi::Hide;
       }
       // set the accelerators for Toplevel MDI mode (each toplevel window needs its own accels
       connect( m_pParent, SIGNAL(childViewIsDetachedNow(QWidget*)), this, SLOT(initKeyAccel(QWidget*)) );

       m_pParent->addWindow( pMDICover, flags);
       // correct the default settings of QextMDI ('cause we haven't a tab order for subwidget focuses)
       pMDICover->setFirstFocusableChildWidget(0L);
       pMDICover->setLastFocusableChildWidget(0L);
     }

friend class QextMdiMainFrm | ### QextMdiMainFrm

[private]

friend class QextMdiChildFrm | ### QextMdiChildFrm

[private]

QString m_szCaption | ### m_szCaption

[protected]

QString m_sTabCaption | ### m_sTabCaption

[protected]

QWidget* m_focusedChildWidget | ### m_focusedChildWidget

[protected]

QWidget* m_firstFocusableChildWidget | ### m_firstFocusableChildWidget

[protected]

QWidget* m_lastFocusableChildWidget | ### m_lastFocusableChildWidget

[protected]

int m_windowMenuID | ### m_windowMenuID

[protected]

bool m_stateChanged | ### m_stateChanged

[protected]

bool m_bToolView | ### m_bToolView

[private]

bool m_bInterruptActivation | ### m_bInterruptActivation

[private]

bool m_bMainframesActivateViewIsPending | ### m_bMainframesActivateViewIsPending

[private]

bool m_bFocusInEventIsPending | ### m_bFocusInEventIsPending

[private]

QextMdiChildView ( const QString& caption, QWidget* parentWidget = 0L, const char* name = 0L, WFlags f=0) | ### QextMdiChildView

Constructor

QextMdiChildView ( QWidget* parentWidget = 0L, const char* name = 0L, WFlags f=0) | ### QextMdiChildView

Constructor 2 (sets "Unnamed" as default caption)

~QextMdiChildView () | ### ~QextMdiChildView

Destructor

void activate () | ### activate

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

void setFirstFocusableChildWidget (QWidget*) | ### setFirstFocusableChildWidget

Memorizes the first focusable child widget of this widget

void setLastFocusableChildWidget (QWidget*) | ### setLastFocusableChildWidget

Memorizes the last focusable child widget of this widget

QWidget* focusedChildWidget () | ### focusedChildWidget

Returns the current focused child widget of this widget

bool isAttached () | ### isAttached

[const]

Returns TRUE if the MDI view is a child window within the MDI mainframe widget or FALSE if the MDI view is in toplevel mode

const QString& caption () | ### caption

[const]

Returns the caption of the child window (different from the caption on the button in the taskbar)

const QString& tabCaption () | ### tabCaption

[const]

Returns the caption of the button on the taskbar

void setCaption (const QString& szCaption) | ### setCaption

[virtual]

Sets the window caption string... Calls updateButton on the taskbar button if it has been set.

void setTabCaption (const QString& caption) | ### setTabCaption

[virtual]

Sets the caption of the button referring to this window

void setMDICaption (const QString &caption) | ### setMDICaption

[virtual]

Sets the caption of both, window and button on the taskbar (they are going to be the same)

QextMdiChildFrm * mdiParent () | ### mdiParent

[const]

Returns the QextMdiChildFrm parent widget (or 0 if the window is not attached)

bool isMinimized () | ### isMinimized

[const]

Tells if the window is minimized when attached to the Mdi manager, or if it is VISIBLE when 'floating'.

bool isMaximized () | ### isMaximized

[const]

Tells if the window is minimized when attached to the Mdi manager, otherwise returns FALSE.

QRect internalGeometry () | ### internalGeometry

[const]

Returns the geometry of this MDI child window as QWidget::geometry() does.

void setInternalGeometry (const QRect& newGeomety) | ### setInternalGeometry

Sets the geometry of the client area of this MDI child window. The top left position of the argument is the position of the top left point of the client area in its parent coordinates and the arguments width and height is the width and height of the client area. Please note: This differs from the behaviour of QWidget::setGeometry()!

QRect externalGeometry () | ### externalGeometry

[const]

Returns the frame geometry of this window or of the parent if there is any...

void setExternalGeometry (const QRect& newGeomety) | ### setExternalGeometry

Sets the geometry of the frame of this MDI child window. The top left position of the argument is the position of the top left point of the frame in its parent coordinates and the arguments width and height is the width and height of the widget frame. Please note: This differs from the behaviour of QWidget::setGeometry()!

QPixmap* myIconPtr () | ### myIconPtr

[virtual]

You should override this function in the derived class.

void minimize (bool bAnimate) | ### minimize

[virtual]

Minimizes this window when it is attached to the Mdi manager. Otherwise has no effect

void maximize (bool bAnimate) | ### maximize

[virtual]

Maximizes this window when it is attached to the Mdi manager. Otherwise has no effect

QRect restoreGeometry () | ### restoreGeometry

Returns the geometry that will be restored by calling restore().

void setRestoreGeometry (const QRect& newRestGeo) | ### setRestoreGeometry

Sets the geometry that will be restored by calling restore().

void removeEventFilterForAllChildren () | ### removeEventFilterForAllChildren

Switches interposing in event loop of all current child widgets off.

void setWindowMenuID ( int id) | ### setWindowMenuID

Internally used for setting an ID for the 'Window' menu entry

void setMinimumSize ( int minw, int minh ) | ### setMinimumSize

[virtual]

Sets the minimum size of the widget to w by h pixels. It extends it base clase method in a way that the minimum size of its childframe (if there is one) will be set, additionally.

void setMaximumSize ( int maxw, int maxh ) | ### setMaximumSize

[virtual]

Sets the maximum size of the widget to w by h pixels. It extends it base clase method in a way that the maximum size of its childframe (if there is one) will be set, additionally.

bool isToolView () | ### isToolView

[const]

Returns if this is added as MDI tool-view

void attach () | ### attach

[virtual slot]

Attaches this window to the Mdi manager. It calls the QextMdiMainFrm attachWindow function , so if you have a pointer to this QextMdiMainFrm you'll be faster calling that function. Useful as slot.

void detach () | ### detach

[virtual slot]

Detaches this window from the Mdi manager. It calls the QextMdiMainFrm detachWindow function , so if you have a pointer to this QextMdiMainFrm you'll be faster calling that function. Useful as slot.

void minimize () | ### minimize

[virtual slot]

Mimimizes the MDI view. If attached, the covering childframe widget is minimized (only a mini widget showing the caption bar and the system buttons will remain visible). If detached, it will use the minimize of the underlying system ( QWidget::showMinimized ).

void maximize () | ### maximize

[virtual slot]

Maximizes the MDI view. If attached, this widget will fill the whole MDI view area widget. The system buttons move to the main menubar (if set by QextMdiMainFrm::setMenuForSDIModeSysButtons ). If detached, it will use the minimize of the underlying system (QWidget::showMaximized ).

void restore () | ### restore

[virtual slot]

Restores this window to its normal size. Also known as 'normalize'.

void youAreAttached (QextMdiChildFrm *lpC) | ### youAreAttached

[virtual slot]

Internally called, if QextMdiMainFrm::attach is called. Actually, only the caption of the covering childframe is set.

void youAreDetached () | ### youAreDetached

[virtual slot]

Internally called, if QextMdiMainFrm::detach is called. Some things for going toplevel will be done here.

void slot_clickedInWindowMenu () | ### slot_clickedInWindowMenu

[virtual slot]

Called if someone click on the "Window" menu item for this child frame window

void slot_clickedInDockMenu () | ### slot_clickedInDockMenu

[virtual slot]

Called if someone click on the "Dock/Undock..." menu item for this child frame window

void show () | ### show

[virtual slot]

Calls QWidget::show but also for it's parent widget if attached

void hide () | ### hide

[virtual slot]

Calls QWidget::hide() or it's parent widget hide() if attached

void showMinimized () | ### showMinimized

[virtual slot]

Overridden from its base class method. Emits a signal QextMdiChildView::isMinimizedNow , additionally. Note that this method is not used by an external windows manager call on system minimizing.

void showMaximized () | ### showMaximized

[virtual slot]

Overridden from its base class method. Emits a signal QextMdiChildView::isMaximizedNow , additionally. Note that this method is not used by an external windows manager call on system maximizing.

void showNormal () | ### showNormal

[virtual slot]

Overridden from its base class method. Emits a signal QextMdiChildView::isRestoredNow , additionally. Note that this method is not used by an external windows manager call on system normalizing.

void closeEvent (QCloseEvent *e) | ### closeEvent

[protected virtual]

Ignores the event and calls QextMdiMainFrm::childWindowCloseRequest instead. This is because the mainframe has control over the views. Therefore the MDI view has to request the mainframe for a close.

bool eventFilter (QObject *obj, QEvent *e) | ### eventFilter

[protected virtual]

It only catches QEvent::KeyPress events there. If a Qt::Key_Tab is pressed, the internal MDI focus handling is called. That means if the last focusable child widget of this is called, it will jump to the first focusable child widget of this. See QextMdiChildView::setFirstFocusableChildWidget and QextMdiChildView::lastFirstFocusableChildWidget

void focusInEvent (QFocusEvent *e) | ### focusInEvent

[protected virtual]

If attached, the childframe will be activated and the MDI taskbar button will be pressed. Additionally, the memorized old focused child widget of this is focused again. Sends the focusInEventOccurs signal befor changing the focus and the gotFocus signal after changing the focus.

void focusOutEvent (QFocusEvent *e) | ### focusOutEvent

[protected virtual]

Send the lostFocus signal

void resizeEvent (QResizeEvent *e) | ### resizeEvent

[protected virtual]

Internally used for the minimize/maximize/restore mechanism when in attach mode.

void slot_childDestroyed () | ### slot_childDestroyed

[protected slots slot]

void attachWindow ( QextMdiChildView*,bool) | ### attachWindow

[signal]

Internally used by QextMdiChildView::attach to send it as command to the mainframe.

void detachWindow ( QextMdiChildView*,bool) | ### detachWindow

[signal]

Internally used by QextMdiChildView::detach to send it as command to the mainframe.

void focusInEventOccurs ( QextMdiChildView*) | ### focusInEventOccurs

[signal]

Is sent when this MDI child view is going to receive focus (before actually changing the focus). Internally used to send information to the mainframe that this MDI child view is focused. See QextMdiChildView::focusInEvent

void gotFocus ( QextMdiChildView*) | ### gotFocus

[signal]

Is sent when this MDI child has received the focus (after actually changing the focus). See QextMdiChildView::focusInEvent

void activated ( QextMdiChildView*) | ### activated

[signal]

Is sent when this MDI child was set to the activate view of all MDI views (after actually changing the focus). See QextMdiChildView::activate

void lostFocus ( QextMdiChildView*) | ### lostFocus

[signal]

Is sent when this MDI child view has lost the focus (after actually changing the focus). See QextMdiChildView::focusOutEvent

void deactivated ( QextMdiChildView*) | ### deactivated

[signal]

Is sent when this MDI child view was deactivated (after actually changing the focus). See QextMdiChildView::focusOutEvent

void childWindowCloseRequest ( QextMdiChildView*) | ### childWindowCloseRequest

[signal]

Internally used to send information to the mainframe that this MDI child view wants to be closed. See QextMdiChildView::closeEvent and QextMdiMainFrm::closeWindow

void windowCaptionChanged ( const QString&) | ### windowCaptionChanged

[signal]

Emitted when the window caption is changed via QextMdiChildView::setCaption or QextMdiChildView::setMDICaption

void tabCaptionChanged ( const QString&) | ### tabCaptionChanged

[signal]

Emitted when the window caption is changed via QextMdiChildView::setTabCaption or QextMdiChildView::setMDICaption

void mdiParentNowMaximized (bool) | ### mdiParentNowMaximized

[signal]

Internally used to send information to the mainframe that this MDI view is maximized now. Usually, the mainframe switches system buttons.

void clickedInWindowMenu (int) | ### clickedInWindowMenu

[signal]

Is automatically emitted when slot_clickedInWindowMenu is called

void clickedInDockMenu (int) | ### clickedInDockMenu

[signal]

Is automatically emitted when slot_clickedInDockMenu is called

void isMaximizedNow () | ### isMaximizedNow

[signal]

Signals this has been maximized

void isMinimizedNow () | ### isMinimizedNow

[signal]

Signals this has been minimized

void isRestoredNow () | ### isRestoredNow

[signal]

Signals this has been restored (normalized)

void isAttachedNow () | ### isAttachedNow

[signal]

Signals this has been attached

void isDetachedNow () | ### isDetachedNow

[signal]

Signals this has been detached

inline QextMdiChildFrm * mdiParent () | ### mdiParent

[const signal]

Generated by: falk on pc9 on Fri Nov 30 14:44:26 2001, using kdoc 2.0a53.