17 #ifndef QGSNEWNAMEDIALOG_H
18 #define QGSNEWNAMEDIALOG_H
48 QgsNewNameDialog(
const QString &source = QString(),
const QString &initial = QString(),
49 const QStringList &extensions = QStringList(),
const QStringList &existing = QStringList(),
50 const QRegExp ®exp = QRegExp(), Qt::CaseSensitivity cs = Qt::CaseSensitive,
51 QWidget *parent
SIP_TRANSFERTHIS =
nullptr, Qt::WindowFlags flags = QgsGuiUtils::ModalDialogFlags );
60 void setHintString(
const QString &hintString );
68 QString hintString()
const;
77 void setOverwriteEnabled(
bool enabled );
92 void setAllowEmptyName(
bool allowed );
107 void setConflictingNameWarning(
const QString &
string );
121 QString name()
const;
131 static bool exists(
const QString &name,
const QStringList &extensions,
132 const QStringList &existing, Qt::CaseSensitivity cs = Qt::CaseSensitive );
151 QLabel *mHintLabel =
nullptr;
152 QLineEdit *mLineEdit =
nullptr;
154 QLabel *mNamesLabel =
nullptr;
155 QLabel *mErrorLabel =
nullptr;
158 bool mOverwriteEnabled =
true;
159 bool mAllowEmptyName =
false;
162 QString highlightText(
const QString &text );
163 static QStringList fullNames(
const QString &name,
const QStringList &extensions );
165 static QStringList matching(
const QStringList &newNames,
const QStringList &existingNames,
166 Qt::CaseSensitivity cs = Qt::CaseSensitive );
A generic dialog with layout and button box.