mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
modify tasks widget to use different models
This commit is contained in:
parent
258dfbffd9
commit
cde8c69cba
1 changed files with 18 additions and 0 deletions
|
|
@ -5,12 +5,15 @@ from Qt import QtWidgets, QtCore, QtGui
|
|||
from avalon.vendor import qtawesome
|
||||
|
||||
from openpype.tools.flickcharm import FlickCharm
|
||||
from openpype.tools.utils.tasks_widget import TasksWidget
|
||||
|
||||
from .delegates import ActionDelegate
|
||||
from . import lib
|
||||
from .models import (
|
||||
ActionModel,
|
||||
ProjectModel,
|
||||
LauncherTaskModel,
|
||||
LauncherTasksProxyModel
|
||||
)
|
||||
from .constants import (
|
||||
ACTION_ROLE,
|
||||
|
|
@ -84,6 +87,21 @@ class ProjectBar(QtWidgets.QWidget):
|
|||
self._launcher_model.set_project_name(project_name)
|
||||
|
||||
|
||||
class LauncherTaskWidget(TasksWidget):
|
||||
def __init__(self, launcher_model, *args, **kwargs):
|
||||
self._launcher_model = launcher_model
|
||||
|
||||
super(LauncherTaskWidget, self).__init__(*args, **kwargs)
|
||||
|
||||
def _create_source_model(self):
|
||||
return LauncherTaskModel(self._launcher_model, self._dbcon)
|
||||
|
||||
def _create_proxy_model(self, source_model):
|
||||
proxy = LauncherTasksProxyModel(self._launcher_model)
|
||||
proxy.setSourceModel(source_model)
|
||||
return proxy
|
||||
|
||||
|
||||
class ActionBar(QtWidgets.QWidget):
|
||||
"""Launcher interface"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue