kmdi Library API Documentation

KMdiChildFrmCaption Class Reference

Internal class. More...

#include <kmdichildfrmcaption.h>

Inheritance diagram for KMdiChildFrmCaption:

QWidget List of all members.

Public Slots

void slot_moveViaSystemMenu ()

Public Member Functions

 KMdiChildFrmCaption (KMdiChildFrm *parent)
 ~KMdiChildFrmCaption ()
void setActive (bool bActive)
void setCaption (const QString &text)
int heightHint ()

Public Attributes

QString m_szCaption

Protected Member Functions

virtual void paintEvent (QPaintEvent *e)
virtual void mousePressEvent (QMouseEvent *)
virtual void mouseDoubleClickEvent (QMouseEvent *)
virtual void mouseReleaseEvent (QMouseEvent *)
virtual void mouseMoveEvent (QMouseEvent *e)
QString abbreviateText (QString origStr, int maxWidth)

Protected Attributes

KMdiChildFrmm_pParent
bool m_bActive
QPoint m_offset
bool m_bChildInDrag

Detailed Description

Internal class.

It's the caption bar of a child frame widget.

Definition at line 44 of file kmdichildfrmcaption.h.


Constructor & Destructor Documentation

KMdiChildFrmCaption::KMdiChildFrmCaption KMdiChildFrm parent  ) 
 

Constructor.

Definition at line 68 of file kmdichildfrmcaption.cpp.

References m_bActive, m_bChildInDrag, m_pParent, and m_szCaption.

KMdiChildFrmCaption::~KMdiChildFrmCaption  ) 
 

Destructor.

Definition at line 81 of file kmdichildfrmcaption.cpp.


Member Function Documentation

void KMdiChildFrmCaption::setActive bool  bActive  ) 
 

Repaint the caption bar in active background colors.

Definition at line 171 of file kmdichildfrmcaption.cpp.

References m_bActive, KMdiChildArea::m_captionActiveBackColor, KMdiChildArea::m_captionInactiveBackColor, KMdiChildFrm::m_pManager, m_pParent, KMdiChildFrm::m_pUnixIcon, and KMdiChildFrm::m_pWinIcon.

Referenced by KMdiChildArea::focusTopChild(), KMdiChildFrm::mousePressEvent(), and KMdiChildFrm::raiseAndActivate().

void KMdiChildFrmCaption::setCaption const QString text  ) 
 

Repaint with a new caption bar title.

Definition at line 190 of file kmdichildfrmcaption.cpp.

References m_szCaption.

Referenced by KMdiChildFrm::setCaption().

int KMdiChildFrmCaption::heightHint  ) 
 

Returns the caption bar height depending on the used font.

Definition at line 198 of file kmdichildfrmcaption.cpp.

References KMdiMainFrm::frameDecorOfAttachedViews(), KMdiChildArea::m_captionFontLineSpacing, KMdiChildFrm::m_pManager, and m_pParent.

Referenced by KMdiChildFrm::doResize(), KMdiChildFrm::eventFilter(), KMdiChildArea::getCascadePoint(), KMdiChildFrm::KMdiChildFrm(), KMdiChildArea::resizeEvent(), KMdiChildFrm::resizeWindow(), KMdiChildFrm::setClient(), and KMdiChildFrm::setState().

void KMdiChildFrmCaption::slot_moveViaSystemMenu  )  [slot]
 

Grabs the mouse, a move cursor, sets a move indicator variable to true and keeps the global mouse position in mind.

Definition at line 310 of file kmdichildfrmcaption.cpp.

References KMdiMainFrm::frameDecorOfAttachedViews(), KMdiChildFrm::m_bDragging, m_offset, and m_pParent.

void KMdiChildFrmCaption::paintEvent QPaintEvent e  )  [protected, virtual]
 

Draws the caption bar and its title using the settings.

Definition at line 227 of file kmdichildfrmcaption.cpp.

References abbreviateText(), KMdiMainFrm::frameDecorOfAttachedViews(), KMdiChildFrm::icon(), KMdiChildArea::m_captionActiveBackColor, KMdiChildArea::m_captionActiveForeColor, KMdiChildArea::m_captionFont, KMdiChildArea::m_captionInactiveBackColor, KMdiChildArea::m_captionInactiveForeColor, KMdiChildFrm::m_pClose, KMdiChildFrm::m_pManager, m_pParent, and m_szCaption.

void KMdiChildFrmCaption::mousePressEvent QMouseEvent  )  [protected, virtual]
 

The same as KMdiChildFrmCaption::slot_moveViaSystemMenu.

Definition at line 86 of file kmdichildfrmcaption.cpp.

References KMdiMainFrm::frameDecorOfAttachedViews(), KMdiChildFrm::m_bDragging, m_offset, m_pParent, and KMdiChildFrm::systemMenu().

void KMdiChildFrmCaption::mouseDoubleClickEvent QMouseEvent  )  [protected, virtual]
 

Calls maximizePressed of the parent widget ( KMdiChildFrm ).

Definition at line 303 of file kmdichildfrmcaption.cpp.

References m_pParent, and KMdiChildFrm::maximizePressed().

void KMdiChildFrmCaption::mouseReleaseEvent QMouseEvent  )  [protected, virtual]
 

Restore the normal mouse cursor, set the state variable back to 'not moving'.

Definition at line 106 of file kmdichildfrmcaption.cpp.

References KMdiMainFrm::frameDecorOfAttachedViews(), m_bChildInDrag, KMdiChildFrm::m_bDragging, KMdiChildFrm::m_pClient, and m_pParent.

void KMdiChildFrmCaption::mouseMoveEvent QMouseEvent e  )  [protected, virtual]
 

Checks if out of move range of the KMdiChildArea and calls KMdiChildFrm::move.

Definition at line 131 of file kmdichildfrmcaption.cpp.

References m_bChildInDrag, KMdiChildFrm::m_bDragging, KMdiChildFrm::m_pClient, KMdiChildFrm::m_pManager, and m_pParent.

QString KMdiChildFrmCaption::abbreviateText QString  origStr,
int  maxWidth
[protected]
 

Computes a new abbreviated string from a given string depending on a given maximum width Replace with a call to a KStringHandler function instead of rolling our own.

Definition at line 261 of file kmdichildfrmcaption.cpp.

Referenced by paintEvent().


Member Data Documentation

QString KMdiChildFrmCaption::m_szCaption
 

the title string shown in the caption bar

Definition at line 116 of file kmdichildfrmcaption.h.

Referenced by KMdiChildFrmCaption(), paintEvent(), and setCaption().

KMdiChildFrm* KMdiChildFrmCaption::m_pParent [protected]
 

parent widget

Definition at line 122 of file kmdichildfrmcaption.h.

Referenced by heightHint(), KMdiChildFrmCaption(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paintEvent(), setActive(), and slot_moveViaSystemMenu().

bool KMdiChildFrmCaption::m_bActive [protected]
 

state variable indicating whether activated or not activated

Definition at line 127 of file kmdichildfrmcaption.h.

Referenced by KMdiChildFrmCaption(), and setActive().

QPoint KMdiChildFrmCaption::m_offset [protected]
 

the position offset related to its parent widget (internally used for translating mouse move positions

Definition at line 132 of file kmdichildfrmcaption.h.

Referenced by mousePressEvent(), and slot_moveViaSystemMenu().

bool KMdiChildFrmCaption::m_bChildInDrag [protected]
 

True if the child knows that it is currently being dragged.

Definition at line 137 of file kmdichildfrmcaption.h.

Referenced by KMdiChildFrmCaption(), mouseMoveEvent(), and mouseReleaseEvent().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kmdi Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Aug 2 12:26:09 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003