def refreshlistView(self):
     self.listView.clear()
     clients = KListViewItem(self.listView, 'clients')
     rows = self.db.mcursor.select(fields=['clientid', 'client'], table='clients')
     for row in rows:
         c = KListViewItem(clients, row['client'])
         c.clientid = row.clientid
 def initlistView(self):
     self.listView.addColumn('client')
     self.listView.setRootIsDecorated(True)
     clients = KListViewItem(self.listView, 'clients')
     rows = self.db.mcursor.select(fields=['clientid', 'client'], table='clients')
     for row in rows:
         c = KListViewItem(clients, row['client'])
         c.clientid = row.clientid
 def refreshlistView(self):
     self.listView.clear()
     all = KListViewItem(self.listView, 'all')
     client = KListViewItem(self.listView, 'client')
     rows = self.db.select(fields=['clientid', 'client'], table='clients')
     for row in rows:
         c = KListViewItem(client, row.client)
         c.clientid = row.clientid
     unassigned = KListViewItem(self.listView, 'unassigned')
 def refreshlistView(self):
     self.listView.clear()
     all = KListViewItem(self.listView, 'all')
     status = KListViewItem(self.listView, 'status')
     rows = self.db.select(table='trouble_status')
     for row in rows:
         s = KListViewItem(status, row.status)
         s.status = row.status
     client = KListViewItem(self.listView, 'client')
     sel = self.db.stmt.select(fields=['clientid'], table='troubles',
                          clause=Neq('status', 'done'))
     clause = In('clientid', sel)
     rows = self.db.select(fields=['clientid', 'client'], table='clients',
                           clause=clause)
     for row in rows:
         c = KListViewItem(client, row.client)
         c.clientid = row.clientid
     magnet = KListViewItem(self.listView, 'magnet')
     for m in self.manager.getUsedMagnets():
         item = KListViewItem(magnet, m)
         item.magnet = m
     untouched = KListViewItem(self.listView, 'untouched')
     statreport = KListViewItem(self.listView, 'status report')