DAZScript abstract base class for button widgets.
Inherits :
Inherited By : DzCheckBox, DzPushButton and DzRadioButton
Deprecated | |
---|---|
ToggleState | { Off, NoChange, On } |
ToggleType | { SingleShot, Toggle, Tristate } |
DAZ Script | |
---|---|
void | toggle () |
DzButton implements an abstract button base. Subclasses specify how to respond to user interaction, and how to present the button to the user. If you want to create a button, create a DzPushButton.
DzPushButton provides both push and toggle buttons. The DzRadioButton and DzCheckBox classes provide only toggle buttons.
The difference between down and on is, when a user clicks a [toggle] button to toggle it on, the button is first pressed and then released into the On state (on is true
, down is false
). When the user clicks it again (to toggle it off), the button is first pressed and then released to the Off state (on and down are false
).
Deprecated
This is no longer applicable. See DzCheckBox::tristate and DzCheckBox::checked
Deprecated
This is no longer applicable. See DzCheckBox::tristate
Holds whether or not autoRepeat is enabled. false
by default. If enabled, the clicked() signal is emitted at regular intervals if down is true
. This property has no effect on toggle buttons.
Holds the initial delay, in milliseconds, before auto-repetition begins
Holds the length of the auto-repetition interval, in milliseconds
Holds whether or not the button is checkable. false
by default.
Holds whether or not the button is checked. Only applies to checkable buttons.
Holds whether or not the button is pressed. true
if the button is pressed down. false
by default. The signals pressed() and clicked() are not emitted when this property set to true
.
Holds the Pixmap shown on the button. If the Pixmap is monochrome (e.g. its depth is 1) and it does not have a mask, the Pixmap will be its own mask. This allows transparent bitmaps to be drawn, which are important for toggle buttons. 0 if no pixmap is set.
Holds the text displayed on the button. undefined by default. An ampersand (&) in the String automatically creates an accelerator for it using the character that follows the ampersand, as the accelerator key. Any previous accelerator will be overwritten, or cleared if no accelerator is defined by the text.
Holds whether or not the button is a toggle (Read Only). false
by default.
Deprecated
Exists only to keep old code working. Do not use in new code. This is always false
.
Deprecated
Exists only to keep old code working. Do not use in new code. This is always false
.
Deprecated
Exists only to keep old code working. Do not use in new code. This is always NoChange.
See Also:
Deprecated
Exists only to keep old code working. Do not use in new code. This is always SingleShot.
See Also:
void : clicked()
Signature:“clicked()”
Emitted when the button is pressed and then released.
void : pressed()
Signature:“pressed()”
Emitted when the button is pressed.
void : released()
Signature:“released()”
Emitted when the button is released.
void : stateChanged( Number state )
Signature:“stateChanged(int)”
Emitted when toggleState on this button has changed.
void : toggled( Boolean onOff )
Signature:“toggled(bool)”
Emitted when the button is toggled.
Parameter(s):
true
if the button is on, false
if the button is off.