Add generic user-provided notes to save along with the capture.

* In future one of the notes items would be for gathered hardware info.
  Not automatically, but with one button press the full configuration
  can be embedded.
This commit is contained in:
baldurk
2017-11-17 16:31:03 +00:00
parent 19974e1771
commit 4a4089f316
18 changed files with 502 additions and 0 deletions
@@ -97,6 +97,8 @@ DECLARE_REFLECTION_STRUCT(SPIRVDisassembler);
\
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_ColorEventRow, true) \
\
CONFIG_SETTING_VAL(public, bool, bool, Comments_ShowOnLoad, false) \
\
CONFIG_SETTING_VAL(public, int, int, Formatter_MinFigures, 2) \
\
CONFIG_SETTING_VAL(public, int, int, Formatter_MaxFigures, 5) \
@@ -313,6 +315,13 @@ For more information about some of these settings that are user-facing see
Defaults to ``True``.
)",
R"(
.. data:: Comments_ShowOnLoad
``True`` if when loading a new capture that contains a comments section, the comment viewer will
be opened and focussed.
Defaults to ``False``.
.. data:: Formatter_MinFigures
The minimum number of significant figures to show in formatted floating point values.
+54
View File
@@ -393,6 +393,22 @@ protected:
DECLARE_REFLECTION_STRUCT(IDebugMessageView);
DOCUMENT("The capture comments window.");
struct ICommentView
{
DOCUMENT(
"Retrieves the QWidget for this :class:`CommentView` if PySide2 is available, or "
"otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a "
"QWidget.");
virtual QWidget *Widget() = 0;
protected:
ICommentView() = default;
~ICommentView() = default;
};
DECLARE_REFLECTION_STRUCT(ICommentView);
DOCUMENT("The statistics window.");
struct IStatisticsViewer
{
@@ -1296,6 +1312,28 @@ as well as messages generated during replay and analysis.
)");
virtual void AddMessages(const rdcarray<DebugMessage> &msgs) = 0;
DOCUMENT(R"(Retrieve the contents for a given notes field.
Examples of fields are:
* 'comments' for generic comments to be displayed in a text field
* 'hwinfo' for a plaintext summary of the hardware and driver configuration of the system.
:param str key: The name of the notes field to retrieve.
:return: The contents, or an empty string if the field doesn't exist.
:rtype: str
)");
virtual QString GetNotes(const QString &key) = 0;
DOCUMENT(R"(Set the contents for a given notes field.
See :meth:`GetNotes` for a list of possible common field keys.
:param str key: The name of the notes field to set.
:param str contents: The new contents to assign to that field.
)");
virtual void SetNotes(const QString &key, const QString &contents) = 0;
DOCUMENT(R"(Get the current list of bookmarks in the capture. Each bookmark is associated with an
EID and has some text attached. There will only be at most one bookmark for any given EID.
@@ -1380,6 +1418,13 @@ If no bookmark exists, this function will do nothing.
)");
virtual IDebugMessageView *GetDebugMessageView() = 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.
:rtype: CommentView
)");
virtual ICommentView *GetCommentView() = 0;
DOCUMENT(R"(Retrieve the current singleton :class:`PerformanceCounterViewer`.
:return: The current window, which is created (but not shown) it there wasn't one open.
@@ -1464,6 +1509,13 @@ If no bookmark exists, this function will do nothing.
)");
virtual bool HasDebugMessageView() = 0;
DOCUMENT(R"(Check if there is a current :class:`CommentView` open.
:return: ``True`` if there is a window open.
:rtype: ``bool``
)");
virtual bool HasCommentView() = 0;
DOCUMENT(R"(Check if there is a current :class:`PerformanceCounterViewer` open.
:return: ``True`` if there is a window open.
@@ -1514,6 +1566,8 @@ If no bookmark exists, this function will do nothing.
DOCUMENT(
"Raise the current :class:`DebugMessageView`, showing it in the default place if needed.");
virtual void ShowDebugMessageView() = 0;
DOCUMENT("Raise the current :class:`CommentView`, showing it in the default place if needed.");
virtual void ShowCommentView() = 0;
DOCUMENT(
"Raise the current :class:`PerformanceCounterViewer`, showing it in the default place if "
"needed.");