• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdeui
 

kdeui

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

#include <ktoolbarlabelaction.h>

Inheritance diagram for KToolBarLabelAction:
KWidgetAction KAction

Public Member Functions

 KToolBarLabelAction (const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name)
 KToolBarLabelAction (TQWidget *buddy, const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name)
 KToolBarLabelAction (TQLabel *label, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name)
virtual void setText (const TQString &text)
virtual void setBuddy (TQWidget *buddy)
TQWidget * buddy () const
TQLabel * label () const
- Public Member Functions inherited from KWidgetAction
 KWidgetAction (TQWidget *widget, const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name)
TQWidget * widget ()
void setAutoSized (bool)
virtual int plug (TQWidget *widget, int index=-1)
virtual void unplug (TQWidget *w)
- Public Member Functions inherited from KAction
 KAction (const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name)
 KAction (const TQString &text, const TQIconSet &pix, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name)
 KAction (const TQString &text, const TQString &pix, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name)
 KAction (const KGuiItem &item, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name)
 KAction (const TQString &text, const KShortcut &cut=KShortcut(), TQObject *parent=0, const char *name=0)
 KAction (const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0)
 KAction (const TQString &text, const TQIconSet &pix, const KShortcut &cut=KShortcut(), TQObject *parent=0, const char *name=0)
 KAction (const TQString &text, const TQString &pix, const KShortcut &cut=KShortcut(), TQObject *parent=0, const char *name=0)
 KAction (const TQString &text, const TQIconSet &pix, const KShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0)
 KAction (const TQString &text, const TQString &pix, const KShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0)
 KAction (TQObject *parent=0, const char *name=0)
virtual ~KAction ()
virtual void plugAccel (KAccel *accel, bool configurable=true) KDE_DEPRECATED
virtual void unplugAccel () KDE_DEPRECATED
virtual bool isPlugged () const
bool isPlugged (const TQWidget *container) const
virtual bool isPlugged (const TQWidget *container, int id) const
virtual bool isPlugged (const TQWidget *container, const TQWidget *_representative) const
TQWidget * container (int index) const
int itemId (int index) const
TQWidget * representative (int index) const
int containerCount () const
uint kaccelCount () const
virtual bool hasIcon () const
bool hasIconSet () const
virtual TQString plainText () const
virtual TQString text () const
virtual const KShortcut & shortcut () const
virtual const KShortcut & shortcutDefault () const
TQString shortcutText () const
void setShortcutText (const TQString &)
virtual bool isEnabled () const
virtual bool isShortcutConfigurable () const
virtual TQString group () const
virtual TQString whatsThis () const
virtual TQString toolTip () const
virtual TQIconSet iconSet (KIcon::Group group, int size=0) const
TQIconSet iconSet () const
virtual TQString icon () const
KActionCollection * parentCollection () const
void unplugAll ()
int accel () const KDE_DEPRECATED
TQString statusText () const
void setAccel (int key) KDE_DEPRECATED
void setStatusText (const TQString &text)
int menuId (int i)

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Additional Inherited Members

- Public Types inherited from KAction
enum  ActivationReason {
  UnknownActivation, EmulatedActivation, AccelActivation, PopupMenuActivation,
  ToolBarActivation
}
- Public Slots inherited from KAction
virtual bool setShortcut (const KShortcut &)
virtual void setGroup (const TQString &)
virtual void setWhatsThis (const TQString &text)
virtual void setToolTip (const TQString &)
virtual void setIconSet (const TQIconSet &iconSet)
virtual void setIcon (const TQString &icon)
virtual void setEnabled (bool enable)
void setDisabled (bool disable)
virtual void setShortcutConfigurable (bool)
virtual void activate ()
- Signals inherited from KAction
void activated ()
void activated (KAction::ActivationReason reason, TQt::ButtonState state)
void enabled (bool)
- Static Public Member Functions inherited from KAction
static int getToolButtonID ()
- Protected Slots inherited from KWidgetAction
void slotToolbarDestroyed ()
- Protected Attributes inherited from KAction
KActionCollection * m_parentCollection
- Properties inherited from KAction
int containerCount
TQString plainText
TQString text
TQString shortcut
bool enabled
TQString group
TQString whatsThis
TQString toolTip
TQString icon

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(TQWidget*) and buddy() methods and can be used as follows:

KHistoryCombo* findCombo = new KHistoryCombo(true, this);
KWidgetAction* action
= new KWidgetAction(findCombo, i18n("F&ind Combo"), Qt::Key_F6, this,
TQT_SLOT(slotFocus()), actionCollection(), "find_combo");
new KToolBarLabelAction(findCombo, i18n("F&ind "), 0, this,
TQT_SLOT(slotFocus()), actionCollection(),
"find_label");
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 TQString &  text,
const KShortcut &  cut,
const TQObject *  receiver,
const char *  slot,
KActionCollection *  parent,
const char *  name 
)

Constructs a toolbar label.

Parameters
textThe label's and the action's text.
cutThe action's shortcut.
receiverThe SLOT's parent.
slotThe TQT_SLOT to invoke to execute this action.
parentThis action's parent.
nameAn internal name for this action.

Definition at line 35 of file ktoolbarlabelaction.cpp.

KToolBarLabelAction::KToolBarLabelAction ( TQWidget *  buddy,
const TQString &  text,
const KShortcut &  cut,
const TQObject *  receiver,
const char *  slot,
KActionCollection *  parent,
const char *  name 
)

Constructs a toolbar label setting a buddy for the label.

Parameters
buddyThe widget which is focused when the label's accelerator is typed.
textThe label's and the action's text.
cutThe action's shortcut.
receiverThe SLOT's parent.
slotThe TQT_SLOT to invoke to execute this action.
parentThis action's parent.
nameAn internal name for this action.

Definition at line 48 of file ktoolbarlabelaction.cpp.

KToolBarLabelAction::KToolBarLabelAction ( TQLabel *  label,
const KShortcut &  cut,
const TQObject *  receiver,
const char *  slot,
KActionCollection *  parent,
const char *  name 
)

Constructs a toolbar label for a label.

You can use this constructor if you want to display a class which is derived from TQLabel in the toolbar. Note that ownership of the label is transferred to the action and the label is deleted when the action is deleted. So you shouldn't hold any pointers to the label.

It's important that the label's name is set to "kde toolbar widget" in its constructor, otherwise it is not correctly rendered in some kde styles.

Parameters
labelthe label which is displayed in the toolbar.
cutThe action's shortcut.
receiverThe SLOT's parent.
slotThe TQT_SLOT to invoke to execute this action.
parentThis action's parent.
nameAn internal name for this action.

Definition at line 62 of file ktoolbarlabelaction.cpp.

Member Function Documentation

TQWidget * 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 104 of file ktoolbarlabelaction.cpp.

TQLabel * KToolBarLabelAction::label ( ) const

Returns the label which is used internally.

Definition at line 109 of file ktoolbarlabelaction.cpp.

void KToolBarLabelAction::setBuddy ( TQWidget *  buddy)
virtual

Sets the label's buddy to buddy.

See QLabel::setBuddy() for details.

Definition at line 99 of file ktoolbarlabelaction.cpp.

void KToolBarLabelAction::setText ( const TQString &  text)
virtual

Reimplemented to update both the action's text and the label's text.

Reimplemented from KAction.

Definition at line 93 of file ktoolbarlabelaction.cpp.


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

kdeui

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

kdeui

Skip menu "kdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |