quickshell-web/modules/Quickshell.Services.UPower/UPowerDevice.json
2024-09-28 02:35:19 +03:00

185 lines
4.4 KiB
JSON

{
"name": "UPowerDevice",
"module": "Quickshell.Services.UPower",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "A device exposed through the UPower system service.",
"details": "",
"flags": [
"uncreatable"
],
"properties": {
"type": {
"type": {
"type": "local",
"module": "Quickshell.Services.UPower",
"name": "UPowerDeviceType"
},
"details": "The type of device.\n",
"flags": [
"readonly"
]
},
"healthSupported": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": null,
"flags": [
"readonly"
]
},
"percentage": {
"type": {
"type": "qt",
"module": "qml",
"name": "real"
},
"details": "Current charge level as a percentage.\n\nThis would be equivalent to TYPE99Venergy99Tprop99TYPE / TYPE99VenergyCapacity99Tprop99TYPE.\n",
"flags": [
"readonly"
]
},
"timeToEmpty": {
"type": {
"type": "qt",
"module": "qml",
"name": "real"
},
"details": "Estimated time until the device is fully discharged, in seconds.\n\nWill be set to `0` if charging.\n",
"flags": [
"readonly"
]
},
"energy": {
"type": {
"type": "qt",
"module": "qml",
"name": "real"
},
"details": "Current energy level of the device in watt-hours.\n",
"flags": [
"readonly"
]
},
"state": {
"type": {
"type": "local",
"module": "Quickshell.Services.UPower",
"name": "UPowerDeviceState"
},
"details": "Current state of the device.\n",
"flags": [
"readonly"
]
},
"isPresent": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the power source is present in the bay or slot, useful for hot-removable batteries.\n\nIf the device `type` is not `Battery`, then the property will be invalid.\n",
"flags": [
"readonly"
]
},
"healthPercentage": {
"type": {
"type": "qt",
"module": "qml",
"name": "real"
},
"details": "Health of the device as a percentage of its original health.\n",
"flags": [
"readonly"
]
},
"nativePath": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "Native path of the device specific to your OS.\n",
"flags": [
"readonly"
]
},
"energyCapacity": {
"type": {
"type": "qt",
"module": "qml",
"name": "real"
},
"details": "Maximum energy capacity of the device in watt-hours\n",
"flags": [
"readonly"
]
},
"timeToFull": {
"type": {
"type": "qt",
"module": "qml",
"name": "real"
},
"details": "Estimated time until the device is fully charged, in seconds.\n\nWill be set to `0` if discharging.\n",
"flags": [
"readonly"
]
},
"isLaptopBattery": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the device is a laptop battery or not. Use this to check if your device is a valid battery.\n\nThis will be equivalent to TYPE99Vtype99Tprop99TYPE == Battery && TYPE99VpowerSupply99Tprop99TYPE == true.\n",
"flags": [
"readonly"
]
},
"changeRate": {
"type": {
"type": "qt",
"module": "qml",
"name": "real"
},
"details": "Rate of energy change in watts (positive when charging, negative when discharging).\n",
"flags": [
"readonly"
]
},
"iconName": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "Name of the icon representing the current state of the device, or an empty string if not provided.\n",
"flags": [
"readonly"
]
},
"powerSupply": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the device is a power supply for your computer and can provide charge.\n",
"flags": [
"readonly"
]
}
},
"functions": [],
"signals": {},
"variants": {}
}