PathChooser Class
(Utils::PathChooser)The PathChooser class is a control that lets the user choose a path, consisting of a QLineEdit and a "Browse" button. More...
| Header: | #include <PathChooser> |
Public Types
| enum | Kind { ExistingDirectory, Directory, File, SaveFile, ..., Any } |
Properties
|
|
Public Functions
| PathChooser(QWidget *parent = nullptr) | |
| virtual | ~PathChooser() |
| void | addButton(const QString &text, QObject *context, const std::function<void() > &callback) |
| QString | baseDirectory() const |
| FileName | baseFileName() const |
| QAbstractButton * | buttonAtIndex(int index) const |
| QStringList | commandVersionArguments() const |
| FancyLineEdit::ValidationFunction | defaultValidationFunction() const |
| QColor | errorColor() const |
| QString | errorMessage() const |
| Kind | expectedKind() const |
| FileName | fileName() const |
| void | insertButton(int index, const QString &text, QObject *context, const std::function<void() > &callback) |
| bool | isReadOnly() const |
| bool | isValid() const |
| FancyLineEdit * | lineEdit() const |
| QColor | okColor() const |
| QString | path() const |
| QString | promptDialogFilter() const |
| QString | promptDialogTitle() const |
| FileName | rawFileName() const |
| QString | rawPath() const |
| void | setBaseDirectory(const QString &directory) |
| void | setBaseFileName(const FileName &base) |
| void | setCommandVersionArguments(const QStringList &arguments) |
| void | setEnvironment(const Environment &env) |
| void | setExpectedKind(Kind expected) |
| void | setHistoryCompleter(const QString &historyKey, bool restoreLastItemFromHistory = false) |
| void | setInitialBrowsePathBackup(const QString &path) |
| void | setPromptDialogFilter(const QString &filter) |
| void | setPromptDialogTitle(const QString &title) |
| void | setReadOnly(bool b) |
| void | setValidationFunction(const FancyLineEdit::ValidationFunction &fn) |
| void | triggerChanged() |
Public Slots
| void | setErrorColor(const QColor &errorColor) |
| void | setFileName(const Utils::FileName &) |
| void | setOkColor(const QColor &okColor) |
| void | setPath(const QString &) |
Signals
| void | beforeBrowsing() |
| void | browsingFinished() |
| void | editingFinished() |
| void | pathChanged(const QString &path) |
| void | rawPathChanged(const QString &text) |
| void | returnPressed() |
| void | validChanged(bool validState) |
Static Public Members
| QString | browseButtonLabel() |
| QString | expandedDirectory(const QString &input, const Utils::Environment &env, const QString &baseDir) |
| QString | homePath() |
| void | installLineEditVersionToolTip(QLineEdit *le, const QStringList &arguments) |
| QString | label() |
| void | setAboutToShowContextMenuHandler(AboutToShowContextMenuHandler handler) |
| QString | toolVersion(const QString &binary, const QStringList &arguments) |
Detailed Description
The PathChooser class is a control that lets the user choose a path, consisting of a QLineEdit and a "Browse" button.
This class has some validation logic for embedding into QWizardPage.
Property Documentation
baseDirectory : QString
Access functions:
| QString | baseDirectory() const |
| void | setBaseDirectory(const QString &directory) |
baseFileName : Utils::FileName
Access functions:
| FileName | baseFileName() const |
| void | setBaseFileName(const FileName &base) |
commandVersionArguments : QStringList
Access functions:
| QStringList | commandVersionArguments() const |
| void | setCommandVersionArguments(const QStringList &arguments) |
errorColor : QColor
Access functions:
| QColor | errorColor() const |
| void | setErrorColor(const QColor &errorColor) |
expectedKind : Kind
Access functions:
| Kind | expectedKind() const |
| void | setExpectedKind(Kind expected) |
fileName : Utils::FileName
Access functions:
| FileName | fileName() const |
| void | setFileName(const Utils::FileName &) |
okColor : QColor
Access functions:
| QColor | okColor() const |
| void | setOkColor(const QColor &okColor) |
path : QString
Access functions:
| QString | path() const |
| void | setPath(const QString &) |
Notifier signal:
| void | pathChanged(const QString &path) |
promptDialogFilter : QString
Access functions:
| QString | promptDialogFilter() const |
| void | setPromptDialogFilter(const QString &filter) |
promptDialogTitle : QString
Access functions:
| QString | promptDialogTitle() const |
| void | setPromptDialogTitle(const QString &title) |
readOnly : bool
Access functions:
| bool | isReadOnly() const |
| void | setReadOnly(bool b) |
Member Function Documentation
PathChooser::PathChooser(QWidget *parent = nullptr)
Default constructs an instance of PathChooser.
[virtual] PathChooser::~PathChooser()
Destroys the instance of PathChooser. The destructor is virtual.