mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
creat raw getReplayMatch method
This commit is contained in:
parent
019b254b7e
commit
6b5b143642
2 changed files with 10 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue