forked from qt-creator/qt-creator
Utils: Document PathChooser::Kind
Change-Id: I0d984c9cae98b59abfb62a3fd6932d63783e9015 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -42,14 +42,32 @@
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Utils::PathChooser
|
\class Utils::PathChooser
|
||||||
|
\inmodule QtCreator
|
||||||
|
|
||||||
\brief The PathChooser class is a control that lets the user choose a path,
|
\brief The PathChooser class is a control that lets the user choose a path.
|
||||||
consisting of a QLineEdit and
|
The control consist of a QLineEdit and a "Browse" button, and is optionally
|
||||||
a "Browse" button.
|
able to perform variable substitution.
|
||||||
|
|
||||||
This class has some validation logic for embedding into QWizardPage.
|
This class has some validation logic for embedding into QWizardPage.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\enum Utils::PathChooser::Kind
|
||||||
|
\inmodule QtCreator
|
||||||
|
|
||||||
|
The Kind enum describes the kind of path a PathChooser considers valid.
|
||||||
|
|
||||||
|
\value ExistingDirectory An existing directory
|
||||||
|
\value Directory A directory that does not need to exist
|
||||||
|
\value File An existing file
|
||||||
|
\value SaveFile A file that does not need to exist
|
||||||
|
\value ExistingCommand An executable file that must exist at the time of selection
|
||||||
|
\value Command An executable file that may or may not exist at the time of selection (e.g. result of a build)
|
||||||
|
\value Any No restriction on the selected path
|
||||||
|
|
||||||
|
\sa setExpectedKind(), expectedKind()
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
static QString appBundleExpandedPath(const QString &path)
|
static QString appBundleExpandedPath(const QString &path)
|
||||||
@@ -620,6 +638,13 @@ QString PathChooser::homePath()
|
|||||||
return QDir::homePath();
|
return QDir::homePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the kind of path the PathChooser will consider valid to select
|
||||||
|
to \a expected.
|
||||||
|
|
||||||
|
\sa Utils::PathChooser::Kind, expectedKind()
|
||||||
|
*/
|
||||||
|
|
||||||
void PathChooser::setExpectedKind(Kind expected)
|
void PathChooser::setExpectedKind(Kind expected)
|
||||||
{
|
{
|
||||||
if (d->m_acceptingKind == expected)
|
if (d->m_acceptingKind == expected)
|
||||||
@@ -628,6 +653,12 @@ void PathChooser::setExpectedKind(Kind expected)
|
|||||||
d->m_lineEdit->validate();
|
d->m_lineEdit->validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the kind of path the PathChooser considers valid to select.
|
||||||
|
|
||||||
|
\sa Utils::PathChooser::Kind, setExpectedKind()
|
||||||
|
*/
|
||||||
|
|
||||||
PathChooser::Kind PathChooser::expectedKind() const
|
PathChooser::Kind PathChooser::expectedKind() const
|
||||||
{
|
{
|
||||||
return d->m_acceptingKind;
|
return d->m_acceptingKind;
|
||||||
|
Reference in New Issue
Block a user