Source code for rsrtx.Implementations.Display.Color.Palette

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PaletteCls:
	"""
	| Commands in total: 8
	| Subgroups: 1
	| Direct child commands: 3
	"""

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

	@property
	def point(self):
		"""
		| Commands in total: 5
		| Subgroups: 4
		| Direct child commands: 1
		"""
		if not hasattr(self, '_point'):
			from .Point import PointCls
			self._point = PointCls(self._core, self._cmd_group)
		return self._point

[docs] def set_add(self, name: str) -> None: """ ``DISPlay:COLor:PALette:ADD`` \n Snippet: ``driver.display.color.palette.set_add(name = 'abc')`` \n Adds a new color table with the specified name. :param name: color table """ param = Conversions.value_to_quoted_str(name) self._core.io.write(f'DISPlay:COLor:PALette:ADD {param}')
[docs] def get_count(self) -> int: """ ``DISPlay:COLor:PALette:COUNt`` \n Snippet: ``value: int = driver.display.color.palette.get_count()`` \n Queries the number of configured color maps. """ response = self._core.io.query_str('DISPlay:COLor:PALette:COUNt?') return Conversions.str_to_int(response)
[docs] def set_remove(self, name: str) -> None: """ ``DISPlay:COLor:PALette:REMove`` \n Snippet: ``driver.display.color.palette.set_remove(name = 'abc')`` \n Removes the specified color table. :param name: color table """ param = Conversions.value_to_quoted_str(name) self._core.io.write(f'DISPlay:COLor:PALette:REMove {param}')
def clone(self) -> 'PaletteCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = PaletteCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group