mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 20:35:53 +08:00
Add a job name property to CuraApplication
This can be used to store the current job name. Contributes to CURA-183
This commit is contained in:
parent
b29f4176a7
commit
e44297e400
@ -83,6 +83,7 @@ class CuraApplication(QtApplication):
|
||||
self._i18n_catalog = None
|
||||
self._previous_active_tool = None
|
||||
self._platform_activity = False
|
||||
self._job_name = None
|
||||
|
||||
self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged)
|
||||
self.getMachineManager().addMachineRequested.connect(self._onAddMachineRequested)
|
||||
@ -241,6 +242,17 @@ class CuraApplication(QtApplication):
|
||||
self._platform_activity = True if count > 0 else False
|
||||
self.activityChanged.emit()
|
||||
|
||||
@pyqtSlot(str)
|
||||
def setJobName(self, name):
|
||||
if self._job_name != name:
|
||||
self._job_name = name
|
||||
self.jobNameChanged.emit()
|
||||
|
||||
jobNameChanged = pyqtSignal()
|
||||
@pyqtProperty(str, notify = jobNameChanged)
|
||||
def jobName(self):
|
||||
return self._job_name
|
||||
|
||||
## Remove an object from the scene
|
||||
@pyqtSlot("quint64")
|
||||
def deleteObject(self, object_id):
|
||||
|
Loading…
x
Reference in New Issue
Block a user