BrickLink QML Type

The core singleton managing the data transfer from and to BrickLink. More...

Import Statement: import BrickLink 1.0

Properties

Signals

Methods

  • Category category(var category)
  • Category category(int categoryId)
  • Color color(var color)
  • Color color(string colorName)
  • Color color(uint colorId)
  • Color colorFromLDrawId(int colorId)
  • Item item(string itemTypeId, string itemId)
  • ItemType itemType(var itemType)
  • ItemType itemType(string itemTypeId)
  • Item itemType(var item)
  • Lot lot(var lot)
  • Image noImage(int width, int height)
  • Picture picture(Item item, Color color, bool highPriority)
  • PriceGuide priceGuide(Item item, Color color, VatType vatType, bool highPriority)
  • PriceGuide priceGuide(Item item, Color color, bool highPriority)

Detailed Description

This singleton is responsible for handling all communications with the BrickLink servers, as well as giving access to the BrickLink item catalog, which is available through these types:

Property Documentation

database : Database [read-only]

The BrickLink catalog Database.


noColor : Color [read-only]

A special Color object denoting an invalid color. The object's Color::isNull returns true. Used as a return value for functions that can fail.


noItem : Item [read-only]

A special Item object denoting an invalid item. The object's Item::isNull returns true. Used as a return value for functions that can fail.


noLot : Lot [read-only]

A special Lot object denoting an invalid lot. The object's Lot::isNull returns true. Used as a return value for functions that can fail.


Signal Documentation

pictureUpdated(Picture picture)

This signal is emitted every time the state of the picture object changes. Receiving this signal doesn't mean the picture is available: you have to check the object's properties to see what has changed.

Note: The corresponding handler is onPictureUpdated.


priceGuideUpdated(PriceGuide priceGuide)

This signal is emitted every time the state of the priceGuide object changes. Receiving this signal doesn't mean the price guide data is available: you have to check the object's properties to see what has changed.

Note: The corresponding handler is onPriceGuideUpdated.


Method Documentation

Category category(var category)

Create a JavaScript Category wrapper for a C++ BrickLink::Category * category obtained from a data model.


Category category(int categoryId)

Returns a Category object corresponding to the given BrickLink categoryId. If there is no match, the returned object is noCategory.


Color color(var color)

Create a JavaScript Color wrapper for a C++ BrickLink::Color * color obtained from a data model.


Color color(string colorName)

Returns a Color object corresponding to the given BrickLink colorName. If there is no match, the returned object is noColor.


Color color(uint colorId)

Returns a Color object corresponding to the given BrickLink colorId. If there is no match, the returned object is noColor.


Color colorFromLDrawId(int colorId)

Returns a Color object corresponding to the given LDraw colorId. If there is no match (or if a LDraw installation isn't available), the returned object is noColor.


Item item(string itemTypeId, string itemId)

Returns an Item object corresponding to the given BrickLink itemTypeId and itemId. If there is no match, the returned object is noItem.


ItemType itemType(var itemType)

Create a JavaScript ItemType wrapper for a C++ BrickLink::ItemType * itemType obtained from a data model.


ItemType itemType(string itemTypeId)

Returns an ItemType object corresponding to the given BrickLink itemTypeId. If there is no match, the returned object is noItemType.

Note: The id is a single letter string and has to be one of PCGIMOPS.


Item itemType(var item)

Create a JavaScript Item wrapper for a C++ BrickLink::Item * item obtained from a data model.


Lot lot(var lot)

Create a JavaScript Lot wrapper for a C++ BrickLink::Lot * lot obtained from a data model.


Image noImage(int width, int height)

Returns an image (sized width x height), which can be used in place of a missing item image.


Picture picture(Item item, Color color, bool highPriority = false)

Creates a Picture object that asynchronously loads (or downloads) the picture for the given item and color combination. If you set highPriority to true the load/download request will be prepended to the work queue instead of appended. You need to connect to the signal BrickLink::pictureUpdated() to know when the data has been loaded.

See also Picture.


PriceGuide priceGuide(Item item, Color color, VatType vatType, bool highPriority = false)

Creates a PriceGuide object that asynchronously loads (or downloads) the price guide data for the given item, color and vatType combination. If you set highPriority to true, the load/download request will be prepended to the work queue instead of appended. You need to connect to the signal BrickLink::priceGuideUpdated() to know when the data has been loaded.

See also PriceGuide.


PriceGuide priceGuide(Item item, Color color, bool highPriority = false)

Creates a PriceGuide object that asynchronously loads (or downloads) the price guide data for the given item, color and currentVatType combination. If you set highPriority to true, the load/download request will be prepended to the work queue instead of appended. You need to connect to the signal BrickLink::priceGuideUpdated() to know when the data has been loaded.

See also PriceGuide.


© 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.