class KToolBar

Floatable toolbar with auto resize. More...

Definition#include <ktoolbar.h>
InheritsQToolBar (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Signals

Public Static Methods

Protected Methods


Detailed Description

A KDE-style toolbar.

KToolBar can be dragged around in and between different docks.

A KToolBar can contain all sorts of widgets.

KToolBar can be used as a standalone widget, but KMainWindow provides easy factories and management of one or more toolbars. Once you have a KToolBar object, you can insert items into it with the insert... methods, or remove them with the removeItem() method. This can be done at any time; the toolbar will be automatically updated. There are also many methods to set per-child properties like alignment and toggle behaviour.

KToolBar uses a global config group to load toolbar settings on construction. It will reread this config group on a KApplication::appearanceChanged() signal.

void  clicked (int id)

[signal]

Emitted when button id is clicked.

void  doubleClicked (int id)

[signal]

Emitted when button id is double-clicked.

Note: you will always recive two clicked() , pressed() and released() signals. There is no way to avoid it - at least no easy way. If you need to resolve this all you can do is set up timers which wait for QApplication::doubleClickInterval() to expire. If in that time you don't get this signal, you may belive that button was only clicked and not double-clicked. And please note that butons with popup menus do not emit this signal, but those with delayed popup do.

void  pressed (int)

[signal]

Emitted when button id is pressed.

void  released (int)

[signal]

Emits when button id is released.

void  toggled (int)

[signal]

Emitted when a toggle button changes state.

Emitted also if you change state with setButton() or toggleButton() If you make a button normal again, with setToggle (false), this signal won't be emitted.

void  highlighted (int id, bool isHighlighted)

[signal]

This signal is emitted when item id gets highlighted/unhighlighted (i.e when mouse enters/exits).

Note that this signal is emitted from all buttons (normal, disabled and toggle) even when there is no visible change in buttons (i.e., buttons do not raise when mouse enters). The parameter isHighlighted is true when mouse enters and false when mouse exits.

void  highlighted (int id )

[signal]

This signal is emitted when item id gets highlighted/unhighlighted (i.e when mouse enters/exits).

Note that this signal is emitted from all buttons (normal, disabled and toggle) even when there is no visible change in buttons (i.e., buttons do not raise when mouse enters).

void  moved ( BarPosition )

[signal]

Emitted when toolbar changes position, or when an item is removed from toolbar.

If you subclass KMainWindow and reimplement KMainWindow::resizeEvent() be sure to connect to this signal. Note: You can connect this signal to a slot that doesn't take parameter.

void  modechange ()

[signal]

This signal is emited when toolbar detects changing of following parameters: highlighting, button-size, button-mode. This signal is internal, aimed to buttons.

bool  highlightSetting ()

[static signal]

Returns: global setting for "Highlight buttons under mouse"

bool  transparentSetting ()

[static signal]

Returns: global setting for "Toolbars transparent when moving"

IconText  iconTextSetting ()

[static signal]

Returns: global setting for "Icon Text"