KMdiChildFrmCaption Class Reference
Internal class. More...
#include <kmdichildfrmcaption.h>
Inheritance diagram for KMdiChildFrmCaption:


| 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 | |
| KMdiChildFrm * | m_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
| 
 | 
| Constructor. 
 Definition at line 52 of file kmdichildfrmcaption.cpp. References m_bActive, m_bChildInDrag, m_pParent, m_szCaption, QWidget::setBackgroundMode(), and QWidget::setFocusPolicy(). | 
| 
 | 
| Destructor. 
 Definition at line 65 of file kmdichildfrmcaption.cpp. | 
Member Function Documentation
| 
 | 
| Repaint the caption bar in active background colors. 
 Definition at line 145 of file kmdichildfrmcaption.cpp. References m_bActive, KMdiChildArea::m_captionActiveBackColor, KMdiChildArea::m_captionInactiveBackColor, KMdiChildFrm::m_pManager, m_pParent, KMdiChildFrm::m_pUnixIcon, KMdiChildFrm::m_pWinIcon, and QWidget::repaint(). Referenced by KMdiChildArea::focusTopChild(), KMdiChildFrm::mousePressEvent(), KMdiChildFrm::raiseAndActivate(), and KMdiChildArea::setTopChild(). | 
| 
 | 
| Repaint with a new caption bar title. 
 Reimplemented from QWidget. Definition at line 164 of file kmdichildfrmcaption.cpp. References m_szCaption, and QWidget::repaint(). Referenced by KMdiChildFrm::setCaption(). | 
| 
 | 
| Returns the caption bar height depending on the used font. 
 Definition at line 172 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(). | 
| 
 | 
| Grabs the mouse, a move cursor, sets a move indicator variable to true and keeps the global mouse position in mind. 
 Definition at line 268 of file kmdichildfrmcaption.cpp. References KMdiMainFrm::frameDecorOfAttachedViews(), QWidget::grabMouse(), KMdiChildFrm::m_bDragging, m_offset, m_pParent, QWidget::mapFromGlobal(), QWidget::setMouseTracking(), and QApplication::setOverrideCursor(). | 
| 
 | 
| Draws the caption bar and its title using the settings. 
 Reimplemented from QWidget. Definition at line 193 of file kmdichildfrmcaption.cpp. References abbreviateText(), QPainter::drawText(), QPainter::fillRect(), KMdiMainFrm::frameDecorOfAttachedViews(), KMdiChildFrm::icon(), QRect::left(), m_bActive, KMdiChildArea::m_captionActiveBackColor, KMdiChildArea::m_captionActiveForeColor, KMdiChildArea::m_captionFont, KMdiChildArea::m_captionInactiveBackColor, KMdiChildArea::m_captionInactiveForeColor, KMdiChildFrm::m_pClose, KMdiChildFrm::m_pManager, m_pParent, m_szCaption, QWidget::rect(), QPainter::setFont(), QRect::setLeft(), QPainter::setPen(), QWidget::width(), and QPixmap::width(). | 
| 
 | 
| The same as KMdiChildFrmCaption::slot_moveViaSystemMenu. 
 Reimplemented from QWidget. Definition at line 71 of file kmdichildfrmcaption.cpp. References QMouseEvent::button(), KMdiMainFrm::frameDecorOfAttachedViews(), KMdiChildFrm::m_bDragging, m_offset, m_pParent, QWidget::mapToGlobal(), QWidget::mapToParent(), QPopupMenu::popup(), QMouseEvent::pos(), QWidget::setMouseTracking(), QApplication::setOverrideCursor(), and KMdiChildFrm::systemMenu(). | 
| 
 | 
| Calls maximizePressed of the parent widget ( KMdiChildFrm ). 
 Reimplemented from QWidget. Definition at line 261 of file kmdichildfrmcaption.cpp. References m_pParent, and KMdiChildFrm::maximizePressed(). | 
| 
 | 
| Restore the normal mouse cursor, set the state variable back to 'not moving'. 
 Reimplemented from QWidget. Definition at line 88 of file kmdichildfrmcaption.cpp. References QMouseEvent::button(), KMdiMainFrm::frameDecorOfAttachedViews(), m_bChildInDrag, KMdiChildFrm::m_bDragging, KMdiChildFrm::m_pClient, m_pParent, QWidget::releaseMouse(), QApplication::restoreOverrideCursor(), and QApplication::sendEvent(). | 
| 
 | 
| Checks if out of move range of the KMdiChildArea and calls KMdiChildFrm::move. 
 Reimplemented from QWidget. Definition at line 109 of file kmdichildfrmcaption.cpp. References QMouseEvent::globalPos(), m_bChildInDrag, KMdiChildFrm::m_bDragging, m_offset, KMdiChildFrm::m_pClient, KMdiChildFrm::m_pManager, m_pParent, QWidget::parentWidget(), QPoint::rx(), QPoint::ry(), QApplication::sendEvent(), QPoint::x(), and QPoint::y(). | 
| 
 | ||||||||||||
| Computes a new abbreviated string from a given string depending on a given maximum width. 
 Definition at line 223 of file kmdichildfrmcaption.cpp. References QWidget::fontMetrics(), QString::left(), QString::length(), QString::right(), and QFontMetrics::width(). Referenced by paintEvent(). | 
Member Data Documentation
| 
 | 
| the title string shown in the caption bar 
 Definition at line 106 of file kmdichildfrmcaption.h. Referenced by KMdiChildFrm::caption(), KMdiChildFrmCaption(), paintEvent(), and setCaption(). | 
| 
 | 
| parent widget 
 Definition at line 112 of file kmdichildfrmcaption.h. Referenced by heightHint(), KMdiChildFrmCaption(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paintEvent(), setActive(), and slot_moveViaSystemMenu(). | 
| 
 | 
| state variable indicating whether activated or not activated 
 Definition at line 116 of file kmdichildfrmcaption.h. Referenced by KMdiChildFrmCaption(), paintEvent(), and setActive(). | 
| 
 | 
| the position offset related to its parent widget (internally used for translating mouse move positions 
 Definition at line 120 of file kmdichildfrmcaption.h. Referenced by mouseMoveEvent(), mousePressEvent(), and slot_moveViaSystemMenu(). | 
| 
 | 
| True if the child knows that it is currently being dragged. 
 Definition at line 124 of file kmdichildfrmcaption.h. Referenced by KMdiChildFrmCaption(), mouseMoveEvent(), and mouseReleaseEvent(). | 
The documentation for this class was generated from the following files:

