KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KToolBarLabelAction Class Reference

from PyKDE4.kdeui import *

Inherits: KAction → QWidgetAction → QAction → QObject

Detailed Description

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>


Signals

 textChanged (QString newText)

Methods

 __init__ (self, QString text, QObject parent)
 __init__ (self, QAction buddy, QString text, QObject parent)
QAction buddy (self)
QWidget createWidget (self, QWidget parent)
bool event (self, QEvent a0)
bool eventFilter (self, QObject watched, QEvent event)
 setBuddy (self, QAction buddy)

Signal Documentation

textChanged ( QString  newText
)

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

Signal syntax:
QObject.connect(source, SIGNAL("textChanged(const QString&)"), target_slot)

Method Documentation

__init__ (  self,
QString  text,
QObject  parent
)

Creates a toolbar label.

Parameters:
text  The label's and the action's text.
parent  This action's parent.

__init__ (  self,
QAction  buddy,
QString  text,
QObject  parent
)

Creates a toolbar label setting a buddy for the label.

Parameters:
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.

QAction buddy (   self )

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

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

QWidget createWidget (  self,
QWidget  parent
)

Reimplemented from

See also:
QActionWidgetFactory.

bool event (  self,
QEvent  a0
)
bool eventFilter (  self,
QObject  watched,
QEvent  event
)
setBuddy (  self,
QAction  buddy
)

Sets the label's buddy to buddy.

See QLabel#setBuddy() for details.

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal