QGIS/python/gui/auto_generated/qgsnewnamedialog.sip.in

176 lines
5.2 KiB
Plaintext
Raw Normal View History

2017-06-07 16:16:21 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsnewnamedialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsNewNameDialog : QgsDialog
{
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
New name, for example new layer name dialog. If existing names are provided,
the dialog warns users if an entered name already exists.
2017-06-07 16:16:21 +02:00
.. versionadded:: 2.10
%End
2017-06-07 16:16:21 +02:00
%TypeHeaderCode
#include "qgsnewnamedialog.h"
%End
public:
2017-06-07 16:16:21 +02:00
QgsNewNameDialog( const QString &source = QString(), const QString &initial = QString(),
2017-06-07 16:16:21 +02:00
const QStringList &extensions = QStringList(), const QStringList &existing = QStringList(),
const QRegExp &regexp = QRegExp(), Qt::CaseSensitivity cs = Qt::CaseSensitive,
QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = QgsGuiUtils::ModalDialogFlags );
%Docstring
2017-12-15 10:36:55 -04:00
New dialog constructor.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param source: original data source name, e.g. original layer name of the layer to be copied
:param initial: initial name
:param extensions: base name extensions, e.g. raster base name band extensions or vector layer type extensions
:param existing: existing names
:param regexp: regular expression to be used as validator, for example db tables should have "[A-Za-z_][A-Za-z0-9_]+"
:param cs: case sensitivity for new name to existing names comparison
:param parent:
:param flags:
2017-06-07 16:16:21 +02:00
%End
void setHintString( const QString &hintString );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the hint string for the dialog (the text shown above the name
input box).
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param hintString: hint text
.. seealso:: :py:func:`hintString`
2017-12-15 10:36:55 -04:00
2017-06-07 16:16:21 +02:00
.. versionadded:: 2.12
%End
QString hintString() const;
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the hint string for the dialog (the text shown above the name
input box).
.. seealso:: :py:func:`setHintString`
2017-12-15 10:36:55 -04:00
2017-06-07 16:16:21 +02:00
.. versionadded:: 2.12
%End
void setOverwriteEnabled( bool enabled );
2017-06-07 16:16:21 +02:00
%Docstring
2019-02-26 19:54:09 +10:00
Sets whether users are permitted to overwrite existing names. If ``True``, then
the dialog will reflect that the new name will overwrite an existing name. If ``False``,
2017-12-15 10:36:55 -04:00
then the dialog will not accept names which already exist.
.. seealso:: :py:func:`overwriteEnabled`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.12
2017-06-07 16:16:21 +02:00
%End
bool overwriteEnabled() const;
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether users are permitted to overwrite existing names.
.. seealso:: :py:func:`setOverwriteEnabled`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.12
%End
void setAllowEmptyName( bool allowed );
%Docstring
Sets whether users are permitted to leave the widget empty.
If ``True``, the dialog will accept an empty name value.
.. seealso:: :py:func:`allowEmptyName`
.. versionadded:: 3.14
%End
bool allowEmptyName() const;
%Docstring
Returns ``True`` if the widget can be left empty (no name filled).
.. seealso:: :py:func:`setAllowEmptyName`
.. versionadded:: 3.14
2017-06-07 16:16:21 +02:00
%End
void setConflictingNameWarning( const QString &string );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the string used for warning users if a conflicting name exists.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param string: warning string. If empty a default warning string will be used.
.. seealso:: :py:func:`conflictingNameWarning`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.12
2017-06-07 16:16:21 +02:00
%End
QString conflictingNameWarning() const;
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the string used for warning users if a conflicting name exists.
.. seealso:: :py:func:`setConflictingNameWarning`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.12
2017-06-07 16:16:21 +02:00
%End
QString name() const;
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Name entered by user.
:return: new name
.. seealso:: :py:func:`newNameChanged`
2017-06-07 16:16:21 +02:00
%End
2017-06-07 16:16:21 +02:00
static bool exists( const QString &name, const QStringList &extensions,
const QStringList &existing, Qt::CaseSensitivity cs = Qt::CaseSensitive );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Test if name or name with at least one extension exists.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param name: name or base name
:param extensions: base name extensions
:param existing: existing names
:param cs: case sensitivity for new name to existing names comparison
2019-02-26 19:54:09 +10:00
:return: ``True`` if name exists
2017-06-07 16:16:21 +02:00
%End
signals:
void newNameChanged();
%Docstring
Emitted when the name is changed in the dialog.
.. versionadded:: 3.2
%End
public slots:
void nameChanged();
protected:
QString highlightText( const QString &text );
2017-06-07 16:16:21 +02:00
%Docstring
List of names with extensions
2017-06-07 16:16:21 +02:00
%End
static QStringList fullNames( const QString &name, const QStringList &extensions );
2017-06-07 16:16:21 +02:00
static QStringList matching( const QStringList &newNames, const QStringList &existingNames,
Qt::CaseSensitivity cs = Qt::CaseSensitive );
};
2017-06-07 16:16:21 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsnewnamedialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/