Mercurial > hg > easaier-soundaccess
comparison widgets/ListResultGeneralItemWidget.cpp @ 126:c26c73ca6d37
the result list is better now.
it's not the final version.
the final version.... is coming soon
author | benoitrigolleau |
---|---|
date | Tue, 23 Oct 2007 15:24:06 +0000 |
parents | 1c638a8e9897 |
children | be6d31baecb9 |
comparison
equal
deleted
inserted
replaced
125:66af7c1b10d9 | 126:c26c73ca6d37 |
---|---|
29 m_waitingWidget = new WaitingWidget(); | 29 m_waitingWidget = new WaitingWidget(); |
30 | 30 |
31 m_labelRank = new QLabel(); | 31 m_labelRank = new QLabel(); |
32 m_labelIcon = new QLabel(); | 32 m_labelIcon = new QLabel(); |
33 m_labelTitleArtist = new QLabel(); | 33 m_labelTitleArtist = new QLabel(); |
34 label4 = new QLabel("4"); | 34 label4 = new QLabel(""); // for the icons |
35 label5 = new QLabel("le super mega truc des options que même que c'est trop bien"); | 35 label5 = new QLabel(""); // for the options |
36 | 36 |
37 m_buttonPrev = new QPushButton(); | 37 m_buttonPrev = new QPushButton(); |
38 m_buttonSimilar = new QPushButton(); | 38 m_buttonSimilar = new QPushButton(); |
39 | 39 |
40 m_confidenceListWidget= new ConfidenceListWidget(); | 40 m_confidenceListWidget= new ConfidenceListWidget(); |
41 m_confidenceListWidget->setMaximumWidth(180); | 41 m_confidenceListWidget->setMaximumWidth(180); |
158 //hLayout3->addWidget(vLine7); | 158 //hLayout3->addWidget(vLine7); |
159 hLayout3->addWidget(m_buttonPrev); | 159 hLayout3->addWidget(m_buttonPrev); |
160 hLayout3->addWidget(m_buttonSimilar); | 160 hLayout3->addWidget(m_buttonSimilar); |
161 | 161 |
162 connect(m_buttonSimilar, SIGNAL(clicked()), this, SLOT(displayCriteria())); | 162 connect(m_buttonSimilar, SIGNAL(clicked()), this, SLOT(displayCriteria())); |
163 | 163 connect(m_labelTitleArtist, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString))); |
164 } | 164 |
165 | 165 } |
166 void ListResultGeneralItemWidget::setTitleAndAuthorName(QString author,QString title){ | 166 |
167 m_labelTitleArtist->setText(author+" - \""+title+"\""); | 167 void ListResultGeneralItemWidget::setTitleAndAuthorName(QString author,QString title, QString uri){ |
168 QString aux = title; | |
169 if(aux.length() > 50){ | |
170 aux.truncate(47); | |
171 aux+="..."; | |
172 } | |
173 | |
174 QString label; | |
175 label = author+" - \""; | |
176 label += "<a href=\""; | |
177 label += uri; | |
178 label += "\">"; | |
179 label += aux; | |
180 label += "</a>"; | |
181 m_labelTitleArtist->setText(label); | |
182 m_labelTitleArtist->setToolTip(title); | |
168 } | 183 } |
169 | 184 |
170 void ListResultGeneralItemWidget::setRank(int rank){ | 185 void ListResultGeneralItemWidget::setRank(int rank){ |
171 m_labelRank->setText(QString().setNum(rank)); | 186 m_labelRank->setText(QString().setNum(rank)); |
172 } | 187 } |