This is the API reference for the functions, classes, and enums in the qrenderdoc
module which represents the UI-specific interface for integrating with the UI and writing UI extensions. For more high-level information and instructions on using the python API, see Python API and Writing UI extensions.
A manager for listing available and active extensions, as well as the interface for extensions to register hooks and additional functionality.
This manager is retrieved by calling CaptureContext.Extensions()
.
Not a member function - the signature for any ExtensionCallback
callbacks.
Callback for extensions to register entry points with, used in many situations depending on how it was registered.
context (CaptureContext) – The current capture context.
data (dict) – Additional data for the call, as a dictionary with string keys. Context-dependent based on what generated the callback
Display an error message dialog.
Retrieve a list of installed extensions.
The list of installed extensions.
List[ExtensionMetadata]
Returns a handle to the mini Qt helper. See MiniQtHelper
.
The helper interface.
Check if an installed extension is enabled.
name# (str) – The qualified name of the extension, e.g. foo.bar
If the extension is enabled or not.
bool
Enable an extension by name. If the extension is already enabled, this will reload it.
name# (str) – The qualified name of the extension, e.g. foo.bar
If the extension loaded successfully, an empty string, otherwise the errors encountered while loading it.
str
Display a simple informational message dialog.
Browse for a directory to open.
Browse for a filename to open.
Display an error message dialog.
text# (str) – The text of the dialog itself, required.
options# (List[DialogButton]) – The buttons to display on the dialog.
title# (str) – The dialog title, optional.
The button that was clicked on.
Register a context menu item in a panel for an extension.
base# (ContextMenu) – The panel to add the item to.
submenus# (List[str]) – A list of strings containing the submenus to add before the item. The last string will be the name of the menu item itself. Must contain at least one entry.
callback# (ExtensionCallback) – The function to callback when the menu item is selected. Callback function signature must match ExtensionCallback()
.
Register a menu item in a panel for an extension.
submenus# (List[str]) – A list of strings containing the submenus to add before the item. The last string will be the name of the menu item itself. Must contain at least one entry.
callback# (ExtensionCallback) – The function to callback when the menu item is selected. Callback function signature must match ExtensionCallback()
.
Register a new menu item in the main window’s menus for an extension.
base# (WindowMenu) – The base menu to add the item to.
submenus# (List[str]) – A list of strings containing the submenus to add before the item. The last string will be the name of the menu item itself. Must contain at least one entry, or two entries if base
is WindowMenu.NewMenu
.
callback# (ExtensionCallback) – The function to callback when the menu item is selected. Callback function signature must match ExtensionCallback()
.
Browse for a filename to save to.
Python can have direct access to Qt via PySide2, but this is not always available in all RenderDoc builds. To aid extensions to manipulate widgets in a simple but portable fashion this helper exposes a small subset of Qt via RenderDoc’s python bindings.
The intention is not to allow fully flexible building of Qt panels, but to allow access to some basic UI building tools for simple data input and display which can be used on any RenderDoc build.
This manager is retrieved by calling ExtensionManager.GetMiniQtHelper()
.
Note
The widget handles returned are PySide2 widgets where that is available, so this can be used to make a basic UI and optionally customise it further with PySide2 when possible.
Not a member function - the signature for any WidgetCallback
callbacks.
Callback for widgets can be registered at creation time, the text field is optional and may be blank depending on the event, but the context and widget are always valid.
context (CaptureContext) – The current capture context.
widget (QWidget) – The widget sending the callback.
text (str) – Additional data for the call, such as the current or selected text.
Not a member function - the signature for any InvokeCallback
callbacks.
Callback for invoking onto the UI thread from another thread (in particular the replay thread). Takes no parameters as the callback is expected to store its own state.
Adds a child widget to a grid layout. If the parent is not a grid layout nothing will happen and the widget will not be added anywhere.
parent# (QWidget) – The parent grid layout widget.
row# (int) – The row at which to add the child widget.
column# (int) – The column at which to add the child widget.
child# (QWidget) – The child widget to add.
rowSpan# (int) – How many rows should this child span over.
columnSpan# (int) – How many columns should this child span over.
Adds a child widget to the end of an ordered layout (either horizontal or vertical). If the parent is not an ordered layout nothing will happen and the widget will not be added anywhere.
Removes all child widgets from a parent and makes them invisible.
These widgets remain valid and can be re-added to another parent or the same parent.
parent# (QWidget) – The parent widget to clear of children.
Close the active modal dialog. This does nothing if no dialog is being shown.
Note
Closing a dialog ‘sucessfully’ does nothing except modify the return value of CloseCurrentDialog()
. It allows quick distinguishing between OK and Cancel actions without having to carry that information separately in a global or other state.
success# (bool) – True
if the dialog was successful (the user clicked an OK/Accept type button).
Closes a top-level widget as if the user had clicked to close.
This function is undefined if used on a non top-level widget. It will invoke the closed widget callback.
widget# (QWidget) – The top-level widget to close.
Create a normal button widget.
pressed# (WidgetCallback) – Callback to be called when the button is pressed. Callback function signature must match WidgetCallback()
.
The handle to the newly created widget.
QWidget
Create a checkbox widget which can be toggled between unchecked and checked. When created the checkbox is unchecked.
changed# (WidgetCallback) – Callback to be called when the widget is toggled. Callback function signature must match WidgetCallback()
.
The handle to the newly created widget.
QWidget
Create a drop-down combo box widget.
When created there are no pre-defined entries in the drop-down section. This can be changed with SetComboOptions()
.
editable# (bool) – True
if the widget should allow the user to enter any text they wish as well as being able to select a pre-defined entry.
changed# (WidgetCallback) – Callback to be called when the text in the combobox is changed. This will be called both when a new option is selected or when the user edits the text. Callback function signature must match WidgetCallback()
.
The handle to the newly created widget.
QWidget
Creates and returns a grid layout widget.
The widget needs to be added to a parent to become part of a panel or window.
Children added to this layout widget are arranged in a grid. Widget sizing follows default logic, which typically has some widgets be only large enough for their content and others which are ‘greedy’ evenly divide any remaining free space. This will not violate the grid constraint though.
The handle to the newly created widget.
QWidget
Create a groupbox widget which can optionally allow collapsing.
This widget can have children added, but it is recommended to immediately add only one child which is a layout type widget, to allow customising how children are added. By default the children are added in a vertical layout.
The widget needs to be added to a parent to become part of a panel or window.
collapsible# (bool) – True
if the groupbox should have a toggle in its header to allow collapsing its contents down vertically.
The handle to the newly created widget.
QWidget
Creates and returns a horizontal layout widget.
The widget needs to be added to a parent to become part of a panel or window.
Children added to this layout widget are listed horizontally. Widget sizing follows default logic, which typically has some widgets be only large enough for their content and others which are ‘greedy’ evenly divide any remaining free space.
The handle to the newly created widget.
QWidget
Create a read-only label widget.
Note
This widget will be blank by default, you can set the text with SetWidgetText()
.
The handle to the newly created widget.
QWidget
Create a widget suitable for rendering to with a renderdoc.ReplayOutput
. This widget takes care of painting on demand and recreating the internal display widget when necessary, however this means you must use GetWidgetWindowingData()
to retrieve the windowing data for creating the output as well as call SetWidgetReplayOutput()
to notify the widget of the current output.
The handle to the newly created widget.
QWidget
Create a progress bar widget.
By default the progress bar has minimum and maximum values of 0 and 100. These can be changed with SetProgressBarRange()
.
horizontal# (bool) – the progress bar orientation, true for horizontal otherwise vertical.
The handle to the newly created widget.
QWidget
Create a radio box widget which can be toggled between unchecked and checked but with at most one radio box in any group of sibling radio boxes being checked.
Upon creation the radio box is unchecked, even in a group of other radio boxes that are unchecked. If you want a default radio box to be checked, you should use SetWidgetChecked()
.
changed# (WidgetCallback) – Callback to be called when the widget is toggled. Callback function signature must match WidgetCallback()
.
The handle to the newly created widget.
QWidget
Creates and returns a spacer widget.
This widget is completely empty but consumes empty space, meaning all other non-greedy widgets in the same container will be minimally sized. This can be useful for simple layouts.
horizontal# (bool) – True
if this spacer should consume horizontal space, False
if this spacer should consume vertical space. Typically this matches the direction of the layout it is in.
The handle to the newly created widget.
QWidget
Create a spinbox widget with a numerical value and up/down buttons to change it.
The number of decimal places can be set to 0 for an integer spinbox, and in that case the step should be set to 1.0.
By default the spinbox has minimum and maximum values of 0.0 and 100.0, these can be changed with SetSpinboxBounds()
.
Create a text box widget for the user to enter text into.
singleLine# (bool) – True
if the widget should be a single-line entry, otherwise it is a multi-line text box.
changed# (WidgetCallback) – Callback to be called when the text in the textbox is changed. Callback function signature must match WidgetCallback()
.
The handle to the newly created widget.
QWidget
Creates and returns a top-level widget for creating layouts.
The widget is not immediately visible. It should be shown either with ShowWidgetAsDialog()
or with CaptureContext.AddDockWindow()
once it’s ready.
This widget can have children added, but it is recommended to immediately add only one child which is a layout type widget, to allow customising how children are added. By default the children are added in a vertical layout.
windowTitle# (str) – The title of any window with this widget as its root.
closed# (WidgetCallback) – A callback that will be called when the widget is closed by the user. This implicitly deletes the widget and all its children, which will no longer be valid even if a handle to them exists. Callback function signature must match WidgetCallback()
.
The handle to the newly created widget.
QWidget
Creates and returns a vertical layout widget.
The widget needs to be added to a parent to become part of a panel or window.
Children added to this layout widget are listed vertically. Widget sizing follows default logic, which typically has some widgets be only large enough for their content and others which are ‘greedy’ evenly divide any remaining free space.
The handle to the newly created widget.
QWidget
Destroy a widget. Widgets stay alive unless explicitly destroyed here, OR in one other case when they are in a widget hiearchy under a top-level window which the user closes, which can be detected with the callback parameter in CreateToplevelWidget()
.
If the widget being destroyed is a top-level window, it will be closed. Otherwise if it is part of a widget hierarchy it will be removed from its parent automatically. You can remove a widget and then destroy it if you wish, but you must not destroy a widget then attempt to remove it from its parent, as after the call to this function the widget is no longer valid to use.
All children under this widget will be destroyed recursively as well, which will be made invalid even if a handle to them exists.
widget# (QWidget) – The widget to destroy.
Find a child widget of a parent by internal name.
Return a child widget for a parent.
Get the number of options in a drop-down combo box. If another type of widget is passed 0
will be returned.
combo# (QWidget) – The combo box.
The current number of options.
int
Return the number of children this widget has. This is generally only useful for layout type widgets.
widget# (QWidget) – The widget to query.
The number of child widgets this widget has.
int
Return the parent of a widget in the widget hierarchy.
Note
The widget returned may not be a widget created through this helper interface if the specified widget has been docked somewhere. Beware making changes to any widgets returned as you may modify the RenderDoc UI itself.
widget# (QWidget) – The widget to query.
The handle to the parent widget with a matching name, or None
if this widget is either not yet parented or is a top-level window.
QWidget
Get the maximum value of the progress bar’s range.
pbar# (QWidget) – the progress bar.
The maximum value of the range.
int
Get the minimum value of the progress bar’s range.
pbar# (QWidget) – the progress bar.
The minimum value of the range.
int
Get the progress bar’s current value.
pbar# (QWidget) – the progress bar.
The current value of the progress bar.
int
Return the current value of a spinbox widget. If another type of widget is passed 0.0
will be returned.
spinbox# (QWidget) – The widget to query.
The current value of the spinbox.
float
Return the internal name of a widget, as set my SetWidgetName()
.
widget# (QWidget) – The widget to query.
The widget’s internal name, which may be an empty string if no name has been set.
str
Return the current text of a widget. See SetWidgetText()
.
widget# (QWidget) – The widget to query.
The widget’s current text, which may be an empty string if no valid text is available.
str
Return the type of the widget as a string. This type is the Qt type name so this should only be used for debugging as the name may change even if for the same type of widget.
widget# (QWidget) – The widget to query.
The widget’s type name.
str
Return the opaque pointer of windowing data suitable for passing to CreateOutput()
or other functions that expect windowing data.
If the widget is not a output rendering widget created with CreateOutputRenderingWidget()
this function will fail and return an invalid set of windowing data.
It’s important to note that the windowing data is not valid forever, so this function should be called as close to where you call CreateOutput()
as possible. Also don’t fetch windowing data unless you are going to create an output, because this function will cause the widget to go into an undefined state unless an output is created to render onto it.
Note
This function must be called on the main UI thread.
widget# (QWidget) – The widget to create windowing data for.
The windowing data.
Insert a child widget at the specified index in an ordered layout (either horizontal or vertical). If the parent is not an ordered layout nothing will happen and the widget will not be added anywhere.
parent# (QWidget) – The parent grid layout widget.
index# (int) – The index to insert the widget at. If this index is out of bounds it will be clamped, so that negative indices will be equivalent to index 0 and all indices above the number of children will append the widget
child# (QWidget) – The child widget to add.
Invoke a callback on the UI thread. All widget accesses must come from the UI thread, so if work has been done on the render thread then this function can be used to asynchronously and safely go back to the UI thread.
This function is safe to call on the UI thread, but it will synchronously call the callback immediately before returning.
Note
No parameters are provided to the callback, it is assumed that the callback will maintain its own context as needed.
callback# (InvokeCallback) – The callback to invoke on the UI thread. Callback function signature must match InvokeCallback()
.
Return the current checked-state of a widget. See SetWidgetChecked()
. If another type of widget is passed other than a checkbox or radio box or group box False
will be returned.
checkableWidget# (QWidget) – The widget to query.
True
if the widget is currently checked.
bool
Return the current enabled-state of a widget. See SetWidgetEnabled()
.
widget# (QWidget) – The widget to query.
True
if the widget is currently enabled.
bool
Return the current visibility of a widget. See SetWidgetVisible()
.
This query is recursive - a widget could be individually visible, but if it is under a parent which is invisible then this widget will be returned as invisible.
widget# (QWidget) – The widget to query.
True
if the widget is currently visible.
bool
Reset a progress bar widget.
Rewinds the progress bar’s indicator and hides the indicator’s label (theme dependent). If you want to keep the label visible, call SetProgressBarValue(0)()
instead. The minimum and maximum values are not changed.
pbar# (QWidget) – the progress bar.
Select the current option in a drop-down combo box. If another type of widget or an unknown option is passed, nothing will happen.
Set the pre-defined options in a drop-down combo box. If another type of widget is passed nothing will happen.
Set an image for a label widget. If the widget isn’t a label, this call has no effect.
The label will be resized to a fixed size to display the image at 100% scale. Any text in the label will not be displayed, but passing an empty image will revert the label back to being text-based.
The data must be in RGB(A) format with the first byte of each texel being R.
Set a progress bar’s minimum and maximum values.
If maximum is smaller than minimum, minimum is set as the maximum, too. If the current value falls outside the new range, the progress bar is reset. Use range (0, 0) to set the progress bar to indeterminated state (the progress cannot be estimated or is not being calculated).
Set the progress bar’s current value.
Attempting to change the current value outside the minimum and maximum range does not affect the current value.
Set the minimum and maximum values allowed in the spinbox. If another type of widget is passed nothing will happen.
Set the value contained in a spinbox. If another type of widget is passed nothing will happen.
Set the default backkground color for a rendering widget. This background color is used when no output is currently configured, e.g. when a capture is closed.
For all other widget types this has no effect.
To disable the background color pass negative values for the components, this will cause a default checkerboard to be rendered instead. This is the default behaviour when a widget is created.
Set whether the widget is checked or not. This only affects checkboxes and radio boxes and group box. If another type of widget is passed nothing will happen.
Set whether the widget is enabled or not. This generally only affects interactive widgets and not fixed widgets, interactive widgets become read-only while still displaying the same data.
Note
Disabled widgets can still be modified programmatically, they are only disabled for the user.
Change the font properties of a widget.
widget# (QWidget) – The widget to change font of.
font# (str) – The new font family to use, or an empty string to leave the font family the same.
fontSize# (int) – The new font point size to use, or 0 to leave the size the same.
bold# (bool) – True
if the font should be bold.
italic# (bool) – True
if the font should be italic.
Set the internal name of a widget. This is not displayed anywhere but can be used by FindChildByName()
to locate a widget within a hierarchy.
Note
Names are optional and only for your use. Nothing prevents from you from setting duplicate names, but this makes searches by name ambiguous.
Set the current output for a widget. This only affects output rendering widgets. If another type of widget is passed nothing will happen.
Passing None
as the output will reset the widget and make it display the default background until another output is set.
When a capture is closed and all outputs are destroyed, the widget will automatically unset the output so there is no need to do that manually.
widget# (QWidget) – The widget to set the output for.
output# (renderdoc.ReplayOutput) – The new output to set, or None
to unset any previous output.
Set the ‘text’ of a widget. How this manifests depends on the type of the widget, for example a text-box or label will set the text directly. For a checkbox or radio button this will add text next to it.
Set whether the widget is visible or not. An invisible widget maintains its position in the hierarchy but is not visible and cannot be interacted with in any way.
Show a top-level widget as a blocking modal dialog. This is most useful to prompt the user for some specific information.
The dialog is only closed when the user closes the window explicitly or if you call CloseCurrentDialog()
in a widget callback, e.g. upon a button press.
widget# (QWidget) – The top-level widget to show as a dialog.
Whether the dialog was closed successfully, via CloseCurrentDialog()
.
bool
The metadata for an extension.
The author of the extension, optionally with an email contact
A longer description of what the extension does
The version of the extension API that this extension is written against
The URL for where the extension is fetched from
The location of this package on disk
The short friendly name for the extension
The python package for this extension, e.g. foo.bar
The version of the extension
Specifies the base menu to add a menu item into.
Unknown/invalid window.
The menu item will be in a section between Open/Save/Close captures and Import/Export.
The menu item will be in a new section at the end of the menu.
The menu item will be added to a new section above Settings.
The menu item will be a root menu, placed between Tools and Help.
The menu item will be added after the error reporting item.
Specifies the panel to add a menu item into.
Unknown/invalid panel.
The EventBrowser
.
The PipelineStateViewer
.
The mesh previewing BufferViewer
.
The TextureViewer
.
Any non-mesh previewing BufferViewer
.
Specifies the panel to add a menu item into.
Unknown/invalid context menu.
Adds the item to the context menu for events in the EventBrowser
.
Adds the item to the context menu for all vertices in the mesh previewing BufferViewer
.
Adds the item to the context menu for vertex inputs in the mesh previewing BufferViewer
.
Adds the item to the context menu for VS output in the mesh previewing BufferViewer
.
Adds the item to the context menu for GS/Tess output in the mesh previewing BufferViewer
.
Adds the item to the context menu for task shader output in the mesh previewing BufferViewer
.
Adds the item to the context menu for mesh shader output in the mesh previewing BufferViewer
.
Adds the item to the context menu for all thumbnails in the TextureViewer
.
Adds the item to the context menu for input thumbnails in the TextureViewer
.
Adds the item to the context menu for output thumbnails in the TextureViewer
.
A button for a dialog prompt.
An OK button
A Save button
A Save All button
An Open button
A Yes button
A Yes To All button
A No button
A No To All button
An Abort button
A Retry button
An Ignore button
A Close button
A Cancel button
A Discard button
A Help button
An Apply button
A Reset button
A Restore Defaults button
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4