本文整理匯總了Python中kdeui.KListViewItem.differs方法的典型用法代碼示例。如果您正苦於以下問題:Python KListViewItem.differs方法的具體用法?Python KListViewItem.differs怎麽用?Python KListViewItem.differs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kdeui.KListViewItem
的用法示例。
在下文中一共展示了KListViewItem.differs方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: refreshListView
# 需要導入模塊: from kdeui import KListViewItem [as 別名]
# 或者: from kdeui.KListViewItem import differs [as 別名]
def refreshListView(self):
self.listView.clear()
self._refresh_suites()
suite_folder = KListViewItem(self.listView, "suites")
suite_folder.folder = True
for suite in self._suites:
item = KListViewItem(suite_folder, suite)
item.suite = suite
profile_folder = KListViewItem(self.listView, "profiles")
profile_folder.profiles = True
family_folder = KListViewItem(self.listView, "families")
family_folder.families = True
machine_folder = KListViewItem(self.listView, "machines")
machine_folder.machines = True
differ_folder = KListViewItem(self.listView, "differs")
differ_folder.differs = True
differ_folder.folder = True
for dtype in ["trait", "family"]:
item = KListViewItem(differ_folder, dtype)
item.dtype = dtype
environ_folder = KListViewItem(self.listView, "environ")
environ_folder.environ = True
environ_folder.folder = True
for etype in ["default", "current"]:
item = KListViewItem(environ_folder, etype)
item.etype = etype
# installer widget is still unimplemented
if False:
installer_folder = KListViewItem(self.listView, "installer")
installer_folder.installer = True
if self.app.cfg.getboolean("management_gui", "client_widget"):
clients_folder = KListViewItem(self.listView, "clients")
clients_folder.clients = True
示例2: refreshListView
# 需要導入模塊: from kdeui import KListViewItem [as 別名]
# 或者: from kdeui.KListViewItem import differs [as 別名]
def refreshListView(self):
suite_folder = KListViewItem(self.listView, 'suites')
for row in self.cursor.select(table='suites'):
item = KListViewItem(suite_folder, row.suite)
item.suite = row.suite
profile_folder = KListViewItem(self.listView, 'profiles')
profile_folder.profiles = True
family_folder = KListViewItem(self.listView, 'families')
family_folder.families = True
machine_folder = KListViewItem(self.listView, 'machines')
machine_folder.machines = True
differ_folder = KListViewItem(self.listView, 'differs')
differ_folder.differs = True
for dtype in ['trait', 'family']:
item = KListViewItem(differ_folder, dtype)
item.dtype = dtype
environ_folder = KListViewItem(self.listView, 'environ')
environ_folder.environ = True
for etype in ['default', 'current']:
item = KListViewItem(environ_folder, etype)
item.etype = etype