cgl.ui.widgets.containers package¶
Submodules¶
cgl.ui.widgets.containers.model module¶
- class cgl.ui.widgets.containers.model.DictionaryItemModel(dict_, header_titles=None)[source]¶
Bases:
LJItemModel- data(self, index: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- staticMetaObject = PySide6.QtCore.QMetaObject("DictionaryItemModel" inherits "LJItemModel": )¶
- class cgl.ui.widgets.containers.model.FileTableModel(data_list: List[List[dict | QPixmap | str]], header_titles: List[str] | None = None, data_filter: bool = False, icon_height: int = 30)[source]¶
Bases:
ListItemModel- data(index, role)[source]¶
Provides the appropriate data based on the given QModelIndex index and the role role.
- Parameters:
index (QModelIndex) – The QModelIndex of the data.
role (int) – The role of the data (e.g., Qt.DisplayRole, Qt.DecorationRole).
- Returns:
The data to be displayed or decorated, or None if not applicable.
- Return type:
Optional[Union[QtGui.QPixmap, str]]
- staticMetaObject = PySide6.QtCore.QMetaObject("FileTableModel" inherits "ListItemModel": )¶
- class cgl.ui.widgets.containers.model.FilesModel(data_list, header_titles=None, data_filter=False, path_object=None, cfg=None)[source]¶
Bases:
QAbstractTableModel- columnCount(self, parent: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex = Invalid(PySide6.QtCore.QModelIndex)) int[source]¶
- data(self, index: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- headerData(self, section: int, orientation: PySide6.QtCore.Qt.Orientation, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- rowCount(self, parent: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex = Invalid(PySide6.QtCore.QModelIndex)) int[source]¶
- staticMetaObject = PySide6.QtCore.QMetaObject("FilesModel" inherits "QAbstractTableModel": )¶
- class cgl.ui.widgets.containers.model.LGListDictionaryItemModel(data)[source]¶
Bases:
LJItemModel- data(self, index: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- staticMetaObject = PySide6.QtCore.QMetaObject("LGListDictionaryItemModel" inherits "LJItemModel": )¶
- class cgl.ui.widgets.containers.model.LGShotgunListDictionaryItemModel(data, display_filter=None)[source]¶
Bases:
LGListDictionaryItemModel- data(self, index: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- staticMetaObject = PySide6.QtCore.QMetaObject("LGShotgunListDictionaryItemModel" inherits "LGListDictionaryItemModel": )¶
- class cgl.ui.widgets.containers.model.LJItemModel[source]¶
Bases:
QAbstractTableModel- columnCount(self, parent: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex = Invalid(PySide6.QtCore.QModelIndex)) int[source]¶
- data(self, index: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- headerData(self, section: int, orientation: PySide6.QtCore.Qt.Orientation, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- rowCount(self, parent: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex = Invalid(PySide6.QtCore.QModelIndex)) int[source]¶
- staticMetaObject = PySide6.QtCore.QMetaObject("LJItemModel" inherits "QAbstractTableModel": )¶
- class cgl.ui.widgets.containers.model.ListItemModel(data_list: List[List[dict | QPixmap | str]], header_titles: List[str] | None = None, data_filter: bool = False, icon_height: int = 30)[source]¶
Bases:
LJItemModelListItemModel is a custom model for a Qt-based application that inherits from the LJItemModel class. This model is designed to be used with Qt views (e.g., QTableView, QListView) to display data in a structured way with an icon in the first column.
- columnCount(parent=None) int[source]¶
Returns the number of columns in the model.
- Parameters:
parent (optional) – The parent QModelIndex. Defaults to None.
- Returns:
The number of columns in the model, which is 2 in this case.
- Return type:
int
- data(index: QModelIndex, role: int) QPixmap | str | None[source]¶
Provides the appropriate data based on the given QModelIndex index and the role role.
- Parameters:
index (QModelIndex) – The QModelIndex of the data.
role (int) – The role of the data (e.g., Qt.DisplayRole, Qt.DecorationRole).
- Returns:
The data to be displayed or decorated, or None if not applicable.
- Return type:
Optional[Union[QtGui.QPixmap, str]]
- staticMetaObject = PySide6.QtCore.QMetaObject("ListItemModel" inherits "LJItemModel": )¶
- class cgl.ui.widgets.containers.model.TreeItemModel(data_list, header_titles=None, data_filter=False)[source]¶
Bases:
LJItemModel- data(self, index: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- staticMetaObject = PySide6.QtCore.QMetaObject("TreeItemModel" inherits "LJItemModel": )¶
cgl.ui.widgets.containers.node module¶
cgl.ui.widgets.containers.pandas_model module¶
- class cgl.ui.widgets.containers.pandas_model.PandasModel(df=Empty DataFrame Columns: [] Index: [], parent=None)[source]¶
Bases:
QAbstractTableModel- columnCount(self, parent: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex = Invalid(PySide6.QtCore.QModelIndex)) int[source]¶
- data(self, index: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- headerData(self, section: int, orientation: PySide6.QtCore.Qt.Orientation, role: int = Instance(Qt.DisplayRole)) Any[source]¶
- rowCount(self, parent: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex = Invalid(PySide6.QtCore.QModelIndex)) int[source]¶
- staticMetaObject = PySide6.QtCore.QMetaObject("PandasModel" inherits "QAbstractTableModel": )¶
cgl.ui.widgets.containers.proxy module¶
- class cgl.ui.widgets.containers.proxy.LJTableSearchProxy[source]¶
Bases:
QSortFilterProxyModel- filterAcceptsRow(self, source_row: int, source_parent: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex) bool[source]¶
- staticMetaObject = PySide6.QtCore.QMetaObject("LJTableSearchProxy" inherits "QSortFilterProxyModel": )¶
cgl.ui.widgets.containers.table module¶
- class cgl.ui.widgets.containers.table.LJKeyPairTableWidget(parent)[source]¶
Bases:
LJTableWidget- staticMetaObject = PySide6.QtCore.QMetaObject("LJKeyPairTableWidget" inherits "LJTableWidget": )¶
- class cgl.ui.widgets.containers.table.LJTableWidget(parent, path_object=None)[source]¶
Bases:
QTableView- double_clicked¶
- dropped¶
- right_clicked¶
- selected¶
- staticMetaObject = PySide6.QtCore.QMetaObject("LJTableWidget" inherits "QTableView": Methods: #107 type=Signal, signature=selected(PyObject), parameters=PyObject #108 type=Signal, signature=right_clicked(PyObject), parameters=PyObject #109 type=Signal, signature=dropped(PyObject), parameters=PyObject #110 type=Signal, signature=double_clicked(PyObject), parameters=PyObject )¶
cgl.ui.widgets.containers.tree module¶
- class cgl.ui.widgets.containers.tree.LJTreeModel(parent=None)[source]¶
Bases:
QStandardItemModel- staticMetaObject = PySide6.QtCore.QMetaObject("LJTreeModel" inherits "QStandardItemModel": )¶
- class cgl.ui.widgets.containers.tree.LJTreeWidget(parent=None, parents=None, model=None)[source]¶
Bases:
QTreeView- files_added¶
- header_labels = []¶
- nothing_selected¶
- selected¶
- staticMetaObject = PySide6.QtCore.QMetaObject("LJTreeWidget" inherits "QTreeView": Methods: #104 type=Signal, signature=nothing_selected() #105 type=Signal, signature=selected(PyObject), parameters=PyObject #106 type=Signal, signature=files_added(PyObject), parameters=PyObject )¶
- class cgl.ui.widgets.containers.tree.ProductionComboDelegate(parent, items)[source]¶
Bases:
QItemDelegate- createEditor(self, parent: PySide6.QtWidgets.QWidget, option: PySide6.QtWidgets.QStyleOptionViewItem, index: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex) PySide6.QtWidgets.QWidget[source]¶
- index_changed¶
- static setEditorData(self, editor: PySide6.QtWidgets.QWidget, index: PySide6.QtCore.QModelIndex | PySide6.QtCore.QPersistentModelIndex) None[source]¶
- staticMetaObject = PySide6.QtCore.QMetaObject("ProductionComboDelegate" inherits "QItemDelegate": Methods: #10 type=Signal, signature=index_changed(PyObject), parameters=PyObject )¶