Changeset View
Changeset View
Standalone View
Standalone View
daemon/actions/bundled/handlebuttonevents.cpp
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
69 | connect(globalAction, SIGNAL(triggered(bool)), SLOT(suspendToDisk())); | 69 | connect(globalAction, SIGNAL(triggered(bool)), SLOT(suspendToDisk())); | ||
70 | 70 | | |||
71 | globalAction = actionCollection->addAction("PowerOff"); | 71 | globalAction = actionCollection->addAction("PowerOff"); | ||
72 | globalAction->setText(i18nc("@action:inmenu Global shortcut", "Power Off")); | 72 | globalAction->setText(i18nc("@action:inmenu Global shortcut", "Power Off")); | ||
73 | accel->setGlobalShortcut(globalAction, Qt::Key_PowerOff); | 73 | accel->setGlobalShortcut(globalAction, Qt::Key_PowerOff); | ||
74 | connect(globalAction, SIGNAL(triggered(bool)), SLOT(powerOffButtonTriggered())); | 74 | connect(globalAction, SIGNAL(triggered(bool)), SLOT(powerOffButtonTriggered())); | ||
75 | 75 | | |||
76 | globalAction = actionCollection->addAction("PowerDown"); | 76 | globalAction = actionCollection->addAction("PowerDown"); | ||
77 | globalAction->setText(i18nc("@action:inmenu Global shortcut", "Power Down")); | 77 | globalAction->setText(i18nc("@action:inmenu Global shortcut, used for long presses of the power button", "Power Down")); | ||
78 | accel->setGlobalShortcut(globalAction, Qt::Key_PowerDown); | 78 | accel->setGlobalShortcut(globalAction, Qt::Key_PowerDown); | ||
79 | connect(globalAction, &QAction::triggered, this, &HandleButtonEvents::powerDownButtonTriggered); | 79 | connect(globalAction, &QAction::triggered, this, &HandleButtonEvents::powerDownButtonTriggered); | ||
80 | 80 | | |||
81 | connect(new KScreen::GetConfigOperation(KScreen::GetConfigOperation::NoEDID), &KScreen::ConfigOperation::finished, | 81 | connect(new KScreen::GetConfigOperation(KScreen::GetConfigOperation::NoEDID), &KScreen::ConfigOperation::finished, | ||
82 | this, [this](KScreen::ConfigOperation *op) { | 82 | this, [this](KScreen::ConfigOperation *op) { | ||
83 | m_screenConfiguration = qobject_cast<KScreen::GetConfigOperation *>(op)->config(); | 83 | m_screenConfiguration = qobject_cast<KScreen::GetConfigOperation *>(op)->config(); | ||
84 | checkOutputs(); | 84 | checkOutputs(); | ||
85 | 85 | | |||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |