Mercurial > hg > easaier-soundaccess
comparison widgets/InfoWidget.cpp @ 244:ec2ca3fbd957
update AudioSourceInfoReader and SparqlResultsReader according to new sparql query
author | lbajardsilogic |
---|---|
date | Fri, 28 Mar 2008 12:22:56 +0000 |
parents | c3296b15c43e |
children | 2ea04b3f9141 |
comparison
equal
deleted
inserted
replaced
243:e977d4abea8a | 244:ec2ca3fbd957 |
---|---|
55 } | 55 } |
56 void InfoWidget::displayAudioSourceInfo(AudioSourceInfoModel* model) | 56 void InfoWidget::displayAudioSourceInfo(AudioSourceInfoModel* model) |
57 { | 57 { |
58 reset(); | 58 reset(); |
59 | 59 |
60 std::map<QString, QString> info = model->getInfo(); | 60 std::map<QString, QStringList*> info = model->getInfo(); |
61 std::map<QString, QString>::iterator iterInfo; | 61 std::map<QString, QStringList*>::iterator iterInfo; |
62 QLabel* proper; | 62 QLabel* proper; |
63 QLabel* icon; | 63 QLabel* icon; |
64 QLabel* value; | 64 QLabel* value; |
65 | 65 |
66 int row = 0; | 66 int row = 0; |
67 | 67 |
68 m_infoLayout->setColumnMinimumWidth(1,20); | 68 m_infoLayout->setColumnMinimumWidth(1,20); |
69 m_infoLayout->setColumnMinimumWidth(3,20); | 69 m_infoLayout->setColumnMinimumWidth(3,20); |
70 | 70 |
71 //display author and title at first | 71 //display author and title at first |
72 iterInfo = info.find("title"); | 72 /* iterInfo = info.find("performance_title"); |
73 if (iterInfo!= info.end()) | 73 if (iterInfo!= info.end()) |
74 { | 74 { |
75 proper = new QLabel(iterInfo->first.toUpper()); | 75 proper = new QLabel(iterInfo->first.toUpper()); |
76 value = new QLabel(iterInfo->second); | 76 value = new QLabel(iterInfo->second); |
77 m_infoLayout->addWidget(proper, row, 0,1,3); | 77 m_infoLayout->addWidget(proper, row, 0,1,3); |
87 m_infoLayout->addWidget(value, row, 4,1,1); | 87 m_infoLayout->addWidget(value, row, 4,1,1); |
88 row++; | 88 row++; |
89 } | 89 } |
90 m_infoLayout->setRowMinimumHeight(row,25); | 90 m_infoLayout->setRowMinimumHeight(row,25); |
91 row++; | 91 row++; |
92 | 92 */ |
93 | 93 |
94 //display other info | 94 //display other info |
95 for (iterInfo = info.begin(); iterInfo != info.end(); iterInfo++) | 95 for (iterInfo = info.begin(); iterInfo != info.end(); iterInfo++) |
96 { | 96 { |
97 if ((iterInfo->first != "title") && (iterInfo->first != "author") && (iterInfo->first.contains("http://purl.org/ontology/mo"))) | 97 /*if ((iterInfo->first != "title") && (iterInfo->first != "author") && (iterInfo->first.contains("http://purl.org/ontology/mo"))) |
98 { | 98 { |
99 QString properName; | 99 QString properName; |
100 properName = iterInfo->first.split("#").last(); | 100 properName = iterInfo->first.split("#").last(); |
101 proper = new QLabel(properName); | 101 proper = new QLabel(properName); |
102 icon = new QLabel(); | 102 icon = new QLabel(); |
128 m_infoLayout->addWidget(icon,row,0,1,1); | 128 m_infoLayout->addWidget(icon,row,0,1,1); |
129 m_infoLayout->addWidget(proper, row, 2,1,1); | 129 m_infoLayout->addWidget(proper, row, 2,1,1); |
130 m_infoLayout->addWidget(value, row, 4,1,1); | 130 m_infoLayout->addWidget(value, row, 4,1,1); |
131 row++; | 131 row++; |
132 } | 132 } |
133 } | 133 }*/ |
134 | |
135 proper = new QLabel(iterInfo->first); | |
136 value = new QLabel(iterInfo->second->join(" ")); | |
137 //connect the main window to the linkActivated signal | |
138 //connect(value, SIGNAL(linkActivated(QString)), MainWindow::instance(), SLOT(importEasaierLayer(QString))); | |
139 | |
140 m_infoLayout->addWidget(proper, row, 2,1,1); | |
141 m_infoLayout->addWidget(value, row, 4,1,1); | |
142 row++; | |
134 } | 143 } |
135 | 144 |
136 m_infoLayout->setColumnStretch( 4, 1); | 145 m_infoLayout->setColumnStretch( 4, 1); |
137 m_infoLayout->setRowStretch( row, 1); | 146 m_infoLayout->setRowStretch( row, 1); |
138 } | 147 } |