SessionList¶
Methods¶
Documentation¶
-
class
qconcurrency.widgets._sessionwidgets_.SessionList(colours=None)[source]¶ Bases:
qconcurrency.widgets._sessionwidgets_._basewidgets_.SessionWidgetBase,PySide.QtGui.QWidget-
__init__(colours=None)[source]¶ Parameters: colours (dict, optional) – An optional dictionary, indicating colours to use for QListWidgetItems based on their status.
Any key that is not set in the dictionary uses the stylesheet’s default colours for
QListWidgetItems{ ‘normal’: {‘fg’:QColor(255,255,255), ‘bg’:QColor(255,255,255)}, ‘changed’: {‘fg’:QColor(255,255,255), ‘bg’:QColor(255,255,255)}, ‘new’: {‘fg’:QColor(255,255,255), ‘bg’:QColor(255,255,255)}, ‘editable’: {‘fg’:QColor(255,255,255), ‘bg’:QColor(255,255,255)}, }
-
add_item(val, _id=None, saved_val=None)[source]¶ Adds a new item to the list.
Parameters: - val (object) –
(ex: 'itemA' )The item you’d like to add to the widget - _id (object, optional) –
If the item exists and has already been assigned an Id provide it here.
Or, if the item is new, but you want to assign a specific Id, you may also provide an Id here.
- saved_val (object, optional) –
If this argument is assigned a value, the item will tracked as being an item that is already saved to the database (or other long-term-storage).
You can test whether or not a widget’s current value is different from this saved value using the method
SessionListItem.is_changed()
- val (object) –
-
changes_exist= <PySide.QtCore.Signal object>¶ True/False if unsaved changes exist
-
keyPressEvent(event)[source]¶ If an item is selected in the list, the last-item in the selection is toggled between editable and normal modes.
-
remove_item(_id)[source]¶ Removes a single item from the list.
Parameters: _id (object, optional) – The _id of the item that you want to delete.
-
selectedItems()[source]¶ Wraps
QtWidgets.QListWidget.selectedItems(), and returns all selectedSessionListItems.
-
staticMetaObject= <PySide.QtCore.QMetaObject object>¶
-