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 )
46 hintString =
tr(
"Enter new %1" ).
arg( nameDesc );
50 hintString =
tr(
"Enter new %1 for %2" ).
arg( nameDesc ).
arg( source );
82 return "<b>" + text +
"</b>";
89 QString namesString =
tr(
"Full names" ) +
": ";
111 namesString +=
" " + newNames.
join(
", " );
133 foreach (
QString ext, extensions )
146 Qt::CaseSensitivity cs )
150 foreach (
QString newName, newNames )
152 foreach (
QString existingName, existingNames )
154 if ( existingName.
compare( newName, cs ) == 0 )
156 list << existingName;
164 const QStringList& existing, Qt::CaseSensitivity cs )
168 return conflicts.
size() > 0;
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 &)
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)