.TH "KToolBarLabelAction" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KToolBarLabelAction \- Class to display a label in a toolbar.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <ktoolbarlabelaction.h>\fP
.PP
Inherits \fBKWidgetAction\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKToolBarLabelAction\fP (const \fBQString\fP &text, const \fBKShortcut\fP &cut, const \fBQObject\fP *receiver, const char *slot, \fBKActionCollection\fP *\fBparent\fP, const char *\fBname\fP)"
.br
.ti -1c
.RI "\fBKToolBarLabelAction\fP (\fBQWidget\fP *buddy, const \fBQString\fP &text, const \fBKShortcut\fP &cut, const \fBQObject\fP *receiver, const char *slot, \fBKActionCollection\fP *\fBparent\fP, const char *\fBname\fP)"
.br
.ti -1c
.RI "\fBKToolBarLabelAction\fP (\fBQLabel\fP *label, const \fBKShortcut\fP &cut, const \fBQObject\fP *receiver, const char *slot, \fBKActionCollection\fP *\fBparent\fP, const char *\fBname\fP)"
.br
.ti -1c
.RI "virtual void \fBsetText\fP (const \fBQString\fP &text)"
.br
.ti -1c
.RI "virtual void \fBsetBuddy\fP (\fBQWidget\fP *buddy)"
.br
.ti -1c
.RI "\fBQWidget\fP * \fBbuddy\fP () const "
.br
.ti -1c
.RI "\fBQLabel\fP * \fBlabel\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Class to display a label in a toolbar. 

KToolBarLabelAction is a convenience class for displaying a label in a toolbar.
.PP
It provides easy access to the label's \fBsetBuddy(QWidget*)\fP and \fBbuddy()\fP methods and can be used as follows:
.PP
.PP
.nf
 KHistoryCombo* findCombo = new KHistoryCombo(true, this);
 KWidgetAction* action
   = new KWidgetAction(findCombo, i18n('F&ind Combo'), Qt::Key_F6, this,
                       SLOT(slotFocus()), actionCollection(), 'find_combo');

 new KToolBarLabelAction(findCombo, i18n('F&ind '), 0, this,
                         SLOT(slotFocus()), actionCollection(),
             'find_label');
.fi
.PP
.PP
\fBAuthor:\fP
.RS 4
Felix Berger <felixberger@beldesign.de> 
.RE
.PP

.PP
Definition at line 49 of file ktoolbarlabelaction.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KToolBarLabelAction::KToolBarLabelAction (const \fBQString\fP & text, const \fBKShortcut\fP & cut, const \fBQObject\fP * receiver, const char * slot, \fBKActionCollection\fP * parent, const char * name)"
.PP
Constructs a toolbar label. 
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The label's and the action's text. 
.br
\fIcut\fP The action's shortcut. 
.br
\fIreceiver\fP The SLOT's parent. 
.br
\fIslot\fP The SLOT to invoke to execute this action. 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.RE
.PP

.PP
Definition at line 35 of file ktoolbarlabelaction.cpp.
.SS "KToolBarLabelAction::KToolBarLabelAction (\fBQWidget\fP * buddy, const \fBQString\fP & text, const \fBKShortcut\fP & cut, const \fBQObject\fP * receiver, const char * slot, \fBKActionCollection\fP * parent, const char * name)"
.PP
Constructs a toolbar label setting a buddy for the label. 
.PP
\fBParameters:\fP
.RS 4
\fIbuddy\fP The widget which is focused when the label's accelerator is typed. 
.br
\fItext\fP The label's and the action's text. 
.br
\fIcut\fP The action's shortcut. 
.br
\fIreceiver\fP The SLOT's parent. 
.br
\fIslot\fP The SLOT to invoke to execute this action. 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.RE
.PP

.PP
Definition at line 48 of file ktoolbarlabelaction.cpp.
.SS "KToolBarLabelAction::KToolBarLabelAction (\fBQLabel\fP * label, const \fBKShortcut\fP & cut, const \fBQObject\fP * receiver, const char * slot, \fBKActionCollection\fP * parent, const char * name)"
.PP
Constructs a toolbar label for a label. 
.PP
You can use this constructor if you want to display a class which is derived from \fBQLabel\fP in the toolbar. Note that ownership of the label is transferred to the action and the label is deleted when the action is deleted. So you shouldn't hold any pointers to the label.
.PP
It's important that the label's name is set to 'kde toolbar widget' in its constructor, otherwise it is not correctly rendered in some kde styles.
.PP
\fBParameters:\fP
.RS 4
\fIlabel\fP the label which is displayed in the toolbar. 
.br
\fIcut\fP The action's shortcut. 
.br
\fIreceiver\fP The SLOT's parent. 
.br
\fIslot\fP The SLOT to invoke to execute this action. 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.RE
.PP

.PP
Definition at line 62 of file ktoolbarlabelaction.cpp.
.PP
References label().
.SH "Member Function Documentation"
.PP 
.SS "void KToolBarLabelAction::setText (const \fBQString\fP & text)\fC [virtual]\fP"
.PP
Reimplemented to update both the action's text and the label's text. 
.PP
Reimplemented from \fBKAction\fP.
.PP
Definition at line 93 of file ktoolbarlabelaction.cpp.
.PP
References KAction::setText().
.SS "void KToolBarLabelAction::setBuddy (\fBQWidget\fP * buddy)\fC [virtual]\fP"
.PP
Sets the label's buddy to buddy. 
.PP
See \fBQLabel::setBuddy()\fP for details. 
.PP
Definition at line 99 of file ktoolbarlabelaction.cpp.
.PP
References buddy().
.SS "\fBQWidget\fP * KToolBarLabelAction::buddy () const"
.PP
Returns the label's buddy or 0 if no buddy is currently set. 
.PP
See \fBQLabel::buddy()\fP and \fBQLabel::setBuddy()\fP for more information. 
.PP
Definition at line 104 of file ktoolbarlabelaction.cpp.
.PP
Referenced by setBuddy().
.SS "\fBQLabel\fP * KToolBarLabelAction::label () const"
.PP
Returns the label which is used internally. 
.PP
Definition at line 109 of file ktoolbarlabelaction.cpp.
.PP
Referenced by KToolBarLabelAction().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
