-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE][QGIS Server] Add short name to layers, groups and project
A number of elements have both a <Name> and a <Title>. The Name is a text string used for machine-to-machine communication while the Title is for the benefit of humans. For example, a dataset might have the descriptive Title “Maximum Atmospheric Temperature” and be requested using the abbreviated Name “ATMAX”. User can already set title for layers, groups and project. OWS name is based on the name used in layer tree. This name is more a label for humans than a name for machine-to-machine communication. To add the capability to users to define Name as a text string for machine-to-machine communication, this pull-request adds: * short name line edits to layers properties * WMS data dialog to layer tree group (short name, title, abstract) * short name line edits to project properties * add a regexp validator "^[A-Za-z][A-Za-z0-9\._-]*" to short name line edit accessible through a static method * add a TreeName element in the fullProjectSettings If a short name has been set for layers, groups and project it is used by QGIS Sever as the layer name.
- Loading branch information
Showing
27 changed files
with
724 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/*************************************************************************** | ||
qgsscalevisibilitydialog.cpp | ||
-------------------------------------- | ||
Date : 20.05.2014 | ||
Copyright : (C) 2014 Denis Rouzaud | ||
Email : denis.rouzaud@gmail.com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsapplication.h" | ||
#include "qgsgroupwmsdatadialog.h" | ||
|
||
|
||
QgsGroupWMSDataDialog::QgsGroupWMSDataDialog( QWidget *parent, const Qt::WindowFlags& fl ) : | ||
QDialog( parent, fl ) | ||
{ | ||
setupUi( this ); | ||
// WMS Name validator | ||
QValidator *shortNameValidator = new QRegExpValidator( QgsApplication::shortNameRegExp(), this ); | ||
mShortNameLineEdit->setValidator( shortNameValidator ); | ||
} | ||
|
||
QString QgsGroupWMSDataDialog::groupShortName() | ||
{ | ||
return mShortNameLineEdit->text(); | ||
} | ||
|
||
void QgsGroupWMSDataDialog::setGroupShortName( QString shortName ) | ||
{ | ||
mShortNameLineEdit->setText( shortName ); | ||
} | ||
|
||
QString QgsGroupWMSDataDialog::groupTitle() | ||
{ | ||
return mTitleLineEdit->text(); | ||
} | ||
|
||
void QgsGroupWMSDataDialog::setGroupTitle( QString title ) | ||
{ | ||
mTitleLineEdit->setText( title ); | ||
} | ||
|
||
QString QgsGroupWMSDataDialog::groupAbstract() | ||
{ | ||
return mAbstractTextEdit->toPlainText(); | ||
} | ||
|
||
void QgsGroupWMSDataDialog::setGroupAbstract( QString abstract ) | ||
{ | ||
mAbstractTextEdit->setPlainText( abstract ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/*************************************************************************** | ||
qgsscalevisibilitydialog.cpp | ||
-------------------------------------- | ||
Date : 20.05.2014 | ||
Copyright : (C) 2014 Denis Rouzaud | ||
Email : denis.rouzaud@gmail.com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSGROUPWMSDATADIALOG_H | ||
#define QGSGROUPWMSDATADIALOG_H | ||
|
||
#include "ui_qgsgroupwmsdatadialogbase.h" | ||
#include "qgisgui.h" | ||
#include "qgscontexthelp.h" | ||
|
||
#include "qgis.h" | ||
|
||
class GUI_EXPORT QgsGroupWMSDataDialog: public QDialog, private Ui::QgsGroupWMSDataDialogBase | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
//! Constructor | ||
QgsGroupWMSDataDialog( QWidget *parent = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags ); | ||
//~QgsGroupWMSDataDialog(); | ||
|
||
//! return group WMS title | ||
QString groupTitle(); | ||
|
||
//! return group WMS short name | ||
QString groupShortName(); | ||
|
||
//! return group WMS abstract | ||
QString groupAbstract(); | ||
|
||
|
||
public slots: | ||
//! set group WMS title | ||
void setGroupTitle( QString title ); | ||
|
||
//! set group WMS short name | ||
void setGroupShortName( QString shortName ); | ||
|
||
//! set group WMS abstract | ||
void setGroupAbstract( QString abstract ); | ||
|
||
|
||
private: | ||
|
||
QString mGroupTitle; | ||
QString mGroupShortName; | ||
|
||
}; | ||
|
||
#endif // QGSGROUPWMSDATADIALOG_H |
Oops, something went wrong.