DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dfiledialog.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DFILEDIALOG_H
6#define DFILEDIALOG_H
7
8#include <dtkwidget_global.h>
9
10#include <QFileDialog>
11#include <QLineEdit>
12
13DWIDGET_BEGIN_NAMESPACE
14
15class LIBDTKWIDGETSHARED_EXPORT DFileDialog : public QFileDialog
16{
17 Q_OBJECT
18
19public:
20 DFileDialog(QWidget *parent, Qt::WindowFlags f);
21 explicit DFileDialog(QWidget *parent = Q_NULLPTR,
22 const QString &caption = QString(),
23 const QString &directory = QString(),
24 const QString &filter = QString());
25
27 bool editable;
28 QStringList data;
29 QString defaultValue;
30 };
31
33 int maxLength;
34 QLineEdit::EchoMode echoMode;
35 QString defaultValue;
36 QString inputMask;
37 QString placeholderText;
38 };
39
40 void addComboBox(const QString &text, const QStringList &data);
41 void addComboBox(const QString &text, const DComboBoxOptions &options);
42 void addLineEdit(const QString &text);
43 void addLineEdit(const QString &text, const DLineEditOptions &options);
44 void setAllowMixedSelection(bool on);
45
46 QString getComboBoxValue(const QString &text) const;
47 QString getLineEditValue(const QString &text) const;
48
49 void setVisible(bool visible) override;
50};
51
52DWIDGET_END_NAMESPACE
53
54#endif // DFILEDIALOG_H
DFileDialog 类提供了一个可供用户选择文件或目录的对话框
Definition dfiledialog.h:16