Commit cae6d4e6 authored by Samuel GAIST's avatar Samuel GAIST Committed by Samuel GAIST
Browse files

[widgets][dataformateditor] Use new DataFormatModel

parent 144af3d7
......@@ -30,8 +30,7 @@ import pytest
from PyQt5 import QtCore
from PyQt5.QtWidgets import QInputDialog
from ..backend.asset import AssetType
from ..backend.assetmodel import AssetModel
from ..backend.assetmodel import DataFormatModel
from ..widgets.dataformateditor import DataformatArrayWidget
from ..widgets.dataformateditor import DataformatEditor
from ..widgets.dataformateditor import DataformatObjectWidget
......@@ -42,8 +41,8 @@ from ..widgets.dataformateditor import default_object_dataformat
@pytest.fixture()
def dataformat_model(test_prefix):
asset_model = AssetModel()
asset_model.asset_type = AssetType.DATAFORMAT
asset_model = DataFormatModel()
asset_model.full_list_enabled = True
asset_model.prefix_path = test_prefix
return asset_model
......
......@@ -40,7 +40,7 @@ from PyQt5.QtWidgets import QVBoxLayout
from PyQt5.QtWidgets import QWidget
from ..backend.asset import AssetType
from ..backend.assetmodel import AssetModel
from ..backend.assetmodel import DataFormatModel
from ..decorators import frozen
from ..utils import dataformat_basetypes
from .editor import AbstractAssetEditor
......@@ -179,7 +179,7 @@ class DataformatWidget(DataformatBaseWidget):
def __init__(self, dataformat_model, parent=None):
"""Constructor
:param dataformat_model AssetModel: model containing the list of
:param dataformat_model DataFormatModel: model containing the list of
available dataformats
:param parent QWidget: parent of this widget
"""
......@@ -220,7 +220,7 @@ class DataformatObjectWidget(DataformatBaseWidget):
def __init__(self, dataformat_model, parent=None):
"""Constructor
:param dataformat_model AssetModel: model containing the list of
:param dataformat_model DataFormatModel: model containing the list of
available dataformats
:param parent QWidget: parent of this widget
"""
......@@ -393,7 +393,7 @@ class DataformatArrayWidget(DataformatBaseWidget):
def __init__(self, dataformat_model, parent=None):
"""Constructor
:param dataformat_model AssetModel: model containing the list of available dataformats
:param dataformat_model DataFormatModel: model containing the list of available dataformats
:param parent QWidget: parent of this widget
"""
......@@ -556,8 +556,8 @@ class DataformatEditor(AbstractAssetEditor):
self.setObjectName(self.__class__.__name__)
self.set_title(self.tr("Dataformat"))
self.dataformat_model = AssetModel()
self.dataformat_model.asset_type = AssetType.DATAFORMAT
self.dataformat_model = DataFormatModel()
self.dataformat_model.full_list_enabled = True
self.extends_label = QLabel()
self._add_information_widget(self.tr("Extends"), self.extends_label)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment