FileNameValidatingLineEdit Class | Extending Qt Creator Manual

Extending Qt Creator Manual | FileNameValidatingLineEdit

Extending Qt Creator Manual 4.6.0

# FileNameValidatingLineEdit Class

(Utils::FileNameValidatingLineEdit)

The FileNameValidatingLineEdit class is a control that lets the user choose a (base) file name, based on a QLineEdit. More...

Header: | #include <FileNameValidatingLineEdit>
Inherits: | Utils::FancyLineEdit

- List of all members, including inherited members

## Properties

- allowDirectories : bool
- forceFirstCapitalLetter : bool
- requiredExtensions : QStringList

- 3 properties inherited from Utils::FancyLineEdit

## Public Functions

| FileNameValidatingLineEdit(QWidget *parent = 0)
bool | allowDirectories() const
bool | forceFirstCapitalLetter() const
QStringList | requiredExtensions() const
void | setAllowDirectories(bool v)
void | setForceFirstCapitalLetter(bool b)
void | setRequiredExtensions(const QStringList &extensionList)

- 28 public functions inherited from Utils::FancyLineEdit

## Static Public Members

bool | validateFileName(const QString &name, bool allowDirectories = false, QString *errorMessage = 0)
bool | validateFileNameExtension(const QString &name, const QStringList &requiredExtensions = QStringList(), QString *errorMessage = 0)

- 1 static public member inherited from Utils::FancyLineEdit

## Reimplemented Protected Functions

virtual QString | fixInputString(const QString &string)

- 3 protected functions inherited from Utils::FancyLineEdit
- 2 protected functions inherited from Utils::CompletingLineEdit

### Additional Inherited Members

- 6 signals inherited from Utils::FancyLineEdit
- 3 protected functions inherited from Utils::FancyLineEdit
- 2 protected functions inherited from Utils::CompletingLineEdit

## Detailed Description

The FileNameValidatingLineEdit class is a control that lets the user choose a (base) file name, based on a QLineEdit.

The class has some validation logic for embedding into QWizardPage.

## Property Documentation

### allowDirectories : bool

Access functions:

bool | allowDirectories() const
void | setAllowDirectories(bool v)

### forceFirstCapitalLetter : bool

Access functions:

bool | forceFirstCapitalLetter() const
void | setForceFirstCapitalLetter(bool b)

### requiredExtensions : QStringList

Access functions:

QStringList | requiredExtensions() const
void | setRequiredExtensions(const QStringList &extensionList)

## Member Function Documentation

### FileNameValidatingLineEdit::FileNameValidatingLineEdit(QWidget *parent = 0)

Default constructs an instance of FileNameValidatingLineEdit.

### `[virtual protected]` QString FileNameValidatingLineEdit::fixInputString(const QString &string)

### `[static]` bool FileNameValidatingLineEdit::validateFileName(const QString &name, bool allowDirectories = false, QString *errorMessage = 0)

### `[static]` bool FileNameValidatingLineEdit::validateFileNameExtension(const QString &name, const QStringList &requiredExtensions = QStringList(), QString *errorMessage = 0)