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

KDEUI

Signals | Public Member Functions | Protected Member Functions | List of all members
KToolBarLabelAction Class Reference

#include <ktoolbarlabelaction.h>

Inheritance diagram for KToolBarLabelAction:
Inheritance graph
[legend]

Signals

void textChanged (const QString &newText)
 
- Signals inherited from KAction
void authorized (KAuth::Action *action)
 
void globalShortcutChanged (const QKeySequence &)
 
void triggered (Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
 

Public Member Functions

 KToolBarLabelAction (const QString &text, QObject *parent)
 
 KToolBarLabelAction (QAction *buddy, const QString &text, QObject *parent)
 
virtual ~KToolBarLabelAction ()
 
QAction * buddy () const
 
virtual QWidget * createWidget (QWidget *parent)
 
void setBuddy (QAction *buddy)
 
- Public Member Functions inherited from KAction
 KAction (QObject *parent)
 
 KAction (const QString &text, QObject *parent)
 
 KAction (const KIcon &icon, const QString &text, QObject *parent)
 
virtual ~KAction ()
 
KAuth::Action * authAction () const
 
bool event (QEvent *)
 
void forgetGlobalShortcut ()
 
const KShortcut & globalShortcut (ShortcutTypes type=ActiveShortcut) const
 
bool globalShortcutAllowed () const
 
bool isGlobalShortcutEnabled () const
 
bool isShortcutConfigurable () const
 
KRockerGesture rockerGesture (ShortcutTypes type=ActiveShortcut) const
 
void setAuthAction (KAuth::Action *action)
 
void setAuthAction (const QString &actionName)
 
void setGlobalShortcut (const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut), GlobalShortcutLoading loading=Autoloading)
 
void setGlobalShortcutAllowed (bool allowed, GlobalShortcutLoading loading=Autoloading)
 
void setHelpText (const QString &text)
 
void setRockerGesture (const KRockerGesture &gest, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShapeGesture (const KShapeGesture &gest, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShortcut (const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShortcut (const QKeySequence &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShortcutConfigurable (bool configurable)
 
void setShortcuts (const QList< QKeySequence > &shortcuts, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
KShapeGesture shapeGesture (ShortcutTypes type=ActiveShortcut) const
 
KShortcut shortcut (ShortcutTypes types=ActiveShortcut) const
 

Protected Member Functions

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

Additional Inherited Members

- Public Types inherited from KAction
enum  GlobalShortcutLoading { Autoloading = 0x0, NoAutoloading = 0x4 }
 
enum  ShortcutType { ActiveShortcut = 0x1, DefaultShortcut = 0x2 }
 
- Properties inherited from KAction
KShortcut globalShortcut
 
bool globalShortcutAllowed
 
bool globalShortcutEnabled
 
KShortcut shortcut
 
bool shortcutConfigurable
 

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 felix.nosp@m.berg.nosp@m.er@be.nosp@m.ldes.nosp@m.ign.d.nosp@m.e

Definition at line 49 of file ktoolbarlabelaction.h.

Constructor & Destructor Documentation

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

Creates a toolbar label.

Parameters
textThe label's and the action's text.
parentThis 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
buddyThe action whose widget which is focused when the label's accelerator is typed.
textThe label's and the action's text.
parentThis 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

Definition at line 104 of file ktoolbarlabelaction.cpp.

bool KToolBarLabelAction::event ( QEvent *  event)
protectedvirtual

Definition at line 78 of file ktoolbarlabelaction.cpp.

bool KToolBarLabelAction::eventFilter ( QObject *  watched,
QEvent *  event 
)
protectedvirtual

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
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal