from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal.Types import DataType
from .....Internal.StructBase import StructBase
from .....Internal.ArgStruct import ArgStruct
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class IconCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("icon", core, parent)
[docs]
def set(self, icon_path: str, icon_index: str) -> None:
"""
``SYSTem:PLUGin:APPStarter:ICON`` \n
Snippet: ``driver.system.plugin.appStarter.icon.set(icon_path = 'abc', icon_index = 'abc')`` \n
Defines an icon for the selected application to be displayed in the 'Application Starter' dialog box.
:param icon_path: Path and file name for icon
:param icon_index: Position of the icon as an ordered number within the dialog box.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('icon_path', icon_path, DataType.String), ArgSingle('icon_index', icon_index, DataType.String))
self._core.io.write(f'SYSTem:PLUGin:APPStarter:ICON {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
class IconStruct(StructBase):
"""
Response structure. Fields: \n
- 1 Icon_Path: str: Path and file name for icon
- 2 Icon_Index: str: Position of the icon as an ordered number within the dialog box.
"""
__meta_args_list = [
ArgStruct.scalar_str('Icon_Path'),
ArgStruct.scalar_str('Icon_Index')]
def __init__(self):
StructBase.__init__(self, self)
self.Icon_Path: str = None
self.Icon_Index: str = None
[docs]
def get(self) -> IconStruct:
"""
``SYSTem:PLUGin:APPStarter:ICON`` \n
Snippet: ``value: IconStruct = driver.system.plugin.appStarter.icon.get()`` \n
Defines an icon for the selected application to be displayed in the 'Application Starter' dialog box.
:return: structure: for return value, see the help for IconStruct structure arguments.
"""
return self._core.io.query_struct(f'SYSTem:PLUGin:APPStarter:ICON?', self.__class__.IconStruct())