changeset 436:1e0744b2cebe

* Add More Info URL to plugin finder
author Chris Cannam
date Thu, 23 Oct 2008 16:30:48 +0000
parents 6324461340b1
children 755243c67f59
files view/View.cpp widgets/TransformFinder.cpp
diffstat 2 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/view/View.cpp	Tue Oct 21 19:31:50 2008 +0000
+++ b/view/View.cpp	Thu Oct 23 16:30:48 2008 +0000
@@ -1597,7 +1597,6 @@
 		paint.drawPixmap(dx, 0, *m_cache);
 		paint.end();
 #endif
-
 		if (dx < 0) {
 		    cacheRect = QRect(width() + dx, 0, -dx, height());
 		} else {
--- a/widgets/TransformFinder.cpp	Tue Oct 21 19:31:50 2008 +0000
+++ b/widgets/TransformFinder.cpp	Thu Oct 23 16:30:48 2008 +0000
@@ -208,17 +208,21 @@
                 .arg(XmlExportable::encodeEntities(desc.description));
         }
 
-        selectedText += tr("<br><small>");
+        selectedText += tr("<small>");
         if (desc.type != "") {
-            selectedText += tr("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; Plugin type: %1<br>")
+            selectedText += tr("<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; Plugin type: %1")
                 .arg(XmlExportable::encodeEntities(desc.type));
         }
         if (desc.category != "") {
-            selectedText += tr("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; Category: %1<br>")
+            selectedText += tr("<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; Category: %1")
                 .arg(XmlExportable::encodeEntities(desc.category));
         }
-        selectedText += tr("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; System identifier: %1")
+        selectedText += tr("<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; System identifier: %1")
             .arg(XmlExportable::encodeEntities(desc.identifier));
+        if (desc.infoUrl != "") {
+            selectedText += tr("<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; More information: <a href=\"%1\">%1</a>")
+                .arg(desc.infoUrl);
+        }
         selectedText += tr("</small>");
 
         if (i >= m_labels.size()) {
@@ -230,6 +234,10 @@
                     SLOT(accept()));
             QPalette palette = label->palette();
             label->setPalette(palette);
+            label->setTextInteractionFlags(Qt::LinksAccessibleByKeyboard |
+                                           Qt::LinksAccessibleByMouse |
+                                           Qt::TextSelectableByMouse);
+            label->setOpenExternalLinks(true);
             m_labels.push_back(label);
         }