| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KToggleToolBarAction Class Reference

An action that takes care of everything associated with showing or hiding a toolbar by a menu action. More...

`#include <kactionclasses.h>`

Inheritance diagram for KToggleToolBarAction:

[legend]
Collaboration diagram for KToggleToolBarAction:

[legend]
List of all members.

## Public Slots
virtual void | setChecked (bool)
## Public Member Functions
| KToggleToolBarAction (const char *toolBarName, const QString &text, KActionCollection *parent, const char *name)
| KToggleToolBarAction (KToolBar *toolBar, const QString &text, KActionCollection *parent, const char *name)
virtual int | plug (QWidget *widget, int index=-1)
KToolBar * | toolBar ()
## Protected Member Functions
virtual void | virtual_hook (int id, void *data)

## Detailed Description

An action that takes care of everything associated with showing or hiding a toolbar by a menu action.

It will show or hide the toolbar with the given name when activated, and check or uncheck itself if the toolbar is manually shown or hidden.

If you need to perfom some additional action when the toolbar is shown or hidden, connect to the toggled(bool) signal. It will be emitted after the toolbar's visibility has changed, whenever it changes.

Since:
  3.1

Definition at line 1172 of file kactionclasses.h.

## Constructor & Destructor Documentation

KToggleToolBarAction::KToggleToolBarAction | ( | const char * | toolBarName,
|  | const QString & | text,
|  | KActionCollection * | parent,
|  | const char * | name
| ) |

| Create a KToggleToolbarAction that manages the toolbar named toolBarName. This can be either the name of a toolbar in an xml ui file, or a toolbar programmatically created with that name. Definition at line 1882 of file kactionclasses.cpp.

## Member Function Documentation

int KToggleToolBarAction::plug | ( | QWidget * | widget,
|  | int | index = `-1`
| ) | `[virtual]`

  | "Plug" or insert this action into a given widget. This will typically be a menu or a toolbar. From this point on, you will never need to directly manipulate the item in the menu or toolbar. You do all enabling/disabling/manipulation directly with your KToggleAction object. Parameters:
  | widget | The GUI element to display this action.
  | index | The index of the item.
Reimplemented from KToggleAction. Definition at line 1901 of file kactionclasses.cpp. References QObject::connect(), QWidget::isDialog(), QWidget::parentWidget(), KToggleAction::plug(), setChecked(), KAction::setEnabled(), and KMainWindow::toolBar().

void KToggleToolBarAction::setChecked | ( | bool |  | ) | `[virtual, slot]`

| Sets the state of the action. Reimplemented from KToggleAction. Definition at line 1931 of file kactionclasses.cpp. References KToggleAction::setChecked(). Referenced by plug().

The documentation for this class was generated from the following files:

- kactionclasses.h
- kactionclasses.cpp

This file is part of the documentation for kdeui Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:22:34 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003