QGIS API Documentation 3.43.0-Master (32433f7016e)
qgsgroupwmsdatadialog.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsscalevisibilitydialog.cpp
3 --------------------------------------
4 Date : 20.05.2014
5 Copyright : (C) 2014 Denis Rouzaud
6 Email : denis.rouzaud@gmail.com
7***************************************************************************
8* *
9* This program is free software; you can redistribute it and/or modify *
10* it under the terms of the GNU General Public License as published by *
11* the Free Software Foundation; either version 2 of the License, or *
12* (at your option) any later version. *
13* *
14***************************************************************************/
15
17#include "moc_qgsgroupwmsdatadialog.cpp"
19
20#include <QRegularExpressionValidator>
21
22QgsGroupWmsDataDialog::QgsGroupWmsDataDialog( QWidget *parent, Qt::WindowFlags fl )
24{
25}
26
27QgsGroupWmsDataDialog::QgsGroupWmsDataDialog( const QgsMapLayerServerProperties &serverProperties, QWidget *parent, Qt::WindowFlags fl )
28 : QDialog( parent, fl )
29 , mServerProperties( std::make_unique<QgsMapLayerServerProperties>() )
30{
31 setupUi( this );
32
33 serverProperties.copyTo( mServerProperties.get() );
34
35 mMapLayerServerPropertiesWidget->setHasWfsTitle( false );
36 mMapLayerServerPropertiesWidget->setServerProperties( mServerProperties.get() );
37}
38
40{
41 mMapLayerServerPropertiesWidget->save();
42 return mServerProperties->shortName();
43}
44
45void QgsGroupWmsDataDialog::setGroupShortName( const QString &shortName )
46{
47 mServerProperties->setShortName( shortName );
48 mMapLayerServerPropertiesWidget->sync();
49}
50
52{
53 mMapLayerServerPropertiesWidget->save();
54 return mServerProperties->title();
55}
56
57void QgsGroupWmsDataDialog::setGroupTitle( const QString &title )
58{
59 mServerProperties->setTitle( title );
60 mMapLayerServerPropertiesWidget->sync();
61}
62
64{
65 mMapLayerServerPropertiesWidget->save();
66 return mServerProperties->abstract();
67}
68
69void QgsGroupWmsDataDialog::setGroupAbstract( const QString &abstract )
70{
71 mServerProperties->setAbstract( abstract );
72 mMapLayerServerPropertiesWidget->sync();
73}
74
76{
77 return mServerProperties.get();
78}
79
81{
82 return mServerProperties.get();
83}
84
86{
87 mMapLayerServerPropertiesWidget->save();
88 QDialog::accept();
89}
A dialog for configuring a WMS group.
Q_DECL_DEPRECATED void setGroupAbstract(const QString &abstract)
Sets group WMS abstract.
Q_DECL_DEPRECATED QgsGroupWmsDataDialog(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor.
Q_DECL_DEPRECATED void setGroupShortName(const QString &shortName)
Sets group WMS short name.
Q_DECL_DEPRECATED void setGroupTitle(const QString &title)
Sets group WMS title.
Q_DECL_DEPRECATED QString groupAbstract() const
Returns group WMS abstract.
Q_DECL_DEPRECATED QString groupTitle() const
Returns group WMS title.
Q_DECL_DEPRECATED QString groupShortName() const
Returns group WMS short name.
QgsMapLayerServerProperties * serverProperties()
Returns QGIS Server Properties for the layer tree group.
Manages QGIS Server properties for a map layer.
void copyTo(QgsMapLayerServerProperties *properties) const
Copy properties to another instance.