User Tools

Site Tools


DzToolBar

Encapsulates a QToolBar that contains DzToolBarItem items.

More...

Inherits :

Enumerations

Properties

DAZ Script
Booleanfloating

Methods

DAZ Script
voidclear ()
voiddock ( DzToolBar::DockArea area, String beforeBar=“” )
DockAreadockedArea ()
DzToolBarItemgetItem ( Number which )
ArraygetItemList ()
NumbergetNumItems ()
BooleanhasItems ()
voidinsertAction ( DzAction action, DzAction before )
voidinsertAction ( String action, Number index=-1 )
voidinsertCustomAction ( String action, Number index=-1 )
voidinsertCustomWidget ( String uiScript, Number index=-1 )
voidinsertItem ( DzToolBarItem item, Number index=-1 )
voidinsertSeparator ( Number index=-1 )
voidinsertViewportAlignmentSpacer ( Number alignment, Number index=-1 )
voidinsertViewportCenterAlignSpacer ( Number index=-1 )
voidinsertViewportLeftAlignSpacer ( Number index=-1 )
BooleanisClosed ()
voidremoveItem ( Number index )
voidremoveItem ( DzToolBarItem item )
voidsetClosed ( Boolean onOff )
voidundock ( Point pos )

Signals

Detailed Description

This class provides access to a toolbar within the interface. This class is not intended to be constructed directly, rather an instance of the class is created using DzPaneMgr::createToolBar().

See Also:

Enumerations


: DockArea

The areas of a DzActivityLayout where this toolbar can be docked.

  • ToolBarTop - The dock area at the top of a DzActivityLayout.
  • ToolBarBottom - The dock area at the bottom of a DzActivityLayout.
  • ToolBarLeft - The dock area on the left side of a DzActivityLayout.
  • ToolBarRight - The dock area on the right side of a DzActivityLayout.
  • NoToolBarArea - No dock area. The toolbar cannot be docked.

Properties


Boolean : floating

Holds whether this toolbar is docked. (Read Only)

Methods


void : clear()

Removes all items from this bar.


void : dock( DzToolBar::DockArea area, String beforeBar=“” )

Docks this toolbar in the specified area on the DzActivityLayout, and shows this toolbar if it is hidden.

Parameter(s):

  • area - The DockArea to dock this toolbar to.
  • beforeBar - The name of this bar in the area to dock before.

DockArea : dockedArea()

Return Value:

  • The dock area that this toolbar is docked in.

DzToolBarItem : getItem( Number which )

Parameter(s):

  • index - The index of the item in this toolbar.

Return Value:

  • The toolbar item at the specified index (if valid), otherwise null.

Array : getItemList()

Return Value:

  • A list of all the items in this toolbar.

Number : getNumItems()

Return Value:

  • The number of items in this toolbar.

Boolean : hasItems()

Return Value:

  • true if there are items in this toolbar, otherwise false.

void : insertAction( DzAction action, DzAction before )

Adds the specified action to this toolbar.

Parameter(s):

  • action - The action to add to this toolbar.
  • before - The action to insert action before.

void : insertAction( String action, Number index=-1 )

Adds the specified action to this toolbar.

Parameter(s):

  • action - The class name of the DzAction that will be added to this toolbar.
  • index - The index at which to insert the item. If the index is invalid (the default) the item is appended to the end of this toolbar.

void : insertCustomAction( String action, Number index=-1 )

Adds the specified custom action to this toolbar.

Parameter(s):

  • action - The name (GUID) of the custom action that will be added to this toolbar.
  • index - The index at which to insert the item. If the index is invalid (the default) the item is appended to the end of this toolbar.

void : insertCustomWidget( String uiScript, Number index=-1 )

Adds a custom widget to this toolbar.

Parameter(s):

  • uiScript - A path to the script that loads the QtDesigner .ui file for the custom widget. A global function named getWidget() is provided at runtime that returns a DzWidget which should be used as the parent argument in a DzUiLoader::load() call.
  • index - The index at which to insert the item. If the index is invalid (the default) the item is appended to the end of this toolbar.

void : insertItem( DzToolBarItem item, Number index=-1 )

Inserts the specified item into this toolbar at the specified location.

Parameter(s):

  • item - The item to insert into this toolbar.
  • index - The index at which to insert the item. If the index is invalid (the default) the item is appended to the end of this toolbar.

void : insertSeparator( Number index=-1 )

Adds a separator to this toolbar.

Parameter(s):

  • index - The index at which to insert the item. If the index is invalid (the default) the item is appended to the end of this toolbar.

void : insertViewportAlignmentSpacer( Number alignment, Number index=-1 )

Adds a spacer to this toolbar which adjusts itself so that items added after it are aligned over the application viewport.

Parameter(s):

  • alignment - The alignment to use for toolbar items. Currently, supports Qt::AlignLeft and Qt::AlignCenter
  • index - The index at which to insert the item. If the index is invalid (the default) the item is appended to the end of this toolbar.

void : insertViewportCenterAlignSpacer( Number index=-1 )

Adds a spacer to this toolbar which adjusts itself so that any items after it are centered over the application viewport.

Parameter(s):

  • index - The index at which to insert the spacer. If the index is invalid (the default) the item is appended to the end of this toolbar.

void : insertViewportLeftAlignSpacer( Number index=-1 )

Adds a spacer to this toolbar which adjusts itself so that any items after it are left aligned over the application viewport.

Parameter(s):

  • index - The index at which to insert the item. If the index is invalid (the default) the item is appended to the end of this toolbar.

Boolean : isClosed()

Return Value:

  • true if this toolbar is not displayed, false if this toolbar is displayed.

void : removeItem( Number index )

Removes the item at the specified index from this toolbar.

Parameter(s):

  • index - The index of the item to remove.

void : removeItem( DzToolBarItem item )

Removes the specified item from this toolbar.

Parameter(s):

  • item - The item to remove.

void : setClosed( Boolean onOff )

Sets whether this toolbar is displayed.

Parameter(s):

  • onOff - If true, this toolbar is not displayed. If false, this toolbar is displayed.

void : undock( Point pos )

Undocks this toolbar, moves it to the specified global coordinates, and shows this toolbar if it is hidden.

Parameter(s):

  • pos - The global coordinates to position this toolbar at.

Signals


void : itemListChanged()

Signature:“itemListChanged()”

Emitted when items are added to or removed from this toolbar.