MCPcopy Create free account
hub / github.com/ckaiser/Lightscreen / connectHotkeys

Method connectHotkeys

lightscreenwindow.cpp:846–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

844}
845
846void LightscreenWindow::connectHotkeys()
847{
848 const QStringList actions = {"screen", "window", "area", "windowPicker", "open", "directory"};
849 QStringList failed;
850 size_t id = Screenshot::WholeScreen;
851
852 for (auto action : actions) {
853 if (settings()->value("actions/" + action + "/enabled").toBool()) {
854 if (!mGlobalHotkeys->registerHotkey(settings()->value("actions/" + action + "/hotkey").toString(), id)) {
855 failed << action;
856 }
857 }
858
859 id++;
860 }
861
862 if (!failed.isEmpty()) {
863 showHotkeyError(failed);
864 }
865}
866
867void LightscreenWindow::createTrayIcon()
868{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected