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

QextMdiChildView Class Reference

#include <qextmdichildview.h>

Inheritance diagram for QextMdiChildView:

KBearMdiChildView

List of all members.


Detailed Description

Base class for all your special view windows.

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);
 }
 

Definition at line 103 of file qextmdichildview.h.


Public Slots

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

Signals

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

Public Member Functions

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

Protected Slots

void slot_childDestroyed ()

Protected Member Functions

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 Attributes

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

Private Attributes

bool m_bFocusInEventIsPending
bool m_bInterruptActivation
bool m_bMainframesActivateViewIsPending
bool m_bToolView

Friends

class QextMdiChildFrm
class QextMdiMainFrm

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index