Beispiel #1
0
InitFile::InitFile(QWidget *parent)
  : QDialog(parent), ui(new Ui::InitFile)
{
  ui->setupUi(this);

  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString tempStr=p->readPath(p->readEntry("pihm", "/model/mesh")); // 49
  tempStr.truncate(tempStr.length()-4);
  ui->lineEditMeshFile->setText(tempStr+"mesh");
  ui->lineEditRivFile->setText(tempStr+"riv");
  ui->lineEditInitFile->setText(tempStr+"init");
}
Beispiel #2
0
paraFileDlg::paraFileDlg(QWidget *parent)
{
    setupUi(this);
    connect(paraFileButton, SIGNAL(clicked()), this, SLOT(paraBrowse()));
    connect(okButton, SIGNAL(clicked()), this, SLOT(run()));
    connect(helpButton, SIGNAL(clicked()), this, SLOT(help()));
    connect(cancelButton, SIGNAL(clicked()), this, SLOT(close()));

    QgsProject *p = QgsProject::instance();
    QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

    QString tempStr=p->readPath(p->readEntry("pihm", "/model/mesh")); // 49
    tempStr.truncate(tempStr.length()-4);
    paraFileLineEdit->setText(tempStr+"para");
}
Beispiel #3
0
SoilFile::SoilFile(QWidget *parent)
  : QDialog(parent), ui(new Ui::SoilFile)
{
  ui->setupUi(this);
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString tempStr=p->readPath(p->readEntry("pihm", "/model/mesh")); tempStr.truncate(tempStr.length()-4);
  ui->lineEditSoilFile->setText(tempStr+"soil");

  tempStr = p->readEntry("pihm", "soil");
  if (!tempStr.isEmpty()) {
    ui->lineEditSoilTexture->setText(p->readPath(tempStr)); // 87
  }
}
void QgsDecorationCopyright::projectRead()
{
  QgsDecorationItem::projectRead();

  QDate now = QDate::currentDate();
  QString defString = "© QGIS " + now.toString( "yyyy" );

  // there is no font setting in the UI, so just use the Qt/QGIS default font (what mQFont gets when created)
  //  mQFont.setFamily( QgsProject::instance()->readEntry( "CopyrightLabel", "/FontName", "Sans Serif" ) );
  //  mQFont.setPointSize( QgsProject::instance()->readNumEntry( "CopyrightLabel", "/FontSize", 9 ) );
  QgsProject* prj = QgsProject::instance();
  mLabelQString = prj->readEntry( mNameConfig, "/Label", defString );
  mPlacementIndex = prj->readNumEntry( mNameConfig, "/Placement", 3 );
  mLabelQColor.setNamedColor( prj->readEntry( mNameConfig, "/Color", "#000000" ) ); // default color is black
}
Beispiel #5
0
CatchmentPolygonDlg::CatchmentPolygonDlg(QWidget *parent)
{
  setupUi(this);
  connect(inputBrowseButton, SIGNAL(clicked()), this, SLOT(inputBrowse()));
  connect(outputBrowseButton, SIGNAL(clicked()), this, SLOT(outputBrowse()));
  connect(runButton, SIGNAL(clicked()), this, SLOT(run()));
  connect(helpButton, SIGNAL(clicked()), this, SLOT(help()));
  connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));

  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));
  inputFileLineEdit->setText(p->readPath(p->readEntry("pihm", "catgrid"))); // 19

  int Thresh(p->readNumEntry("pihm", "facThreshold"));
  outputFileLineEdit->setText(projDir+"/RasterProcessing/cat"+ QString::number(Thresh) +".shp");
}
bool QgsServerProjectUtils::wmsInfoFormatSia2045( const QgsProject &project )
{
  QString sia2045 = project.readEntry( QStringLiteral( "WMSInfoFormatSIA2045" ), QStringLiteral( "/" ), "" );

  return sia2045.compare( QLatin1String( "enabled" ), Qt::CaseInsensitive ) == 0
         || sia2045.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;
}
bool QgsServerProjectUtils::wmsFeatureInfoSegmentizeWktGeometry( const QgsProject &project )
{
  QString segmGeom = project.readEntry( QStringLiteral( "WMSSegmentizeFeatureInfoGeometry" ), QStringLiteral( "/" ), "" );

  return segmGeom.compare( QLatin1String( "enabled" ), Qt::CaseInsensitive ) == 0
         || segmGeom.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;
}
Beispiel #8
0
void GeolFile::on_pushButtonGeolTexture_clicked()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString s = QFileDialog::getOpenFileName(this, "Choose Geol Texture File", projDir, "Texture (*.txt *.TXT)");
  ui->lineEditGeolTexture->setText(s);
}
Beispiel #9
0
void spatialPlotDlg::browseRivShapeFile()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString str = QFileDialog::getOpenFileName(this, "Choose Riv Shape File", projDir+"/VectorProcessing","Shape File(*.shp *.SHP)");
  lineEditRivShape->setText(str);
}
Beispiel #10
0
FlowGridDlg::FlowGridDlg(QWidget *parent)
{
  setupUi(this);
  connect(inputBrowseButton, SIGNAL(clicked()), this, SLOT(inputBrowse()));
  connect(outputFDRBrowseButton, SIGNAL(clicked()), this, SLOT(outputFDRBrowse()));
  connect(outputFAGBrowseButton, SIGNAL(clicked()), this, SLOT(outputFAGBrowse()));
  connect(runButton, SIGNAL(clicked()), this, SLOT(run()));
  connect(helpButton, SIGNAL(clicked()), this, SLOT(help()));
  connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));

  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  inputFileLineEdit->setText(p->readPath(p->readEntry("pihm", "fill"))); // 4
  outputFDRFileLineEdit->setText(projDir+"/RasterProcessing/fdr.asc");
  outputFAGFileLineEdit->setText(projDir+"/RasterProcessing/fac.asc");
}
Beispiel #11
0
void CatchmentPolygonDlg::inputBrowse()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString str = QFileDialog::getOpenFileName(this, "Choose File", projDir+"/RasterProcessing","CatchmentGrid File(*.adf *.asc)");
  inputFileLineEdit->setText(str);
}
Beispiel #12
0
void spatialPlotDlg::browseEleShapeFile()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString str = QFileDialog::getOpenFileName(this, "Choose TIN Shape File", projDir+"/DomainDecomposition","Shape File(*.shp *.SHP)");
  lineEditEleShape->setText(str);
}
Beispiel #13
0
void InitFile::on_pushButton_RivFile_clicked()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString s = QFileDialog::getOpenFileName(this, "Choose Riv File", projDir+"/DataModel", "Riv File (*.riv)");
  ui->lineEditRivFile->setText(s);
}
Beispiel #14
0
void GeolFile::on_pushButtonGeolFile_clicked()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString s = QFileDialog::getSaveFileName(this, "Choose .GEOL File Name", projDir+"/DataModel", "GEOL file (*.geol)");
  if(!s.endsWith(".geol"))
    s.append(".geol");
  ui->lineEditGeolFile->setText(s);
}
Beispiel #15
0
LinkGridDlg::LinkGridDlg(QWidget *parent)
{
  setupUi(this);
  connect(inputSTRBrowseButton, SIGNAL(clicked()), this, SLOT(inputSTRBrowse()));
  connect(inputFDRBrowseButton, SIGNAL(clicked()), this, SLOT(inputFDRBrowse()));
  connect(outputBrowseButton, SIGNAL(clicked()), this, SLOT(outputBrowse()));
  connect(runButton, SIGNAL(clicked()), this, SLOT(run()));
  connect(helpButton, SIGNAL(clicked()), this, SLOT(help()));
  connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));

  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  inputSTRFileLineEdit->setText(p->readPath(p->readEntry("pihm", "strgrid"))); // 9
  inputFDRFileLineEdit->setText(p->readPath(p->readEntry("pihm", "fdr"))); // 6

  int Thresh(p->readNumEntry("pihm", "facThreshold")); // 10
  outputFileLineEdit->setText(projDir+"/RasterProcessing/lnk"+QString::number(Thresh)+".asc");
}
Beispiel #16
0
void FlowGridDlg::inputBrowse()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString str = QFileDialog::getOpenFileName(this, "Choose File", projDir+"/RasterProcessing","DEM/Fill Grid File(*.adf *.asc)");
  inputFileLineEdit->setText(str);

  outputFDRFileLineEdit->setText(projDir+"/RasterProcessing/fdr.asc");
  outputFAGFileLineEdit->setText(projDir+"/RasterProcessing/fac.asc");
}
Beispiel #17
0
bool QgsServerProjectUtils::wmsFeatureInfoAddWktGeometry( const QgsProject &project )
{
  QString wktGeom = project.readEntry( QStringLiteral( "WMSAddWktGeometry" ), QStringLiteral( "/" ), "" );

  if ( wktGeom.compare( QLatin1String( "enabled" ), Qt::CaseInsensitive ) == 0
       || wktGeom.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0 )
  {
    return true;
  }
  return false;
}
Beispiel #18
0
void paraFileDlg::paraBrowse()
{
    QgsProject *p = QgsProject::instance();
    QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

    QString temp = QFileDialog::getSaveFileName(this, "Choose File", projDir+"/DataModel","para File(*.para *.PARA)");
    QString tmp = temp;
    if(!(tmp.toLower()).endsWith(".para")) {
        tmp.append(".para");
        temp = tmp;
    }
    paraFileLineEdit->setText(temp);
}
Beispiel #19
0
void spatialPlotDlg::browseModelFile()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString folder = QFileDialog::getExistingDirectory(this, "Choose Input Directory", projDir);
  folder=folder+"/"+p->readEntry("pihm", "ID");       // 50
  if(tabWidget->currentIndex()== ELEMENT_FEATURE)
  {
    //                      IS, GW, unsat, surf, ET0, ET1, ET2, Precip, NetPrecip, Infil, Rech
    const char* suffix[] = {".is.txt", ".GW.txt", ".unsat.txt", ".surf.txt", ".et0.txt", ".et1.txt", ".et2.txt", ".prep.txt", ".nprep.txt", ".infil.txt", ".Rech.txt"};
    folder += suffix[comboBoxEleVariable->currentIndex()];
  }
  if(tabWidget->currentIndex()== RIVER_FEATURE)
  {
    //                      head, inflow, outflow, baseflow tot, surfflow tot, base left, base right, surf left, surf right
    const char* suffix[] = {".stage.txt", ".rivFlx0.txt", ".rivFlx1.txt", ".rivFlx4.txt", ".rivFlx2.txt", ".rivFlx4.txt", ".rivFlx5.txt", ".rivFlx2.txt", ".rivFlx3.txt"};
    folder += suffix[comboBoxRivVariable->currentIndex()];
  }

  //QString str = QFileDialog::getOpenFileName(this, "Choose Model Output File", "~/","Text File(*.txt *.TXT);; NetCDF File(*.nc *.NC)");
  lineEditFileName->setText(folder);
}
Beispiel #20
0
void FlowGridDlg::outputFAGBrowse()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString temp = QFileDialog::getSaveFileName(this, "Choose File", projDir+"/RasterProcessing","Flow Acc Grid File(*.adf *.asc)");
  QString tmp = temp;
  if(!(tmp.toLower()).endsWith(".asc")) {
    tmp.append(".asc");
    temp = tmp;
  }

  outputFAGFileLineEdit->setText(temp);
}
// --------------------------- private slots ------------------------------- //
void QgsOpenRasterDialog::on_tbnSelectRaster_clicked()
{
  QSettings settings;
  QString dir = settings.value( "/Plugin-GeoReferencer/rasterdirectory" ).toString();
  if ( dir.isEmpty() )
    dir = ".";

  QString lastUsedFilter = settings.value( "/Plugin-GeoReferencer/lastusedfilter" ).toString();

  QString filters;
  QgsRasterLayer::buildSupportedRasterFileFilter( filters );
  filters.prepend( "(*.*);;" );
  QString rasterFileName = QFileDialog::getOpenFileName( this, tr( "Choose a name of the raster" ), dir,
                           filters, &lastUsedFilter );

  if ( rasterFileName.isEmpty() )
  {
    return;
  }
  leRasterFileName->setText( rasterFileName );

  // do we think that this is a valid raster?
  if ( !QgsRasterLayer::isValidRasterFileName( rasterFileName ) )
  {
    QMessageBox::critical( this, tr( "Error" ),
                           tr( "The selected file is not a valid raster file." ) );
    return;
  }

  QFileInfo fileInfo( rasterFileName );
  settings.setValue( "/Plugin-GeoReferencer/rasterdirectory", fileInfo.path() );
  settings.setValue( "/Plugin-GeoReferencer/lastusedfilter", lastUsedFilter );

  QString modifiedFileName = generateModifiedRasterFileName();
  leModifiedRasterFileName->setText( modifiedFileName );

  // What DOING this code?
  QgsProject* prj = QgsProject::instance();
  QString projBehaviour = settings.value( "/Projections/defaultBehaviour", "prompt" ).toString();
  QString projectCRS = prj->readEntry( "SpatialRefSys", "/ProjectCRSProj4String" );
  int projectCrsId = prj->readNumEntry( "SpatialRefSys", "/ProjectCrsId" );

  settings.setValue( "/Projections/defaultBehaviour", "useProject" );
  prj->writeEntry( "SpatialRefSys", "/ProjectCRSProj4String", GEOPROJ4 );
  prj->writeEntry( "SpatialRefSys", "/ProjectCrsId", int( GEOCRS_ID ) );

  settings.setValue( "/Projections/defaultBehaviour", projBehaviour );
  prj->writeEntry( "SpatialRefSys", "/ProjectCRSProj4String", projectCRS );
  prj->writeEntry( "SpatialRefSys", "/ProjectCrsId", projectCrsId );
}
Beispiel #22
0
void CatchmentPolygonDlg::outputBrowse()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  QString temp = QFileDialog::getSaveFileName(this, "Choose File", projDir+"/RasterProcessing","Catchment Polygon File(*.shp)");
  QString tmp = temp;
  if(!(tmp.toLower()).endsWith(".shp")) {
    tmp.append(".shp");
    temp = tmp;
  }

  outputFileLineEdit->setText(temp);
}
Beispiel #23
0
spatialPlotDlg::spatialPlotDlg(QDialog *parent)
{
  setupUi(this);

  connect( pushButtonEleShape, SIGNAL( clicked() ), this, SLOT( browseEleShapeFile() ) );
  connect( pushButtonRivShape, SIGNAL( clicked() ), this, SLOT( browseRivShapeFile() ) );
  connect( pushButtonFileName, SIGNAL( clicked() ), this, SLOT( browseModelFile()    ) );
  connect( pushButtonGenerate, SIGNAL( clicked() ), this, SLOT( generate()           ) );
  connect( pushButtonHelp,     SIGNAL( clicked() ), this, SLOT( help()               ) );

  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));

  int scale = p->readNumEntry("pihm", "scale");       // 110
  int step = p->readNumEntry("pihm", "step5");       // 106
  comboBoxEle->setCurrentIndex(scale);
  comboBoxRiv->setCurrentIndex(scale);
  step= scale==0 ? step : scale==1 ? step/60 : step/1440;
  //lineEditEleTime->setText(QString::number(step, 10));

  step=p->readNumEntry("pihm", "step8");   // 109
  step= scale==0 ? step : scale==1 ? step/60 : step/1440;
  //lineEditRivTime->setText(QString::number(step,10));

  lineEditEleShape->setText(p->readPath(p->readEntry("pihm", "TIN"))); // 48
  lineEditRivShape->setText(p->readPath(p->readEntry("pihm", "rivdec"))); // 81

  int start, finish;
  start = p->readNumEntry("pihm", "start"); // 111
  finish= p->readNumEntry("pihm", "finish"); // 112
  start = scale==0 ? start : scale==1 ? start/60 : start/1440; start = start +1;
  finish= scale==0 ? finish : scale==1 ? finish/60 : finish/1440;
  lineEditEleStart->setText(QString::number(start,10));
  lineEditEleFinish->setText(QString::number(finish,10));
  lineEditRivStart->setText(QString::number(start,10));
  lineEditRivFinish->setText(QString::number(finish,10));
}
Beispiel #24
0
void CatchmentPolygonDlg::run()
{
  QgsProject *p = QgsProject::instance();
  QString projDir = p->readPath(p->readEntry("pihm", "projDir"));
  p->writeEntry("pihm", "catgrid", p->writePath(inputFileLineEdit->text())); // 20
  p->writeEntry("pihm", "catpoly", p->writePath(outputFileLineEdit->text())); // 21

  QDir dir = QDir::home();
  QString home = dir.homePath();
  QString logFileName(qPrintable(home+"/log.html"));
  ofstream log;
  log.open(qPrintable(logFileName));
  log<<"<html><body><font size=3 color=black><p> Verifying Files...</p></font></body></html>";
  log.close();
  messageLog->setSource(logFileName);
  messageLog->setFocus();
  messageLog->setModified(TRUE);


  QString inputFileName((inputFileLineEdit->text()));
  QString outputShpFileName((outputFileLineEdit->text()));
  QString outputDbfFileName; QString outputShxFileName, id;
  outputDbfFileName = outputShpFileName;
  outputDbfFileName.truncate(outputDbfFileName.length()-3); outputShxFileName=outputDbfFileName;
  outputDbfFileName.append("dbf");

  outputShxFileName.truncate(outputShxFileName.length()-1);
  id=outputShxFileName;
  id=id.right(id.length()-id.lastIndexOf("/",-1)-1);
  cout << "ID = "<<qPrintable(id) <<"\n";
  outputShxFileName.append(".shx");

  QString shpFile = projDir+"/VectorProcessing/"+id+".shp";
  QString dbfFile = projDir+"/VectorProcessing/"+id+".dbf";
  QString shxFile = projDir+"/VectorProcessing/"+id+".shx";

  ifstream inFile;      inFile.open(qPrintable(inputFileLineEdit->text()));
//  ofstream outFile;    outFile.open(qPrintable(outputFileLineEdit->text()));
  int runFlag = 1;

  log.open(qPrintable(logFileName), ios::app);
  if(inputFileName.length()==0) {
    log<<"<p><font size=3 color=red> Error! Please input Catchment Grid Input File</p>";
    runFlag = 0;
  }
  else{
    log<<"<p>Checking... "<<qPrintable(inputFileName)<<"... ";
    if(inFile == NULL) {
      log<<"<font size=3 color=red> Error!</p>";
      qWarning("\n%s doesn't exist!", qPrintable(inputFileLineEdit->text()));
      runFlag = 0;
    }
    else
      log<<"Done!</p>";
  }
  log.close();
  messageLog->reload();
  QApplication::processEvents();

  log.open(qPrintable(logFileName), ios::app);
  if(outputShpFileName.length()==0) {
    log<<"<p><font size=3 color=red> Error! Please input Catchment Polygon Output File</p>";
    runFlag = 0;
  }
  else{
    log<<"<p>Checking... "<<qPrintable(outputShpFileName)<<"... ";
/*    if(outFile == NULL) {
      log<<"<font size=3 color=red> Error!</p>";
      qWarning("\nCan not open output file name");
      runFlag = 0;
    }
    else*/
      log<<"Done!</p>";
  }
  log.close();
  messageLog->reload();
  QApplication::processEvents();


  if(runFlag == 1) {

    log.open(qPrintable(logFileName), ios::app);
    log<<"<p>Running...";
    log.close();
    messageLog->reload();
    QApplication::processEvents();

    Convert(inputFileName, outputShpFileName);

    char err = 0;
    if (QFile::exists(shpFile) && !QFile::remove(shpFile)) err |= 1;
    if (QFile::exists(dbfFile) && !QFile::remove(dbfFile)) err |= 2;
    if (QFile::exists(shxFile) && !QFile::remove(shxFile)) err |= 4;
    const char* msg[] = {" shp", " dbf", " shx"};
    QString s("Failed to remove old:");
    char idx = 0;
    for(; err; err>>=1, ++idx)
      if (err & 1) {
        s += msg[idx];
      }
    if (idx)
      QMessageBox::warning(this, "Failed to remove old files", s);

    QFile::copy(outputShpFileName, shpFile);
    QFile::copy(outputDbfFileName, dbfFile);
    QFile::copy(outputShxFileName, shxFile);

    p->writeEntry("pihm", "catpoly", shpFile); //21

    log.open(qPrintable(logFileName), ios::app);
    log<<" Done!</p>";
    log.close();
    messageLog->reload();
    QApplication::processEvents();

    if(showSG_DFrame->isChecked() == 1) {
      QString myFileNameQString = outputShpFileName;
      QFileInfo myFileInfo(myFileNameQString);
      QString myBaseNameQString = myFileInfo.baseName();
      QString provider = "OGR";
      cout<<"\n"<<myFileNameQString.ascii()<<"\n"<<myBaseNameQString.ascii()<<"\n"<<provider.ascii()<<"\n";
      //getchar(); getchar();
      applicationPointer->addVectorLayer(myFileNameQString, myBaseNameQString, "ogr");
      //QgsRasterLayer *tempLayer = new QgsRasterLayer("/backup/pihm/RasterProcessing/FillPits", "morgedem.asc");
//??			applicationPointer->addLayer(QStringList(outputShpFileName), NULL);
    }
  }
Beispiel #25
0
QString QgsServerProjectUtils::owsServiceAbstract( const QgsProject &project )
{
  return project.readEntry( QStringLiteral( "WMSServiceAbstract" ), QStringLiteral( "/" ) );
}
Beispiel #26
0
QString QgsServerProjectUtils::wmtsServiceUrl( const QgsProject &project )
{
  return project.readEntry( QStringLiteral( "WMTSUrl" ), QStringLiteral( "/" ), "" );
}
Beispiel #27
0
QString QgsServerProjectUtils::owsServiceAccessConstraints( const QgsProject &project )
{
  return project.readEntry( QStringLiteral( "WMSAccessConstraints" ), QStringLiteral( "/" ) );
}
Beispiel #28
0
QString QgsServerProjectUtils::owsServiceFees( const QgsProject &project )
{
  return project.readEntry( QStringLiteral( "WMSFees" ), QStringLiteral( "/" ) );
}
Beispiel #29
0
QString QgsServerProjectUtils::owsServiceContactPhone( const QgsProject &project )
{
  return project.readEntry( QStringLiteral( "WMSContactPhone" ), QStringLiteral( "/" ) );
}
Beispiel #30
0
QString QgsServerProjectUtils::owsServiceOnlineResource( const QgsProject &project )
{
  return project.readEntry( QStringLiteral( "WMSOnlineResource" ), QStringLiteral( "/" ) );
}