Store: chooser, add descriptive tool tips.

This commit is contained in:
John Schember 2011-05-26 07:06:15 -04:00
parent e6d4b492de
commit 612c4c36da

View File

@ -103,7 +103,22 @@ class Matches(QAbstractItemModel):
return Qt.Unchecked return Qt.Unchecked
return Qt.Checked return Qt.Checked
elif role == Qt.ToolTipRole: elif role == Qt.ToolTipRole:
return QVariant('<p>%s</p>' % result.description) if col == 0:
if is_disabled(result):
return QVariant(_('<p>This store is currently diabled and cannot be used in other parts of calibre.</p>'))
else:
return QVariant(_('<p>This store is currently enabled and can be used in other parts of calibre.</p>'))
elif col == 1:
return QVariant('<p>%s</p>' % result.description)
elif col == 2:
if result.drm_free_only:
return QVariant(_('<p>This store only distributes ebooks with DRM.</p>'))
else:
return QVariant(_('<p>This store distributes ebooks with DRM. It may have some titles without DRM, but you will need to check on a per title basis.</p>'))
elif col == 3:
return QVariant(_('<p>This store is headquartered in %s. This is a good indication of what market the store caters to. However, this does not necessarily mean that the store is limited to that market only.</p>') % result.headquarters)
elif col == 4:
return QVariant(_('<p>This store distributes ebooks in the following formats: %s</p>') % ', '.join(result.formats))
return NONE return NONE
def setData(self, index, data, role): def setData(self, index, data, role):