jvconnected.ui.models.tslumd

class jvconnected.ui.models.tslumd.UmdModel(*args)[source]

Bases: GenericQObject

Qt bridge to jvconnected.interfaces.tslumd.umd_io.UmdIo

umd_io

UmdIo instance

Property engine: jvconnected.ui.models.engine.EngineModel

The EngineModel in use

Property running: bool

Alias for jvconnected.interfaces.tslumd.umd_io.UmdIo.running

Property hostaddr: str

Alias for jvconnected.interfaces.tslumd.umd_io.UmdIo.hostaddr

Property hostport: int

Alias for jvconnected.interfaces.tslumd.umd_io.UmdIo.hostport

Property editedProperties: List[str]

A list of attributes that have changed and are waiting to be set on the umd_io

async Slot sendValuesToInterface()[source]

Update the umd_io values for any attributes currently in editedProperties.

After all values are set, the editedProperties list is emptied.

async Slot getValuesFromInterface()[source]

Get the current values from the umd_io

Changes made to anything in editedProperties are overwritten and the list is cleared.

_generic_setter(attr, value)[source]

To be used in the ‘getter’ method for a Property

Parameters
  • attr (str) – The instance attribute name containing the Property value

  • value – The value passed from the original setter

class jvconnected.ui.models.tslumd.TallyRoles(value)[source]

Bases: IntEnum

Role definitions to specify column mapping in TallyListModel to a PySide2.QtQuick.TableView

screenIndexRole

Screen index

tallyIndexRole

Tally index

RhTallyRole

rhTally

TxtTallyRole

txtTally

LhTallyRole

lhTally

TextRole

text

get_tally_prop() str[source]

Get the attribute name of this role mapped to jvconnected.interfaces.tslumd.umd_io.Tally

get_tally_prop_value(tally: Tally) Any[source]

Get the value associated with this role from the given tslumd.tallyobj.Tally

get_qt_prop() str[source]

Get the camel-case name of this role used in Qml

class jvconnected.ui.models.tslumd.TallyListModel(*args, **kwargs)[source]

Bases: QAbstractTableModel

Table Model for jvconnected.interfaces.tslumd.umd_io.Tally objects

umd_io

UmdIo instance

tally_key_indices

Used to keep the table row in sync with the item key within tallies

Property engine: jvconnected.ui.models.engine.EngineModel

The EngineModel in use

property tallies: Optional[Dict[Tuple[int, int], Tally]]

Shortcut for tallies on umd_io

roleNames(self) Dict[int, PySide2.QtCore.QByteArray][source]
columnCount(self, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) int[source]
rowCount(self, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) int[source]
flags(self, index: PySide2.QtCore.QModelIndex) PySide2.QtCore.Qt.ItemFlags[source]
Slot getTallyKeyForRow(row: int) Tuple[int, int][source]

Get the key within tallies for the given row

data(self, index: PySide2.QtCore.QModelIndex, role: int = PySide2.QtCore.Qt.ItemDataRole.DisplayRole) Any[source]
class jvconnected.ui.models.tslumd.TallyMapListModel(*args, **kwargs)[source]

Bases: QAbstractTableModel

Table Model for jvconnected.interfaces.tslumd.mapper.DeviceMapping objects

umd_io

UmdIo instance

map_indices

Used to keep the table row in sync with the item key within maps

Property engine: jvconnected.ui.models.engine.EngineModel

The EngineModel in use

property maps: Optional[Dict[int, DeviceMapping]]

Shortcut for device_maps of the umd_io

Slot getIndexForRow(row: int) int[source]

Get the key within maps for the given row

roleNames(self) Dict[int, PySide2.QtCore.QByteArray][source]
columnCount(self, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) int[source]
rowCount(self, parent: PySide2.QtCore.QModelIndex = Invalid(PySide2.QtCore.QModelIndex)) int[source]
flags(self, index: PySide2.QtCore.QModelIndex) PySide2.QtCore.Qt.ItemFlags[source]
data(self, index: PySide2.QtCore.QModelIndex, role: int = PySide2.QtCore.Qt.ItemDataRole.DisplayRole) Any[source]
async Slot unMapByRow(row: int)[source]

Remove a DeviceMapping from the umd_io. See jvconnected.interfaces.tslumd.umd_io.UmdIo.remove_device_mapping()

Parameters

row (int) – The table row index

class jvconnected.ui.models.tslumd.TallyMapBase(*args)[source]

Bases: GenericQObject

Property tallyKey: Tuple[int, int]

Tuple of screenIndex, tallyIndex matching jvconnected.interfaces.tslumd.mapper.TallyMap.tally_key

Property screenIndex: int

Alias for jvconnected.interfaces.tslumd.mapper.TallyMap.screen_index

Property tallyIndex: int

Alias for jvconnected.interfaces.tslumd.mapper.TallyMap.tally_index

Property tallyType: str

Alias for jvconnected.interfaces.tslumd.mapper.TallyMap.tally_type

class jvconnected.ui.models.tslumd.TallyMapModel(*args)[source]

Bases: TallyMapBase

Property deviceIndex: int

Alias for jvconnected.interfaces.tslumd.mapper.DeviceMapping.device_index

Property destTallyType: str

The destination tally type to map to the device ('Preview' or 'Program')

Slot checkValid() bool[source]

Check validity of current parameters

async Slot applyMap(umd_model: UmdModel)[source]

Add a DeviceMapping to the UmdModel.umd_io using jvconnected.interfaces.tslumd.umd_io.UmdIo.add_device_mapping()

create_device_map() DeviceMapping[source]

Create a DeviceMapping with the current values of this instance

merge_with_device_map(existing_map: DeviceMapping) DeviceMapping[source]

Merge an existing DeviceMapping with one created by create_device_map()

class jvconnected.ui.models.tslumd.TallyCreateMapModel(*args)[source]

Bases: GenericQObject

Property deviceIndex: int

The device index

Property program: jvconnected.ui.models.tslumd.TallyMapModel

Instance of TallyMapModel to be used for program tally

Property preview: jvconnected.ui.models.tslumd.TallyMapModel

Instance of TallyMapModel to be used for preview tally

Slot checkValid() bool[source]

Check validity of current parameters

Calls checkValid() on both program and preview objects

async Slot applyMap(umd_model: UmdModel)[source]

Add a DeviceMapping to the UmdModel.umd_io using jvconnected.interfaces.tslumd.umd_io.UmdIo.add_device_mapping().

The values from the program and preview objects are merged

class jvconnected.ui.models.tslumd.TallyUnmapModel(*args)[source]

Bases: TallyMapBase