Beispiel #1
0
    def __init__(self, settings):

        QAbstractListModel.__init__(self)
        self.settings = settings

        self._nameList = list()
        self.load()
Beispiel #2
0
    def __init__(self, displayTag="name", parent=None):
        self.displayTag = displayTag
        QAbstractListModel.__init__(self, parent)
        self._objects = []

        self.rowsInserted.connect(self.lengthChanged)
        self.rowsRemoved.connect(self.lengthChanged)
Beispiel #3
0
    def __init__(self, settings):

        QAbstractListModel.__init__(self)
        self.settings = settings

        self._data = []
        self.load()
Beispiel #4
0
    def __init__(self, kraj, filename=None):

        QAbstractListModel.__init__(self)
        self.okresy_list = []
        self.ktery_kraj = kraj
        self.zaloha = []
        if filename:
            self.load_from_json(filename)
Beispiel #5
0
    def __init__(self):
        QAbstractListModel.__init__(self)

        # self.__effects_count = 3
        self.__effect_ids = local_effects.keys()
        self.__order = dict(enumerate(local_effects.keys()))
        global patch_bay_singleton
        patch_bay_singleton = self
Beispiel #6
0
 def __init__(self, na_manager: QNetworkAccessManager):
     QAbstractListModel.__init__(self)
     self.vehicle_list = []
     self.na_manager = na_manager
     self.na_manager.finished[QNetworkReply].connect(self.download_finished)
     self.timer = QTimer()
     self.timer.setInterval(UPDATE_INTERVAL)
     self.timer.timeout.connect(self.start_download)
     self.timer.start()
Beispiel #7
0
    def __init__(self, parent=None):

        QAbstractListModel.__init__(self, parent)
        # holds a list of all topic objects referenced by the "relatedTopics"
        # list inside the current topic object `topic`
        self.relTopics = list()
        """ List of instances of `Topic` that are specified as related to
        `self.topic` """
        self.topic = None
        """ Current topic to which the related topics shall be displayed. """
Beispiel #8
0
    def __init__(self):
        QAbstractListModel.__init__(self)
        self.__cpu_count = psutil.cpu_count()
        self.__cpu_load = [0] * self.__cpu_count
        self.__update_timer = QTimer(self)
        self.__update_timer.setInterval(1000)
        self.__update_timer.timeout.connect(self.__update)
        self.__update_timer.start()
        # The first call returns invalid data

        psutil.cpu_percent(percpu=True)
Beispiel #9
0
    def __init__(self, parent=None):
        '''
        Initialisation of board. Creates todo list as well as populates it.
        '''

        QAbstractListModel.__init__(self, parent)

        self.mydb = SQLDatabase.get_db_instance()
        self.cursor = self.mydb.cursor()

        self._todos = []
        self.refresh_todos_list()
    def __init__(self, parent=None):

        QAbstractListModel.__init__(self, parent)

        self.size = QSize(100, 100)
        """ Size of an icon """
        self.currentTopic = None
        """ Currently open topic """
        self.snapshotList = []
        """ List of the snapshot files """
        self.snapshotImgs = []
        """ Buffer of the already loaded images """
Beispiel #11
0
 def __init__(self):
     QAbstractListModel.__init__(self)
     
     self.__cpu_count = psutil.cpu_count()
     self.__cpu_load = [0] * self.__cpu_count
     
     self.__update_timer = QTimer(self)
     self.__update_timer.setInterval(1000)
     self.__update_timer.timeout.connect(self.__update)
     self.__update_timer.start()
     
     # The first call returns invalid data
     psutil.cpu_percent(percpu=True)
Beispiel #12
0
 def __init__(self, filename=None):
     QAbstractListModel.__init__(self)
     self.city_list = []
     self.kraje_list = []
     self.obce_list = []
     self.okres_v = None
     self.dolnimez = 0
     self.hornimez = 1400000
     self.mesta = False
     self.obce = False
     self.vybranyokres = None
     self.vybranykraj = None
     if filename:
         self.load_from_json(filename)
Beispiel #13
0
    def __init__(self, snapshotModel, parent=None):

        QAbstractListModel.__init__(self, parent=None)
        self.viewpoints = []
        """ List of instances of `ViewpointReference` """
        # used to retrieve the snapshot icons.
        self.snapshotModel = snapshotModel
        """ Reference to SnapshotModel used to retrieve icons of the snapshots
        """

        # set up the sizes and offsets
        self._iconQSize = None
        """ Size in pixels """
        self._iconSize = QSize(10, 10)
        """ Size in millimeters """
        self.calcSizes()
Beispiel #14
0
    def __init__(self):
        QAbstractListModel.__init__(self)

        self.__rows = 16  # 行数
        self.__cols = 30  # 列数
        self.__minesCount = 99  # 总地雷数
        self.count_opened = 0  # 揭开的块的总数
        self.markedCount = 0  # 已经标记地雷的总数
        self.gameStatus = 0  # 游戏状态 0:等待,1:正在进行,2:成功,3:引爆了

        self.__table = []  # * (self.__cols * self.__rows)
        for i in range(self.__rows * self.__cols):
            self.__table.append({
                'mineflag': False,
                'openedflag': False,
                'mark': "",
                'minesaround': 0
            })
            item = QStandardItem(i, 0)
            item.setFlags(item.flags() | Qt.ItemIsEditable)
Beispiel #15
0
 def __init__(self):
     QAbstractListModel.__init__(self)
 def __init__(self,data,tablemodel,fileList ,parent=None):
     QAbstractListModel.__init__(self, parent)
     self.metadataList = fileList
     self.tablemodel = tablemodel
Beispiel #17
0
 def __init__(self):
     QAbstractListModel.__init__(self)
     self._items = SortedDict()
Beispiel #18
0
 def __init__(self):
     QAbstractListModel.__init__(self)
     self._itemlist = []
Beispiel #19
0
 def __init__(self, parent = None):
     QAbstractListModel.__init__(self, parent)
     self._data = []
Beispiel #20
0
    def __init__(self):

        QAbstractListModel.__init__(self)
        self.updateTopics()
        self.items = []
Beispiel #21
0
 def __init__(self, parent=None):
     QAbstractListModel.__init__(self, parent)
     self._items = []
Beispiel #22
0
 def __init__(self, parent=None):
     QAbstractListModel.__init__(self, parent)
     self.addons = []
Beispiel #23
0
 def __init__(self):
     QAbstractListModel.__init__(self)
     self.setRoleNames({0: 'pysideModelData'})
Beispiel #24
0
 def __init__(self, parent=None):
     QAbstractListModel.__init__(self, parent)
     self.readFromFile("content.txt")
    def __init__(self, parent=None):
        QAbstractListModel.__init__(self, parent)

        self._data_series = list()
        self._length_data = 0
Beispiel #26
0
    def __init__(self, parent = None):
        QAbstractListModel.__init__(self, parent)

        self.m_objects = []
Beispiel #27
0
 def __init__(self, filename=None):
     QAbstractListModel.__init__(self)
     self.kraje_list = []
     self.ktery_kraj = None
     if filename:
         self.load_from_json(filename)
Beispiel #28
0
 def __init__(self, parent=None):
     QAbstractListModel.__init__(self, parent)
     self.obj = MyObject()
     self.obj.setObjectName(object_name)
    def __init__(self, parent=None):

        QAbstractListModel.__init__(self, parent)
        self.items = []
        self.currentTopic = None
Beispiel #30
0
 def __init__(self, hyperthoughtimpl, parent=None):
     QAbstractListModel.__init__(self, parent)
     self.hyperthoughtimpl = hyperthoughtimpl
     self.directoryList = []
     self.uuidList = []
 def __init__(self,filename=None):
     """Initialize and load list from given file"""
     QAbstractListModel.__init__(self)
     self.city_list = []
     if filename:
         self.load_from_json(filename)
Beispiel #32
0
 def __init__(self):
     QAbstractListModel.__init__(self)
     self.setRoleNames({0: 'pysideModelData'})
 def __init__(self, prototype: ListModelItem, parent=None):
     QAbstractListModel.__init__(self, parent)
     self.parent = parent
     self._prototype = prototype
     self._items: List[ListModelItem] = []