comparison MainWindow.py @ 152:a1c0459e1eeb

rename some methods
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sat, 27 Aug 2011 07:11:08 +0200
parents bca9341dc67f
children 65c4bb6d5add
comparison
equal deleted inserted replaced
151:bca9341dc67f 152:a1c0459e1eeb
50 50
51 def setupFeedEntries(self): 51 def setupFeedEntries(self):
52 # TODO move the access to preferences into the backend 52 # TODO move the access to preferences into the backend
53 hideReadEntries = self.preferences.hideReadFeedEntries() 53 hideReadEntries = self.preferences.hideReadFeedEntries()
54 self.feedEntries = self.backend.entriesForSelectedFeed(hideReadEntries) 54 self.feedEntries = self.backend.entriesForSelectedFeed(hideReadEntries)
55 self.initFeedDisplayModel() 55 self.initFeedEntriesDisplayModel()
56 56
57 def initFeedDisplayModel(self): 57 def initFeedEntriesDisplayModel(self):
58 self.setupFeedTableModel() 58 self.setupFeedEntriesTableModel()
59 self.ui.feedEntryList.update() 59 self.ui.feedEntryList.update()
60 self.setupFeedTableHeaderWidths() 60 self.setupFeedEntriesTableHeaderWidths()
61 self.scrollFirstRowInFeedTableToVisible() 61 self.scrollFirstRowInFeedEntriesTableToVisible()
62 62
63 def setupFeedTableModel(self): 63 def setupFeedEntriesTableModel(self):
64 model = FeedEntryTableModel(self.feedEntries) 64 model = FeedEntryTableModel(self.feedEntries)
65 self.ui.feedEntryList.setModel(model) 65 self.ui.feedEntryList.setModel(model)
66 66
67 def setupFeedTableHeaderWidths(self): 67 def setupFeedEntriesTableHeaderWidths(self):
68 width = self.ui.feedEntryList.width() 68 width = self.ui.feedEntryList.width()
69 firstColumnWidth = int(width * 0.8) 69 firstColumnWidth = int(width * 0.8)
70 self.ui.feedEntryList.setColumnWidth(0, firstColumnWidth) 70 self.ui.feedEntryList.setColumnWidth(0, firstColumnWidth)
71 71
72 def scrollFirstRowInFeedTableToVisible(self): 72 def scrollFirstRowInFeedEntriesTableToVisible(self):
73 model = self.ui.feedEntryList.model() 73 model = self.ui.feedEntryList.model()
74 visibleIndex = model.createIndex(0, 0) 74 visibleIndex = model.createIndex(0, 0)
75 self.ui.feedEntryList.scrollTo(visibleIndex) 75 self.ui.feedEntryList.scrollTo(visibleIndex)
76 76
77 def feedEntrySelected(self, index): 77 def feedEntrySelected(self, index):