items.task_items#

The view and model used to display task folder items.

Folders found in an asset’s root are referred to as task folders. Bookmarks generally expects them to be associated with a task or data-type e.g. render, comp, textures, etc.

Some default task-folders are defined by bookmarks.tokens.tokens.

Classes:

TaskItemContextMenu(index[, parent])

Context menu associated with TaskItemView.

TaskItemModel([parent])

Task folder item model used to get task folders of an asset item.

TaskItemView([parent])

The view responsible for displaying the available data-keys.

TaskItemViewDelegate([parent])

Delegate used to paint TaskItemView.

class bookmarks.items.task_items.TaskItemContextMenu(index, parent=None)[source]#

Bases: BaseContextMenu

Context menu associated with TaskItemView.

Methods:

setup()

Creates the context menu.

setup()[source]#

Creates the context menu.

class bookmarks.items.task_items.TaskItemModel(parent=None)[source]#

Bases: ItemModel

Task folder item model used to get task folders of an asset item.

Methods:

data_type()

The model's data type.

default_row_size()

Returns the default item size.

file_count(source)

Counts the number of file items the current task folder has.

filter_setting_dict_key()

The custom dictionary key used to save filter settings to the user settings file.

init_data(**kwargs)

Function wrapper.

item_generator(path)

Used to iterate over all files in a given folder.

reset_data(*args[, force, emit_active])

Force model data reset every time.

source_path()

The model's source path.

data_type()[source]#

The model’s data type.

default_row_size()[source]#

Returns the default item size.

file_count(source)[source]#

Counts the number of file items the current task folder has.

filter_setting_dict_key()[source]#

The custom dictionary key used to save filter settings to the user settings file.

init_data(**kwargs)#

Function wrapper.

classmethod item_generator(path)[source]#

Used to iterate over all files in a given folder.

Yields:

DirEntry – A DirEntry instance.

reset_data(*args, force=False, emit_active=True)[source]#

Force model data reset every time.

source_path()[source]#

The model’s source path.

class bookmarks.items.task_items.TaskItemView(parent=None)[source]#

Bases: ThreadedItemView

The view responsible for displaying the available data-keys.

Classes:

Methods:

contextMenuEvent(event)

Event handler.

eventFilter(widget, event)

Event filter handler.

focusOutEvent(event)

Event handler.

get_source_model()

Returns the model class associated with this view.

hideEvent(event)

Event handler.

inline_icons_count()

Inline buttons count.

item_clicked(index)

Slot connected to th clicked signal.

keyPressEvent(event)

Key press event handler.

key_enter()

Custom key action.

mousePressEvent(event)

Event handler.

resize_widget(rect)

Slot used to resize the view to the given rect.

select_active_item()

Select the current active item.

showEvent(event)

Event handler.

tab_changed(idx)

Slot connected called when the current tab has changed.

ContextMenu#

alias of TaskItemContextMenu Methods:

setup()

Creates the context menu.

Delegate#

alias of TaskItemViewDelegate Methods:

get_description_rect(*args, **kwargs)

Get description rectangle.

get_text_segments(*args, **kwargs)

Get text segments.

paint(painter, option, index)

The main paint method.

paint_background(*args)

Paints the background.

paint_name(*args)

Paints the name and the number of files available for the given task item.

sizeHint(option, index)

Size hint.

contextMenuEvent(event)[source]#

Event handler.

eventFilter(widget, event)[source]#

Event filter handler.

focusOutEvent(event)[source]#

Event handler.

get_source_model()[source]#

Returns the model class associated with this view.

hideEvent(event)[source]#

Event handler.

inline_icons_count()[source]#

Inline buttons count.

item_clicked(index)[source]#

Slot connected to th clicked signal.

keyPressEvent(event)[source]#

Key press event handler.

key_enter()[source]#

Custom key action.

mousePressEvent(event)[source]#

Event handler.

resize_widget(rect)[source]#

Slot used to resize the view to the given rect.

select_active_item()[source]#

Select the current active item.

showEvent(event)[source]#

Event handler.

tab_changed(idx)[source]#

Slot connected called when the current tab has changed.

class bookmarks.items.task_items.TaskItemViewDelegate(parent=None)[source]#

Bases: ItemDelegate

Delegate used to paint TaskItemView.

Methods:

get_description_rect(*args, **kwargs)

Get description rectangle.

get_text_segments(*args, **kwargs)

Get text segments.

paint(painter, option, index)

The main paint method.

paint_background(*args)

Paints the background.

paint_name(*args)

Paints the name and the number of files available for the given task item.

sizeHint(option, index)

Size hint.

get_description_rect(*args, **kwargs)[source]#

Get description rectangle.

get_text_segments(*args, **kwargs)[source]#

Get text segments.

paint(painter, option, index)[source]#

The main paint method.

paint_background(*args)[source]#

Paints the background.

paint_name(*args)[source]#

Paints the name and the number of files available for the given task item.

sizeHint(option, index)[source]#

Size hint.