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
qquicklabsplatformfontdialog_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QQUICKLABSPLATFORMFONTDIALOG_P_H
5#define QQUICKLABSPLATFORMFONTDIALOG_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
19#include <QtGui/qfont.h>
20#include <QtQml/qqml.h>
21
23
25{
29 Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL)
31 Q_PROPERTY(QFontDialogOptions::FontDialogOptions options READ options WRITE setOptions NOTIFY optionsChanged FINAL)
32
33public:
35
36 QFont font() const;
37 void setFont(const QFont &font);
38
39 QFont currentFont() const;
40 void setCurrentFont(const QFont &font);
41
42 QFontDialogOptions::FontDialogOptions options() const;
43 void setOptions(QFontDialogOptions::FontDialogOptions options);
44
49
50protected:
51 bool useNativeDialog() const override;
53 void onShow(QPlatformDialogHelper *dialog) override;
54 void accept() override;
55
57 QFont m_font;
58 QFont m_currentFont; // TODO: QFontDialogOptions::initialFont
60};
61
63
64#endif // QQUICKLABSPLATFORMFONTDIALOG_P_H
\reentrant
Definition qfont.h:22
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
void onShow(QPlatformDialogHelper *dialog) override
void accept() override
\qmlmethod void Qt.labs.platform::Dialog::accept()
void setOptions(QFontDialogOptions::FontDialogOptions options)
void onCreate(QPlatformDialogHelper *dialog) override
QFontDialogOptions::FontDialogOptions options
\inmodule QtCore
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_EXTENDED_NAMESPACE(EXTENDED_NAMESPACE)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
#define explicit
QFileDialog dialog(this)
[1]