• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KToolBarLabelAction Class Reference

#include <ktoolbarlabelaction.h>

Inheritance diagram for KToolBarLabelAction:

Inheritance graph
[legend]

List of all members.


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>

Definition at line 49 of file ktoolbarlabelaction.h.


Signals

void textChanged (const QString &newText)

Public Member Functions

QAction * buddy () const
virtual QWidget * createWidget (QWidget *parent)
 KToolBarLabelAction (QAction *buddy, const QString &text, QObject *parent)
 KToolBarLabelAction (const QString &text, QObject *parent)
void setBuddy (QAction *buddy)
virtual ~KToolBarLabelAction ()

Protected Member Functions

virtual bool event (QEvent *)
virtual bool eventFilter (QObject *watched, QEvent *event)

Constructor & Destructor Documentation

KToolBarLabelAction::KToolBarLabelAction ( const QString &  text,
QObject *  parent 
)

Creates a toolbar label.

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

Definition at line 33 of file ktoolbarlabelaction.cpp.

KToolBarLabelAction::KToolBarLabelAction ( QAction *  buddy,
const 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.

Definition at line 40 of file ktoolbarlabelaction.cpp.

KToolBarLabelAction::~KToolBarLabelAction (  )  [virtual]

Destroys the toolbar label.

Definition at line 49 of file ktoolbarlabelaction.cpp.


Member Function Documentation

QAction * KToolBarLabelAction::buddy (  )  const

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

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

Definition at line 73 of file ktoolbarlabelaction.cpp.

QWidget * KToolBarLabelAction::createWidget ( QWidget *  parent  )  [virtual]

Reimplemented from.

See also:
QActionWidgetFactory.

These lines were copied from Konqueror's KonqDraggableLabel class in konq_misc.cc

Reimplemented from QWidgetAction.

Definition at line 104 of file ktoolbarlabelaction.cpp.

bool KToolBarLabelAction::event ( QEvent *  event  )  [protected, virtual]

Definition at line 78 of file ktoolbarlabelaction.cpp.

bool KToolBarLabelAction::eventFilter ( QObject *  watched,
QEvent *  event 
) [protected, virtual]

Definition at line 90 of file ktoolbarlabelaction.cpp.

void KToolBarLabelAction::setBuddy ( QAction *  buddy  ) 

Sets the label's buddy to buddy.

See QLabel::setBuddy() for details.

Definition at line 54 of file ktoolbarlabelaction.cpp.

void KToolBarLabelAction::textChanged ( const QString &  newText  )  [signal]

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


The documentation for this class was generated from the following files:
  • ktoolbarlabelaction.h
  • ktoolbarlabelaction.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal