RNAction

Hierarchy

  • QAction

    RNAction

Implements

  • RNComponent

Index

Constructors

Properties

Methods

Constructors

constructor

+ new RNAction(): RNAction

Inherited from RNAction.constructor

Overrides void

Returns: RNAction

+ new RNAction(native: NativeElement): RNAction

Inherited from RNAction.constructor

Overrides void

Parameters:

NameType
nativeNativeElement

Returns: RNAction

+ new RNAction(parent: NodeWidget‹any›): RNAction

Inherited from RNAction.constructor

Overrides void

Parameters:

NameType
parentNodeWidget‹any›

Returns: RNAction

Properties

Optional icon

icon? : QIcon

Inherited from RNAction.icon


Optional menu

menu? : QMenu

Inherited from RNAction.menu


native

native: NativeElement

Inherited from RNAction.native

Overrides void


nodeChildren

nodeChildren: Set‹Component›

Inherited from RNAction.nodeChildren


Optional nodeParent

nodeParent? : Component

Inherited from RNAction.nodeParent


Static tagName

tagName: string = "action"

Methods

addEventListener

addEventListenerSignalType›(signalType: SignalType, callback: QActionSignals[SignalType]): void

Inherited from RNAction.addEventListener

Type parameters:

SignalType: keyof QActionSignals

Parameters:

NameTypeDescription
signalTypeSignalTypeSignalType is a signal from the widgets signals interface.
callbackQActionSignals[SignalType]Corresponding callback for the signal as mentioned in the widget's signal interface

Returns: void

void

For example in the case of QPushButton:

const button = new QPushButton();
button.addEventListener('clicked',(checked)=>console.log("clicked"));
// here clicked is a value from QPushButtonSignals interface

addEventListener(eventType: WidgetEventTypes, callback: function): void

Inherited from RNAction.addEventListener

Parameters:

eventType: WidgetEventTypes

callback: function

For example in the case of QPushButton:

const button = new QPushButton();
button.addEventListener(WidgetEventTypes.HoverEnter,()=>console.log("hovered"));

▸ (event?: NativeRawPointer‹"QEvent"›): void

Parameters:

NameType
event?NativeRawPointer‹"QEvent"›

Returns: void


appendChild

appendChild(child: Component): void

Parameters:

NameType
childComponent

Returns: void


appendInitialChild

appendInitialChild(child: Component): void

Parameters:

NameType
childComponent

Returns: void


data

data(): QVariant

Inherited from RNAction.data

Returns: QVariant


eventProcessed

eventProcessed(): boolean

Inherited from RNAction.eventProcessed

Get the state of the event processed flag

See setEventProcessed().

Returns: boolean

boolean True if the current event is flagged as processed.


font

font(): QFont

Inherited from RNAction.font

Returns: QFont


inherits

inherits(className: string): boolean

Inherited from RNAction.inherits

Parameters:

NameType
classNamestring

Returns: boolean


insertBefore

insertBefore(child: Component, beforeChild: Component): void

Parameters:

NameType
childComponent
beforeChildComponent

Returns: void


isCheckable

isCheckable(): boolean

Inherited from RNAction.isCheckable

Returns: boolean


isChecked

isChecked(): boolean

Inherited from RNAction.isChecked

Returns: boolean


isSeparator

isSeparator(): boolean

Inherited from RNAction.isSeparator

Returns: boolean


objectName

objectName(): string

Inherited from RNAction.objectName

Returns: string


property

property(name: string): QVariant

Inherited from RNAction.property

Parameters:

NameType
namestring

Returns: QVariant


removeChild

removeChild(child: Component): void

Parameters:

NameType
childComponent

Returns: void


removeEventListener

removeEventListenerSignalType›(signalType: SignalType, callback: QActionSignals[SignalType]): void

Inherited from RNAction.removeEventListener

Type parameters:

SignalType: keyof QActionSignals

Parameters:

NameType
signalTypeSignalType
callbackQActionSignals[SignalType]

Returns: void

removeEventListener(eventType: WidgetEventTypes, callback: function): void

Inherited from RNAction.removeEventListener

Parameters:

eventType: WidgetEventTypes

callback: function

▸ (event?: NativeRawPointer‹"QEvent"›): void

Parameters:

NameType
event?NativeRawPointer‹"QEvent"›

Returns: void


setCheckable

setCheckable(isCheckable: boolean): void

Inherited from RNAction.setCheckable

Parameters:

NameType
isCheckableboolean

Returns: void


setChecked

setChecked(isChecked: boolean): void

Inherited from RNAction.setChecked

Parameters:

NameType
isCheckedboolean

Returns: void


setData

setData(value: QVariant): void

Inherited from RNAction.setData

Parameters:

NameType
valueQVariant

Returns: void


setEnabled

setEnabled(enabled: boolean): void

Inherited from RNAction.setEnabled

Parameters:

NameType
enabledboolean

Returns: void


setEventProcessed

setEventProcessed(isProcessed: boolean): void

Inherited from RNAction.setEventProcessed

Mark the current event as having been processed

This method is used to indicate that the currently dispatched event has been processed and no further processing by superclasses is required. It only makes sense to call this method from an event handler.

When set, this flag will cause NodeGui's QObject::event() method to return true and not call the superclass event(), effectively preventing any further processing on this event.

Parameters:

NameTypeDescription
isProcessedbooleantrue if the event has been processed.

Returns: void


setFont

setFont(font: QFont): void

Inherited from RNAction.setFont

Parameters:

NameType
fontQFont

Returns: void


setIcon

setIcon(icon: QIcon): void

Inherited from RNAction.setIcon

Parameters:

NameType
iconQIcon

Returns: void


setMenu

setMenu(menu: QMenu): void

Inherited from RNAction.setMenu

Parameters:

NameType
menuQMenu

Returns: void


setNodeParent

setNodeParent(parent?: Component): void

Inherited from RNAction.setNodeParent

Parameters:

NameType
parent?Component

Returns: void


setObjectName

setObjectName(objectName: string): void

Inherited from RNAction.setObjectName

Parameters:

NameType
objectNamestring

Returns: void


setProperty

setProperty(name: string, value: QVariantType): boolean

Inherited from RNAction.setProperty

Parameters:

NameType
namestring
valueQVariantType

Returns: boolean


setProps

setProps(newProps: ActionProps, oldProps: ActionProps): void

Parameters:

NameType
newPropsActionProps
oldPropsActionProps

Returns: void


setSeparator

setSeparator(isSeparator: boolean): void

Inherited from RNAction.setSeparator

Parameters:

NameType
isSeparatorboolean

Returns: void


setShortcut

setShortcut(keysequence: QKeySequence): void

Inherited from RNAction.setShortcut

Parameters:

NameType
keysequenceQKeySequence

Returns: void


setShortcutContext

setShortcutContext(shortcutContext: ShortcutContext): void

Inherited from RNAction.setShortcutContext

Parameters:

NameType
shortcutContextShortcutContext

Returns: void


setText

setText(text: string): void

Inherited from RNAction.setText

Parameters:

NameType
textstring

Returns: void