This file gives coding agents the short version of how to work safely in QontrolPanel.
QontrolPanel is a Windows tray application for audio, media, display, power, shortcut, and headset controls. It is built with Qt 6, C++20, QML, CMake, MSVC, vcpkg, hidapi, and a vendored HeadsetControl library.
Read these docs before larger changes:
docs/ARCHITECTURE.mddocs/BUILD.mddocs/HID_DEVICES.mddocs/HEADSETCONTROL_INTEGRATION.md
src/: C++ implementations.include/: C++ headers and QML-facing singleton declarations.qml/: QML UI.qml/Common/: reusable QML controls.qml/SettingsPane/: settings pages.qml/Singletons/: QML-only singletons.resources/: icons, sounds, resource files.i18n/: Qt translation source files.dependencies/headsetcontrol/: vendored HeadsetControl dependency.cmake/: project CMake helpers.tools/: installer and release support.
- Follow existing Qt naming, signal, slot, and singleton patterns.
- Keep Windows API details in C++ managers and bridges.
- Keep QML focused on presentation and binding to bridge properties.
- Do not block the UI thread with device enumeration, monitor brightness work, HID polling, network calls, or slow Windows API calls.
- Prefer adding behavior to an existing bridge/manager when it belongs to that domain.
- Use Qt models for list data shown in QML.
- Update
UserSettingsconsistently when adding settings: property, getter, setter, signal, member, defaults, load, save, and QML binding. - Update translations when adding user-visible strings.
- Keep log messages in a stable untranslated form; do not pass
LOG_*orLogManagermessage text throughtr()orqsTr(). - Keep HeadsetControl protocol/device work inside
dependencies/headsetcontrolunless the change is only QontrolPanel orchestration or UI.
Typical Windows build:
git submodule update --init --recursive
C:\vcpkg\vcpkg install hidapi:x64-windows getopt-win32:x64-windows
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build --config Release
cmake --install build --config ReleaseQt Creator with the MSVC 2022 64-bit kit is also a supported path.
When possible, validate changes with:
- a CMake configure;
- a Release build;
- manual launch from Qt Creator or the installed output;
- affected settings pane interaction;
- real-device validation for audio, HID, display, hotkey, or power behavior.
For documentation-only changes, spelling, links, and consistency with CMakeLists.txt and existing source files are the main checks.
- Windows COM/WMI lifetime in monitor code.
- Hotkey registration and native event filtering.
- Audio session/device enumeration.
- Headset HID writes and polling intervals.
- Single-instance behavior through
QLocalServer. - Translation generation changing
.tsfiles during builds. - Installer and release workflow assumptions.
- Do not rewrite unrelated files.
- Preserve existing line endings when editing human-authored files; this is a Windows app and line-ending churn makes focused reviews harder. Do not normalize generated files unless the task explicitly asks for it.
- Do not update the HeadsetControl submodule unless the task explicitly asks for it.
- Keep dependency and generated-file churn out of focused code changes.
- When updating translations, edit only the
.tsfiles ini18n/;.qmfiles are generated by CI. - Mention any validation that could not be run locally, especially because this app targets Windows.