Picture QML Type

This value type represents a picture of a BrickLink item. More...

Import Statement: import BrickLink 1.0

Properties

Methods

Detailed Description

Each picture of an item in the BrickLink catalog is available as a Picture object.

You cannot create Picture objects yourself, but you can retrieve a Picture object given the item and color id via BrickLink::picture().

Note: Pictures aren't readily available, but need to be asynchronously loaded (or even downloaded) at runtime. You need to connect to the signal BrickLink::pictureUpdated() to know when the data has been loaded.

Property Documentation

color : ColorPointer [read-only]

The BrickLink color reference this picture is requested for as a raw C++ pointer. You can convert it to a QML Color object like this:

let color = BrickLink.color(pic.color)

image : image [read-only]

Returns the image if the Picture object isValid, or a null image otherwise.


isNull : bool [read-only]

Returns whether this Picture is null. Since this type is a value wrapper around a C++ object, we cannot use the normal JavaScript null notation.


isValid : bool [read-only]

Returns whether the image property currently holds a valid image.


item : ItemPointer [read-only]

The BrickLink item reference this picture is requested for as a raw C++ pointer. You can convert it to a QML Item object like this:

let item = BrickLink.item(pic.item)

lastUpdated : date [read-only]

Holds the time stamp of the last successful update of this picture.


updateStatus : UpdateStatus [read-only]

Returns the current update status. The available values are:

ConstantDescription
BrickLink.UpdateStatus.OkThe last picture load (or download) was successful.
BrickLink.UpdateStatus.LoadingBrickStore is currently loading the picture from the local cache.
BrickLink.UpdateStatus.UpdatingBrickStore is currently downloading the picture from BrickLink.
BrickLink.UpdateStatus.UpdateFailedThe last download from BrickLink failed. isValid might still be true, if there was a valid picture available before the failed update!

Method Documentation

update(bool highPriority = false)

Tries to re-download the picture from the BrickLink server. If you set highPriority to true the load/download request will be prepended to the work queue instead of appended.


© 2004-2025 Robert Griebl. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. All trademarks are property of their respective owners.