mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 05:53:59 -06: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
1 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue