Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickfontdialog_p.h
Go to the documentation of this file.
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 QQUICKFONTDIALOG_P_H
5#define QQUICKFONTDIALOG_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 <QtGui/qfont.h>
19
21
23
24class Q_QUICKDIALOGS2_EXPORT QQuickFontDialog : public QQuickAbstractDialog
25{
27 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont NOTIFY selectedFontChanged)
28 Q_PROPERTY(QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY currentFontChanged FINAL)
29 Q_PROPERTY(QFontDialogOptions::FontDialogOptions options READ options WRITE setOptions
30 RESET resetOptions NOTIFY optionsChanged)
31 Q_FLAGS(QFontDialogOptions::FontDialogOptions)
34
35public:
36 explicit QQuickFontDialog(QObject *parent = nullptr);
37
38 void setCurrentFont(const QFont &font);
39 QFont currentFont() const;
40
41 void setSelectedFont(const QFont &font);
42 QFont selectedFont() const;
43
44 QFontDialogOptions::FontDialogOptions options() const;
45 void setOptions(QFontDialogOptions::FontDialogOptions options);
46 void resetOptions();
47
49 void selectedFontChanged();
50 void currentFontChanged();
51 void optionsChanged();
52
53protected:
54 bool useNativeDialog() const override;
55 void onCreate(QPlatformDialogHelper *dialog) override;
56 void onShow(QPlatformDialogHelper *dialog) override;
57
60 QFont m_selectedFont;
61};
62
64
65#endif // QQUICKFONTDIALOG_P_H
\reentrant
Definition qfont.h:22
\inmodule QtCore
Definition qobject.h:103
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
\inmodule QtCore
Combined button and popup list for selecting options.
SharedPointerFileDialogOptions m_options
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_FLAGS(x)
#define Q_SIGNALS
#define explicit
QFileDialog dialog(this)
[1]