当前位置: 首页>>代码示例>>Python>>正文


Python kdeui.KListViewItem类代码示例

本文整理汇总了Python中kdeui.KListViewItem的典型用法代码示例。如果您正苦于以下问题:Python KListViewItem类的具体用法?Python KListViewItem怎么用?Python KListViewItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了KListViewItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: refreshlistView

 def refreshlistView(self):
     self.clear()
     self.setColumnText(1, self.file_type)
     if self.trait is None:
         traits = self.traits.list()
     else:
         traits = [self.trait]
     for trait in traits:
         item = KListViewItem(self, trait)
         item.trait = trait
         # expand tree by default
         item.setOpen(True)
         if self.file_type == 'template':
             for row in self.templates.templates(trait):
                 template_item = KListViewItem(item, str(row.templatefile),
                                               row.template)
                 template_item.trait = trait
                 template_item.row = row
         elif self.file_type == 'script':
             # perhaps we need to make a method to obtain scriptnames
             # in TraitScript object
             for row in self.scripts.cmd.select(clause=Eq('trait', trait), order='script'):
                 script_item = KListViewItem(item, str(row.scriptfile), row.script)
                 script_item.trait = trait
                 script_item.row = row
         else:
             raise ValueError, "unknown file_type %s" % self.file_type
开发者ID:joelsefus,项目名称:paella,代码行数:27,代码来源:differ.py

示例2: refreshlistView

 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
开发者ID:BackupTheBerlios,项目名称:konsultant-svn,代码行数:7,代码来源:main.py

示例3: refreshListView

 def refreshListView(self):
     self.listView.clear()
     cursor = self.app.conn.stmtcursor()
     rows = self.app.guests.get_guest_rows()
     for row in rows:
         name = '%s %s' % (row.firstname, row.lastname)
         item = KListViewItem(self.listView, name)
         item.guestid = row['guestid']
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:8,代码来源:utmainwin.py

示例4: initlistView

 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
开发者ID:BackupTheBerlios,项目名称:konsultant-svn,代码行数:8,代码来源:clientmanager.py

示例5: refreshListView

 def refreshListView(self):
     trait_folder = KListViewItem(self.listView, 'traits')
     for trait in self.trait.get_trait_list():
         item = KListViewItem(trait_folder, trait)
         item.trait = trait
         for widget in ['trait', 'template', 'environ', 'scripts']:
             w = KListViewItem(item, widget)
             w.trait = item.trait
             w.widget = widget
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:9,代码来源:template.py

示例6: refreshlistView

 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')
开发者ID:BackupTheBerlios,项目名称:konsultant-svn,代码行数:9,代码来源:main.py

示例7: selectionChanged

 def selectionChanged(self):
     item = self.etypeView.currentItem()
     etype = item.etype
     self.current_etype = etype
     fields = self.app.db.get_etype_extra_fields(etype)
     self.extfieldsView.clear()
     for field in fields:
         item = KListViewItem(self.extfieldsView, *field)
         item.fieldname = field[0]
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:9,代码来源:etypewin.py

示例8: __init__

 def __init__(self, parent, name='ProfileSelectorDialog'):
     BaseDialogWindow.__init__(self, parent, name=name)
     self.dbox = self.app.make_new_dosbox_object()
     profiles = self.dbox.get_profile_list()
     self.listView = KListView(self)
     self.listView.addColumn('profile')
     self.setMainWidget(self.listView)
     for profile in profiles:
         item = KListViewItem(self.listView, profile)
         item.profile = profile
开发者ID:BackupTheBerlios,项目名称:dosbox-pykde-svn,代码行数:10,代码来源:profile.py

示例9: refreshListView

 def refreshListView(self):
     self.listView.clear()
     gameids = self.handler.get_all_html_ids()
     print 'in initlistView', gameids
     for gameid in gameids:
         #item = KListViewItem(self.listView, str(gameid))
         #item.gameid = gameid
         self.handler.get_game_data(gameid)
         item = KListViewItem(self.listView, self.handler.parser.title)
         item.gameid = gameid
开发者ID:BackupTheBerlios,项目名称:dosbox-pykde-svn,代码行数:10,代码来源:importbrowser.py

示例10: initlistView

 def initlistView(self):
     self.listView.addColumn('group')
     self.listView.setRootIsDecorated(True)
     all = KListViewItem(self.listView, 'all')
     groups = [KListViewItem(self.listView, g) for g in self.groupfields]
     for g, parent in zip(self.groupfields, groups):
         fields = ['distinct %s' % g]
         rows = self.db.mcursor.select(fields=fields, table=self.table, order=g)
         for row in rows:
             item = KListViewItem(parent, row[g])
             item.groupfield = g
开发者ID:BackupTheBerlios,项目名称:konsultant-svn,代码行数:11,代码来源:gui.py

示例11: refreshlistView

 def refreshlistView(self):
     self.listView.clear()
     rows = self.manager.get_users()
     print rows
     print 'helo;'
     users = KListViewItem(self.listView, 'user')
     groups = KListViewItem(self.listView, 'group')
     for row in rows:
         c = KListViewItem(users, row.usename)
         c.userid = row.usesysid
     for row in self.manager.get_groups():
         c = KListViewItem(groups, row.group)
         c.grosysid = row.grosysid
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:13,代码来源:admin.py

示例12: refreshListView

 def refreshListView(self):
     self.listView.clear()
     #cursor = self.app.conn.stmtcursor()
     #rows = self.app.db.get_entities()
     #for row in rows:
     #    item = KListViewItem(self.listView, row['name'])
     #    item.entityid = row['entityid']
     entities = self.app.db.get_entities()
     for entity in entities:
         item = KListViewItem(self.listView, entity.name)
         # we don't need the id anymore
         item.entityid = entity.entityid
         # since we can hold the whole object
         # which will talk to the db as needed
         item.entity = entity
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:15,代码来源:entitywin.py

示例13: refreshlistView

    def refreshlistView(self):
        self.clear()
        if self.ftype == 'template':
            self.setColumnText(1, 'template')
        elif self.ftype == 'script':
            self.setColumnText(1, 'script')

        for trait in self.traits.list():
            item = KListViewItem(self, trait)
            item.trait = trait
            if self.ftype == 'template':
                for row in self.templates.templates(trait):
                    titem = KListViewItem(item, str(row.templatefile), row.template, row.package)
                    titem.trait = trait
                    titem.row = row
            elif self.ftype == 'script':
                for row in self.scripts.cmd.select(clause=Eq('trait', trait), order='script'):
                    sitem = KListViewItem(item, str(row.scriptfile), row.script)
                    sitem.trait = trait
                    sitem.row = row
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:20,代码来源:differ.py

示例14: refreshlistView

 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')
开发者ID:BackupTheBerlios,项目名称:konsultant-svn,代码行数:23,代码来源:main.py

示例15: refreshListView

 def refreshListView(self):
     self.listView.clear()
     for suite in self.suitecursor.get_suites():
         item = KListViewItem(self.listView, suite)
         item.suite = suite
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:5,代码来源:main.py


注:本文中的kdeui.KListViewItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。