KDevelop API Documentation

KDevCompat::KWidgetAction Class Reference

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

#include <kdevwidgetaction.h>

Inheritance diagram for KDevCompat::KWidgetAction:

KAction QObject KListViewAction 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)
 Create an action that will embed widget into a toolbar when plugged.

virtual ~KWidgetAction ()
QWidgetwidget ()
 Returns the widget associated with this action.

void setAutoSized (bool)
virtual int plug (QWidget *w, int index=-1)
 Plug the action.

virtual void unplug (QWidget *w)
 Unplug the action.


Protected Member Functions

virtual void virtual_hook (int id, void *data)

Private Attributes

QGuardedPtr< QWidgetm_widget
bool m_autoSized
KWidgetActionPrivate * d

Detailed Description

An action that automatically embeds a widget into a toolbar.

Definition at line 27 of file kdevwidgetaction.h.


Constructor & Destructor Documentation

KDevCompat::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 21 of file kdevwidgetaction.cpp.

References text().

KDevCompat::KWidgetAction::~KWidgetAction  )  [virtual]
 

Definition at line 31 of file kdevwidgetaction.cpp.


Member Function Documentation

int KDevCompat::KWidgetAction::plug QWidget w,
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 54 of file kdevwidgetaction.cpp.

References KAction::containerCount(), endl(), KAction::getToolButtonID(), KToolBar::insertWidget(), kdError(), KToolBar::setItemAutoSized(), and KAction::slotDestroyed().

void KDevCompat::KWidgetAction::setAutoSized bool   ) 
 

Definition at line 35 of file kdevwidgetaction.cpp.

References KAction::isPlugged(), and KToolBar::setItemAutoSized().

void KDevCompat::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 83 of file kdevwidgetaction.cpp.

void KDevCompat::KWidgetAction::virtual_hook int  id,
void *  data
[protected, virtual]
 

Reimplemented from KAction.

Definition at line 95 of file kdevwidgetaction.cpp.

QWidget* KDevCompat::KWidgetAction::widget  )  [inline]
 

Returns the widget associated with this action.

Definition at line 45 of file kdevwidgetaction.h.

References m_widget.


Member Data Documentation

KWidgetActionPrivate* KDevCompat::KWidgetAction::d [private]
 

Definition at line 66 of file kdevwidgetaction.h.

bool KDevCompat::KWidgetAction::m_autoSized [private]
 

Definition at line 61 of file kdevwidgetaction.h.

QGuardedPtr<QWidget> KDevCompat::KWidgetAction::m_widget [private]
 

Definition at line 60 of file kdevwidgetaction.h.

Referenced by widget().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:02:09 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003