Source code for RsSmw.Implementations.Display.Dialog

from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ...Internal.Utilities import trim_str_response


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DialogCls:
	"""
	| Commands in total: 4
	| Subgroups: 0
	| Direct child commands: 4
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("dialog", core, parent)

[docs] def close(self, dialog_id: str) -> None: """ ``DISPlay:DIALog:CLOSe`` \n Snippet: ``driver.display.dialog.close(dialog_id = 'abc')`` \n Closes the specified dialog. :param dialog_id: string To find out the dialog identifier, use the query method ``RsSmw.display.dialog.id()`` . The DialogName part of the query result is sufficient. """ param = Conversions.value_to_quoted_str(dialog_id) self._core.io.write(f'DISPlay:DIALog:CLOSe {param}')
[docs] def close_all(self) -> None: """ ``DISPlay:DIALog:CLOSe:ALL`` \n Snippet: ``driver.display.dialog.close_all()`` \n Closes all open dialogs. """ self._core.io.write(f'DISPlay:DIALog:CLOSe:ALL')
[docs] def close_all_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``DISPlay:DIALog:CLOSe:ALL`` \n Snippet: ``driver.display.dialog.close_all_with_opc()`` \n Closes all open dialogs. Same as close_all, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'DISPlay:DIALog:CLOSe:ALL', opc_timeout_ms)
[docs] def get_id(self) -> str: """ ``DISPlay:DIALog:ID`` \n Snippet: ``value: str = driver.display.dialog.get_id()`` \n Returns the dialog identifiers of the open dialogs in a string separated by blanks. :return: dialog_id_list: DialogID#1 DialogID#2 ... DialogID#n Dialog identifiers are string without blanks. Blanks are represented as $$. Dialog identifiers DialogID are composed of two main parts: DialogName[OptionalParts] DialogName Meaningful information, mandatory input parameter for the commands: method ``RsSmw.display.dialog.open()`` method ``RsSmw.display.dialog.close()`` Optional parts String of $X values, where X is a character, interpreted as follows: $qDialogQualifier: optional dialog qualifier, usually the letter A or B, as displayed in the dialog title. $iInstances: comma-separated list of instance indexes, given in the order h,c,s,d,g,u,0. Default is zero; the terminating ',0' can be omitted. $tTabIds: comma-separated indexes or tab names; required, if a dialog is composed of several tabs. $xLeft$yTop$hLeft$wTop: position and size; superfluous information. """ response = self._core.io.query_str('DISPlay:DIALog:ID?') return trim_str_response(response)
[docs] def open(self, dialog_id: str) -> None: """ ``DISPlay:DIALog:OPEN`` \n Snippet: ``driver.display.dialog.open(dialog_id = 'abc')`` \n Opens the specified dialog. :param dialog_id: string To find out the dialog identifier, use the query method ``RsSmw.display.dialog.id()`` . The DialogName part of the query result is mandatory. """ param = Conversions.value_to_quoted_str(dialog_id) self._core.io.write(f'DISPlay:DIALog:OPEN {param}')