from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class OrientationCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("orientation", core, parent)
[docs]
def set(self, orientation: enums.PageOrientation) -> None:
"""
``HCOPy:PAGE:ORIentation`` \n
Snippet: ``driver.hardCopy.page.orientation.set(orientation = enums.PageOrientation.LANDscape)`` \n
The command selects the page orientation of the printout. The command is only available if the output device is a printer
or a PDF file.
:param orientation: LANDscape | PORTrait
"""
param = Conversions.enum_scalar_to_str(orientation, enums.PageOrientation)
self._core.io.write(f'HCOPy:PAGE:ORIentation {param}')
# noinspection PyTypeChecker
[docs]
def get(self) -> enums.PageOrientation:
"""
``HCOPy:PAGE:ORIentation`` \n
Snippet: ``value: enums.PageOrientation = driver.hardCopy.page.orientation.get()`` \n
The command selects the page orientation of the printout. The command is only available if the output device is a printer
or a PDF file.
:return: orientation: LANDscape | PORTrait
"""
response = self._core.io.query_str(f'HCOPy:PAGE:ORIentation?')
return Conversions.str_to_scalar_enum(response, enums.PageOrientation)