From 6de264e28a7cfdb23470978b6a4b8b730a3c3eb9 Mon Sep 17 00:00:00 2001 From: Joseph Yu Date: Fri, 30 Apr 2021 16:17:00 +0100 Subject: [PATCH] Using tuple() syntax --- python/tank/platform/engine.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/python/tank/platform/engine.py b/python/tank/platform/engine.py index e8bcc6b71..9bf8c3cfe 100644 --- a/python/tank/platform/engine.py +++ b/python/tank/platform/engine.py @@ -1835,9 +1835,7 @@ def show_dialog(self, title, bundle, widget_class, *args, **kwargs): The dialog will be created with a standard Toolkit window title bar where the title will be displayed. - .. seealso:: - - :ref:`qdialog-exit-codes` - - :ref:`hiding-toolkit-title-bar` + .. seealso:: :ref:`hiding-toolkit-title-bar` **Notes for engine developers** @@ -1907,7 +1905,9 @@ def show_modal(self, title, bundle, widget_class, *args, **kwargs): the title will be displayed. .. seealso:: + - :ref:`qdialog-exit-codes` + - :ref:`hiding-toolkit-title-bar` :param title: The title of the window @@ -1918,10 +1918,9 @@ def show_modal(self, title, bundle, widget_class, *args, **kwargs): Additional parameters specified will be passed through to the ``widget_class`` constructor. - :returns: Tuple of :attr:`QDialog.DialogCode - ` and and the created - ``widget_class`` instance - :rtype: (:class:`int`, :class:`PySide.QtGui.QWidget`) + :returns: :attr:`QDialog.DialogCode ` + and the created ``widget_class`` instance + :rtype: tuple(int, PySide.QtGui.QWidget) """ if not self.has_ui: self.log_error( @@ -1954,14 +1953,7 @@ def show_panel(self, panel_id, title, bundle, widget_class, *args, **kwargs): The dialog will be created with a standard Toolkit window title bar where the title will be displayed. - .. note:: In some cases, it is necessary to hide the standard Toolkit title - bar. You can do this by adding a property to the widget class you are - displaying:: - - @property - def hide_tk_title_bar(self): - "Tell the system to not show the standard toolkit toolbar" - return True + .. seealso:: :ref:`hiding-toolkit-title-bar` :param panel_id: Unique identifier for the panel, as obtained by register_panel(). :param title: The title of the panel @@ -1969,9 +1961,11 @@ def hide_tk_title_bar(self): :param widget_class: The class of the UI to be constructed. This must derive from QWidget. :type widget_class: :class:`PySide.QtGui.QWidget` - Additional parameters specified will be passed through to the widget_class constructor. + Additional parameters specified will be passed through to the + ``widget_class`` constructor. - :returns: the created widget_class instance + :returns: The created ``widget_class`` instance + :rtype: PySide.QtGui.QWidget """ # engines implementing panel support should subclass this method. # the core implementation falls back on a modeless window.