User Tools

Site Tools


DzStyle

Class that defines the look and feel of the GUI.

More...

Inherits :

Enumerations

Static Methods

Methods

Signals

Detailed Description

Interface Colors

Interface Numbers

Text Styles

Pixel Metrics

Style Hints

  • All style hints that are NOT prefixed with a “DZ_” are wrappers for QStyle::StyleHint provided by the Qt framework.
  • All style hints that ARE prefixed with a “DZ_” are added by the application.
  • See getNumStyleHints(), getStyleHintName(), findStyleHint(()

Standard Pixmaps

Primitive Elements

Action Icons

  • The action index is constantly evolving - below is a script that can be run to get a list of all available actions
var oMgr = MainWindow.getActionMgr();
var oAction;
for( var i = 0, n = oMgr.getNumActions(); i < n; i += 1 ) {
	oAction = oMgr.getAction( i );
	print( oAction.actionGroup, ":", oAction.text.replace( "&", "" ), ":", oAction.className() );
}

Example:

Reset the current style colors to their default values.

var oStyle = App.getStyle();
for( var i = 0, n = oStyle.getNumInterfaceColors(); i < n; i += 1 ){
	oStyle.setInterfaceColor( i, oStyle.getInterfaceColorDefault( i ) );
}

Enumerations


: PixmapMode

TODO: Add description.

  • Normal - The mode when the user is not interacting with the pixmap, but the item represented by the pixmap is available.
  • Disabled - The mode when the item represented by the pixmap is not available.
  • Active - The mode when the item represented by the pixmap is available and the user is interacting with it.
  • Selected - The mode when the item represented by the pixmap is selected.

—–

: PixmapState

TODO: Add description.

  • On - The pixmap when the widget is in the On state.
  • Off - The pixmap when the widget is in the Off state.

Static Methods


DzError : compileStyleDefinition( String infile, String outfile )

Compiles a text-based style definition and its images into a single binary style definition file.

Parameter(s):

  • infile - The name of the XML-based text style description.
  • outfile - The name of the DAZ Studio style definition file to create.

Return Value:

  • true on success, otherwise false.

Number : findPixelMetric( String name )

Parameter(s):

  • name - The name of the pixel metric to find the index of.

Return Value:

  • The index of the pixel metric with the given name (if any), otherwise -1.

Number : findPrimitiveElement( String name )

Parameter(s):

  • name - The name of the primitive element to find the index of.

Return Value:

  • The index of the primitive element with the given name (if any), otherwise -1.

Number : findStandardPixmap( String name )

Parameter(s):

  • name - The name of the standard pixmap to find the index of.

Return Value:

  • The index of the standard pixmap with the given name (if any), otherwise -1.

Number : findStyleHint( String name )

Parameter(s):

  • name - The name of the style hint to find the index of.

Return Value:

  • The index of the style hint with the given name (if any), otherwise -1.

Number : findTextStyle( String name )

Parameter(s):

  • name - The name of the text style to find the index of.

Return Value:

  • The index of the text style with the given name (if any), otherwise -1.

Number : getNumPixelMetrics()

Return Value:

  • The number of pixel metrics.

Number : getNumPrimitiveElements()

Return Value:

  • The number of primitive elements.

Number : getNumStandardPixmaps()

Return Value:

  • The number of standard pixmaps.

Number : getNumStyleHints()

Return Value:

  • The number of style hints.

Number : getNumTextStyles()

Return Value:

  • The number of text styles.

String : getPixelMetricName( Number which )

Parameter(s):

  • which - The index of the pixel metric to get the name of.

Return Value:

  • The name of the pixel metric at the given index (if any), otherwise an empty string.

String : getPrimitiveElementName( Number which )

Parameter(s):

  • which - The index of the primitive element to get the name of.

Return Value:

  • The name of the primitive element at the given index (if any), otherwise an empty string.

String : getStandardPixmapName( Number which )

Parameter(s):

  • which - The index of the standard pixmap to get the name of.

Return Value:

  • The name of the standard pixmap at the given index (if any), otherwise an empty string.

String : getStyleHintName( Number which )

Parameter(s):

  • which - The index of the style hint to get the name of.

Return Value:

  • The name of the style hint at the given index (if any), otherwise an empty string.

String : getTextStyleName( Number which )

Parameter(s):

  • which - The index of the text style to get the name of.

Return Value:

  • The name of the text style at the given index (if any), otherwise an empty string.

Methods


Pixmap : actionPixmap( String className, PixmapMode mode, PixmapState state )

Return Value:

  • A pixmap from the DzAction with the class name.

Number : findInterfaceColor( String name )

Return Value:

  • The index of the given interface color, or -1 if the color cannot be found.

Number : findInterfaceNumber( String name )

Return Value:

  • The index of the given interface number, or -1 if the number cannot be found.

Since:

  • 4.9.0.43

Color : getInterfaceColor( String name )

Return Value:

  • The current value of the given interface color.

Color : getInterfaceColor( Number which )

Return Value:

  • The current value of the given interface color.

Color : getInterfaceColorDefault( Number which )

Return Value:

  • The default value of the given interface color.

String : getInterfaceColorDescription( Number which )

Return Value:

  • A user-readable description for the given interface color.

void : getInterfaceColorDisplaySettings( Number which, DzSettings settings )

Since:

  • 4.9.0.43

String : getInterfaceColorName( Number which )

Return Value:

  • The name for the given interface color.

Number : getInterfaceNumber( String name, Number defaultValue=0.0 )

Return Value:

  • The current value of the given interface number.

Since:

  • 4.9.0.43

Number : getInterfaceNumber( Number which )

Return Value:

  • The current value of the given interface number.

Since:

  • 4.9.0.43

Number : getInterfaceNumberDefault( Number which )

Return Value:

  • The default value of the given interface number.

Since:

  • 4.9.0.43

String : getInterfaceNumberDescription( Number which )

Return Value:

  • A user-readable description for the given interface number.

Since:

  • 4.9.0.43

void : getInterfaceNumberDisplaySettings( Number which, DzSettings settings )

Since:

  • 4.9.0.43

String : getInterfaceNumberName( Number which )

Return Value:

  • The name for the given interface number.

Since:

  • 4.9.0.43

Number : getNumInterfaceColors()

Return Value:

  • The number of user-customizable interface colors for the current style

Number : getNumInterfaceNumbers()

Return Value:

  • The number of user-customizable interface numbers for the current style.

Since:

  • 4.9.0.43

String : getStyleDefinition()

Return Value:

  • The name of the currently active style definition.

Number : pixelMetric( String metricName )

Parameter(s):

  • metricName - The name of the pixel metric to get; the name must match one of the pixel metric names from the style definition.

Return Value:

  • The value of the pixel metric with the given name.

void : setInterfaceColor( Number which, Color color )

Sets the given interface color to the new value. The interface will not automatically update - the current style must be reloaded before the changes will take affect.


void : setInterfaceNumber( Number which, Number value )

Sets the given interface number to the new value. The interface will not automatically update - the current style must be reloaded before the changes will take affect.

Since:

  • 4.9.0.43

Boolean : setStyledIcon( QAbstractButton button, String pixmapName )

Parameter(s):

  • button - The button to set the icon on.
  • pixmapName - The name of the pixmap to convert into an icon; the name must match one of the standard pixmap names from the style definition.

Return Value:

  • true if the button icon was set, otherwise false.

Pixmap : standardPixmap( String pixmapName )

Parameter(s):

  • pixmapName - The name of the pixmap to get; the name must match one of the standard pixmap names from the style definition.

Return Value:

  • A pixmap with the given name (if any), otherwise NULL.

Font : textStyle( String styleName )

Parameter(s):

  • styleName - The name of the text style to get the font of; the name must match one of the text style names from the style definition.

Return Value:

  • The font of the text style with the given name.

Color : textStyleColor( String styleName )

Parameter(s):

  • styleName - The name of the text style to get the color of; the name must match one of the text style names from the style definition.

Return Value:

  • The color of the text style with the given name.

Signals


void : interfaceColorsChanged()

Emitted when the interface color settings have changed.


void : interfaceNumbersChanged()

Emitted when the interface number settings have changed.