1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt Designer of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:GPL-EXCEPT$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU
19** General Public License version 3 as published by the Free Software
20** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
21** included in the packaging of this file. Please review the following
22** information to ensure the GNU General Public License requirements will
23** be met: https://www.gnu.org/licenses/gpl-3.0.html.
24**
25** $QT_END_LICENSE$
26**
27****************************************************************************/
28
29#ifndef DIALOGGUI
30#define DIALOGGUI
31
32//
33// W A R N I N G
34// -------------
35//
36// This file is not part of the Qt API. It exists for the convenience
37// of Qt Designer. This header
38// file may change from version to version without notice, or even be removed.
39//
40// We mean it.
41//
42
43#include "shared_global_p.h"
44#include <abstractdialoggui_p.h>
45
46QT_BEGIN_NAMESPACE
47
48class QFileIconProvider;
49
50namespace qdesigner_internal {
51
52class QDESIGNER_SHARED_EXPORT DialogGui : public QDesignerDialogGuiInterface
53{
54public:
55 DialogGui();
56 ~DialogGui() override;
57
58 QMessageBox::StandardButton
59 message(QWidget *parent, Message context, QMessageBox::Icon icon,
60 const QString &title, const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok,
61 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) override;
62
63 QMessageBox::StandardButton
64 message(QWidget *parent, Message context, QMessageBox::Icon icon,
65 const QString &title, const QString &text, const QString &informativeText,
66 QMessageBox::StandardButtons buttons = QMessageBox::Ok,
67 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) override;
68
69 QMessageBox::StandardButton
70 message(QWidget *parent, Message context, QMessageBox::Icon icon,
71 const QString &title, const QString &text, const QString &informativeText, const QString &detailedText,
72 QMessageBox::StandardButtons buttons = QMessageBox::Ok,
73 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) override;
74
75 QString getExistingDirectory(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), QFileDialog::Options options = QFileDialog::ShowDirsOnly) override;
76 QString getOpenFileName(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = {}) override;
77 QStringList getOpenFileNames(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = {}) override;
78 QString getSaveFileName(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = {}) override;
79
80 QString getOpenImageFileName(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = {}) override;
81 QStringList getOpenImageFileNames(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = {}) override;
82
83private:
84 QFileIconProvider *ensureIconProvider();
85 void initializeImageFileDialog(QFileDialog &fd, QFileDialog::Options options, QFileDialog::FileMode);
86
87 QFileIconProvider *m_iconProvider = nullptr;
88};
89
90} // namespace qdesigner_internal
91
92QT_END_NAMESPACE
93
94#endif // DIALOGGUI
95

source code of qttools/src/designer/src/lib/shared/dialoggui_p.h