File indexing completed on 2024-04-28 05:36:16
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Tomaz Canabrava <tcanabrava@kde.org> 0003 * SPDX-FileCopyrightText: 2023 Jakob Petsovits <jpetso@petsovits.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include <QObject> 0011 0012 #include "powerdevilcore_export.h" 0013 0014 namespace PowerDevil 0015 { 0016 Q_NAMESPACE_EXPORT(POWERDEVILCORE_EXPORT) 0017 Q_CLASSINFO("RegisterEnumClassesUnscoped", "false") 0018 0019 // The flag-style values here are useless: 0020 // Power actions never use more than one at a time, and config combobox option listings can't be 0021 // passed as flags because it's impossible to specify whether NoAction is or isn't included. 0022 enum class PowerButtonAction : uint { 0023 NoAction = 0, 0024 Sleep = 1, 0025 Hibernate = 2, 0026 // Unused = 4, // previously SuspendHybrid - use Sleep + SleepMode::HybridSuspend instead 0027 Shutdown = 8, 0028 PromptLogoutDialog = 16, 0029 LockScreen = 32, 0030 TurnOffScreen = 64, 0031 ToggleScreenOnOff = 128, 0032 }; 0033 Q_ENUM_NS(PowerButtonAction) 0034 0035 enum class SleepMode : uint { 0036 SuspendToRam = 1, 0037 HybridSuspend = 2, 0038 SuspendThenHibernate = 3, 0039 }; 0040 Q_ENUM_NS(SleepMode) 0041 0042 enum class BrightnessControlType : uint { 0043 UnknownBrightnessControl = 0, 0044 Screen = 1, 0045 Keyboard = 2, 0046 }; 0047 Q_ENUM_NS(BrightnessControlType) 0048 0049 } // namespace PowerDevil