SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
AddBasemapDialog Class Reference

Unified dialog for adding a layer from a web service or a file. More...

#include <addbasemapdialog.h>

Inheritance diagram for AddBasemapDialog:
Collaboration diagram for AddBasemapDialog:

Public Types

enum  Tab {
  XyzTiles = 0 ,
  WmsWmts = 1 ,
  Wcs = 2 ,
  ArcGisRest = 3 ,
  LocalFile = 4 ,
  Wfs = 5
}
 The dialog's pages, in the order they appear. More...
 

Public Member Functions

 AddBasemapDialog (QWidget *parent=nullptr)
 
 ~AddBasemapDialog () override
 
void setPreferredExtent (const QRectF &lonLatBounds)
 Limits a feature request to the ground the map is looking at.
 
void connectToWFS ()
 Asks the WFS at the address now entered what it holds.
 
QString wfsStatus () const
 
OpenSWMMVisLayercreateLayer (QObject *parent) const
 Creates and returns the layer the current page describes.
 
void setInitialTab (int index)
 

Detailed Description

Unified dialog for adding a layer from a web service or a file.

Member Enumeration Documentation

◆ Tab

The dialog's pages, in the order they appear.

Named because createLayer() dispatches on the current page and callers open the dialog on a chosen one; bare indices in two files is how that goes wrong quietly.

Wfs is last rather than beside the other OGC services, which would read better, because DialogLayoutPersistence remembers the selected page by index – renumbering would silently open somebody's saved dialog on a different service.

Enumerator
XyzTiles 
WmsWmts 
Wcs 
ArcGisRest 
LocalFile 
Wfs 

Constructor & Destructor Documentation

◆ AddBasemapDialog()

AddBasemapDialog::AddBasemapDialog ( QWidget *  parent = nullptr)
explicit
Here is the call graph for this function:

◆ ~AddBasemapDialog()

AddBasemapDialog::~AddBasemapDialog ( )
override

Member Function Documentation

◆ connectToWFS()

void AddBasemapDialog::connectToWFS ( )

Asks the WFS at the address now entered what it holds.

Public because it is what the page's Connect button does, and a test should press the button rather than reach past it.

◆ createLayer()

OpenSWMMVisLayer * AddBasemapDialog::createLayer ( QObject *  parent) const

Creates and returns the layer the current page describes.

Not always a basemap. The WFS page yields a vector layer of features for the layer tree rather than a picture to sit behind the model, and that layer has already been fetched by the time this is called – see fetchWFSThenAccept().

Caller owns the returned object. Returns nullptr on failure.

Parameters
parentQt parent for the new layer object.

◆ setInitialTab()

void AddBasemapDialog::setInitialTab ( int  index)

◆ setPreferredExtent()

void AddBasemapDialog::setPreferredExtent ( const QRectF &  lonLatBounds)

Limits a feature request to the ground the map is looking at.

Longitude and latitude. Only the WFS page uses it: a feature service holds a country and a model needs one catchment, so without this the request is bounded only by a feature count and returns an arbitrary few thousand from wherever the service starts counting.

Parameters
lonLatBoundsThe map's current extent, or a null rectangle.

◆ wfsStatus()

QString AddBasemapDialog::wfsStatus ( ) const

What the WFS page is currently saying. Empty until it has said something.


The documentation for this class was generated from the following files: