PriceGuide QML Type

This value type represents the price guide for a BrickLink item. More...

Import Statement: import BrickLink 1.0

Properties

Methods

  • int lots(Time time, Condition condition)
  • real price(Time time, Condition condition, Price price)
  • int quantity(Time time, Condition condition)
  • update(bool highPriority)

Detailed Description

Each price guide of an item in the BrickLink catalog is available as a PriceGuide object.

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

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

The following three enumerations are used to retrieve the price guide data from this object:

Time

ConstantDescription
BrickLink.Time.PastSixThe sales in the last six months.
BrickLink.Time.CurrentThe items currently for sale.

Condition

ConstantDescription
BrickLink.Condition.NewOnly items in new condition.
BrickLink.Condition.UsedOnly items in used condition.

Price

ConstantDescription
BrickLink.Price.LowestThe lowest price.
BrickLink.Price.AverageThe average price.
BrickLink.Price.WAverageThe weighted average price.
BrickLink.Price.HighestThe highest price.

Property Documentation

[read-only] color : Color

The BrickLink color reference this price guide is requested for.


[read-only] isNull : bool

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


[read-only] isValid : bool

Returns whether this object currently holds valid price guide data.


[read-only] item : Item

The BrickLink item reference this price guide is requested for.


[read-only] lastUpdated : date

Holds the time stamp of the last successful update of this price guide.


[read-only] updateStatus : UpdateStatus

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

int lots(Time time, Condition condition)

Returns the number of lots for sale (or lots that have been sold) given the time frame and condition. Returns 0 if no data is available. See the PriceGuide type documentation for the possible values of the Time and Condition enumerations.


real price(Time time, Condition condition, Price price)

Returns the price of items for sale (or item that have been sold) given the time frame, condition and price type. Returns 0 if no data is available. See the PriceGuide type documentation for the possible values of the Time, Condition and Price enumerations.


int quantity(Time time, Condition condition)

Returns the number of items for sale (or item that have been sold) given the time frame and condition. Returns 0 if no data is available. See the PriceGuide type documentation for the possible values of the Time and Condition enumerations.


update(bool highPriority = false)

Tries to re-download the price guide 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-2024 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.