# class KToolBarLabelAction

###

Module | kdeui
Namespace |
Class | KToolBarLabelAction
Inherits | KAction

Class to display a label in a toolbar.

KToolBarLabelAction is a convenience class for displaying a label in a toolbar.

It provides easy access to the label's #setBuddy(QAction*) and #buddy() methods and can be used as follows:

    KHistoryCombo* findCombo = new KHistoryCombo( true, this );

    KWidgetAction* action = new KWidgetAction( findCombo, i18n("Find Combo"),
    Qt.Key_F6, this, SLOT( slotFocus() ),
    actionCollection(), "find_combo");

    KAction *action = new KToolBarLabelAction( action, i18n( "Find "), "find_label" );
    action->setShortcut( Qt.Key_F6 );
    connect( action, SIGNAL( triggered() ), this, SLOT( slotFocus() ) );

Author Felix Berger <felixberger@beldesign.de>

### methods

- KToolBarLabelAction (text, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  text | QString |
  parent | QObject |

  Creates a toolbar label.

  text - The label's and the action's text.

  parent - This action's parent.

- KToolBarLabelAction (buddy, text, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  buddy | QAction |
  text | QString |
  parent | QObject |

  Creates a toolbar label setting a buddy for the label.

  buddy - The action whose widget which is focused when the label's accelerator is typed.

  text - The label's and the action's text.

  parent - This action's parent.

- buddy ( )

  returns QAction

  Returns the label's buddy or 0 if no buddy is currently set.

  See QLabel#buddy() and QLabel#setBuddy() for more information.

- createWidget (parent)

  returns QWidget

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget |

  Reimplemented from

  See also QActionWidgetFactory.

- event (a0)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  a0 | QEvent |

- eventFilter (watched, event)

  returns bool
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  watched | QObject |
  event | QEvent |

- setBuddy (buddy)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  buddy | QAction |

  Sets the label's buddy to buddy.

  See QLabel#setBuddy() for details.

- textChanged (newText)

  returns Nothing
  SIGNAL ("textChanged (const QString&)")

  Argument | Type | Default
  --- | --- | ---
  newText | QString |

  This signal is emmitted whenever the text of this action is changed.