kmdi Library API Documentation

KMdiTaskBarButton Class Reference

Internal class. More...

#include <kmditaskbar.h>

Inheritance diagram for KMdiTaskBarButton:

Inheritance graph
[legend]
Collaboration diagram for KMdiTaskBarButton:

Collaboration graph
[legend]
List of all members.

Public Slots

void setNewText (const QString &)

Signals

void clicked (KMdiChildView *)
void leftMouseButtonClicked (KMdiChildView *)
void rightMouseButtonClicked (KMdiChildView *)
void buttonTextChanged (int)

Public Member Functions

 KMdiTaskBarButton (KMdiTaskBar *pTaskBar, KMdiChildView *win_ptr)
 ~KMdiTaskBarButton ()
QString actualText () const
void fitText (const QString &, int newWidth)
void setText (const QString &)

Public Attributes

KMdiChildViewm_pWindow

Protected Slots

void mousePressEvent (QMouseEvent *)

Protected Attributes

QString m_actualText

Detailed Description

Internal class.

It's a special kind of QPushButton catching mouse clicks. And you have the ability to abbreviate the text that it fits in the button.

Definition at line 51 of file kmditaskbar.h.


Constructor & Destructor Documentation

KMdiTaskBarButton::KMdiTaskBarButton KMdiTaskBar pTaskBar,
KMdiChildView win_ptr
 

Constructor (sets to toggle button, adds a tooltip (caption) and sets to NoFocus.

Definition at line 58 of file kmditaskbar.cpp.

References KMdiChildView::caption(), and m_pWindow.

KMdiTaskBarButton::~KMdiTaskBarButton  ) 
 

Destructor.

Definition at line 68 of file kmditaskbar.cpp.


Member Function Documentation

QString KMdiTaskBarButton::actualText  )  const
 

text() returns the possibly abbreviated text including the dots in it.

But actualText() returns the full text.

Definition at line 128 of file kmditaskbar.cpp.

Referenced by KMdiTaskBar::layoutTaskBar().

void KMdiTaskBarButton::fitText const QString ,
int  newWidth
 

Given the parameter newWidth this function possibly abbreviates the parameter string and sets a new button text.

Definition at line 100 of file kmditaskbar.cpp.

References m_actualText.

Referenced by KMdiTaskBar::layoutTaskBar().

void KMdiTaskBarButton::setText const QString  ) 
 

Sets the text and avoids any abbreviation.

Memorizes that text in m_actualText, too.

Definition at line 94 of file kmditaskbar.cpp.

References m_actualText.

Referenced by KMdiTaskBar::addWinButton(), KMdiTaskBar::layoutTaskBar(), and setNewText().

void KMdiTaskBarButton::clicked KMdiChildView  )  [signal]
 

Emitted when the button has been clicked.

Internally connected to setFocus of the according MDI view.

Referenced by mousePressEvent().

void KMdiTaskBarButton::leftMouseButtonClicked KMdiChildView  )  [signal]
 

Internally connected with KMdiMainFrm::activateView.

Referenced by mousePressEvent().

void KMdiTaskBarButton::rightMouseButtonClicked KMdiChildView  )  [signal]
 

Internally connected with KMdiMainFrm::taskbarButtonRightClicked.

Referenced by mousePressEvent().

void KMdiTaskBarButton::buttonTextChanged int   )  [signal]
 

Emitted when the button text has changed.

Internally connected with KMdiTaskBar::layoutTaskBar

Referenced by setNewText().

void KMdiTaskBarButton::setNewText const QString s  )  [slot]
 

A slot version of setText.

Definition at line 88 of file kmditaskbar.cpp.

References buttonTextChanged(), and setText().

void KMdiTaskBarButton::mousePressEvent QMouseEvent  )  [protected, slot]
 

Reimplemented from its base class to catch right and left mouse button clicks.

Definition at line 72 of file kmditaskbar.cpp.

References clicked(), leftMouseButtonClicked(), m_pWindow, and rightMouseButtonClicked().


Member Data Documentation

KMdiChildView* KMdiTaskBarButton::m_pWindow
 

The according MDI view.

Definition at line 109 of file kmditaskbar.h.

Referenced by KMdiTaskBar::getButton(), KMdiTaskBar::getNextWindowButton(), KMdiTaskBarButton(), mousePressEvent(), and KMdiTaskBar::setActiveButton().

QString KMdiTaskBarButton::m_actualText [protected]
 

Internally we must remember the real text because the button text can be abbreviated.

Definition at line 114 of file kmditaskbar.h.

Referenced by fitText(), and setText().


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.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 30 10:22:02 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003