filebrowser¶
- class jukeboxcore.gui.widgets.filebrowser.FileBrowser(filetype, releasetypes=None, get_current_file=None, parent=None)[source]¶
Bases: jukeboxcore.gui.widgets.filebrowser_ui.Ui_FileBrowser, PySide.QtGui.QWidget
A browser for taskfiles
Initialize a new file browser widget with the given parent
Parameters: - filetype – the filetype the browser should display from djadapter.FILETYPES
- releasetypes – the releasetypes the browser should display.
- get_current_file (func|None) – a function that should return the current open file as a jukeboxcore.filesys.TaskFileInfo
- parent (QWidget) – Optional - the parent of the window - default is None
Raises: None
- shot_taskfile_sel_changed = <PySide.QtCore.Signal object at 0x00000000040565A8>¶
Signal when the selection changes. Returns a TaskFileInfo or None
- asset_taskfile_sel_changed = <PySide.QtCore.Signal object at 0x00000000040565E0>¶
Signal when the selection changes. Returns a TaskFileInfo or None
- init_selection()[source]¶
Call selection changed in the beginning, so signals get emitted once
Emit shot_taskfile_sel_changed signal and asset_taskfile_sel_changed.
Returns: None Raises: None
- setup_ui()[source]¶
Create the browsers and all necessary ui elements for the tool
Returns: None Return type: None Raises: None
Create a radio button for every releasetype
Returns: None Return type: None Raises: None
- setup_signals()[source]¶
Connect the signals with the slots to make the ui functional
Returns: None Return type: None Raises: None
- create_prj_browser()[source]¶
Create the project browser
This creates a combobox brower for projects and adds it to the ui
Returns: the created combo box browser Return type: jukeboxcore.gui.widgets.browser.ComboBoxBrowser Raises: None
- create_shot_browser()[source]¶
Create the shot browser
This creates a list browser for shots and adds it to the ui
Returns: the created borwser Return type: jukeboxcore.gui.widgets.browser.ListBrowser Raises: None
- create_asset_browser()[source]¶
Create the asset browser
This creates a list browser for assets and adds it to the ui
Returns: the created borwser Return type: jukeboxcore.gui.widgets.browser.ListBrowser Raises: None
- create_ver_browser(layout)[source]¶
Create a version browser and insert it into the given layout
Parameters: layout (QLayout) – the layout to insert the browser into Returns: the created browser Return type: jukeboxcore.gui.widgets.browser.ComboBoxBrowser Raises: None
- create_comment_browser(layout)[source]¶
Create a comment browser and insert it into the given layout
Parameters: layout (QLayout) – the layout to insert the browser into Returns: the created browser Return type: jukeboxcore.gui.widgets.browser.ListBrowser Raises: None
- create_current_pb()[source]¶
Create a push button and place it in the corner of the tabwidget
Returns: the created button Return type: QtGui.QPushButton Raises: None
- create_prj_model()[source]¶
Create and return a tree model that represents a list of projects
Returns: the creeated model Return type: jukeboxcore.gui.treemodel.TreeModel Raises: None
- create_shot_model(project, releasetype)[source]¶
Create and return a new tree model that represents shots til descriptors
The tree will include sequences, shots, tasks and descriptors of the given releaetype.
Parameters: - releasetype (djadapter.RELEASETYPES) – the releasetype for the model
- project (djadapter.models.Project) – the project of the shots
Returns: the created tree model
Return type: Raises: None
- create_asset_model(project, releasetype)[source]¶
Create and return a new tree model that represents assets til descriptors
The tree will include assettypes, assets, tasks and descriptors of the given releaetype.
Parameters: - releasetype (djadapter.RELEASETYPES) – the releasetype for the model
- project (djadapter.models.Project) – the project of the assets
Returns: the created tree model
Return type: Raises: None
- create_version_model(task, releasetype, descriptor)[source]¶
Create and return a new model that represents taskfiles for the given task, releasetpye and descriptor
Parameters: - task (djadapter.models.Task) – the task of the taskfiles
- releasetype (str) – the releasetype
- descriptor (str|None) – the descirptor
Returns: the created tree model
Return type: Raises: None
- releasetype_btn_toggled(checked)[source]¶
Callback for when a certain releasetype is toggled
If the button is checked, update browsers
Parameters: checked (bool) – the state of the button Returns: None Return type: None Raises: None
- update_shot_browser(project, releasetype)[source]¶
Update the shot browser to the given project
Parameters: - releasetype (djadapter.RELEASETYPES) – the releasetype for the model
- project (djadapter.models.Project) – the project of the shots
Returns: None
Return type: None
Raises: None
- update_asset_browser(project, releasetype)[source]¶
update the assetbrowser to the given project
Parameters: - releasetype (djadapter.RELEASETYPES) – the releasetype for the model
- project (djadapter.models.Project) – the project of the assets
Returns: None
Return type: None
Raises: None
- update_browsers(*args, **kwargs)[source]¶
Update the shot and the assetbrowsers
Returns: None Return type: None Raises: None
- update_version_descriptor(task, releasetype, descriptor, verbrowser, commentbrowser)[source]¶
Update the versions in the given browser
Parameters: - task (djadapter.models.Task | None) – the task of the taskfiles
- releasetype (str|None) – the releasetype
- descriptor (str|None) – the descirptor
- verbrowser (jukeboxcore.gui.widgets.browser.AbstractTreeBrowser) – the browser to update (the version browser)
- commentbrowser (jukeboxcore.gui.widgets.browser.AbstractTreeBrowser) – the comment browser to update
Returns: None
Return type: None
Raises: None
- selection_changed(index, source, update, commentbrowser, mapper)[source]¶
Callback for when the asset or shot browser changed its selection
Parameters: - index (QtCore.QModelIndex) – the modelindex with the descriptor tree item as internal data
- source (jukeboxcore.gui.widgets.browser.AbstractTreeBrowser) – the shot or asset browser to that changed its selection
- update (jukeboxcore.gui.widgets.browser.AbstractTreeBrowser) – the browser to update
- browser (jukeboxcore.gui.widgets.browser.AbstractTreeBrowser) – the comment browser to update
- mapper (QtGui.QDataWidgetMapper) – the data widget mapper to update
Returns: None
Return type: None
Raises: None
- set_info_mapper_model(mapper, model)[source]¶
Set the model for the info mapper
Parameters: - mapper (QtGui.QDataWidgetMapper) – the mapper to update
- model (QtGui.QAbstractItemModel | None) – The model to set
Returns: None
Return type: None
Raises: None
- set_mapper_index(index, mapper)[source]¶
Set the mapper to the given index
Parameters: - index (QtCore.QModelIndex) – the index to set
- mapper (QtGui.QDataWidgetMapper) – the mapper to set
Returns: None
Return type: None
Raises: None
- get_releasetype()[source]¶
Return the currently selected releasetype
Returns: the selected releasetype Return type: str Raises: None
- asset_ver_sel_changed(index)[source]¶
Callback for when the version selection has changed
Emit asset_taskfile_sel_changed signal.
Parameters: index (QtCore.QModelIndex) – the selected index Returns: None Return type: None Raises: None
- shot_ver_sel_changed(index)[source]¶
Callback for when the version selection has changed
Emit shot_taskfile_sel_changed signal.
Parameters: index (QtCore.QModelIndex) – the selected index Returns: None Return type: None Raises: None
- set_to_current()[source]¶
Set the selection to the currently open one
Returns: None Return type: None Raises: None
- set_selection(taskfile)[source]¶
Set the selection to the given taskfile
Parameters: taskfile (djadapter.models.TaskFile) – the taskfile to set the selection to Returns: None Return type: None Raises: None
- set_project(project)[source]¶
Set the project selection to the given project
Parameters: project (djadapter.models.Project) – the project to select Returns: None Return type: None Raises: ValueError
- set_releasetype(releasetype)[source]¶
Set the releasetype to either work or release
Parameters: releasetype (djadapter.RELEASETYPES) – the release type to set Returns: None Return type: None Raises: None
- set_level(browser, lvl, obj)[source]¶
Set the given browser level selection to the one that matches with obj
This is going to compare the internal_data of the model with the obj
Parameters: Returns: None
Return type: None
Raises: None
Set the banner labels pixmap to the project banner
Parameters: project (djadapter.models.Project | None) – the project with the banner Returns: None Return type: None Raises: None
- update_model(tfi)[source]¶
Update the model for the given tfi
Parameters: tfi (TaskFileInfo) – taskfile info Returns: None Return type: None Raises: None
- open_asset_path(*args, **kwargs)[source]¶
Open the currently selected asset in the filebrowser
Returns: None Return type: None Raises: None
- open_shot_path(*args, **kwargs)[source]¶
Open the currently selected shot in the filebrowser
Returns: None Return type: None Raises: None
- staticMetaObject = <PySide.QtCore.QMetaObject object at 0x000000000505E9C8>¶