Refactor the plugin to use the new composite plugin model introduced in DMS 1.5.0.
Current Hacky Pattern
- Uses
type: "daemon" with capabilities: ["control-center"].
- Uses
readonly property bool isDaemonInstance: root.parent !== null in QuickCaptureWidget.qml because the component gets loaded multiple times (once as daemon, once as widget).
- Relies on
PluginService.pluginInstances["quickCapture"] to delegate capture events from widget to the daemon.
Planned Changes
- Update
plugin.json to:
"type": "composite",
"components": {
"daemon": "./QuickCaptureDaemon.qml",
"widget": "./QuickCaptureWidget.qml"
},
"requires_dms": ">=1.5.0"
- Create
QuickCaptureDaemon.qml to handle background timers, process executions, and screenshot controls.
- Keep
QuickCaptureWidget.qml strictly for UI elements, calling the daemon functions directly.
Refactor the plugin to use the new composite plugin model introduced in DMS 1.5.0.
Current Hacky Pattern
type: "daemon"withcapabilities: ["control-center"].readonly property bool isDaemonInstance: root.parent !== nullinQuickCaptureWidget.qmlbecause the component gets loaded multiple times (once as daemon, once as widget).PluginService.pluginInstances["quickCapture"]to delegate capture events from widget to the daemon.Planned Changes
plugin.jsonto:QuickCaptureDaemon.qmlto handle background timers, process executions, and screenshot controls.QuickCaptureWidget.qmlstrictly for UI elements, calling the daemon functions directly.