@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


QMenuBarSignals

Ƭ QMenuBarSignals: 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


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 button

button: QPushButton‹› = new QPushButton()


Const centralWidget

centralWidget: QWidgetQWidgetSignals = new QWidget()


Const label

label: QLabel‹› = new QLabel()


Const label2

label2: QLabel‹› = new QLabel()


Const nativeWrapperRegistry

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


Const rootLayout

rootLayout: FlexLayout‹› = new FlexLayout()


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


createTreeWidget

createTreeWidget(): QTreeWidget

Returns: QTreeWidget


main

main(): void

Returns: void


noop

noop(): void

Returns: void


prepareInlineStyleSheet

prepareInlineStyleSheetSignals›(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

wrapWithActivateUvLoopT›(func: T): T

Type parameters:

T: Function

Parameters:

NameType
funcT

Returns: T