diff transform/TransformFactory.cpp @ 462:957e6a5c8495

* Add More Info URL to plugin finder
author Chris Cannam
date Thu, 23 Oct 2008 16:30:48 +0000
parents 2019d89ebcf9
children 70b333085952
line wrap: on
line diff
--- a/transform/TransformFactory.cpp	Fri Oct 17 15:26:29 2008 +0000
+++ b/transform/TransformFactory.cpp	Thu Oct 23 16:30:48 2008 +0000
@@ -551,6 +551,7 @@
 
         QString description = desc.getPluginDescription();
         QString maker = desc.getPluginMaker();
+        QString infoUrl = desc.getPluginInfoURL();
 
         QStringList oids = desc.getOutputIds();
 
@@ -581,14 +582,43 @@
                 td.name = tr("%1: %2").arg(name).arg(oname);
             }
 
+            QString longDescription = description;
+            //!!! basically duplicated from above
+            if (longDescription == "") {
+                if (oids.size() == 1) {
+                    longDescription = tr("Extract features using \"%1\" plugin (from %2)")
+                        .arg(name).arg(maker);
+                } else {
+                    longDescription = tr("Extract features using \"%1\" output of \"%2\" plugin (from %3)")
+                        .arg(oname).arg(name).arg(maker);
+                }
+            } else {
+                if (oids.size() == 1) {
+                    longDescription = tr("%1 using \"%2\" plugin (from %3)")
+                        .arg(longDescription).arg(name).arg(maker);
+                } else {
+                    longDescription = tr("%1 using \"%2\" output of \"%3\" plugin (from %4)")
+                        .arg(longDescription).arg(oname).arg(name).arg(maker);
+                }
+            }                    
+
             td.friendlyName = name; //!!!???
             td.description = description;
-            td.longDescription = ""; //!!!
+            td.longDescription = longDescription;
             td.maker = maker;
+            td.infoUrl = infoUrl;
             td.units = "";
             td.configurable = false;
 
             m_uninstalledTransforms[tid] = td;
+
+            if (td.infoUrl != "") {
+                if (m_transforms.find(tid) != m_transforms.end()) {
+                    if (m_transforms[tid].infoUrl == "") {
+                        m_transforms[tid].infoUrl = td.infoUrl;
+                    }
+                }
+            }
         }
     }