comparison FeedSettings.py @ 48:6e5219e05625

GUI for feed settings
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sun, 16 May 2010 08:26:46 +0200
parents
children 6bc6899f3330
comparison
equal deleted inserted replaced
47:a8442c3487b5 48:6e5219e05625
1
2 from PyQt4 import QtGui
3 from Ui_FeedSettings import Ui_FeedSettings
4
5 class FeedSettings(QtGui.QDialog):
6 def __init__(self, session, feed):
7 QtGui.QWidget.__init__(self, None)
8 self.session = session
9 self.feed = feed
10 self.ui = Ui_FeedSettings()
11 self.ui.setupUi(self)
12 self.initUi()
13
14 def initUi(self):
15 self.ui.autoLoadArticle.setChecked(self.feed.auto_load_entry_link)
16
17 def autoLoadArticleChanged(self, change):
18 if change:
19 self.feed.auto_load_entry_link = True
20 else:
21 self.feed.auto_load_entry_link = False
22
23 def accept(self):
24 self.session.commit()
25 QtGui.QDialog.accept(self)
26
27 def reject(self):
28 self.session.rollback()
29 QtGui.QDialog.reject(self)