KToolBar Class Reference
from PyKDE4.kdeui import *
Inherits: QToolBar → QWidget → QObject
Detailed Description
Floatable toolbar with auto resize.
A KDE-style toolbar.
KToolBar can be used as a standalone widget, but KMainWindow provides easy factories and management of one or more toolbars.
KToolBar uses a global config group to load toolbar settings on construction. It will reread this config group on a KApplication.appearanceChanged() signal.
Method Documentation
__init__ | ( | self, | ||
QWidget | parent, | |||
bool | isMainToolBar=0, | |||
bool | readConfig=1 | |||
) |
__init__ | ( | self, | ||
QString | objectName, | |||
QMainWindow | parentWindow, | |||
Qt::ToolBarArea | area, | |||
bool | newLine=0, | |||
bool | isMainToolBar=0, | |||
bool | readConfig=1 | |||
) |
actionEvent | ( | self, | ||
QActionEvent | a0 | |||
) |
applySettings | ( | self, | ||
KConfigGroup | cg, | |||
bool | forceGlobal=0 | |||
) |
Read the toolbar settings from group configGroup in config and apply them.
- Parameters:
-
forceGlobal is deprecated. In kde3 it used to mean "force global settings, i.e. ignore cg", but only for visibility/position/index, not for icon size etc. Only visibility is still controlled by this.
bool contextMenuEnabled | ( | self ) |
Returns the context menu enabled flag
- Returns:
- true if the context menu is disabled
- Deprecated:
- use contextMenuPolicy
contextMenuEvent | ( | self, | ||
QContextMenuEvent | a0 | |||
) |
dragEnterEvent | ( | self, | ||
QDragEnterEvent | a0 | |||
) |
dragLeaveEvent | ( | self, | ||
QDragLeaveEvent | a0 | |||
) |
dragMoveEvent | ( | self, | ||
QDragMoveEvent | a0 | |||
) |
dropEvent | ( | self, | ||
QDropEvent | a0 | |||
) |
Reimplemented to support context menu activation on disabled tool buttons.
int iconSizeDefault | ( | self ) |
Returns the default size for this type of toolbar.
- Returns:
- the default size for this type of toolbar.
loadState | ( | self, | ||
QDomElement | element | |||
) |
Load state from an XML
- Parameters:
-
element, called by KXMLGUIBuilder.
KMainWindow mainWindow | ( | self ) |
Returns the main window that this toolbar is docked with.
mouseMoveEvent | ( | self, | ||
QMouseEvent | a0 | |||
) |
mousePressEvent | ( | self, | ||
QMouseEvent | a0 | |||
) |
mouseReleaseEvent | ( | self, | ||
QMouseEvent | a0 | |||
) |
saveSettings | ( | self, | ||
KConfigGroup | cg | |||
) |
Save the toolbar settings to group configGroup in config.
saveState | ( | self, | ||
QDomElement | element | |||
) |
Save state into an XML
- Parameters:
-
element, called by KXMLGUIBuilder.
setContextMenuEnabled | ( | self, | ||
bool | enable=1 | |||
) |
This allows you to enable or disable the context menu.
- Parameters:
-
enable If false, then the context menu will be disabled
- Deprecated:
- use setContextMenuPolicy
setIconDimensions | ( | self, | ||
int | size | |||
) |
Convenience function to set icon size
setToolBarsEditable | ( | self, | ||
bool | editable | |||
) |
Enable or disable toolbar editing via drag & drop of actions. This is called by KEditToolbar and should generally be set to disabled whenever KEditToolbar is not active.
setToolBarsLocked | ( | self, | ||
bool | locked | |||
) |
Allows you to lock and unlock all toolbars (i.e., disallow/allow moving of the toobars).
setXMLGUIClient | ( | self, | ||
KXMLGUIClient | client | |||
) |
Sets the XML gui client.
slotMovableChanged | ( | self, | ||
bool | movable | |||
) |
bool toolBarsEditable | ( | self ) |
Returns whether the toolbars are currently editable (drag & drop of actions).
bool toolBarsLocked | ( | self ) |
Returns whether the toolbars are locked (i.e., moving of the toobars disallowed).
Qt::ToolButtonStyle toolButtonStyleSetting | ( | self ) |
Returns the global setting for "Icon Text" for the main toolbar
- Returns:
- global setting for "Icon Text" for the main toolbar