Permission
Base classes
| Name |
Children |
Inherits |
QPermission PySide6.QtCore QPermission(self, /) -> None |
|
|
⋔ Inheritance diagram
graph TD
249695062["core.Permission"]
3684004584["QtCore.QPermission"]
37984305["Shiboken.Object"]
2751680898["builtins.object"]
3684004584 --> 249695062
37984305 --> 3684004584
2751680898 --> 37984305
🛈 DocStrings
Bases: QPermission
Opaque wrapper of a typed permission.
Source code in prettyqt/core/permission.py
| class Permission(core.QPermission):
"""Opaque wrapper of a typed permission."""
def __repr__(self):
return get_repr(self, self.get_status())
def get_status(self) -> constants.PermissionStatusStr:
"""Return current permission status.
Returns:
permission status
"""
return constants.PERMISSION_STATUS.inverse[self.status()]
def get_type(self) -> core.MetaType:
"""Return the meta-type of the wrapped permission.
Returns:
permission meta-type
"""
return core.MetaType(self.type().id())
|
get_status() -> constants.PermissionStatusStr
Return current permission status.
Source code in prettyqt/core/permission.py
| def get_status(self) -> constants.PermissionStatusStr:
"""Return current permission status.
Returns:
permission status
"""
return constants.PERMISSION_STATUS.inverse[self.status()]
|
get_type() -> core.MetaType
Return the meta-type of the wrapped permission.
Source code in prettyqt/core/permission.py
| def get_type(self) -> core.MetaType:
"""Return the meta-type of the wrapped permission.
Returns:
permission meta-type
"""
return core.MetaType(self.type().id())
|
:fa-brands-github: Show source on GitHub