На цій сторінці

Utils::PathChooser Class

class Utils::PathChooser

Клас PathChooser — це елемент управління, що дозволяє користувачеві вибрати шлях. Цей елемент складається з поля введення шляху ( QLineEdit ) та кнопки «Огляд» (Browse) і, за бажанням, може виконувати підстановку змінних. Детальніше...

Header: #include <PathChooser>

Публічні типи

enum Kind { ExistingDirectory, Directory, File, SaveFile, ExistingCommand, …, Any }

Публічні функції

Utils::FilePath baseDirectory() const
QStringList commandVersionArguments() const
Utils::PathChooser::Kind expectedKind() const
Utils::FilePath filePath() const
bool isReadOnly() const
QString promptDialogFilter() const
QString promptDialogTitle() const
void setBaseDirectory(const Utils::Lazy<Utils::FilePath> &base)
void setCommandVersionArguments(const QStringList &arguments)
void setExpectedKind(Utils::PathChooser::Kind expected)
void setPromptDialogFilter(const QString &filter)
void setPromptDialogTitle(const QString &title)
void setReadOnly(bool b)

Публічні слоти

void setFilePath(const Utils::FilePath &)
void setPath(const QString &)

Сигнали

void textChanged(const QString &text)

Детальний опис

Цей клас має певну логіку перевірки, призначену для вбудовування в QWizardPage.

Документація щодо типів членів

enum PathChooser::Kind

Перелік «Kind» описує тип шляху, який програма « PathChooser » вважає дійсним.

КонстантаЗначенняОпис
Utils::PathChooser::ExistingDirectory0Існуючий каталог
Utils::PathChooser::Directory1Каталог, який не обов’язково має існувати
Utils::PathChooser::File2Існуючий файл
Utils::PathChooser::SaveFile3Файл, який не обов'язково має існувати
Utils::PathChooser::ExistingCommand4Виконуваний файл, який повинен існувати на момент вибору
Utils::PathChooser::Command5Виконуваний файл, який може існувати або не існувати на момент вибору (наприклад, результат компіляції)
Utils::PathChooser::Any6Відсутність обмежень щодо обраного шляху

Див. також setExpectedKind() та expectedKind().

Документація до функцій-членів

Utils::PathChooser::Kind PathChooser::expectedKind() const

Повертає тип шляху, який PathChooser вважає придатним для вибору.

Див. також Utils::PathChooser::Kind та setExpectedKind().

void PathChooser::setExpectedKind(Utils::PathChooser::Kind expected)

Встановлює тип шляху, який PathChooser вважатиме дійсним для вибору на expected.

Див. також Utils::PathChooser::Kind та expectedKind().

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.