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 setConflictingNameWarning(
const QString &
string );
106 QString name()
const;
116 static bool exists(
const QString &name,
const QStringList &extensions,
117 const QStringList &existing, Qt::CaseSensitivity cs = Qt::CaseSensitive );
126 void newNameChanged();
136 QLabel *mHintLabel =
nullptr;
137 QLineEdit *mLineEdit =
nullptr;
139 QLabel *mNamesLabel =
nullptr;
140 QLabel *mErrorLabel =
nullptr;
143 bool mOverwriteEnabled =
true;
146 QString highlightText(
const QString &text );
147 static QStringList fullNames(
const QString &name,
const QStringList &extensions );
149 static QStringList matching(
const QStringList &newNames,
const QStringList &existingNames,
150 Qt::CaseSensitivity cs = Qt::CaseSensitive );
153 #endif // QGSNEWNAMEDIALOG_H