kdeui Library API Documentation

KWidgetAction Class Reference

An action that automatically embeds a widget into a toolbar. More...

#include <kactionclasses.h>

Inheritance diagram for KWidgetAction:

Inheritance graph
[legend]
Collaboration diagram for KWidgetAction:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KWidgetAction (QWidget *widget, const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name)
QWidgetwidget ()
void setAutoSized (bool)
virtual int plug (QWidget *widget, int index=-1)
virtual void unplug (QWidget *w)

Protected Slots

void slotToolbarDestroyed ()

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Detailed Description

An action that automatically embeds a widget into a toolbar.

Definition at line 1231 of file kactionclasses.h.


Constructor & Destructor Documentation

KWidgetAction::KWidgetAction QWidget widget,
const QString text,
const KShortcut cut,
const QObject receiver,
const char *  slot,
KActionCollection parent,
const char *  name
 

Create an action that will embed widget into a toolbar when plugged.

This action may only be plugged into a toolbar.

Definition at line 1981 of file kactionclasses.cpp.

References KStdAccel::cut(), and KStdAccel::name().


Member Function Documentation

QWidget* KWidgetAction::widget  )  [inline]
 

Returns the widget associated with this action.

Definition at line 1249 of file kactionclasses.h.

int KWidgetAction::plug QWidget widget,
int  index = -1
[virtual]
 

Plug the action.

The widget passed to the constructor will be reparented to w, which must inherit KToolBar.

Reimplemented from KAction.

Definition at line 2014 of file kactionclasses.cpp.

References QWhatsThis::add(), QObject::connect(), QObject::destroyed(), endl(), KAction::getToolButtonID(), KToolBar::insertWidget(), kdError(), QObject::name(), KToolBar::setItemAutoSized(), and KAction::whatsThis().

void KWidgetAction::unplug QWidget w  )  [virtual]
 

Unplug the action.

Ensures that the action is not destroyed. It will be hidden and reparented to 0L instead.

Reimplemented from KAction.

Definition at line 2045 of file kactionclasses.cpp.

References QObject::disconnect(), KAction::isPlugged(), and KAction::unplug().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdeui Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed May 12 09:05:33 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2003