|
mutterkey
KDE-first push-to-talk transcription tool for KDE Plasma
|
Coordinates the daemon-mode push-to-talk workflow. More...
#include <service.h>
Signals | |
| void | transcriptionReady (const QString &text) |
| Emitted when a transcription result has been copied successfully. | |
| void | transcriptionFailed (const RuntimeError &error) |
| Emitted when recording or transcription fails. | |
Public Member Functions | |
| MutterkeyService (const AppConfig &config, std::shared_ptr< const TranscriptionEngine > transcriptionEngine, QClipboard *clipboard, QObject *parent=nullptr) | |
| Creates the service with a fixed runtime configuration. | |
| ~MutterkeyService () override | |
| Stops background work and joins the transcription thread. | |
| bool | start (QString *errorMessage=nullptr) |
| Starts the hotkey, worker thread, and optional backend warmup. | |
| void | stop () |
| Stops recording, hotkey registration, and background transcription. | |
| QJsonObject | diagnostics () const |
Returns current service diagnostics for diagnose mode. | |
| bool | invokeShortcut (QString *errorMessage=nullptr) |
| Invokes the registered shortcut action for diagnostics. | |
Coordinates the daemon-mode push-to-talk workflow.
The service owns the recorder, clipboard writer, hotkey manager, and a dedicated transcription thread. The worker object itself lives on the transcription thread, while this service stays on the main thread and coordinates cross-thread requests through Qt signal and slot delivery.
|
explicit |
Creates the service with a fixed runtime configuration.
| config | Startup configuration snapshot copied into the service. |
| transcriptionEngine | Shared immutable engine used by the worker thread. |
| clipboard | Non-owning pointer to the application clipboard. |
| parent | Optional QObject parent. |
| QJsonObject MutterkeyService::diagnostics | ( | ) | const |
Returns current service diagnostics for diagnose mode.
| bool MutterkeyService::invokeShortcut | ( | QString * | errorMessage = nullptr | ) |
Invokes the registered shortcut action for diagnostics.
| errorMessage | Optional output for invocation failures. |
true when invocation was dispatched. | bool MutterkeyService::start | ( | QString * | errorMessage = nullptr | ) |
Starts the hotkey, worker thread, and optional backend warmup.
| errorMessage | Optional output for startup failures. |
true when the service reached a running state.
|
signal |
Emitted when recording or transcription fails.
| error | Structured failure description. |
|
signal |
Emitted when a transcription result has been copied successfully.
| text | Final transcribed text. |