User Tools

Site Tools


DzWidget

Enumerations

Properties

Constructors

DAZ Script
DzWidget ( DzWidget parent )

Methods

DAZ Script
DzWidgetfindChildOfWidget ( String name )
ArraygetChildrenOfWidget ( String name=“” )
DzLayoutgetLayout ()
QWidgetgetWidget ()
Pixmapgrab ( Rect rectangle )
Pixmapgrab ( Number x=0, Number y=0, Number width=-1, Number height=-1 )
voidhide ()
PointmapFrom ( DzWidget parent, Point pos )
PointmapFromGlobal ( Point pos )
PointmapFromParent ( Point pos )
PointmapTo ( DzWidget parent, Point pos )
PointmapToGlobal ( Point pos )
PointmapToParent ( Point pos )
voidreparent ( DzWidget parent, Point pnt, Boolean showIt=false )
voidsetFixedHeight ( Number height )
voidsetFixedSize ( Number width, Number height )
voidsetFixedWidth ( Number width )
voidsetGeometry ( Number x, Number y, Number w, Number h )
voidshow ()

Detailed Description

Base class for all wrapped widgets. This is an abstract base class that provides general functionality for script widget components.

Enumerations


: AlignmentFlags

Enumerated values for describing how widgets should be aligned.

Since:

  • 4.9.3.93
  • AlignLeft - Aligns horizontally with the left edge.
  • AlignLeading - TODO: Add description.
  • AlignRight - Aligns horizontally with the right edge.
  • AlignTrailing - TODO: Add description.
  • AlignHCenter - Aligns horizontally in the center.
  • AlignJustify - Justifies the text in the available space.
  • AlignAbsolute - TODO: Add description.
  • AlignHorizontal_Mask - TODO: Add description.
  • AlignTop - Aligns vertically with the top edge.
  • AlignBottom - Aligns vertically with the bottom edge.
  • AlignVCenter - Aligns vertically in the center.
  • AlignVertical_Mask - TODO: Add description.
  • AlignCenter - Aligns in the center in both dimensions.
  • AlignAuto - Aligns horizontally according to the language (left for most).

—–

: Orientation

Enumerated values for describing how widgets should be oriented.

Since:

  • 4.9.3.93
  • Horizontal - Horizontal orientation (Left to Right).
  • Vertical - Vertical orientation (Top to Bottom).

—–

: SortOrder

Enumerated values for describing the order that items should be sorted.

Since:

  • 4.9.3.93
  • AscendingOrder - Sort in ascending order.
  • DescendingOrder - Sort in descending order.
  • Ascending - Provided for backward compatibility.
  • Descending - Provided for backward compatibility.

—–

: TextElideMode

Enumerated values that describe how the text string is elided.

Since:

  • 4.10.0.22
  • ElideLeft - TODO: Add description.
  • ElideRight - TODO: Add description.
  • ElideMiddle - TODO: Add description.
  • ElideNone - TODO: Add description.

—–

: TextFlag

Enumerated values for describing text modifiers.

Since:

  • 4.10.0.22
  • TextSingleLine - Treat all whitespace as spaces and print one line.
  • TextDontClip - If it is impossible to stay within the bounds, print outside.
  • TextExpandTabs - Makes the ASCII tab character move to the next tab stop.
  • TextShowMnemonic - Displays the string “&P” as P. For an ampersand, use “&&”.
  • TextWordWrap - Break lines at appropriate points, e.g., word boundaries.
  • TextWrapAnywhere - Break lines anywhere, even within words.
  • TextDontPrint - Treat this text as “hidden” and do not print it.
  • TextIncludeTrailingSpaces - TODO: Add description.
  • TextHideMnemonic - Same as TextShowMnemonic but does not draw the underlines.
  • TextJustificationForced - Ensures that text lines are justified.
  • TextForceLeftToRight - TODO: Add description.
  • TextForceRightToLeft - TODO: Add description.
  • TextLongestVariant - TODO: Add description.
  • TextBypassShaping - TODO: Add description.

—–

: TextInteractionFlags

Enumerated values that describe how a label reacts to user input.

Since:

  • 4.9.3.93
  • NoTextInteraction - TODO: Add description.
  • TextSelectableByMouse - No interaction with the text is possible.
  • TextSelectableByKeyboard - Text can be selected with the mouse and copied to the clipboard using a context menu or standard keyboard shortcuts.
  • LinksAccessibleByMouse - Text can be selected with the cursor keys on the keyboard. A text cursor is shown.
  • LinksAccessibleByKeyboard - Links can be highlighted and activated with the mouse.
  • TextEditable - Links can be focused using tab and activated with enter.
  • TextEditorInteraction - The text is fully editable.
  • TextBrowserInteraction - The default for a DzTextEdit.

Properties


Number : colorCount

Holds the number of different colors available for the widget. (Read Only)

Since:

  • 4.9.0.9

Number : depth

Holds the bit depth (number of bit planes) of the widget. (Read Only)

Since:

  • 4.9.0.9

Boolean : enabled

Holds whether or not the widget is enabled.


Font : font

Holds the Font for the widget and all child widgets that do not have a custom font of their own.


Number : globalX

Holds the x position of the widget, relative to the desktop. (Read Only)


Number : globalY

Holds the y position of the widget, relative to the desktop. (Read Only)


Number : height

Holds the height of the widget.


Number : heightMM

Holds the height of the widget in millimeters. (Read Only)

Since:

  • 4.9.0.9

Number : logicalDpiX

Holds the horizontal resolution of the widget in dots per inch. (Read Only)

Since:

  • 4.9.0.9

Number : logicalDpiY

Holds the vertical resolution of the widget in dots per inch. (Read Only)

Since:

  • 4.9.0.9

Number : maxHeight

Holds the maximum height of the widget.


Number : maxWidth

Holds the maximum width of the widget.


Number : minHeight

Holds the minimum height of the widget.


Number : minWidth

Holds the minimum width of the widget.


Palette : palette

Holds the Palette for the widget and all child widgets that do not have a custom palette of their own.


Color : paletteBackgroundColor

Holds the background color of the widget.


Pixmap : paletteBackgroundPixmap

Holds the background Pixmap of the widget.


Color : paletteForegroundColor

Holds the foreground color of the widget.


Number : physicalDpiX

Holds the horizontal resolution of the widget in dots per inch. (Read Only)

Since:

  • 4.9.0.9

Number : physicalDpiY

Holds the vertical resolution of the widget in dots per inch. (Read Only)

Since:

  • 4.9.0.9

String : toolTip

Holds the tool tip text for the widget and all child widgets that do not have a custom tool tip text of their own.


String : whatsThis

Holds the “Whats This” text for the widget and all child widgets that do not have a custom “Whats This” text of their own.


Number : width

Holds the width of the widget.


Number : widthMM

Holds the width of the widget in millimeters. (Read Only)

Since:

  • 4.9.0.9

Number : x

Holds the x position of the widget, relative to its parent.


Number : y

Holds the y position of the widget, relative to its parent.

Constructors


DzWidget( DzWidget parent )

Creates a new widget as a child of the given parent widget.

Parameter(s):

  • parent - The widget parent for the widget.

Methods


DzWidget : findChildOfWidget( String name )

Return Value:

  • The child widget named name, otherwise undefined.

Array : getChildrenOfWidget( String name=“” )

Return Value:

  • A list of this widget's children.

DzLayout : getLayout()

Return Value:

  • The layout managing this widget.

QWidget : getWidget()

Return Value:


Pixmap : grab( Rect rectangle )

Paints the widget, restricted by the given rectangle, into a pixmap. If the widget has any children, they are also painted in the appropriate positions.

Parameter(s):

  • rectangle - The rectangle, relative to the top left corner of the widget, to capture.

Return Value:

  • If the rectangle does not overlap the widget's rectangle, or an error occurs, the pixmap will be null. If the rectangle is a superset of the widget, the areas outside the widget are covered with the widget's background.

Since:

  • 4.9.3.105

Pixmap : grab( Number x=0, Number y=0, Number width=-1, Number height=-1 )

Paints the widget, restricted by the given rectangle, into a pixmap. If the widget has any children, they are also painted in the appropriate positions.

Parameter(s):

  • x - The relative x position of the rectangle to capture.
  • y - The relative y position of the rectangle to capture.
  • w - The width of the rectangle to capture.
  • h - The height of the rectangle to capture.

Return Value:

  • If the rectangle defined by x, y, w, and h does not overlap the widget's rectangle, or an error occurs, the pixmap will be null. If the rectangle is a superset of the widget, the areas outside the widget are covered with the widget's background.

Since:

  • 4.9.3.105

void : hide()

Hide the widget; make it invisible.


Point : mapFrom( DzWidget parent, Point pos )

Translates the widget coordinate pos from the coordinate system of parent to this widget's coordinate system. parent must not be undefined and must be a parent of the calling widget.

Parameter(s):

  • parent - The widget in the parent chain to map from.
  • pos - The position to map.

Since:

  • 4.9.0.9

Point : mapFromGlobal( Point pos )

Translates the global screen coordinate pos to widget coordinates.

Parameter(s):

  • pos - The position to map.

See Also:

Since:

  • 4.9.0.9

Point : mapFromParent( Point pos )

Translates the widget coordinate pos from the coordinate system of the parent widget to this widget's coordinate system.

Parameter(s):

  • pos - The position to map.

Since:

  • 4.9.0.9

Point : mapTo( DzWidget parent, Point pos )

Translates the widget coordinate pos to the coordinate system of parent. parent must not be undefined and must be a parent of the calling widget.

Parameter(s):

  • parent - The widget in the parent chain to map to.
  • pos - The position to map.

Since:

  • 4.9.0.9

Point : mapToGlobal( Point pos )

Translates the widget coordinate pos to global screen coordinates. For example, mapToGlobal( Point(0, 0) ) would give the global coordinates of the top-left pixel of the widget.

Parameter(s):

  • pos - The position to map.

Since:

  • 4.9.0.9

Point : mapToParent( Point pos )

Translates the widget coordinate pos to a coordinate in the parent widget.

Parameter(s):

  • pos - The position to map.

Since:

  • 4.9.0.9

void : reparent( DzWidget parent, Point pnt, Boolean showIt=false )

Reparents the widget.

Parameter(s):

  • parent - The new parent widget for this widget.
  • pnt - The location in the new parent widget to place this widget.
  • showIt - If true, show() is called on the widget after it is reparented.

void : setFixedHeight( Number height )

Sets a fixed height for the widget.


void : setFixedSize( Number width, Number height )

Sets a fixed width and height for the widget.


void : setFixedWidth( Number width )

Sets a fixed width for the widget.


void : setGeometry( Number x, Number y, Number w, Number h )

Sets the position and size for the widget (relative to its parent).


void : show()

Show the widget; make it visible if its parent is visible.