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() ) );
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) | |
| textChanged (self, QString newText) | |
Method Documentation
Creates a toolbar label.
- Parameters:
-
text The label's and the action's text. parent This action's 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.
| bool event | ( | self, | ||
| QEvent | a0 | |||
| ) |
| setBuddy | ( | self, | ||
| QAction | buddy | |||
| ) |
Sets the label's buddy to buddy.
See QLabel#setBuddy() for details.
| textChanged | ( | self, | ||
| 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)
KDE 4.4 PyKDE API Reference