Mercurial > hg > Feedworm
diff MainWindowController.py @ 23:dcc8abff0694
All the wiring of slots is done through QtDesigner now, look how much code has just disappeared :-)
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 29 Apr 2010 05:41:52 +0200 |
parents | c8bb3cee7935 |
children |
line wrap: on
line diff
--- a/MainWindowController.py Thu Apr 29 05:22:59 2010 +0200 +++ b/MainWindowController.py Thu Apr 29 05:41:52 2010 +0200 @@ -2,7 +2,7 @@ from DisplayModel import DisplayModel from Feed import Feed from FeedEntry import FeedEntry -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui from PyQt4.QtCore import QUrl from Ui_MainWindow import Ui_MainWindow @@ -12,24 +12,12 @@ self.session = session self.ui = Ui_MainWindow() self.ui.setupUi(self) - self.setupWidgets() + self.setupFeedList() - def setupWidgets(self): - self.setupAddFeedMenuEntry() - self.setupFeedList() - self.setupFeedEntryList() - - def setupAddFeedMenuEntry(self): - self.connect(self.ui.actionAdd, QtCore.SIGNAL("activated(int)"), self.addFeed) - def setupFeedList(self): self.allFeeds = Feed.all(self.session) feedModel = DisplayModel(self, self.allFeeds, Feed.userPresentableString) self.ui.feedList.setModel(feedModel) - self.connect(self.ui.feedList, QtCore.SIGNAL("clicked(QModelIndex)"), self.feedSelected) - - def setupFeedEntryList(self): - self.connect(self.ui.feedEntryList, QtCore.SIGNAL("clicked(QModelIndex)"), self.feedEntrySelected) def feedSelected(self, index): self.selectedFeed = self.allFeeds[index.row()] @@ -44,4 +32,5 @@ self.ui.webView.setHtml(entry.summary, baseUrl) def addFeed(self): - pass \ No newline at end of file + print("Add Feed!") + \ No newline at end of file