File indexing completed on 2024-05-05 03:42:10

0001 #!/usr/bin/python3
0002 # -*- coding: utf-8 -*-
0003 # GCompris - ApplicationInfo.py
0004 #
0005 # SPDX-FileCopyrightText: 2021 Johnny Jazeix <jazeix@gmail.com>
0006 #
0007 # SPDX-License-Identifier: GPL-3.0-or-later
0008 
0009 from PyQt5.QtCore import pyqtProperty, QObject, pyqtSignal
0010 
0011 class ApplicationInfo(QObject):
0012     box2DInstalledChanged = pyqtSignal()
0013 
0014     def __init__(self, parent=None):
0015         super().__init__(parent)
0016 
0017         # Initialise the value of the properties.
0018         self._isBox2DInstalled = True
0019         self._isMobile = False
0020 
0021     @pyqtProperty(bool, notify=box2DInstalledChanged)
0022     def isBox2DInstalled(self):
0023         return self._isBox2DInstalled
0024 
0025     @isBox2DInstalled.setter
0026     def isBox2DInstalled(self, isBox2DInstalled):
0027         self._isBox2DInstalled = isBox2DInstalled
0028 
0029     def createSingleton(self, engine):
0030         return ApplicationInfo(self)