本文整理汇总了Python中kdeui.KListView类的典型用法代码示例。如果您正苦于以下问题:Python KListView类的具体用法?Python KListView怎么用?Python KListView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了KListView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PaellaRecordSelector
class PaellaRecordSelector(QSplitter, BasePaellaWidget):
def __init__(self, parent, table, fields, idcol, groupfields,
mainview, name='PaellaRecordSelector'):
#PaellaManagerWidget.__init__(self, parent, mainview, name=name)
QSplitter.__init__(self, parent, name)
BasePaellaWidget.initPaellaCommon(self)
self.current = currentobject()
self.table = table
self.fields = fields
self.idcol = idcol
self.groupfields = groupfields
self.listView = KListView(self)
self.vsplit = QSplitter(self)
self.vsplit.setOrientation(self.Vertical)
self.mainView = mainview(self.vsplit)
self.recordForm = EditableRecordFrame(self, fields)
self.connect(self.listView, SIGNAL('selectionChanged()'),
self.groupChanged)
self.connect(self.recordForm.insButton, SIGNAL('clicked()'),
self.insertRecord)
self.connect(self.recordForm.updButton, SIGNAL('clicked()'),
self.updateRecord)
self.initlistView()
self.setSource(self.handleURL)
def initlistView(self):
self.listView.addColumn('group')
self.listView.setRootIsDecorated(True)
示例2: ImportsMainWindow
class ImportsMainWindow(BaseMainWindow):
def __init__(self, parent, name='ImportsMainWindow'):
BaseMainWindow.__init__(self, parent, name=name)
self.handler = AbandonGamesHandler(self.app)
self.splitView = QSplitter(self)
self.listView = KListView(self.splitView)
self.connect(self.listView,
SIGNAL('selectionChanged()'), self.selectionChanged)
self.initlistView()
self.textView = MainAbandoniaPart(self.splitView)
self.setCentralWidget(self.splitView)
def initlistView(self):
self.listView.addColumn('games', -1)
self.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
def selectionChanged(self):
item = self.listView.currentItem()
self.handler.get_game_data(item.gameid)
print 'in selectionChanged', self.handler.parser.gameid
self.textView.set_game_info(self.handler)
示例3: __init__
def __init__(self, app, parent, name='FamilyList'):
KListView.__init__(self, parent, name)
dbwidget(self, app)
self.family = Family(self.conn)
self.setRootIsDecorated(True)
self.addColumn('family')
self.refreshlistView()
示例4: __init__
def __init__(self, parent, name='FamilyList'):
KListView.__init__(self, parent, name)
self.app = get_application_pointer()
self.conn = self.app.conn
self.family = Family(self.conn)
self.setRootIsDecorated(True)
self.addColumn('family')
self.refreshlistView()
示例5: __init__
def __init__(self, app, parent, clientid):
KListView.__init__(self, parent)
self.app = app
self.manager = ClientManager(self.app)
self.clientid = clientid
self.addColumn('tag')
self.addColumn('value')
self.setRootIsDecorated(True)
self.connect(self, SIGNAL('rightButtonClicked()'), self.popupmymenu)
self.refreshlistView()
示例6: __init__
def __init__(self, app, parent, etype='default', name='EnvironmentList'):
KListView.__init__(self, parent, name)
dbwidget(self, app)
self.etype = etype
self.environ = ETYPE[self.etype](self.conn)
self.cursor = StatementCursor(self.conn)
self.cursor.set_table('%s_environment' % self.etype)
self.setRootIsDecorated(True)
for field in ['section', 'option', 'value']:
self.addColumn(field)
示例7: __init__
def __init__(self, app, parent, ftype='template', name='TraitList'):
KListView.__init__(self, parent, name)
dbwidget(self, app)
self.ftype = ftype
self.scripts = None
self.templates = None
self.traits = None
self.setRootIsDecorated(True)
self.addColumn('trait/file')
self.addColumn('name')
self.addColumn('package')
示例8: __init__
def __init__(self, parent, etype='default', name='EnvironmentList'):
KListView.__init__(self, parent, name)
self.app = get_application_pointer()
self.conn = self.app.conn
self.etype = etype
self.environ = ETYPE[self.etype](self.conn)
self.cursor = self.conn.cursor(statement=True)
self.cursor.set_table('%s_environment' % self.etype)
self.setRootIsDecorated(True)
for field in ['section', 'option', 'value']:
self.addColumn(field)
示例9: __init__
def __init__(self, parent, name='EntityTypeWindow'):
BaseMainWindow.__init__(self, parent, name=name)
self.splitView = QSplitter(self, 'splitView')
self.etypeView = KListView(self.splitView, 'etypes_view')
self.extfieldsView = KListView(self.splitView, 'extfields_view')
self.initActions()
self.initMenus()
self.initToolbar()
self.setCentralWidget(self.splitView)
self.connect(self.etypeView,
SIGNAL('selectionChanged()'), self.selectionChanged)
self.initlistView()
self.current_etype = None
示例10: ProfileSelectorDialog
class ProfileSelectorDialog(BaseDialogWindow):
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
def get_selected_profile(self):
item = self.listView.currentItem()
return item.profile
示例11: SimpleSplitWindow
class SimpleSplitWindow(KMainWindow):
def __init__(self, app, parent, view, name):
KMainWindow.__init__(self, parent, name)
self.app = app
self.conn = app.conn
self.mainView = QSplitter(self, 'mainView')
self.listView = KListView(self.mainView)
self.listView.setRootIsDecorated(True)
self.view = view(self.app, self.mainView)
self.setCentralWidget(self.mainView)
if hasattr(self, 'initlistView'):
self.initlistView()
self.connect(self.listView,
SIGNAL('selectionChanged()'), self.selectionChanged)
self.show()
示例12: __init__
def __init__(self, parent):
KMainWindow.__init__(self, parent, 'Uncover Truth Frontend')
self.app = get_application_pointer()
self.splitView = QSplitter(self, 'splitView')
self.listView = KListView(self.splitView, 'guests_view')
self.textView = InfoPart(self.splitView)
self.initlistView()
self.connect(self.listView,
SIGNAL('selectionChanged()'), self.selectionChanged)
self.connect(self.textView,
PYSIGNAL('GuestInfoUpdated'), self.refreshDisplay)
self.setCentralWidget(self.splitView)
collection = self.actionCollection()
self.quitAction = KStdAction.quit(self.close, collection)
self.newGuestAction = KStdAction.openNew(self.slotNewGuest, collection)
self.selectAllAction = KStdAction.selectAll(self.slotSelectAll,
collection)
mainmenu = KPopupMenu(self)
self.newGuestAction.plug(mainmenu)
self.selectAllAction.plug(mainmenu)
self.quitAction.plug(mainmenu)
menubar = self.menuBar()
menubar.insertItem('&Main', mainmenu)
toolbar = self.toolBar()
self.newGuestAction.plug(toolbar)
self.quitAction.plug(toolbar)
self.new_guest_dialog = None
# resize window
self.resize(400, 500)
self.splitView.setSizes([75, 325])
示例13: BaseSplitWindow
class BaseSplitWindow(BaseMainWindow):
def __init__(self, parent, view, listview=None, name='BaseSplitWIndow'):
BaseMainWindow.__init__(self, parent, name=name)
self.splitter = QSplitter(self, 'mainView')
if listview is None:
self.listView = KListView(self.splitter)
else:
self.listView = listview(self.splitter)
self.mainView = view(self.splitter)
self.setCentralWidget(self.splitter)
if hasattr(self, 'initlistView'):
self.initlistView()
elif hasattr(self.listView, 'initlistView'):
self.listView.initlistView()
self.connect(self.listView,
SIGNAL('selectionChanged()'), self.selectionChanged)
示例14: __init__
def __init__(self, parent, name='MainEntityWindow'):
BaseToolboxWindow.__init__(self, parent, name=name)
self.splitView = QSplitter(self, 'splitView')
self.listView = KListView(self.splitView, 'entities_view')
self.textView = RtorrentInfoPart(self.splitView)
self.initActions()
self.initMenus()
self.initToolbar()
self.app.rtserver = Server(url="http://roujin/RPC2")
self.app.rtorrent = Rtorrent(self.app.rtserver)
#self._sortby = 'name'
self.initlistView()
self.connect(self.listView,
SIGNAL('selectionChanged()'), self.selectionChanged)
self.connect(self.textView,
PYSIGNAL('EntityInfoUpdated'), self.refreshDisplay)
self.setCentralWidget(self.splitView)
# dialogs
self._new_entity_dlg = None
# resize window
self.resize(400, 500)
self.splitView.setSizes([75, 325])
self.setAcceptDrops(True)
示例15: SuiteSelector
class SuiteSelector(KDialogBase):
def __init__(self, app, parent):
KDialogBase.__init__(self, parent, 'SuiteSelector')
dbwidget(self, app)
self.suites = Suites(self.conn)
self.listView = KListView(self)
self.listView.addColumn('suite')
self.setMainWidget(self.listView)
self.refreshlistView()
self.show()
def refreshlistView(self):
self.listView.clear()
for suite in self.suites.list():
item = KListViewItem(self.listView, suite)
item.suite = suite