Skip to content

refactor: support DMS 1.5.0+ composite plugin model #9

@hthienloc

Description

@hthienloc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions