示例#1
0
 def _setUpRecords(self):
     recbuf = Config.getRecordBuffer()
     if recbuf:
         # recbuf is not a empty list
         for buf in recbuf:
             rdate, rec = buf2record(buf)
             self.addRecord(rdate, rec)
     # set record buffer up to default value a empty list.
     Config.setRecordBuffer(list())
示例#2
0
 def addRecord(self, rdate, baserec):
     if self.isSetup:
         self.rec_m.addItem(rdate, baserec)
         self._checkProjects(rdate, baserec, act="add")
         Config.setDefault(baserec)
     else:
         buf = record2buf(rdate, baserec)
         recbuf = Config.getRecordBuffer()
         recbuf.append(buf)
         Config.setRecordBuffer(recbuf)