DtkWidget 5.6.0.2
DTK Widget module
| Public 成员函数 | 所有成员列表
Dtk::Widget::DFileDialog类 参考

The DFileDialog class provides a dialog that allow users to select files or directories. 更多...

类 Dtk::Widget::DFileDialog 继承关系图:
Inheritance graph
[图例]
Dtk::Widget::DFileDialog 的协作图:
Collaboration graph
[图例]

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() 来得到用户所输入的值。

成员函数说明

◆ addComboBox() [1/2]

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 多选框的属性信息

◆ addComboBox() [2/2]

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 多选框的选项列表

◆ addLineEdit() [1/2]

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 追加选项的描述文字(作为键)

◆ addLineEdit() [2/2]

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 输入框的属性信息

◆ getComboBoxValue()

QString Dtk::Widget::DFileDialog::getComboBoxValue ( const QString text) const

Get the added extra ComboBox value

获得所追加的额外多选框的值

text The description (key) of the ComboBox. text 所追加的多选框的描述名(作为键)

参见
addComboBox()

◆ getLineEditValue()

QString Dtk::Widget::DFileDialog::getLineEditValue ( const QString text) const

Get the added extra LineEdit value

获得所追加的额外输入框的值

text The description (key) of the ComboBox. text 所追加的多选框的描述名(作为键)

参见
addLineEdit()

◆ setAllowMixedSelection()

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.


该类的文档由以下文件生成: