File: ApplicationInfo.py

package info (click to toggle)
gcompris-qt 26.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 144,692 kB
  • sloc: javascript: 64,854; cpp: 7,375; xml: 1,349; python: 1,310; sh: 584; sql: 236; php: 183; java: 121; perl: 40; ansic: 14; makefile: 7; awk: 6
file content (30 lines) | stat: -rw-r--r-- 822 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# GCompris - ApplicationInfo.py
#
# SPDX-FileCopyrightText: 2021 Johnny Jazeix <jazeix@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later

from PySide6.QtCore import QObject, Property, Signal

class ApplicationInfo(QObject):
    box2DInstalledChanged = Signal()

    def __init__(self, parent=None):
        super().__init__(parent)

        # Initialise the value of the properties.
        self._isBox2DInstalled = True
        self._isMobile = False

    @Property(bool, notify=box2DInstalledChanged)
    def isBox2DInstalled(self):
        return self._isBox2DInstalled

    @isBox2DInstalled.setter
    def isBox2DInstalled(self, isBox2DInstalled):
        self._isBox2DInstalled = isBox2DInstalled

    def createSingleton(self):
        return ApplicationInfo(self)