Mercurial > hg > easaier-soundaccess
comparison widgets/QueryResultsWidget.cpp @ 90:87495ac7710a
support audio source info from boca
author | lbajardsilogic |
---|---|
date | Thu, 28 Jun 2007 16:57:29 +0000 |
parents | 5060939ca69d |
children | c26c73ca6d37 |
comparison
equal
deleted
inserted
replaced
89:4fd3274908a5 | 90:87495ac7710a |
---|---|
71 std::vector<Info>::iterator iter; | 71 std::vector<Info>::iterator iter; |
72 | 72 |
73 QLabel* result = new QLabel(); | 73 QLabel* result = new QLabel(); |
74 | 74 |
75 QString text; | 75 QString text; |
76 QString uri = ""; | |
76 | 77 |
77 for (iter = m_curResult.begin(); iter != m_curResult.end(); iter++) | 78 for (iter = m_curResult.begin(); iter != m_curResult.end(); iter++) |
78 { | 79 { |
79 text += "<br>" ; | 80 if ((*iter).name == "identification") |
80 text += (*iter).name; | |
81 text += " : " ; | |
82 if (((*iter).value.left(4) == "http") && ((*iter).value.right(4) == ".xml")) | |
83 { | 81 { |
84 text += "<a href=\""; | 82 uri = (*iter).value; |
85 text += (*iter).value; | 83 uri = uri.right(uri.length() - uri.lastIndexOf("#") - 1); |
86 text += "\">"; | 84 } |
87 text += (*iter).value; | 85 } |
88 text += "</a>"; | 86 |
89 } else | 87 for (iter = m_curResult.begin(); iter != m_curResult.end(); iter++) |
88 { | |
89 if ((*iter).name != "identification") | |
90 { | 90 { |
91 text += (*iter).value; | 91 text += "<br>" ; |
92 text += (*iter).name; | |
93 text += " : " ; | |
94 if ((*iter).name == "title") | |
95 { | |
96 text += "<a href=\""; | |
97 text += uri; | |
98 text += "\">"; | |
99 text += (*iter).value; | |
100 text += "</a>"; | |
101 } else | |
102 { | |
103 text += (*iter).value; | |
104 } | |
105 text += "</br>" ; | |
92 } | 106 } |
93 text += "</br>" ; | |
94 } | 107 } |
95 | 108 |
96 connect(result, SIGNAL(linkActivated(QString)), MainWindow::instance(), SLOT(importEasaierFile(QString))); | 109 connect(result, SIGNAL(linkActivated(QString)), MainWindow::instance(), SLOT(importEasaierFile(QString))); |
97 | 110 |
98 result->setText(text); | 111 result->setText(text); |