mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
tell logged in clients about new replays
This commit is contained in:
parent
2487476fcc
commit
a876a0bf5f
14 changed files with 95 additions and 11 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include "pb/response.pb.h"
|
||||
#include "pb/response_replay_download.pb.h"
|
||||
#include "pb/command_replay_download.pb.h"
|
||||
#include "pb/event_replay_added.pb.h"
|
||||
|
||||
TabReplays::TabReplays(TabSupervisor *_tabSupervisor, AbstractClient *_client)
|
||||
: Tab(_tabSupervisor), client(_client)
|
||||
|
|
@ -90,6 +91,8 @@ TabReplays::TabReplays(TabSupervisor *_tabSupervisor, AbstractClient *_client)
|
|||
|
||||
retranslateUi();
|
||||
setLayout(hbox);
|
||||
|
||||
connect(client, SIGNAL(replayAddedEventReceived(const Event_ReplayAdded &)), this, SLOT(replayAddedEventReceived(const Event_ReplayAdded &)));
|
||||
}
|
||||
|
||||
void TabReplays::retranslateUi()
|
||||
|
|
@ -183,3 +186,8 @@ void TabReplays::downloadFinished(const Response &r)
|
|||
f.write((const char *) data.data(), data.size());
|
||||
f.close();
|
||||
}
|
||||
|
||||
void TabReplays::replayAddedEventReceived(const Event_ReplayAdded &event)
|
||||
{
|
||||
serverDirView->addMatchInfo(event.match_info());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue