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 );
105 QString name()
const;
115 static bool exists(
const QString &name,
const QStringList &extensions,
116 const QStringList &existing, Qt::CaseSensitivity cs = Qt::CaseSensitive );
124 QLabel *mHintLabel =
nullptr;
125 QLineEdit *mLineEdit =
nullptr;
127 QLabel *mNamesLabel =
nullptr;
128 QLabel *mErrorLabel =
nullptr;
131 bool mOverwriteEnabled =
true;
134 QString highlightText(
const QString &text );
135 static QStringList fullNames(
const QString &name,
const QStringList &extensions );
137 static QStringList matching(
const QStringList &newNames,
const QStringList &existingNames,
138 Qt::CaseSensitivity cs = Qt::CaseSensitive );
141 #endif // QGSNEWNAMEDIALOG_H
A generic dialog with layout and button box.