# HG changeset patch # User lbajardsilogic # Date 1206636825 0 # Node ID 60e84bb658bcb0ff1bd05ca1511090f86ec1e952 # Parent 2aea571dc9d4be75141ceefaee878dbfe8d2a31a integration of new sparql query diff -r 2aea571dc9d4 -r 60e84bb658bc data/model/QueryModel.cpp --- a/data/model/QueryModel.cpp Tue Mar 25 14:54:36 2008 +0000 +++ b/data/model/QueryModel.cpp Thu Mar 27 16:53:45 2008 +0000 @@ -137,7 +137,8 @@ if (iter != m_properties.end()) { - return iter->second->getValue(); + PropertyModel * propModel = iter->second; + return propModel->getValue(); } return ""; @@ -282,10 +283,10 @@ if (range != "") { - m_value = "0"; m_range = range.split("/"); m_min = 0; m_max = m_range.size(); + m_value = m_range.at(0); } } } else if (type == "file") @@ -310,7 +311,7 @@ { m_range << range; m_type = ValueProperty; - m_value = "0"; m_min = 0; m_max = m_range.size(); + m_value = m_range.at(0); } \ No newline at end of file diff -r 2aea571dc9d4 -r 60e84bb658bc data/model/QueryModel.h --- a/data/model/QueryModel.h Tue Mar 25 14:54:36 2008 +0000 +++ b/data/model/QueryModel.h Thu Mar 27 16:53:45 2008 +0000 @@ -109,7 +109,7 @@ inline QString getValue() const {return m_value;} - void setValue(int value){m_value = QString::number(value);} + void setValue(int value){if (m_type == ValueProperty) {m_value = m_range.at(value);} else {m_value = QString::number(value);}} void setValue(QString value){m_value = value;} void addRange(const QString &range); diff -r 2aea571dc9d4 -r 60e84bb658bc widgets/QueryResultsWidget.cpp --- a/widgets/QueryResultsWidget.cpp Tue Mar 25 14:54:36 2008 +0000 +++ b/widgets/QueryResultsWidget.cpp Thu Mar 27 16:53:45 2008 +0000 @@ -131,21 +131,21 @@ for (iterOnInfo = (*onInfo).begin(); iterOnInfo != (*onInfo).end(); iterOnInfo++) { - if ((*iterOnInfo).name == "identification") + if ((*iterOnInfo).name == "signal") { uri = (*iterOnInfo).value; - uri = uri.right(uri.length() - uri.lastIndexOf("#") - 1); + //uri = uri.right(uri.length() - uri.lastIndexOf("#") - 1); } } for (iterOnInfo = (*onInfo).begin(); iterOnInfo != (*onInfo).end(); iterOnInfo++) { - if ((*iterOnInfo).name != "identification") + if ((*iterOnInfo).name != "signal") { - if((*iterOnInfo).name == "author"){ + if((*iterOnInfo).name == "composer_given_name"){ author = (*iterOnInfo).value; } - if ((*iterOnInfo).name == "title") + if ((*iterOnInfo).name == "performance_title") { title += (*iterOnInfo).value; } diff -r 2aea571dc9d4 -r 60e84bb658bc widgets/SearchWidget.cpp --- a/widgets/SearchWidget.cpp Tue Mar 25 14:54:36 2008 +0000 +++ b/widgets/SearchWidget.cpp Thu Mar 27 16:53:45 2008 +0000 @@ -197,7 +197,7 @@ box->addItems(curTheme->getPropertyRange(name)); - + connect(box, SIGNAL(currentIndexChanged(int)), curTheme, SLOT(setProperty(int))); field = box;