====== UI API ====== .. py:module:: p3dsdk.ui UI API is acccessible through the :py:mod:`p3dsdk.ui` submodule. .. toctree:: :glob: :maxdepth: 3 ui/* .. py:class:: Application() Creates an application instance. .. py:method:: exec() Display on screen all the widgets on which :py:meth:`show()` method was called. .. py:class:: Orientation .. py:attribute:: HORIZONTAL Horizontal orientation. .. py:attribute:: VERTICAL Vertical orientation. .. py:class:: Position .. py:attribute:: CENTER Center alignment. .. py:attribute:: LEFT Left alignment. .. py:attribute:: RIGHT Right alignment. .. py:class:: Tick Slider tick position. .. py:attribute:: NONE No ticks displayed. .. py:attribute:: ABOVE Ticks above or left of the slider. .. py:attribute:: BELOW Ticks below or right of the slider. .. py:attribute:: BOTH Ticks on both sides. .. py:function:: critical_message_box(title, msg, button_list) Creates a message box with a critical icon. :param title: The title of the message box. :type title: str :param msg: The message contained in the message box. :type msg: str :param button_list: List of button names that will be displayed on the message box. There is a maximum of three buttons. :type button_list: list(str) :returns: The name of the button that was clicked. :rtype: str .. py:function:: information_message_box(title, msg, button_list) Creates a message box with an information icon. :param title: The title of the message box. :type title: str :param msg: The message contained in the message box. :type msg: str :param button_list: List of button names that will be displayed on the message box. There is a maximum of three buttons. :type button_list: list(str) :returns: The name of the button that was clicked. :rtype: str .. py:function:: no_icon_message_box(title, msg, button_list) Creates a message box without icon. :param title: The title of the message box. :type title: str :param msg: The message contained in the message box. :type msg: str :param button_list: List of button names that will be displayed on the message box. There is a maximum of three buttons. :type button_list: list(str) :returns: The name of the button that was clicked. :rtype: str .. py:function:: warning_message_box(title, msg, button_list) Creates a message box with a warning icon. :param title: The title of the message box. :type title: str :param msg: The message contained in the message box. :type msg: str :param button_list: List of button names that will be displayed on the message box. There is a maximum of three buttons. :type button_list: list(str) :returns: The name of the button that was clicked. :rtype: str .. py:function:: open_directory_selector(dir_name = "/") Shows an open directory selector. :param dir_name: The path where the dialog will be open. :type dir_name: str :returns: The path of the directory that was selected. If no directory was selected an empty string is returned. :rtype: str .. py:function:: open_file_selector(dir_name = "/", filter = "") Shows an open file selector. :param dir_name: The path where the dialog will be open. :type dir_name: str :param filter: The types of files that will be visible from the dialog. :type filter: str :returns: The path of the file that was selected. If no file was selected an empty string is returned. :rtype: str .. py:function:: save_file_selector(dir_name) Shows a saving file selector. :param dir_name: The path where the dialog will be open. :type dir_name: str :param filter: The types of files that will be visible from the dialog. :type filter: str :returns: The path of the file that is to be saved. If no file was selected an empty string is returned. :rtype: str