QGIS API Documentation  3.22.4-Białowieża (ce8e65e95e)
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 : [email protected]
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 
16 #include "qgsapplication.h"
17 #include "qgsgroupwmsdatadialog.h"
18 
19 #include <QRegularExpressionValidator>
20 
21 QgsGroupWmsDataDialog::QgsGroupWmsDataDialog( QWidget *parent, Qt::WindowFlags fl )
22  : QDialog( parent, fl )
23 {
24  setupUi( this );
25  // WMS Name validator
26  QValidator *shortNameValidator = new QRegularExpressionValidator( QgsApplication::shortNameRegularExpression(), this );
27  mShortNameLineEdit->setValidator( shortNameValidator );
28 }
29 
31 {
32  return mShortNameLineEdit->text();
33 }
34 
35 void QgsGroupWmsDataDialog::setGroupShortName( const QString &shortName )
36 {
37  mShortNameLineEdit->setText( shortName );
38 }
39 
41 {
42  return mTitleLineEdit->text();
43 }
44 
45 void QgsGroupWmsDataDialog::setGroupTitle( const QString &title )
46 {
47  mTitleLineEdit->setText( title );
48 }
49 
51 {
52  return mAbstractTextEdit->toPlainText();
53 }
54 
55 void QgsGroupWmsDataDialog::setGroupAbstract( const QString &abstract )
56 {
57  mAbstractTextEdit->setPlainText( abstract );
58 }
static QRegularExpression shortNameRegularExpression()
Returns the short name regular expression for line edit validator.
QString groupTitle()
Returns group WMS title.
void setGroupAbstract(const QString &abstract)
Sets group WMS abstract.
QgsGroupWmsDataDialog(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor.
void setGroupShortName(const QString &shortName)
Sets group WMS short name.
void setGroupTitle(const QString &title)
Sets group WMS title.
QString groupAbstract()
Returns group WMS abstract.
QString groupShortName()
Returns group WMS short name.