QtAutoUpdater  3.0.0
A Qt library to automatically check for updates and install them
Signals | Properties | List of all members
de::skycoder42::QtAutoUpdater::Quick::UpdaterComponent Class Reference

[INTERNAL] Base class for components More...

+ Inheritance diagram for de::skycoder42::QtAutoUpdater::Quick::UpdaterComponent:

Signals

void showComponent (Component component, var params)
 Gets emitted to show this component in the GUI. More...
 
void showItem (Item item)
 Gets emitted to show this component in the GUI. More...
 

Properties

Updater updater
 The updater to be used by the component. More...
 
bool useAsComponent
 Specifies if the consumer of the component expects an item or a component. More...
 
bool loading
 Specifies if the component is currently beeing loaded. More...
 
var goBackCallback
 Sets a callback to be called to close a created component. More...
 
Component viewComponent
 [PRIVATE PROPERTY]
 

Detailed Description

[INTERNAL] Base class for components

Warning
This class is internal and cannot be instanciated. It only exists as common base for the other components

Definition at line 11 of file UpdaterComponent.qml.

Member Function Documentation

◆ showComponent

void de::skycoder42::QtAutoUpdater::Quick::UpdaterComponent::showComponent ( Component  component,
var  params 
)
signal

Gets emitted to show this component in the GUI.

Parameters
componentThe component to be loaded and shown
paramsThe parameters to be passed to the item to be created for it's initialization

Catch this signal to actually show the GUI to be created by this component. You have to instancaite the component yourself, by using the given parameters. The following is an example for the StackView:

StackView {
id: stackView
...
}
UpdaterComponent {
onShowComponent: stackView.push(component, params)
}
Attention
This signal is only emitted if useAsComponent is set to true
See also
UpdaterComponent::seAsComponent, UpdaterComponent::showItem, QtQuick.Controls.StackView

◆ showItem

void de::skycoder42::QtAutoUpdater::Quick::UpdaterComponent::showItem ( Item  item)
signal

Gets emitted to show this component in the GUI.

Parameters
itemThe item to be shown

Catch this signal to actually show the GUI to be created by this component. The component was already instanciated and initialized when passed via this signal, so you only have to add it to the GUI. The following is an example for the StackView:

StackView {
id: stackView
...
}
UpdaterComponent {
onShowItem: stackView.push(item)
}
Attention
This signal is only emitted if useAsComponent is set to false
See also
UpdaterComponent::seAsComponent, UpdaterComponent::showItem, QtQuick.Controls.StackView

Property Documentation

◆ goBackCallback

var de::skycoder42::QtAutoUpdater::Quick::UpdaterComponent::goBackCallback

Sets a callback to be called to close a created component.

Default: null

This must be a function with no parameters, i.e. function() {...}. It is called from any item created by this component if the item has to be closed. Thus, this method should remove the calling view from the GUI. Typically, this pops the view from a StackView or something similar. The following is an example for a stackview:

StackView {
id: stackView
...
}
UpdaterComponent {
goBackCallback: stackView.pop
}
Attention
You have to specifiy such a callback for the components to work properly. If not addend they are impossible to close, leading to a lockup of your GUI!!!
Accessors
MEMBERgoBackCallback
See also
QtQuick.Controls.StackView

Definition at line 84 of file UpdaterComponent.qml.

◆ loading

bool de::skycoder42::QtAutoUpdater::Quick::UpdaterComponent::loading

Specifies if the component is currently beeing loaded.

Default: false

This property can be used to show a busy indicator or something similar while the component is beeing loaded. Since the components are typically available locally, this can be ignored as loading is instant. However, when loading components from the network, this can be useful so the user does not think the app has stalled.

Accessors
MEMBERloading
READONLY
Remarks
This property is read-only

Definition at line 54 of file UpdaterComponent.qml.

◆ updater

Updater de::skycoder42::QtAutoUpdater::Quick::UpdaterComponent::updater

The updater to be used by the component.

Default: null

Accessors
MEMBERupdater
See also
QtAutoUpdater::Updater

Definition at line 23 of file UpdaterComponent.qml.

◆ useAsComponent

bool de::skycoder42::QtAutoUpdater::Quick::UpdaterComponent::useAsComponent

Specifies if the consumer of the component expects an item or a component.

Default: false

If set to true, the showItem() signal gets emitted with the already loaded item, as soon as the component was activated. If set to false, showComponent() is emitted instead. Use the property to specify which variant you need to consume the creation of a component.

Accessors
MEMBERuseAsComponent
See also
UpdaterComponent::showComponent, UpdaterComponent::showItem

Definition at line 38 of file UpdaterComponent.qml.


The documentation for this class was generated from the following file:
de::skycoder42::QtAutoUpdater::Quick::UpdaterComponent::goBackCallback
var goBackCallback
Sets a callback to be called to close a created component.
Definition: UpdaterComponent.qml:84