cgl.ui.widgets.containers package

Submodules

cgl.ui.widgets.containers.menu module

class cgl.ui.widgets.containers.menu.LJMenu(parent)[source]

Bases: QMenu

action_exists(action_name)[source]

handy function to determine if an action by name “action_name” already exists :param action_name: :return:

create_action(name, trigger=None, checkable=False)[source]
staticMetaObject = PySide6.QtCore.QMetaObject("LJMenu" inherits "QMenu": )

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]
has_approved_frame_padding(filename)[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

clear_data()[source]
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: LJItemModel

ListItemModel 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.

clear_data()[source]
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

class cgl.ui.widgets.containers.node.Node(name, parent=None)[source]

Bases: object

addChild(child)[source]
attrs()[source]
child(row)[source]
childCount()[source]
data(column)[source]
insertChild(position, child)[source]
log(tabLevel=-1)[source]
property name
parent()[source]
removeChild(position)[source]
static resource()[source]
row()[source]
setData(column, value)[source]
to_dict(d)[source]
to_list()[source]
to_xml()[source]
static typeInfo()[source]
property value

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]
invalidateFilter(self) None[source]
set_search_widget(wgt)[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

restore()[source]
staticMetaObject = PySide6.QtCore.QMetaObject("LJKeyPairTableWidget" inherits "LJTableWidget": )
class cgl.ui.widgets.containers.table.LJTableWidget(parent, path_object=None)[source]

Bases: QTableView

clear()[source]
column_count()[source]
double_clicked
dragEnterEvent(self, event: PySide6.QtGui.QDragEnterEvent) None[source]
dragMoveEvent(self, event: PySide6.QtGui.QDragMoveEvent) None[source]
dropEvent(self, event: PySide6.QtGui.QDropEvent) None[source]
dropped
header_right_click(position)[source]
header_right_click_menu_trigger(header)[source]
mousePressEvent(self, event: PySide6.QtGui.QMouseEvent) None[source]
mouseReleaseEvent(self, event: PySide6.QtGui.QMouseEvent) None[source]
on_closing()[source]
resizeEvent(event)[source]

Resize all sections to content and user interactive

right_clicked
row_count()[source]
select_row_by_text(text, column=0)[source]
selected
send_double_click_signal()[source]
set_draggable(value)[source]
set_item_model(mdl, proxy=None)[source]
sizeHint(self) PySide6.QtCore.QSize[source]
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 )
viewClicked()[source]

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

clear()[source]
Returns:

column_count()[source]
dropEvent(self, event: PySide6.QtGui.QDropEvent) None[source]
files_added
header_labels = []
nothing_selected
static on_closing()[source]
populate_from_data_frame(path_object, data_frame, header)[source]
populate_from_directory(directory)[source]
row_count()[source]
row_selected()[source]
select_row_by_text(text, column=0)[source]
selected
set_header_labels(mdl, headers)[source]
set_text(row, column_number, new_text)[source]
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 reload_items(items)[source]
send_index_change()[source]
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 )

Module contents