Skip to content

Commit

Permalink
fix wfs layer verfication. update letters
Browse files Browse the repository at this point in the history
  • Loading branch information
David Tran committed Aug 25, 2014
1 parent 050311d commit 515b5c1
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion OGR2GUI.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.2, 2014-08-25T13:38:38. -->
<!-- Written by QtCreator 3.1.2, 2014-08-25T16:41:07. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
Expand Down
2 changes: 1 addition & 1 deletion OGR2GUI_test.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.2, 2014-08-23T23:54:21. -->
<!-- Written by QtCreator 3.1.2, 2014-08-25T16:42:43. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
Expand Down
2 changes: 1 addition & 1 deletion include/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class App : public QMainWindow
QList<QPair<QString, QString> > formatsListReadOnly;
QList<QPair<QString, QString> > databaseListReadWrite;
QList<QPair<QString, QString> > databaseListReadOnly;
QList<QPair<QString, QString> > webserviceList;
QList<QPair<QString, QString> > webServiceList;
QList<QPair<QString, QString> > projectionsList;

QMenuBar *theMenu;
Expand Down
2 changes: 1 addition & 1 deletion include/tests/testOgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/*!
* \file testOgr.h
* \brief Test Ogr API
* \brief Test OGR API
* \author David Tran [HSR]
* \version 0.1
* \date 13/06/14
Expand Down
2 changes: 1 addition & 1 deletion res/databases
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ PostgreSQL,QPSQL
SQLite,QSQLITE
#readonly
MySQL,QMYSQL
ODBC,QODBC
ODBC,QODBC
4 changes: 2 additions & 2 deletions res/resources.qrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<RCC>
<qresource prefix="/">
<file>formats</file>
<file>databases</file>
<file>webservices</file>
<file>databases</file>
<file>webservices</file>
</qresource>
</RCC>
32 changes: 17 additions & 15 deletions src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void App::initData(void) {
QFile resWebServices(":/webservices");
readResources(resFormats, formatsListReadOnly, formatsListReadWrite);
readResources(resDatabases, databaseListReadOnly, databaseListReadWrite);
readResources(resWebServices, webserviceList);
readResources(resWebServices, webServiceList);
}

void App::readResources(QFile &file, QList<QPair<QString, QString> > &readonlyList, QList<QPair<QString, QString> > &readwriteList) {
Expand Down Expand Up @@ -512,7 +512,7 @@ QString App::currentParameters(void) const {
QString parameters = tr(" -f ") + tr("\"") + cmbTargetFormat->currentText() + tr("\" ");
parameters += tr("\"") + txtTargetName->text()+ tr("\" ");
if(radSourceWebService->isChecked() && !txtSourceName->text().isEmpty())
parameters += webserviceList.at(cmbSourceFormat->currentIndex()).second;
parameters += webServiceList.at(cmbSourceFormat->currentIndex()).second;
parameters += tr("\"") + txtSourceName->text().trimmed() + tr("\"");
if(!cmbTargetProj->currentText().isEmpty())
parameters += tr(" -t_srs EPSG:") + projectionsList.at(cmbTargetProj->currentIndex()).first;
Expand Down Expand Up @@ -617,8 +617,8 @@ void App::evtRadSourceWebService(void) {

cmbSourceFormat->clear();

for(int i = 0; i < webserviceList.size(); ++i) {
cmbSourceFormat->addItem(webserviceList.at(i).first);
for(int i = 0; i < webServiceList.size(); ++i) {
cmbSourceFormat->addItem(webServiceList.at(i).first);
}

radTargetFile->setEnabled(true);
Expand All @@ -645,7 +645,7 @@ void App::evtTxtSourceName(void) {

txtSourceProj->clear();
if(radSourceWebService->isChecked())
name = webserviceList.at(0).second.toStdString() + name;
name = webServiceList.at(0).second.toStdString() + name;
bool isOpen = ogr->openSource(name, epsg, query, error);
if(isOpen) {
for(int i = 0; i < projectionsList.size(); ++i) {
Expand Down Expand Up @@ -709,7 +709,7 @@ void App::evtBtnSourceName(void) {
txtSourceQuery->setEnabled(false);
}
} else if(radSourceWebService->isChecked()) {
wsConnect->setConnectionType(webserviceList.at(index).second);
wsConnect->setConnectionType(webServiceList.at(index).second);
if(wsConnect->exec() == QDialog::Accepted) {
txtSourceName->setText(wsConnect->getConnectionString());
}
Expand Down Expand Up @@ -819,19 +819,21 @@ void App::evtBtnExecute(void) {
return;
}
bool resVal = true;
QStringList fileList;
if(radSourceWebService->isChecked()) {
QStringList fileList = wsConnect->getSelectedLayersAsList();
sourcename = webserviceList.at(cmbSourceFormat->currentIndex()).second + sourcename;
if(fileList.size() >= 0) {
for(int i=0; i<fileList.size(); ++i) {
if(!ogr->openSource(sourcename.toStdString(), fileList.at(i).toStdString(), epsg, query, error)) {
resVal = false;
break;
}
fileList = wsConnect->getSelectedLayersAsList();
sourcename = webServiceList.at(cmbSourceFormat->currentIndex()).second + sourcename;
}
if(fileList.size() > 0) {
for(int i=0; i<fileList.size(); ++i) {
if(!ogr->openSource(sourcename.toStdString(), fileList.at(i).toStdString(), epsg, query, error)) {
resVal = false;
break;
}
}
} else {
resVal = ogr->openSource(sourcename.toStdString(), epsg, query, error);
}
resVal = ogr->openSource(sourcename.toStdString(), epsg, query, error);
if(!resVal) {
txtOutput->append(tr("\n * unable to open source !\n"));
progress->setValue(maxValue/progressSteps*2);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testOgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/*!
* \file testOgr.cpp
* \brief Test Ogr API
* \brief Test OGR API
* \author David Tran [HSR]
* \version 0.1
* \date 13/06/14
Expand Down

0 comments on commit 515b5c1

Please sign in to comment.