creat raw getReplayMatch method

This commit is contained in:
RickyRister 2024-12-24 22:45:27 -08:00
parent 019b254b7e
commit 6b5b143642
2 changed files with 10 additions and 0 deletions

View file

@ -330,6 +330,15 @@ ServerInfo_Replay const *RemoteReplayList_TreeWidget::getReplay(const QModelInde
return treeModel->getReplay(proxyModel->mapToSource(ind));
}
/**
* Gets the replay match at the given index
* @return The replay match. Returns nullptr if there is no replay match at the index.
*/
ServerInfo_ReplayMatch const *RemoteReplayList_TreeWidget::getReplayMatch(const QModelIndex &ind) const
{
return treeModel->getReplayMatch(proxyModel->mapToSource(ind));
}
/**
* Gets all currently selected replays.
* Any selection that isn't a replay file (e.g. a folder) will appear as a nullptr in the list.

View file

@ -112,6 +112,7 @@ private:
public:
RemoteReplayList_TreeWidget(AbstractClient *_client, QWidget *parent = nullptr);
ServerInfo_Replay const *getReplay(const QModelIndex &ind) const;
ServerInfo_ReplayMatch const *getReplayMatch(const QModelIndex &ind) const;
QList<ServerInfo_Replay const *> getSelectedReplays() const;
QSet<ServerInfo_ReplayMatch const *> getSelectedReplayMatches() const;
void refreshTree();