annotate AddFeed.py @ 47:a8442c3487b5

add an option to Feed that allows loading an entry's link right away instead of displaying a feed's summary
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sun, 16 May 2010 08:13:07 +0200
parents bdd1296a4b8c
children 6eba4168fd54
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
1
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
2 from PyQt4 import QtGui
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
3 from Ui_AddFeed import Ui_AddFeed
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
4
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
5 class AddFeed(QtGui.QDialog):
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
6 def __init__(self, session=None):
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
7 QtGui.QWidget.__init__(self, None)
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
8 self.session = session
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
9 self.ui = Ui_AddFeed()
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
10 self.ui.setupUi(self)
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
11 self.ui.url.setFocus()
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
12
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
13 def getUrl(self):
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
14 text = self.ui.url.text()
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
15 # the content of a QLineEdit is a QString, convert it to a Python string
bdd1296a4b8c implemented adding a feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
16 return str(text)