@nodegui/nodegui

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

FlexLayoutSignals

Ƭ FlexLayoutSignals: QLayoutSignals


FlexNode

Ƭ FlexNode: NativeRawPointer‹"YGNodeRef"›


ImageFormats

Ƭ ImageFormats: "BMP" | "GIF" | "JPG" | "JPEG" | "PNG" | "PBM" | "PGM" | "PPM" | "XBM" | "XPM" | "SVG"


JsWrapFunction

Ƭ JsWrapFunction: function

Type declaration:

â–¸ (element: any): any

Parameters:

NameType
elementany

NativeElement

Ƭ NativeElement: object

Type declaration:

  • [ key: string]: any

  • type: "native"


NativeRawPointer

Ƭ NativeRawPointer: Record‹T, unknown›


QAbstractItemSignals

Ƭ QAbstractItemSignals: QObjectSignals


QAbstractScrollAreaSignals

Ƭ QAbstractScrollAreaSignals: QFrameSignals


QBoxLayoutSignals

Ƭ QBoxLayoutSignals: QLayoutSignals


QDialSignals

Ƭ QDialSignals: QAbstractSliderSignals


QErrorMessageSignals

Ƭ QErrorMessageSignals: QDialogSignals


QFrameSignals

Ƭ QFrameSignals: QWidgetSignals


QGridLayoutSignals

Ƭ QGridLayoutSignals: QLayoutSignals


QHeaderViewSignals

Ƭ QHeaderViewSignals: QAbstractItemViewSignals


QItemSelectionModelSignals

Ƭ QItemSelectionModelSignals: QObjectSignals


QLayoutSignals

Ƭ QLayoutSignals: QObjectSignals


QListViewSignals

Ƭ QListViewSignals: QAbstractItemViewSignals


QMainWindowSignals

Ƭ QMainWindowSignals: QWidgetSignals


QPushButtonSignals

Ƭ QPushButtonSignals: QAbstractButtonSignals


QRadioButtonSignals

Ƭ QRadioButtonSignals: QAbstractButtonSignals


QScrollAreaSignals

Ƭ QScrollAreaSignals: QAbstractScrollAreaSignals


QScrollBarSignals

Ƭ QScrollBarSignals: QAbstractSliderSignals


QSliderSignals

Ƭ QSliderSignals: QAbstractSliderSignals


QTableViewSignals

Ƭ QTableViewSignals: QAbstractItemViewSignals


QVariantType

Ƭ QVariantType: NativeElement | string | string[] | number | boolean | QRect


SupportedFormats

Ƭ SupportedFormats: "gif" | "webp"

Variables

Const COLS

• COLS: 3 = 3


Const ROWS

• ROWS: 2 = 2


Const addon

• addon: any = require('../../../build/Release/nodegui_core.node')


Const centralWidget

• centralWidget: QWidget‹QWidgetSignals› = new QWidget()


Const combobox

• combobox: QComboBox‹› = new QComboBox()


Const currentIndexLabel

• currentIndexLabel: QLabel‹› = new QLabel()


Const nativeWrapperRegistry

• nativeWrapperRegistry: Map‹string, function› = new Map<string, JsWrapFunction>()


Const rootLayout

• rootLayout: QBoxLayout‹› = new QBoxLayout(Direction.TopToBottom)


Const stackedLayout

• stackedLayout: QStackedLayout‹› = new QStackedLayout()


Const testImagePath

• testImagePath: string = path.resolve(__dirname, 'assets', 'nodegui.png')


Const win

• win: QMainWindow‹› = new QMainWindow()


Const wrapperCache

• wrapperCache: WrapperCache‹› = new WrapperCache()

Functions

addDefaultErrorHandler

â–¸ addDefaultErrorHandler(native: NativeElement, emitter: EventEmitter): void

Parameters:

NameType
nativeNativeElement
emitterEventEmitter

Returns: void


checkIfNapiExternal

â–¸ checkIfNapiExternal(arg: any): boolean

Parameters:

NameType
argany

Returns: boolean


checkIfNativeElement

â–¸ checkIfNativeElement(arg: any): arg is NativeElement

Parameters:

NameType
argany

Returns: arg is NativeElement


Const createPage

▸ createPage(text: string): QWidget‹QWidgetSignals›

Parameters:

NameType
textstring

Returns: QWidget‹QWidgetSignals›


createTreeWidget

â–¸ createTreeWidget(): QTreeWidget

Returns: QTreeWidget


main

â–¸ main(): void

Returns: void


nativeObjectFromVariantType

â–¸ nativeObjectFromVariantType(obj: QVariantType): any

Get the correct native object which should be passed down to the C++ wrapper from a QVariantType object.

Parameters:

NameType
objQVariantType

Returns: any


noop

â–¸ noop(): void

Returns: void


prepareInlineStyleSheet

▸ prepareInlineStyleSheet‹Signals›(widget: QWidget‹Signals›, rawStyle: string): string

Type parameters:

â–ª Signals: QWidgetSignals

Parameters:

NameType
widgetQWidget‹Signals›
rawStylestring

Returns: string


registerNativeWrapFunction

â–¸ registerNativeWrapFunction(wrapperTypeName: string, jsWrapFunction: JsWrapFunction): void

Register a function to wrap a specific Node API wrapper objects with a JS object.

Parameters:

NameTypeDescription
wrapperTypeNamestringthe C++ wrapper type name the wrap function applies to.
jsWrapFunctionJsWrapFunctionfunction to wrap a native wrapper to a JS wrapper object.

Returns: void


setLogCreateQObject

â–¸ setLogCreateQObject(on: boolean): void

Turn on/off logging when QObjects are created.

Parameters:

NameTypeDescription
onbooleanWhen true, logging is written to console when QObjects are created by NodeGui.

Returns: void


setLogDestroyQObject

â–¸ setLogDestroyQObject(on: boolean): void

Turn on/off logging when QObjects are destoryed.

Parameters:

NameTypeDescription
onbooleanWhen true, logging is written to console when QObjects are destroyed.

Returns: void


wrapNative

â–¸ wrapNative(native: any): any

Try to wrap a native Node object with its JS wrapper.

Parameters:

NameTypeDescription
nativeanythe native object to wrap

Returns: any

the JS object wrapping the native object or the native object if it couldn't be wrapped or doesn't need to be wrapped.


wrapWithActivateUvLoop

▸ wrapWithActivateUvLoop‹T›(func: T): T

Type parameters:

â–ª T: Function

Parameters:

NameType
funcT

Returns: T