|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The left-list VIEW of ItemMarketModel – the Buy or Sell slice. More...
#include <itemmarketviewmodel.h>
Public Member Functions | |
| ItemMarketViewModel (ItemMarketModel *source, QObject *parent=nullptr) | |
Protected Member Functions | |
| bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override |
The left-list VIEW of ItemMarketModel – the Buy or Sell slice.
The unified market list holds BOTH the sell rows (your items) and the buy rows (the store) at once – one single-currency cart spanning both. The Buy/Sell strip only chooses which slice the left list shows; it must NOT rebuild or clear the cart. This proxy does that slicing: it accepts source rows whose viewTag matches the model's current isBuyMode (ViewBuy vs ViewSell), and re-filters live when the strip toggles. In Exchange mode the source is the separate exchange list, shown wholesale. The receipt reads the cart across both slices via ItemMarketCartModel.
Exposed as brg.marketViewModel; the left ListView binds to it. Roles pass through from the source unchanged.
Definition at line 37 of file itemmarketviewmodel.h.
|
explicit |
Definition at line 25 of file itemmarketviewmodel.cpp.
|
overrideprotected |
Definition at line 38 of file itemmarketviewmodel.cpp.
References ItemMarketModel::ViewBuy, ItemMarketModel::ViewSell, and ItemMarketModel::ViewTagRole.