55 lines
1.9 KiB
JSON
55 lines
1.9 KiB
JSON
|
{
|
||
|
"name": "RetainableLock",
|
||
|
"module": "Quickshell",
|
||
|
"type": "class",
|
||
|
"super": {
|
||
|
"type": "qt",
|
||
|
"module": "qml.QtQml",
|
||
|
"name": "QtObject"
|
||
|
},
|
||
|
"description": "A helper for easily using Retainable.",
|
||
|
"details": "A RetainableLock provides extra safety and ease of use for locking\n{{< qmltypelink type=\"local\" module=\"Quickshell\" name=\"Retainable\" mtype=\"\" mname=\"\" >}} objects. A retainable object can be locked by multiple\nlocks at once, and each lock re-exposes relevant properties\nof the retained objects.\n\n#### Example\nThe code below will keep a retainable object alive for as long as the\nRetainableLock exists.\n\n```qml\nRetainableLock {\n object: aRetainableObject\n locked: true\n}\n```\n",
|
||
|
"properties": {
|
||
|
"object": {
|
||
|
"type": {
|
||
|
"type": "qt",
|
||
|
"module": "qml.QtQml",
|
||
|
"name": "QtObject"
|
||
|
},
|
||
|
"details": "The object to lock. Must be {{< qmltypelink type=\"local\" module=\"Quickshell\" name=\"Retainable\" mtype=\"\" mname=\"\" >}}.\n"
|
||
|
},
|
||
|
"retained": {
|
||
|
"type": {
|
||
|
"type": "qt",
|
||
|
"module": "qml",
|
||
|
"name": "bool"
|
||
|
},
|
||
|
"details": "If the object is currently in a retained state.\n",
|
||
|
"flags": [
|
||
|
"readonly"
|
||
|
]
|
||
|
},
|
||
|
"locked": {
|
||
|
"type": {
|
||
|
"type": "qt",
|
||
|
"module": "qml",
|
||
|
"name": "bool"
|
||
|
},
|
||
|
"details": "If the object should be locked.\n"
|
||
|
}
|
||
|
},
|
||
|
"functions": [],
|
||
|
"signals": {
|
||
|
"aboutToDestroy": {
|
||
|
"name": "aboutToDestroy",
|
||
|
"details": "Rebroadcast of the object's {{< qmltypelink type=\"local\" module=\"Quickshell\" name=\"Retainable\" mtype=\"signal\" mname=\"aboutToDestroy\" >}}.\n",
|
||
|
"params": []
|
||
|
},
|
||
|
"dropped": {
|
||
|
"name": "dropped",
|
||
|
"details": "Rebroadcast of the object's {{< qmltypelink type=\"local\" module=\"Quickshell\" name=\"Retainable\" mtype=\"signal\" mname=\"dropped\" >}}.\n",
|
||
|
"params": []
|
||
|
}
|
||
|
},
|
||
|
"variants": {}
|
||
|
}
|