Esempio n. 1
0
 def handleMetaTable(self, data):
     data.pop(0)  # 忽略表头
     data.sort(key=itemgetter(0))
     x, y = 120, 100
     hInterval = 50
     vInterval = 0
     for row in data:
         if x > 1400:
             x = 120
             y = y + vInterval + 50
             vInterval = 0
         clsitem = Document.create_clsitem(row[1], (x, y))
         w, h = clsitem.get_size()
         x = x + w + hInterval
         if vInterval < h:
             vInterval = h