| 1 | // Copyright (C) 2021 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QQUICKFONTDIALOGIMPL_P_P_H |
| 5 | #define QQUICKFONTDIALOGIMPL_P_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtQuickTemplates2/private/qquickcombobox_p.h> |
| 19 | #include <QtQuickTemplates2/private/qquickdialog_p_p.h> |
| 20 | #include <QtQuickTemplates2/private/qquickdialogbuttonbox_p.h> |
| 21 | |
| 22 | #include "qquickfontdialogimpl_p.h" |
| 23 | |
| 24 | #include <QtCore/qpointer.h> |
| 25 | |
| 26 | QT_BEGIN_NAMESPACE |
| 27 | |
| 28 | class QQuickFontDialogImplPrivate : public QQuickDialogPrivate |
| 29 | { |
| 30 | Q_DECLARE_PUBLIC(QQuickFontDialogImpl) |
| 31 | public: |
| 32 | QQuickFontDialogImplPrivate(); |
| 33 | |
| 34 | static QQuickFontDialogImplPrivate *get(QQuickFontDialogImpl *dialog) |
| 35 | { |
| 36 | return dialog->d_func(); |
| 37 | } |
| 38 | |
| 39 | QQuickFontDialogImplAttached *attachedOrWarn(); |
| 40 | |
| 41 | void updateEnabled(); |
| 42 | |
| 43 | void handleAccept() override; |
| 44 | void handleClick(QQuickAbstractButton *button) override; |
| 45 | |
| 46 | QSharedPointer<QFontDialogOptions> options; |
| 47 | |
| 48 | QFont currentFont; |
| 49 | }; |
| 50 | |
| 51 | class QQuickFontDialogImplAttachedPrivate : public QObjectPrivate |
| 52 | { |
| 53 | void currentFontChanged(const QFont &font); |
| 54 | |
| 55 | public: |
| 56 | Q_DECLARE_PUBLIC(QQuickFontDialogImplAttached) |
| 57 | |
| 58 | QPointer<QQuickDialogButtonBox> buttonBox; |
| 59 | QPointer<QQuickListView> familyListView; |
| 60 | QPointer<QQuickListView> styleListView; |
| 61 | QPointer<QQuickListView> sizeListView; |
| 62 | QPointer<QQuickTextEdit> sampleEdit; |
| 63 | QPointer<QQuickComboBox> writingSystemComboBox; |
| 64 | QPointer<QQuickCheckBox> underlineCheckBox; |
| 65 | QPointer<QQuickCheckBox> strikeoutCheckBox; |
| 66 | QPointer<QQuickTextField> familyEdit; |
| 67 | QPointer<QQuickTextField> styleEdit; |
| 68 | QPointer<QQuickTextField> sizeEdit; |
| 69 | }; |
| 70 | |
| 71 | QT_END_NAMESPACE |
| 72 | |
| 73 | #endif // QQUICKFONTDIALOGIMPL_P_P_H |
| 74 |
