mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 16:27:51 -06:00
Set non-NOTIFY properties to constants
This commit is contained in:
parent
9d53a31ec1
commit
0e44a78251
1 changed files with 6 additions and 5 deletions
|
@ -1,7 +1,8 @@
|
||||||
|
# Copyright (c) 2018 Ultimaker B.V.
|
||||||
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtSignal, pyqtProperty, QObject, pyqtSlot
|
from PyQt5.QtCore import pyqtSignal, pyqtProperty, QObject, pyqtSlot
|
||||||
|
|
||||||
|
|
||||||
class ConfigurationChangeModel(QObject):
|
class ConfigurationChangeModel(QObject):
|
||||||
def __init__(self, type_of_change: str, index: int, target_name: str, origin_name: str) -> None:
|
def __init__(self, type_of_change: str, index: int, target_name: str, origin_name: str) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
@ -11,20 +12,20 @@ class ConfigurationChangeModel(QObject):
|
||||||
self._target_name = target_name
|
self._target_name = target_name
|
||||||
self._origin_name = origin_name
|
self._origin_name = origin_name
|
||||||
|
|
||||||
@pyqtProperty(int)
|
@pyqtProperty(int, constant = True)
|
||||||
def index(self) -> int:
|
def index(self) -> int:
|
||||||
return self._index
|
return self._index
|
||||||
# "target_id": fields.String(required=True, description="Target material guid or hotend id"),
|
# "target_id": fields.String(required=True, description="Target material guid or hotend id"),
|
||||||
# "origin_id": fields.String(required=True, description="Original/current material guid or hotend id"),
|
# "origin_id": fields.String(required=True, description="Original/current material guid or hotend id"),
|
||||||
|
|
||||||
@pyqtProperty(str)
|
@pyqtProperty(str, constant = True)
|
||||||
def typeOfChange(self) -> str:
|
def typeOfChange(self) -> str:
|
||||||
return self._type_of_change
|
return self._type_of_change
|
||||||
|
|
||||||
@pyqtProperty(str)
|
@pyqtProperty(str, constant = True)
|
||||||
def targetName(self) -> str:
|
def targetName(self) -> str:
|
||||||
return self._target_name
|
return self._target_name
|
||||||
|
|
||||||
@pyqtProperty(str)
|
@pyqtProperty(str, constant = True)
|
||||||
def originName(self) -> str:
|
def originName(self) -> str:
|
||||||
return self._origin_name
|
return self._origin_name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue