comparison MainWindow.py @ 226:016c89dfd488

use our generic PyQtLib instead of custom Qt models in this project
author Dirk Olmes <dirk@xanthippe.ping.de>
date Thu, 22 May 2014 06:10:05 +0200
parents 699d8f1cebd4
children 94a902de5266
comparison
equal deleted inserted replaced
225:f6dcc85cd8ca 226:016c89dfd488
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 import subprocess 2 import subprocess
3 from AddFeed import AddFeed 3 from AddFeed import AddFeed
4 from DisplayModel import DisplayModel 4 from PyQtLib.GenericListModel import GenericListModel
5 from FeedEntryItemDelegate import FeedEntryItemDelegate 5 from FeedEntryItemDelegate import FeedEntryItemDelegate
6 from FeedEntryTableModel import FeedEntryTableModel 6 from FeedEntryTableModel import FeedEntryTableModel
7 from FeedSettings import FeedSettings 7 from FeedSettings import FeedSettings
8 from PreferencesDialog import PreferencesDialog 8 from PreferencesDialog import PreferencesDialog
9 from PyQt4.QtCore import QUrl 9 from PyQt4.QtCore import QUrl
22 self.updateFeedList() 22 self.updateFeedList()
23 self.initFeedEntryList() 23 self.initFeedEntryList()
24 24
25 def updateFeedList(self): 25 def updateFeedList(self):
26 allFeeds = self.backend.getFeeds() 26 allFeeds = self.backend.getFeeds()
27 feedModel = DisplayModel(self, allFeeds, "title") 27 feedModel = GenericListModel(self, allFeeds, 'title')
28 self.ui.feedList.setModel(feedModel) 28 self.ui.feedList.setModel(feedModel)
29 self.ui.feedList.update() 29 self.ui.feedList.update()
30 30
31 def initFeedEntryList(self): 31 def initFeedEntryList(self):
32 # setup the default row height. This must be called before a table model is set 32 # setup the default row height. This must be called before a table model is set