ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | List of all members
OrgExplorerTradeModel Class Referencefinal

Table model for filtered trades in the org/BU tree window. More...

#include <OrgExplorerTradeModel.hpp>

Inherits QAbstractTableModel.

Collaboration diagram for OrgExplorerTradeModel:
Collaboration graph

Public Types

enum  Column {
  ExternalId , TradeType , CounterpartyShortCode , CounterpartyName ,
  LifecycleEvent , TradeDate , EffectiveDate , TerminationDate ,
  Version , ModifiedBy , RecordedAt , ColumnCount
}
 

Signals

void dataLoaded ()
 
void loadError (const QString &error_message, const QString &details={})
 

Public Member Functions

 OrgExplorerTradeModel (ClientManager *clientManager, QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
void set_filter (std::optional< boost::uuids::uuid > book_id, std::optional< boost::uuids::uuid > business_unit_id)
 Set book / business_unit filter and clear existing data.
 
void set_counterparty_map (std::unordered_map< std::string, CounterpartyInfo > cpty_map)
 Set the counterparty lookup map (UUID string -> CounterpartyInfo).
 
void refresh ()
 Refresh trade data from server using current filter.
 
void load_page (std::uint32_t offset, std::uint32_t limit)
 Load a specific page.
 
std::uint32_t total_available_count () const
 Get total available count from last fetch.
 
const trading::domain::tradeget_trade (int row) const
 Get the trade at the given row.
 

Detailed Description

Table model for filtered trades in the org/BU tree window.

Mirrors PortfolioExplorerTradeModel but filters by book_id or business_unit_id rather than portfolio_id.