Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
RemoteReplayList_TreeWidget Class Reference

#include <remote_replay_list_tree_widget.h>

Inheritance diagram for RemoteReplayList_TreeWidget:
[legend]
Collaboration diagram for RemoteReplayList_TreeWidget:
[legend]

Public Member Functions

 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 clearTree ()
void refreshTree ()
void addMatchInfo (const ServerInfo_ReplayMatch &matchInfo)
void updateMatchInfo (int gameId, const ServerInfo_ReplayMatch &matchInfo)
void removeMatchInfo (int gameId)

Private Attributes

RemoteReplayList_TreeModeltreeModel
QSortFilterProxyModel * proxyModel

Constructor & Destructor Documentation

◆ RemoteReplayList_TreeWidget()

RemoteReplayList_TreeWidget::RemoteReplayList_TreeWidget ( AbstractClient * _client,
QWidget * parent = nullptr )
explicit

Member Function Documentation

◆ addMatchInfo()

void RemoteReplayList_TreeWidget::addMatchInfo ( const ServerInfo_ReplayMatch & matchInfo)
inline

◆ clearTree()

void RemoteReplayList_TreeWidget::clearTree ( )
inline

◆ getReplay()

ServerInfo_Replay const * RemoteReplayList_TreeWidget::getReplay ( const QModelIndex & ind) const
nodiscard

Gets the replay at the given index

Returns
The replay. Returns nullptr if there is no replay at the index.

◆ getReplayMatch()

ServerInfo_ReplayMatch const * RemoteReplayList_TreeWidget::getReplayMatch ( const QModelIndex & ind) const
nodiscard

Gets the replay match at the given index

Returns
The replay match. Returns nullptr if there is no replay match at the index.

◆ getSelectedReplayMatches()

QSet< ServerInfo_ReplayMatch const * > RemoteReplayList_TreeWidget::getSelectedReplayMatches ( ) const
nodiscard

Gets all currently selected replayMatches. If a non-folder node is selected, it will return the parent folder of that node.

Returns
A Set of pointers to the selected replayMatches.

◆ getSelectedReplays()

QList< ServerInfo_Replay const * > RemoteReplayList_TreeWidget::getSelectedReplays ( ) const
nodiscard

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. Make sure to check the list for nullptr before using it.

Returns
A List of pointers to the selected replays, as well as nullptr for any selection that isn't a replay.

◆ refreshTree()

void RemoteReplayList_TreeWidget::refreshTree ( )
inline

◆ removeMatchInfo()

void RemoteReplayList_TreeWidget::removeMatchInfo ( int gameId)
inline

◆ updateMatchInfo()

void RemoteReplayList_TreeWidget::updateMatchInfo ( int gameId,
const ServerInfo_ReplayMatch & matchInfo )
inline

Member Data Documentation

◆ proxyModel

QSortFilterProxyModel* RemoteReplayList_TreeWidget::proxyModel
private

◆ treeModel

RemoteReplayList_TreeModel* RemoteReplayList_TreeWidget::treeModel
private

The documentation for this class was generated from the following files: