DtkWidget 5.6.0.2
DTK Widget module
|
The DFileDialog class provides a dialog that allow users to select files or directories. 更多...
类 | |
struct | DComboBoxOptions |
struct | DLineEditOptions |
Public 成员函数 | |
DFileDialog (QWidget *parent, Qt::WindowFlags f) | |
DFileDialog (QWidget *parent=Q_NULLPTR, const QString &caption=QString(), const QString &directory=QString(), const QString &filter=QString()) | |
void | addComboBox (const QString &text, const QStringList &data) |
Add an extra ComboBox widget to the DFileDialog 更多... | |
void | addComboBox (const QString &text, const DComboBoxOptions &options) |
Add an extra ComboBox widget to the DFileDialog 更多... | |
void | addLineEdit (const QString &text) |
Add an extra LineEdit widget to the DFileDialog 更多... | |
void | addLineEdit (const QString &text, const DLineEditOptions &options) |
Add an extra LineEdit widget to the DFileDialog 更多... | |
void | setAllowMixedSelection (bool on) |
Allow mixed selection 更多... | |
QString | getComboBoxValue (const QString &text) const |
Get the added extra ComboBox value 更多... | |
QString | getLineEditValue (const QString &text) const |
Get the added extra LineEdit value 更多... | |
void | setVisible (bool visible) override |
The DFileDialog class provides a dialog that allow users to select files or directories.
\inmodule dtkwidget
DFileDialog 类提供了一个可供用户选择文件或目录的对话框.
You can also add extra ComboBox and LineEdit widget via addComboBox() and addLineEdit() to allowed user fill more field when needed. Values of these extra fields can be accessed via getComboBoxValue() and getLineEditValue() . 你也可以通过 addComboBox() 和 addLineEdit() 来为文件选择框增加额外的输入内容控件,并通过 getComboBoxValue() 和 getLineEditValue() 来得到用户所输入的值。
void Dtk::Widget::DFileDialog::addComboBox | ( | const QString & | text, |
const DComboBoxOptions & | options | ||
) |
Add an extra ComboBox widget to the DFileDialog
为文件选择框追加一个下拉单选框
text ComboBox description text (as key for getting value). options ComboBox data
text 追加选项的描述文字(作为键) options 多选框的属性信息
void Dtk::Widget::DFileDialog::addComboBox | ( | const QString & | text, |
const QStringList & | data | ||
) |
Add an extra ComboBox widget to the DFileDialog
为文件选择框追加一个下拉单选框
text ComboBox description text (as key for getting value). data ComboBox options in a string list
text 追加选项的描述文字(作为键) data 多选框的选项列表
void Dtk::Widget::DFileDialog::addLineEdit | ( | const QString & | text | ) |
Add an extra LineEdit widget to the DFileDialog
为文件选择框追加一个输入框
text LineEdit description text (as key for getting value). text 追加选项的描述文字(作为键)
void Dtk::Widget::DFileDialog::addLineEdit | ( | const QString & | text, |
const DLineEditOptions & | options | ||
) |
Add an extra LineEdit widget to the DFileDialog
为文件选择框追加一个输入框
text LineEdit description text (as key for getting value). options LineEdit data
text 追加选项的描述文字(作为键) options 输入框的属性信息
Get the added extra LineEdit value
获得所追加的额外输入框的值
text The description (key) of the ComboBox. text 所追加的多选框的描述名(作为键)
void Dtk::Widget::DFileDialog::setAllowMixedSelection | ( | bool | on | ) |
Allow mixed selection
Allow user choose files and folders at the same time when selecting multiple files. By default user can only select files (folder not included) when selecting multiple files.
Notice that this option only works when file mode is QFileDialog::ExistingFiles
on enable this feature or not.