Mercurial > hg > easaier-soundaccess
changeset 81:82c960dc79f7
query only with author and title is ok
author | benoitrigolleau |
---|---|
date | Thu, 21 Jun 2007 15:37:55 +0000 |
parents | e760dd1ca601 |
children | 8ebc85f6ce4e |
files | sv/main/EasaierSessionManager.cpp |
diffstat | 1 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/sv/main/EasaierSessionManager.cpp Thu Jun 21 12:38:27 2007 +0000 +++ b/sv/main/EasaierSessionManager.cpp Thu Jun 21 15:37:55 2007 +0000 @@ -18,6 +18,7 @@ #include <QTextStream> #include <iostream> #include <QStatusBar> +#include <vector> #include "layer/Layer.h" @@ -29,6 +30,7 @@ #include "data/model/WaveFileModel.h" #include "main/MainWindow.h" #include "widgets/QueryResultsWidget.h" +#include "base/PropertyContainer.h" EasaierSessionManager::EasaierSessionManager(HttpClient* httpClient) : QObject(), m_fileName(""), @@ -135,8 +137,7 @@ LoadedFile* newFile = new LoadedFile(localPath); newFile->setFileType(type); newFile->setUri(uri); - - int index = m_httpClient->get(path, newFile); + int index = m_httpClient->get(uri, newFile); std::cerr << "Ask for file : GET " << path.toStdString() << " - index : " << index << std::endl; @@ -362,7 +363,16 @@ QString text = tr("Sorry query database information on the %1 theme is not yet available. All results are returned").arg(themeName); QMessageBox::information( MainWindow::instance(), tr("Query database information"), text); - QString filename = "http://easaier.silogic.fr/data/query/results.xml"; + QueryThemeModel *themeModel = (m_queryModel->getThemes()).find(themeName)->second; + QString params = ""; + if(themeModel!=0){ + PropertyContainer::PropertyList propertyList = themeModel->getProperties(); + for(int i=0; i<propertyList.size();i++){ + params+= "&"+propertyList[i] + "="+themeModel->getPropertyValue(propertyList[i]); + } + } + //QString filename = "http://easaier.silogic.fr/data/query/results.xml"; + QString filename = "http://easaier.silogic.fr:9876/easaier/servlet/MOQueryServlet?theme="+themeName+""+params; loadFile(filename, LoadedFile::QUERY_RESULTS); }