當前位置: 首頁>>代碼示例>>Python>>正文


Python kdeui.KListView類代碼示例

本文整理匯總了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)
開發者ID:joelsefus,項目名稱:paella,代碼行數:28,代碼來源:widgets.py

示例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)
開發者ID:BackupTheBerlios,項目名稱:dosbox-pykde-svn,代碼行數:34,代碼來源:importbrowser.py

示例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()
開發者ID:BackupTheBerlios,項目名稱:paella-svn,代碼行數:8,代碼來源:differ.py

示例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()
開發者ID:joelsefus,項目名稱:paella,代碼行數:10,代碼來源:differ.py

示例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()
開發者ID:BackupTheBerlios,項目名稱:konsultant-svn,代碼行數:10,代碼來源:tagedit.py

示例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)
開發者ID:BackupTheBerlios,項目名稱:paella-svn,代碼行數:10,代碼來源:environ.py

示例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')
開發者ID:BackupTheBerlios,項目名稱:paella-svn,代碼行數:11,代碼來源:differ.py

示例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)
開發者ID:joelsefus,項目名稱:paella,代碼行數:11,代碼來源:environ.py

示例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
開發者ID:BackupTheBerlios,項目名稱:useless-svn,代碼行數:13,代碼來源:etypewin.py

示例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
開發者ID:BackupTheBerlios,項目名稱:dosbox-pykde-svn,代碼行數:15,代碼來源:profile.py

示例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()
開發者ID:BackupTheBerlios,項目名稱:useless-svn,代碼行數:15,代碼來源:gui.py

示例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])
開發者ID:BackupTheBerlios,項目名稱:useless-svn,代碼行數:35,代碼來源:utmainwin.py

示例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)
開發者ID:BackupTheBerlios,項目名稱:useless-svn,代碼行數:16,代碼來源:mainwin.py

示例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)
開發者ID:BackupTheBerlios,項目名稱:useless-svn,代碼行數:30,代碼來源:mainwin.py

示例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
開發者ID:BackupTheBerlios,項目名稱:paella-svn,代碼行數:16,代碼來源:gui.py


注:本文中的kdeui.KListView類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。