Set up proper log loading/closing

* This includes the recent log menu list, progress bars and popup.
This commit is contained in:
baldurk
2016-10-12 16:59:25 +02:00
parent c5973d1ed6
commit 18898b7f09
7 changed files with 793 additions and 63 deletions
+22 -3
View File
@@ -36,13 +36,13 @@ RenderManager::~RenderManager()
{
}
void RenderManager::Init(int proxyRenderer, QString replayHost, QString logfile, float *progress)
void RenderManager::OpenCapture(const QString &logfile, float *progress)
{
if(m_Running)
return;
m_ProxyRenderer = proxyRenderer;
m_ReplayHost = replayHost;
m_ProxyRenderer = -1;
m_ReplayHost = "";
m_Logfile = logfile;
m_Progress = progress;
@@ -56,6 +56,25 @@ void RenderManager::Init(int proxyRenderer, QString replayHost, QString logfile,
}
}
void RenderManager::DeleteCapture(const QString &logfile, bool local)
{
if(IsRunning())
{
AsyncInvoke([this, logfile, local](IReplayRenderer *) { DeleteCapture(logfile, local); });
return;
}
if(local)
{
QFile::remove(logfile);
}
else
{
// TODO
// m_Remote.TakeOwnershipCapture(logfile);
}
}
bool RenderManager::IsRunning()
{
return m_Thread->isRunning() && m_Running;