QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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
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
18#include "qgsgui.h"
20
21#include <QRegularExpressionValidator>
22
23#include "moc_qgsgroupwmsdatadialog.cpp"
24
25QgsGroupWmsDataDialog::QgsGroupWmsDataDialog( QWidget *parent, Qt::WindowFlags fl )
27{
28}
29
31 : QDialog( parent, fl )
32 , mServerProperties( std::make_unique<QgsMapLayerServerProperties>() )
33{
34 setupUi( this );
36
37 serverProperties.copyTo( mServerProperties.get() );
38
39 mMapLayerServerPropertiesWidget->setHasWfsTitle( false );
40 mMapLayerServerPropertiesWidget->setServerProperties( mServerProperties.get() );
41}
42
44{
45 mMapLayerServerPropertiesWidget->save();
46 return mServerProperties->shortName();
47}
48
49void QgsGroupWmsDataDialog::setGroupShortName( const QString &shortName )
50{
51 mServerProperties->setShortName( shortName );
52 mMapLayerServerPropertiesWidget->sync();
53}
54
56{
57 mMapLayerServerPropertiesWidget->save();
58 return mServerProperties->title();
59}
60
61void QgsGroupWmsDataDialog::setGroupTitle( const QString &title )
62{
63 mServerProperties->setTitle( title );
64 mMapLayerServerPropertiesWidget->sync();
65}
66
68{
69 mMapLayerServerPropertiesWidget->save();
70 return mServerProperties->abstract();
71}
72
73void QgsGroupWmsDataDialog::setGroupAbstract( const QString &abstract )
74{
75 mServerProperties->setAbstract( abstract );
76 mMapLayerServerPropertiesWidget->sync();
77}
78
80{
81 return mServerProperties.get();
82}
83
85{
86 return mServerProperties.get();
87}
88
90{
91 mMapLayerServerPropertiesWidget->save();
92 QDialog::accept();
93}
94
96{
97 return mComputeTimeDimension->checkState() == Qt::Checked;
98}
99
101{
102 mComputeTimeDimension->setCheckState( hasTimeDimension ? Qt::Checked : Qt::Unchecked );
103}
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:221
Manages QGIS Server properties for a map layer.