mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Add a viewer of the diagnostic log in the UI itself
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include "Windows/Dialogs/LiveCapture.h"
|
||||
#include "Windows/Dialogs/SettingsDialog.h"
|
||||
#include "Windows/EventBrowser.h"
|
||||
#include "Windows/LogView.h"
|
||||
#include "Windows/MainWindow.h"
|
||||
#include "Windows/PerformanceCounterViewer.h"
|
||||
#include "Windows/PipelineState/PipelineStateViewer.h"
|
||||
@@ -1896,6 +1897,18 @@ IDebugMessageView *CaptureContext::GetDebugMessageView()
|
||||
return m_DebugMessageView;
|
||||
}
|
||||
|
||||
IDiagnosticLogView *CaptureContext::GetDiagnosticLogView()
|
||||
{
|
||||
if(m_DiagnosticLogView)
|
||||
return m_DiagnosticLogView;
|
||||
|
||||
m_DiagnosticLogView = new LogView(*this, m_MainWindow);
|
||||
m_DiagnosticLogView->setObjectName(lit("diagnosticLogView"));
|
||||
setupDockWindow(m_DiagnosticLogView);
|
||||
|
||||
return m_DiagnosticLogView;
|
||||
}
|
||||
|
||||
ICommentView *CaptureContext::GetCommentView()
|
||||
{
|
||||
if(m_CommentView)
|
||||
@@ -2003,6 +2016,11 @@ void CaptureContext::ShowDebugMessageView()
|
||||
m_MainWindow->showDebugMessageView();
|
||||
}
|
||||
|
||||
void CaptureContext::ShowDiagnosticLogView()
|
||||
{
|
||||
m_MainWindow->showDiagnosticLogView();
|
||||
}
|
||||
|
||||
void CaptureContext::ShowCommentView()
|
||||
{
|
||||
m_MainWindow->showCommentView();
|
||||
@@ -2122,6 +2140,10 @@ QWidget *CaptureContext::CreateBuiltinWindow(const rdcstr &objectName)
|
||||
{
|
||||
return GetDebugMessageView()->Widget();
|
||||
}
|
||||
else if(objectName == "diagnosticLogView")
|
||||
{
|
||||
return GetDiagnosticLogView()->Widget();
|
||||
}
|
||||
else if(objectName == "commentView")
|
||||
{
|
||||
return GetCommentView()->Widget();
|
||||
@@ -2166,6 +2188,8 @@ void CaptureContext::BuiltinWindowClosed(QWidget *window)
|
||||
m_MeshPreview = NULL;
|
||||
else if(m_DebugMessageView && m_DebugMessageView->Widget() == window)
|
||||
m_DebugMessageView = NULL;
|
||||
else if(m_DiagnosticLogView && m_DiagnosticLogView->Widget() == window)
|
||||
m_DiagnosticLogView = NULL;
|
||||
else if(m_CommentView && m_CommentView->Widget() == window)
|
||||
m_CommentView = NULL;
|
||||
else if(m_StatisticsViewer && m_StatisticsViewer->Widget() == window)
|
||||
|
||||
@@ -45,6 +45,7 @@ class BufferViewer;
|
||||
class TextureViewer;
|
||||
class CaptureDialog;
|
||||
class DebugMessageView;
|
||||
class LogView;
|
||||
class CommentView;
|
||||
class PerformanceCounterViewer;
|
||||
class StatisticsViewer;
|
||||
@@ -193,6 +194,7 @@ public:
|
||||
IPipelineStateViewer *GetPipelineViewer() override;
|
||||
ICaptureDialog *GetCaptureDialog() override;
|
||||
IDebugMessageView *GetDebugMessageView() override;
|
||||
IDiagnosticLogView *GetDiagnosticLogView() override;
|
||||
ICommentView *GetCommentView() override;
|
||||
IPerformanceCounterViewer *GetPerformanceCounterViewer() override;
|
||||
IStatisticsViewer *GetStatisticsViewer() override;
|
||||
@@ -207,6 +209,7 @@ public:
|
||||
bool HasMeshPreview() override { return m_MeshPreview != NULL; }
|
||||
bool HasCaptureDialog() override { return m_CaptureDialog != NULL; }
|
||||
bool HasDebugMessageView() override { return m_DebugMessageView != NULL; }
|
||||
bool HasDiagnosticLogView() override { return m_DiagnosticLogView != NULL; }
|
||||
bool HasCommentView() override { return m_CommentView != NULL; }
|
||||
bool HasPerformanceCounterViewer() override { return m_PerformanceCounterViewer != NULL; }
|
||||
bool HasStatisticsViewer() override { return m_StatisticsViewer != NULL; }
|
||||
@@ -220,6 +223,7 @@ public:
|
||||
void ShowPipelineViewer() override;
|
||||
void ShowCaptureDialog() override;
|
||||
void ShowDebugMessageView() override;
|
||||
void ShowDiagnosticLogView() override;
|
||||
void ShowCommentView() override;
|
||||
void ShowPerformanceCounterViewer() override;
|
||||
void ShowStatisticsViewer() override;
|
||||
@@ -383,6 +387,7 @@ private:
|
||||
PipelineStateViewer *m_PipelineViewer = NULL;
|
||||
CaptureDialog *m_CaptureDialog = NULL;
|
||||
DebugMessageView *m_DebugMessageView = NULL;
|
||||
LogView *m_DiagnosticLogView = NULL;
|
||||
CommentView *m_CommentView = NULL;
|
||||
PerformanceCounterViewer *m_PerformanceCounterViewer = NULL;
|
||||
StatisticsViewer *m_StatisticsViewer = NULL;
|
||||
|
||||
@@ -238,7 +238,7 @@ void PersistantConfig::AddAndroidHosts()
|
||||
SetConfigSetting("MaxConnectTimeout", QString::number(Android_MaxConnectTimeout));
|
||||
|
||||
rdcstr androidHosts;
|
||||
RENDERDOC_EnumerateAndroidDevices(&androidHosts);
|
||||
RENDERDOC_EnumerateAndroidDevices(androidHosts);
|
||||
for(const QString &hostName :
|
||||
QString(androidHosts).split(QLatin1Char(','), QString::SkipEmptyParts))
|
||||
{
|
||||
|
||||
@@ -441,6 +441,22 @@ protected:
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(IDebugMessageView);
|
||||
|
||||
DOCUMENT("The diagnostic log viewing window.");
|
||||
struct IDiagnosticLogView
|
||||
{
|
||||
DOCUMENT(
|
||||
"Retrieves the QWidget for this :class:`DiagnosticLogView` if PySide2 is available, or "
|
||||
"otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a "
|
||||
"QWidget.");
|
||||
virtual QWidget *Widget() = 0;
|
||||
|
||||
protected:
|
||||
IDiagnosticLogView() = default;
|
||||
~IDiagnosticLogView() = default;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(IDiagnosticLogView);
|
||||
|
||||
DOCUMENT("The capture comments window.");
|
||||
struct ICommentView
|
||||
{
|
||||
@@ -1597,6 +1613,13 @@ If no bookmark exists, this function will do nothing.
|
||||
)");
|
||||
virtual IDebugMessageView *GetDebugMessageView() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current singleton :class:`LogView`.
|
||||
|
||||
:return: The current window, which is created (but not shown) it there wasn't one open.
|
||||
:rtype: LogView
|
||||
)");
|
||||
virtual IDiagnosticLogView *GetDiagnosticLogView() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current singleton :class:`CommentView`.
|
||||
|
||||
:return: The current window, which is created (but not shown) it there wasn't one open.
|
||||
@@ -1688,6 +1711,13 @@ If no bookmark exists, this function will do nothing.
|
||||
)");
|
||||
virtual bool HasDebugMessageView() = 0;
|
||||
|
||||
DOCUMENT(R"(Check if there is a current :class:`DiagnosticLogView` open.
|
||||
|
||||
:return: ``True`` if there is a window open.
|
||||
:rtype: ``bool``
|
||||
)");
|
||||
virtual bool HasDiagnosticLogView() = 0;
|
||||
|
||||
DOCUMENT(R"(Check if there is a current :class:`CommentView` open.
|
||||
|
||||
:return: ``True`` if there is a window open.
|
||||
@@ -1748,6 +1778,9 @@ place if needed.
|
||||
DOCUMENT(
|
||||
"Raise the current :class:`DebugMessageView`, showing it in the default place if needed.");
|
||||
virtual void ShowDebugMessageView() = 0;
|
||||
DOCUMENT(
|
||||
"Raise the current :class:`DiagnosticLogView`, showing it in the default place if needed.");
|
||||
virtual void ShowDiagnosticLogView() = 0;
|
||||
DOCUMENT("Raise the current :class:`CommentView`, showing it in the default place if needed.");
|
||||
virtual void ShowCommentView() = 0;
|
||||
DOCUMENT(
|
||||
|
||||
Reference in New Issue
Block a user