Widget containing tool buttons. More...
#include <xmlui/toolstrip.h>
Widget containing tool buttons.
This widget can be used as a replacement of the menu bar and toolbars. It displays tool buttons of different size layed out and grouped in sections. The tool strip can be populated with actions using the Builder object.
ToolStrip | ( | QWidget * | parent | ) |
Constructor.
parent | The parent widget. |
~ToolStrip | ( | ) |
Destructor.
void setHeaderWidget | ( | QWidget * | widget | ) |
Set the header widget displayed in the left part of the tool strip.
QWidget * headerWidget | ( | ) | const |
Return the header widget.
void addToolAction | ( | QAction * | action | ) |
Add a tool button associated with given action.
action | The action to add. |
void addSeparator | ( | ) |
Add a separator between buttons.
void beginSection | ( | const QString & | title | ) |
Begin a section containing actions.
title | The title of the section. |
void endSection | ( | ) |
End the current section.
void beginGrid | ( | ) |
Begin a grid layout inside a section.
void endGrid | ( | ) |
End the current grid layout.
void beginRow | ( | ) |
Begin a horizontal row of small buttons in a grid layout.
void endRow | ( | ) |
End the current row.
void clearToolActions | ( | ) |
Remove all tool buttons and sections.
The header widget and auxiliary actions are not removed.
void addAuxiliaryAction | ( | QAction * | action | ) |
Add a tool button associated with given action in the top right corner of the tool strip.
action | The action to add. |
void clearAuxiliaryActions | ( | ) |
Remove all auxiliary actions.
void setContentsMargins | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom | |||
) |
Set the margins for tool strip contents.
void execMenu | ( | QAction * | action | ) |
Execute the popup menu associated with given action.