WIP: Make CuraPackageManager aggregate PluginRegistry data

CURA-4644
This commit is contained in:
Lipu Fei 2018-04-12 15:19:18 +02:00
parent f510603cb5
commit 0f966115e6
5 changed files with 83 additions and 53 deletions

View file

@ -4,10 +4,12 @@
import re
from typing import Dict
from PyQt5.QtCore import Qt, pyqtProperty, pyqtSignal
from PyQt5.QtCore import Qt, pyqtProperty
from UM.Application import Application
from UM.Qt.ListModel import ListModel
## Model that holds cura packages. By setting the filter property the instances held by this model can be changed.
class PackagesModel(ListModel):
IdRole = Qt.UserRole + 1
@ -40,7 +42,7 @@ class PackagesModel(ListModel):
self.addRoleName(PackagesModel.LastUpdatedRole, "last_updated")
# List of filters for queries. The result is the union of the each list of results.
self._filter = {} # type: Dict[str,str]
self._filter = {} # type: Dict[str, str]
def setMetadata(self, data):
self._metadata = data