QStatusBar
Create and control progress bar widgets.
This class is a JS wrapper around Qt's QStatusBar class
A QStatusBar
provides ability to add and manipulate the status bar of a window.
Example
Hierarchy
↳ NodeWidget‹QStatusBarSignals›
↳ QStatusBar
Index
Constructors
Properties
Methods
- acceptDrops
- activateWindow
- addAction
- addEventListener
- addPermanentWidget
- addWidget
- adjustSize
- clearMessage
- close
- currentMessage
- font
- geometry
- getFlexNode
- hasMouseTracking
- hide
- inherits
- insertPermanentWidget
- insertWidget
- isEnabled
- isSizeGripEnabled
- isVisible
- lower
- mapFromGlobal
- mapFromParent
- mapToGlobal
- mapToParent
- maximumSize
- minimumSize
- move
- objectName
- pos
- property
- raise
- removeAction
- removeEventListener
- removeWidget
- repaint
- repolish
- resize
- setAcceptDrops
- setAttribute
- setContextMenuPolicy
- setCursor
- setEnabled
- setFixedSize
- setFlexNodeSizeControlled
- setFocus
- setFont
- setGeometry
- setGraphicsEffect
- setInlineStyle
- setLayout
- setMaximumSize
- setMinimumSize
- setMouseTracking
- setNodeParent
- setObjectName
- setProperty
- setSizeGripEnabled
- setStyleSheet
- setWindowFlag
- setWindowIcon
- setWindowOpacity
- setWindowState
- setWindowTitle
- show
- showFullScreen
- showMaximized
- showMessage
- showMinimized
- showNormal
- size
- styleSheet
- testAttribute
- update
- updateGeometry
- windowOpacity
- windowState
- windowTitle
Constructors
constructor
+ new QStatusBar(): QStatusBar
Overrides NodeWidget.constructor
Returns: QStatusBar
+ new QStatusBar(parent
: NodeWidget‹any›): QStatusBar
Overrides NodeWidget.constructor
Parameters:
Name | Type |
---|---|
parent | NodeWidget‹any› |
Returns: QStatusBar
Properties
_rawInlineStyle
• _rawInlineStyle: string = ""
Inherited from QMenu._rawInlineStyle
actions
• actions: Set‹QAction›
Optional
layout
• layout? : NodeLayout‹QStatusBarSignals›
native
• native: NativeElement
nodeChildren
• nodeChildren: Set‹Component›
Inherited from Component.nodeChildren
Optional
nodeParent
• nodeParent? : Component
Inherited from Component.nodeParent
permanentWidgets
• permanentWidgets: Set‹NativeElement›
type
• type: string = "widget"
widgets
• widgets: Set‹NativeElement›
Methods
acceptDrops
â–¸ acceptDrops(): boolean
Inherited from QMenu.acceptDrops
Returns: boolean
activateWindow
â–¸ activateWindow(): void
Inherited from QMenu.activateWindow
Returns: void
addAction
â–¸ addAction(action
: QAction | string): QAction
Inherited from QMenu.addAction
Parameters:
Name | Type |
---|---|
action | QAction | string |
Returns: QAction
addEventListener
▸ addEventListener‹SignalType›(signalType
: SignalType, callback
: QStatusBarSignals[SignalType]): void
Inherited from EventWidget.addEventListener
Type parameters:
â–ª SignalType: keyof QStatusBarSignals
Parameters:
Name | Type | Description |
---|---|---|
signalType | SignalType | SignalType is a signal from the widgets signals interface. |
callback | QStatusBarSignals[SignalType] | Corresponding callback for the signal as mentioned in the widget's signal interface |
Returns: void
void
For example in the case of QPushButton:
â–¸ addEventListener(eventType
: WidgetEventTypes, callback
: function): void
Inherited from EventWidget.addEventListener
Parameters:
â–ª eventType: WidgetEventTypes
â–ª callback: function
For example in the case of QPushButton:
â–¸ (event?
: NativeRawPointer‹"QEvent"›): void
Parameters:
Name | Type |
---|---|
event? | NativeRawPointer‹"QEvent"› |
Returns: void
addPermanentWidget
â–¸ addPermanentWidget(widget
: QWidget, stretch
: number): void
Adds the given widget permanently to this status bar, reparenting the widget if it isn't already a child of this QStatusBar object. The stretch parameter is used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space. Permanently means that the widget may not be obscured by temporary messages. It is is located at the far right of the status bar.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
widget | QWidget | - | The widget to permanently add to this status bar. |
stretch | number | 0 | Used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space. |
Returns: void
addWidget
â–¸ addWidget(widget
: QWidget, stretch
: number): void
Adds the given widget to this status bar, reparenting the widget if it isn't already a child of this QStatusBar object. The stretch parameter is used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space. The widget is located to the far left of the first permanent widget (see addPermanentWidget()) and may be obscured by temporary messages.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
widget | QWidget | - | The widget to add to this status bar. |
stretch | number | 0 | Used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space. |
Returns: void
adjustSize
â–¸ adjustSize(): void
Inherited from QMenu.adjustSize
Returns: void
clearMessage
â–¸ clearMessage(): void
Removes any temporary message being shown.
Returns: void
close
â–¸ close(): boolean
Returns: boolean
currentMessage
â–¸ currentMessage(): string
Returns the temporary message currently shown, or an empty string if there is no such message.
Returns: string
font
â–¸ font(): QFont
Returns: QFont
geometry
â–¸ geometry(): QRect
Returns: QRect
getFlexNode
â–¸ getFlexNode(): FlexNode
Inherited from YogaWidget.getFlexNode
Returns: FlexNode
hasMouseTracking
â–¸ hasMouseTracking(): boolean
Inherited from QMenu.hasMouseTracking
Returns: boolean
hide
â–¸ hide(): void
Returns: void
inherits
â–¸ inherits(className
: string): boolean
Inherited from NodeObject.inherits
Parameters:
Name | Type |
---|---|
className | string |
Returns: boolean
insertPermanentWidget
â–¸ insertPermanentWidget(index
: number, widget
: QWidget, stretch
: number): number
Inserts the given widget at the given index permanently to this status bar, reparenting the widget if it isn't already a child of this QStatusBar object. If index is out of range, the widget is appended (in which case it is the actual index of the widget that is returned). The stretch parameter is used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space. Permanently means that the widget may not be obscured by temporary messages. It is is located at the far right of the status bar.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
index | number | - | The index at which to insert the given widget permanently. |
widget | QWidget | - | The widget to insert into this status bar permanently. |
stretch | number | 0 | Used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space. |
Returns: number
insertWidget
â–¸ insertWidget(index
: number, widget
: QWidget, stretch
: number): number
Inserts the given widget at the given index to this status bar, reparenting the widget if it isn't already a child of this QStatusBar object. If index is out of range, the widget is appended (in which case it is the actual index of the widget that is returned). The stretch parameter is used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space. The widget is located to the far left of the first permanent widget (see addPermanentWidget()) and may be obscured by temporary messages.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
index | number | - | The index at which to insert the given widget. |
widget | QWidget | - | The widget to insert into this status bar. |
stretch | number | 0 | Used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space. |
Returns: number
isEnabled
â–¸ isEnabled(): boolean
Inherited from QMenu.isEnabled
Returns: boolean
isSizeGripEnabled
â–¸ isSizeGripEnabled(): boolean
Determines whether the QSizeGrip in the bottom-right corner of the status bar is enabled
Returns: boolean
isVisible
â–¸ isVisible(): boolean
Inherited from QMenu.isVisible
Returns: boolean
lower
â–¸ lower(): void
Returns: void
mapFromGlobal
â–¸ mapFromGlobal(pos
: QPoint): QPoint
Inherited from QMenu.mapFromGlobal
Parameters:
Name | Type |
---|---|
pos | QPoint |
Returns: QPoint
mapFromParent
â–¸ mapFromParent(pos
: QPoint): QPoint
Inherited from QMenu.mapFromParent
Parameters:
Name | Type |
---|---|
pos | QPoint |
Returns: QPoint
mapToGlobal
â–¸ mapToGlobal(pos
: QPoint): QPoint
Inherited from QMenu.mapToGlobal
Parameters:
Name | Type |
---|---|
pos | QPoint |
Returns: QPoint
mapToParent
â–¸ mapToParent(pos
: QPoint): QPoint
Inherited from QMenu.mapToParent
Parameters:
Name | Type |
---|---|
pos | QPoint |
Returns: QPoint
maximumSize
â–¸ maximumSize(): QSize
Inherited from QMenu.maximumSize
Returns: QSize
minimumSize
â–¸ minimumSize(): QSize
Inherited from QMenu.minimumSize
Returns: QSize
move
â–¸ move(x
: number, y
: number): void
Parameters:
Name | Type |
---|---|
x | number |
y | number |
Returns: void
objectName
â–¸ objectName(): string
Inherited from NodeObject.objectName
Returns: string
pos
â–¸ pos(): object
Returns: object
x: number
y: number
property
â–¸ property(name
: string): QVariant
Inherited from NodeObject.property
Parameters:
Name | Type |
---|---|
name | string |
Returns: QVariant
raise
â–¸ raise(): void
Returns: void
removeAction
â–¸ removeAction(action
: QAction): void
Inherited from QMenu.removeAction
Parameters:
Name | Type |
---|---|
action | QAction |
Returns: void
removeEventListener
▸ removeEventListener‹SignalType›(signalType
: SignalType, callback
: QStatusBarSignals[SignalType]): void
Inherited from EventWidget.removeEventListener
Type parameters:
â–ª SignalType: keyof QStatusBarSignals
Parameters:
Name | Type |
---|---|
signalType | SignalType |
callback | QStatusBarSignals[SignalType] |
Returns: void
â–¸ removeEventListener(eventType
: WidgetEventTypes, callback
: function): void
Inherited from EventWidget.removeEventListener
Parameters:
â–ª eventType: WidgetEventTypes
â–ª callback: function
â–¸ (event?
: NativeRawPointer‹"QEvent"›): void
Parameters:
Name | Type |
---|---|
event? | NativeRawPointer‹"QEvent"› |
Returns: void
removeWidget
â–¸ removeWidget(widget
: QWidget): void
Removes the specified widget from the status bar. Note: This function does not delete the widget but hides it. To add the widget again, you must call both the addWidget() and show() functions.
Parameters:
Name | Type | Description |
---|---|---|
widget | QWidget | The widget to remove from this status bar. |
Returns: void
repaint
â–¸ repaint(): void
Returns: void
repolish
â–¸ repolish(): void
Returns: void
resize
â–¸ resize(width
: number, height
: number): void
Parameters:
Name | Type |
---|---|
width | number |
height | number |
Returns: void
setAcceptDrops
â–¸ setAcceptDrops(on
: boolean): void
Inherited from QMenu.setAcceptDrops
Parameters:
Name | Type |
---|---|
on | boolean |
Returns: void
setAttribute
â–¸ setAttribute(attribute
: WidgetAttribute, switchOn
: boolean): void
Inherited from QMenu.setAttribute
Parameters:
Name | Type |
---|---|
attribute | WidgetAttribute |
switchOn | boolean |
Returns: void
setContextMenuPolicy
â–¸ setContextMenuPolicy(contextMenuPolicy
: ContextMenuPolicy): void
Inherited from QMenu.setContextMenuPolicy
Parameters:
Name | Type |
---|---|
contextMenuPolicy | ContextMenuPolicy |
Returns: void
setCursor
â–¸ setCursor(cursor
: CursorShape | QCursor): void
Inherited from QMenu.setCursor
Parameters:
Name | Type |
---|---|
cursor | CursorShape | QCursor |
Returns: void
setEnabled
â–¸ setEnabled(enabled
: boolean): void
Inherited from QMenu.setEnabled
Parameters:
Name | Type |
---|---|
enabled | boolean |
Returns: void
setFixedSize
â–¸ setFixedSize(width
: number, height
: number): void
Inherited from QMenu.setFixedSize
Parameters:
Name | Type |
---|---|
width | number |
height | number |
Returns: void
setFlexNodeSizeControlled
â–¸ setFlexNodeSizeControlled(isSizeControlled
: boolean): void
Inherited from YogaWidget.setFlexNodeSizeControlled
sets whether the widget's size is controlled by someone else (for example a window's size is controlled by its frame when dragged).
Parameters:
Name | Type | Description |
---|---|---|
isSizeControlled | boolean |
Returns: void
setFocus
â–¸ setFocus(reason
: FocusReason): void
Parameters:
Name | Type |
---|---|
reason | FocusReason |
Returns: void
setFont
â–¸ setFont(font
: QFont): void
Parameters:
Name | Type |
---|---|
font | QFont |
Returns: void
setGeometry
â–¸ setGeometry(x
: number, y
: number, w
: number, h
: number): void
Inherited from QMenu.setGeometry
Parameters:
Name | Type |
---|---|
x | number |
y | number |
w | number |
h | number |
Returns: void
setGraphicsEffect
â–¸ setGraphicsEffect(effect
: QGraphicsEffect‹any›): void
Inherited from QMenu.setGraphicsEffect
Parameters:
Name | Type |
---|---|
effect | QGraphicsEffect‹any› |
Returns: void
setInlineStyle
â–¸ setInlineStyle(style
: string): void
Inherited from QMenu.setInlineStyle
Parameters:
Name | Type |
---|---|
style | string |
Returns: void
setLayout
â–¸ setLayout(parentLayout
: NodeLayout‹QStatusBarSignals›): void
Inherited from QMenu.setLayout
Parameters:
Name | Type |
---|---|
parentLayout | NodeLayout‹QStatusBarSignals› |
Returns: void
setMaximumSize
â–¸ setMaximumSize(maxw
: number, maxh
: number): void
Inherited from QMenu.setMaximumSize
Parameters:
Name | Type |
---|---|
maxw | number |
maxh | number |
Returns: void
setMinimumSize
â–¸ setMinimumSize(minw
: number, minh
: number): void
Inherited from QMenu.setMinimumSize
Parameters:
Name | Type |
---|---|
minw | number |
minh | number |
Returns: void
setMouseTracking
â–¸ setMouseTracking(isMouseTracked
: boolean): void
Inherited from QMenu.setMouseTracking
Parameters:
Name | Type |
---|---|
isMouseTracked | boolean |
Returns: void
setNodeParent
â–¸ setNodeParent(parent?
: Component): void
Inherited from Component.setNodeParent
Parameters:
Name | Type |
---|---|
parent? | Component |
Returns: void
setObjectName
â–¸ setObjectName(objectName
: string): void
Inherited from QMenu.setObjectName
Overrides NodeObject.setObjectName
Parameters:
Name | Type |
---|---|
objectName | string |
Returns: void
setProperty
â–¸ setProperty(name
: string, value
: QVariantType): boolean
Inherited from NodeObject.setProperty
Parameters:
Name | Type |
---|---|
name | string |
value | QVariantType |
Returns: boolean
setSizeGripEnabled
â–¸ setSizeGripEnabled(enabled
: boolean): void
Enables or disables the QSizeGrip in the bottom-right corner of this status bar.
Parameters:
Name | Type | Description |
---|---|---|
enabled | boolean | Determines if the QSizeGrip should be enabled or disabled. |
Returns: void
setStyleSheet
â–¸ setStyleSheet(styleSheet
: string): void
Inherited from QMenu.setStyleSheet
Parameters:
Name | Type |
---|---|
styleSheet | string |
Returns: void
setWindowFlag
â–¸ setWindowFlag(windowType
: WindowType, switchOn
: boolean): void
Inherited from QMenu.setWindowFlag
Parameters:
Name | Type |
---|---|
windowType | WindowType |
switchOn | boolean |
Returns: void
setWindowIcon
â–¸ setWindowIcon(icon
: QIcon): void
Inherited from QMenu.setWindowIcon
Parameters:
Name | Type |
---|---|
icon | QIcon |
Returns: void
setWindowOpacity
â–¸ setWindowOpacity(opacity
: number): void
Inherited from QMenu.setWindowOpacity
Parameters:
Name | Type |
---|---|
opacity | number |
Returns: void
setWindowState
â–¸ setWindowState(state
: WindowState): void
Inherited from QMenu.setWindowState
Parameters:
Name | Type |
---|---|
state | WindowState |
Returns: void
setWindowTitle
â–¸ setWindowTitle(title
: string): void
Inherited from QMenu.setWindowTitle
Parameters:
Name | Type |
---|---|
title | string |
Returns: void
show
â–¸ show(): void
Returns: void
showFullScreen
â–¸ showFullScreen(): void
Inherited from QMenu.showFullScreen
Returns: void
showMaximized
â–¸ showMaximized(): void
Inherited from QMenu.showMaximized
Returns: void
showMessage
â–¸ showMessage(message
: string, timeout
: number): void
Hides the normal status indications and displays the given message for the specified number of milli-seconds (timeout). If timeout is 0 (default), the message remains displayed until the clearMessage() slot is called or until the showMessage() slot is called again to change the message. Note that showMessage() is called to show temporary explanations of tool tip texts, so passing a timeout of 0 is not sufficient to display a permanent message.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
message | string | - | The message to display. |
timeout | number | 0 | The number of milliseconds to display the message. |
Returns: void
showMinimized
â–¸ showMinimized(): void
Inherited from QMenu.showMinimized
Returns: void
showNormal
â–¸ showNormal(): void
Inherited from QMenu.showNormal
Returns: void
size
â–¸ size(): QSize
Returns: QSize
styleSheet
â–¸ styleSheet(): string
Inherited from QMenu.styleSheet
Returns: string
testAttribute
â–¸ testAttribute(attribute
: WidgetAttribute): boolean
Inherited from QMenu.testAttribute
Parameters:
Name | Type |
---|---|
attribute | WidgetAttribute |
Returns: boolean
update
â–¸ update(): void
Returns: void
updateGeometry
â–¸ updateGeometry(): void
Inherited from QMenu.updateGeometry
Returns: void
windowOpacity
â–¸ windowOpacity(): number
Inherited from QMenu.windowOpacity
Returns: number
windowState
â–¸ windowState(): number
Inherited from QMenu.windowState
Returns: number
windowTitle
â–¸ windowTitle(): string
Inherited from QMenu.windowTitle
Returns: string