taurus.qt.qtcore.model
This package provides taurus Qt models
Pure PyQt view based widgets can be used to display the contents of the several model classes provided here.
Displaying the device list in a PyQt5.Qt.QTreeView
:
view = Qt.QTreeView()
db = taurus.Database()
model = taurus.qt.qtcore.TaurusDbDeviceModel()
model.setDataSource(db)
view.setModel(model)
Same example but in a PyQt5.Qt.QTableView
:
view = Qt.QTableView()
db = taurus.Database()
model = taurus.qt.qtcore.TaurusDbPlainDeviceModel()
model.setDataSource(db)
view.setModel(model)
And now inside a PyQt.Qt.QComboBox
:
view = Qt.QComboBox()
db = taurus.Database()
model = taurus.qt.qtcore.TaurusDbPlainDeviceModel()
model.setDataSource(db)
view.setModel(model)
Classes
- class TaurusBaseModel(parent=None, data=None)[source]
The base class for all Taurus Qt models.
- class TaurusDbBaseModel(parent=None, data=None)[source]
The base class for all Taurus database Qt models. By default, this model represents a plain device perspective of the underlying database.
- class TaurusDbDeviceClassModel(parent=None, data=None)[source]
A Qt model that structures class elements in a tree organized as:
- <Class>
- <Device>
<Attribute>
- class TaurusDbDeviceClassProxyModel(parent=None)[source]
A Qt filter & sort model for the TaurusDbDeviceClassModel
- class TaurusDbDeviceModel(parent=None, data=None)[source]
A Qt model that structures device elements in a 3 level tree organized as:
<domain>
<family>
<member>
- class TaurusDbDeviceProxyModel(parent=None)[source]
A Qt filter & sort model for model for the taurus models: - TaurusDbBaseModel - TaurusDbDeviceModel - TaurusDbSimpleDeviceModel - TaurusDbPlainDeviceModel
- class TaurusDbPlainDeviceModel(parent=None, data=None)[source]
A Qt model that structures device elements in 1 level tree. Device nodes will have attribute child nodes if the device is running.
- class TaurusDbServerModel(parent=None, data=None)[source]
A Qt model that structures server elements in a tree organized as:
<Server name>
<Server instance>
<Class>
<Device>
<Attribute>
- class TaurusDbServerProxyModel(parent=None)[source]
A Qt filter & sort model for the TaurusDbServerModel
- class TaurusDbSimpleDeviceAliasModel(parent=None, data=None)[source]
A Qt model that structures device elements in 1 level tree with device alias as node leafs. This model contains only 1 column.
- class TaurusDbSimpleDeviceModel(parent=None, data=None)[source]
A Qt model that structures device elements in 1 level tree with device name as node leafs. This model contains only 1 column.
- class TaurusTreeAttributeItem(model, data, parent=None)[source]
A node designed to represent an attribute
- class TaurusTreeDeviceClassItem(model, data, parent=None)[source]
A node designed to represent a device class
- class TaurusTreeDeviceDomainItem(model, data, parent=None)[source]
A node designed to represent a the domain part of a device name
- class TaurusTreeDeviceFamilyItem(model, data, parent=None)[source]
A node designed to represent a the family part of a device name
- class TaurusTreeDeviceItem(model, data, parent=None)[source]
A node designed to represent a device
- class TaurusTreeDeviceMemberItem(model, data, parent=None)[source]
A node designed to represent a the member part of a device name
- class TaurusTreeDevicePartItem(model, data, parent=None)[source]
A node designed to represent a ‘part’ (or totality) of a device name
- class TaurusTreeServerItem(model, data, parent=None)[source]
A node designed to represent a server
- class TaurusTreeServerNameItem(model, data, parent=None)[source]
A node designed to represent the server name part of a server