QGIS API Documentation 3.99.0-Master (f78f5286a64)
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 "qgsgui.h"
18#include "moc_qgsgroupwmsdatadialog.cpp"
20
21#include <QRegularExpressionValidator>
22
23QgsGroupWmsDataDialog::QgsGroupWmsDataDialog( QWidget *parent, Qt::WindowFlags fl )
25{
26}
27
28QgsGroupWmsDataDialog::QgsGroupWmsDataDialog( const QgsMapLayerServerProperties &serverProperties, QWidget *parent, Qt::WindowFlags fl )
29 : QDialog( parent, fl )
30 , mServerProperties( std::make_unique<QgsMapLayerServerProperties>() )
31{
32 setupUi( this );
34
35 serverProperties.copyTo( mServerProperties.get() );
36
37 mMapLayerServerPropertiesWidget->setHasWfsTitle( false );
38 mMapLayerServerPropertiesWidget->setServerProperties( mServerProperties.get() );
39}
40
42{
43 mMapLayerServerPropertiesWidget->save();
44 return mServerProperties->shortName();
45}
46
47void QgsGroupWmsDataDialog::setGroupShortName( const QString &shortName )
48{
49 mServerProperties->setShortName( shortName );
50 mMapLayerServerPropertiesWidget->sync();
51}
52
54{
55 mMapLayerServerPropertiesWidget->save();
56 return mServerProperties->title();
57}
58
59void QgsGroupWmsDataDialog::setGroupTitle( const QString &title )
60{
61 mServerProperties->setTitle( title );
62 mMapLayerServerPropertiesWidget->sync();
63}
64
66{
67 mMapLayerServerPropertiesWidget->save();
68 return mServerProperties->abstract();
69}
70
71void QgsGroupWmsDataDialog::setGroupAbstract( const QString &abstract )
72{
73 mServerProperties->setAbstract( abstract );
74 mMapLayerServerPropertiesWidget->sync();
75}
76
78{
79 return mServerProperties.get();
80}
81
83{
84 return mServerProperties.get();
85}
86
88{
89 mMapLayerServerPropertiesWidget->save();
90 QDialog::accept();
91}
92
94{
95 return mComputeTimeDimension->checkState() == Qt::Checked;
96}
97
98void QgsGroupWmsDataDialog::setHasTimeDimension( bool hasTimeDimension )
99{
100 mComputeTimeDimension->setCheckState( hasTimeDimension ? Qt::Checked : Qt::Unchecked );
101}
A dialog for configuring a WMS group.
void setHasTimeDimension(bool hasTimeDimension)
Sets whether the time dimension should be computed for this group or not.
bool hasTimeDimension() const
Returns whether the time dimension should be computed for this group or not.
Q_DECL_DEPRECATED void setGroupAbstract(const QString &abstract)
Sets group WMS abstract.
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.
static void enableAutoGeometryRestore(QWidget *widget, const QString &key=QString())
Register the widget to allow its position to be automatically saved and restored when open and closed...
Definition qgsgui.cpp:210
Manages QGIS Server properties for a map layer.
void copyTo(QgsMapLayerServerProperties *properties) const
Copy properties to another instance.