196 static QHash<QString, QVector<ItemMarketEntry*>*>
instances;
virtual QString _name()=0
Subtype: compute the display name.
ItemMarketEntry(int compatMoneyCurrency=CompatEither, int compatBuyMode=CompatEither)
int totalStackCount()
Stacks across all rows of this type.
int cartSignVal
Net contribution sign (-1 buy / +1 sell).
int moneyLeftover()
Money remaining if this checks out.
static QVector< ItemMarketEntry * > * activeList
Current model's live rows.
void reUpdateConstants()
Clear the cached mode-stable values.
bool requestFilter()
Helper: does this row pass the current mode filter?
QString name()
Cached display name.
virtual void checkout()=0
Subtype: apply this row's transaction.
virtual QString _whichType()=0
Subtype: report the type label.
static QHash< QString, QVector< ItemMarketEntry * > * > instances
All rows, grouped by type.
int compatBuyMode
Buy/sell compatibility.
QString whichType()
Cached type label.
static bool * isMoneyCurrency
Shared: current currency mode.
int itemWorth()
Cached unit value.
virtual int stackCount()=0
Subtype: new stack slots needed (see note above).
static PlayerBasics * player
Shared: player money/coins.
QHash< int, QVariant > cache
Memoised mode-stable values (see HashKey* enum).
void setCartCount(int val)
Set the cart quantity (backs onCart).
int totalWorth()
Signed worth across ALL rows (sell +, buy -).
int viewTag
Left-list view filter tag.
void finishConstruction()
Finalise construction (register the instance).
int inStockCount()
Cached owned/sellable count.
virtual int _itemWorth()=0
Subtype: compute the unit value.
virtual int _inStockCount()=0
Subtype: compute the owned/sellable count.
static QVector< ItemMarketEntry * > instancesCombined
All rows, flat.
virtual ~ItemMarketEntry()
virtual bool _canSell()=0
Subtype: compute sellability.
void doReUpdateConstants()
Force a refresh of the "mode-stable" values.
int onCart
Backing cart quantity.
int compatMoneyCurrency
Money/coins compatibility.
virtual void initOnce()
One-time setup for the first instance of a type.
bool canAnyCheckout()
Can any row check out?
bool exclude
Exclude from aggregate totals (see note).
virtual QString infoText()
Detailed-tooltip body (default none).
int cartWorth()
Value of the cart quantity.
static bool * isBuyMode
Shared: current buy/sell mode.
bool canSell()
Cached sellable flag.
int getCartCount()
Current cart quantity (backs onCart).
virtual int onCartLeft()=0
Subtype: how many more may be added.
virtual bool canCheckout()
Can this row alone check out?
The trainer's headline values: name, ID, money, coins, badges, starter.