19 #include <QPushButton> 20 #include <QRegExpValidator> 21 #include <QSizePolicy> 28 const QRegExp& regexp, Qt::CaseSensitivity cs,
31 , mExiting( existing )
32 , mExtensions( extensions )
33 , mCaseSensitivity( cs )
34 , mNamesLabel( nullptr )
36 , mOverwriteEnabled( true )
47 hintString =
tr(
"Enter new %1" ).
arg( nameDesc );
51 hintString =
tr(
"Enter new %1 for %2" ).
arg( nameDesc, source );
109 return "<b>" + text +
"</b>";
115 QString namesString =
tr(
"Full names" ) +
": ";
137 namesString +=
' ' + newNames.
join(
", " );
146 :
tr(
"%n Name(s) %1 exists",
nullptr, conflicts.
size() ).arg( conflicts.
join(
", " ) );
168 Q_FOREACH (
const QString& ext, extensions )
181 Qt::CaseSensitivity cs )
185 Q_FOREACH (
const QString& newName, newNames )
187 Q_FOREACH (
const QString& existingName, existingNames )
189 if ( existingName.
compare( newName, cs ) == 0 )
191 list << existingName;
199 const QStringList& existing, Qt::CaseSensitivity cs )
void setSizeConstraint(SizeConstraint)
A generic dialog with layout and button box.
QString join(const QString &separator) const
QString tr(const char *sourceText, const char *disambiguation, int n)
QDialogButtonBox * buttonBox()
Returns the button box.
void setText(const QString &)
int width(const QString &text, int len) const
QVBoxLayout * layout()
Returns the central layout. Widgets added to it must have this dialog as parent.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int compare(const QString &other) const
bool exactMatch(const QString &str) const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void setValidator(const QValidator *v)
void setWordWrap(bool on)
void setSpacing(int spacing)