siriushla.as_ap_configdb.normconfigs

Code Documentation

siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow module

Define a window to manage offline configurations.

class siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow.ConfigManagerWindow(config_type, parent=None)[source]

Bases: _SiriusWindow

Window to manage offline configuration of BO and SI devices.

This window allows the user to create new configurations as well as interpolate or apply a tune or chromaticity delta to a configuration.

NEW_CONFIGURATION = 0
closeEvent(event)[source]

Close window.

The user is warned if there are any unsaved changes.

keyPressEvent(event)[source]

Override keyPressEvent.

Ctrl+S - Save changes Ctrl+W - Close configuration on focus F2 - Rename configuration on focus Ctrl+Z - Undo Ctrl+R - Redo

siriushla.as_ap_configdb.normconfigs.ConfigModel module

Configuration window model definition.

class siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigDelegate[source]

Bases: QItemDelegate

Styling.

createEditor(parent, option, index)[source]

Override.

Create and editor based on the cell type

paint(painter, option, index)[source]

Override paint function.

Responsible for painting dirt columns and cells.

setEditorData(editor, index)[source]

Override.

Set cell data as float.

class siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel(config_type, parent=None)[source]

Bases: QAbstractTableModel

Model for the configuration table.

CHROMATICITY = 1
TUNE = 0
UNDO_MEMORY = 75
cleanUndo(column)[source]

Clean undo/redo actions for given column.

closeConfiguration(column)[source]

Close a configuration.

columnCount(index=<PyQt5.QtCore.QModelIndex object>)[source]

Return the number of configurations currently open.

property configurations

Return list of open configurations.

data(index, role=0)[source]

Set data of the table (override).

deleteConfiguration(config_info)[source]

Delete configuration from database.

deriveConfiguration(config_name, base_column, func, parameters)[source]

Create new configuration from existing one TUNE or CHROMATICITY.

flags(index)[source]

Override to make cells editable.

getConfigurationColumn(config_name)[source]

Return column number of the given configuration.

getConfigurations(deleted=False)[source]

Return name of saved configurations.

getTuneMatrix()[source]

Get tune matrix from db.

headerData(section, orientation, role=0)[source]

Set headers of the table (override).

insertColumn(column, index=<PyQt5.QtCore.QModelIndex object>)[source]

Update table widget telling it a new column was inserted.

interpolateConfiguration(config_name, column1, column2)[source]

Linear interpolation of 2 configurations.

loadConfiguration(name=None, values=None)[source]

Load configuration from database.

removeColumns(column, count=1, index=<PyQt5.QtCore.QModelIndex object>)[source]

Update table widget telling it a column was removed.

renameConfiguration(column, new_name)[source]

Change configuration name.

rowCount(index=<PyQt5.QtCore.QModelIndex object>)[source]

Return the number of PVs for this configuration type.

saveConfiguration(column)[source]

Save configuration if it is dirty.

setData(index, value, role=2)[source]

Set cell data.

setDataAlt(row, config_name, value, old_value, redo=True)[source]

Called by the undo/redo methods to change data on table.

class siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration(name, config_type, values, new=True)[source]

Bases: object

Represents a configuration.

delete()[source]

Delete configuration.

static delete_config(config_type, name)[source]

Delete configuration.

property dirty

Return wether thre is unsaved data.

static loadConfiguration(config_type, name)[source]

Load existing configuration.

property name

Configuration name.

static newConfiguration(name, config_type, values)[source]

Create new configuration.

property old_name

Configuration name in database.

save()[source]

Save data.

setValue(pv_name, value)[source]

Set value of a given pv.

property values

PV values.

siriushla.as_ap_configdb.normconfigs.LoadingThread module

class siriushla.as_ap_configdb.normconfigs.LoadingThread.LoadingThread(name, pv_list, parent=None)[source]

Bases: QThread

VACA_PREFIX = ''
run(self)[source]
taskFinished

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

taskUpdated

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

siriushla.as_ap_configdb.normconfigs.TuneDlg module

class siriushla.as_ap_configdb.normconfigs.TuneDlg.TuneDlg(parent=None)[source]

Bases: QDialog

Module contents