Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qfontdialog.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QFONTDIALOG_H
6
#
define
QFONTDIALOG_H
7
8
#
include
<
QtWidgets
/
qtwidgetsglobal
.
h
>
9
#
include
<
QtGui
/
qwindowdefs
.
h
>
10
#
include
<
QtGui
/
qfont
.
h
>
11
12
#
include
<
QtWidgets
/
qdialog
.
h
>
13
14
QT_REQUIRE_CONFIG
(
fontdialog
);
15
16
QT_BEGIN_NAMESPACE
17
18
class
QFontDialogPrivate;
19
20
class
Q_WIDGETS_EXPORT
QFontDialog
:
public
QDialog
21
{
22
Q_OBJECT
23
Q_DECLARE_PRIVATE(QFontDialog)
24
Q_PROPERTY(QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY currentFontChanged)
25
Q_PROPERTY(FontDialogOptions options READ options WRITE setOptions)
26
27
public
:
28
enum
FontDialogOption {
29
NoButtons = 0x00000001,
30
DontUseNativeDialog = 0x00000002,
31
ScalableFonts = 0x00000004,
32
NonScalableFonts = 0x00000008,
33
MonospacedFonts = 0x00000010,
34
ProportionalFonts = 0x00000020
35
};
36
Q_ENUM(FontDialogOption)
37
38
Q_DECLARE_FLAGS(FontDialogOptions, FontDialogOption)
39
40
explicit
QFontDialog(QWidget *parent =
nullptr
);
41
explicit
QFontDialog(
const
QFont &initial, QWidget *parent =
nullptr
);
42
~QFontDialog();
43
44
void
setCurrentFont(
const
QFont &font);
45
QFont currentFont()
const
;
46
47
QFont selectedFont()
const
;
48
49
void
setOption(FontDialogOption option,
bool
on =
true
);
50
bool
testOption(FontDialogOption option)
const
;
51
void
setOptions(FontDialogOptions options);
52
FontDialogOptions options()
const
;
53
54
using
QDialog::open;
55
void
open(QObject *receiver,
const
char
*member);
56
57
void
setVisible(
bool
visible) override;
58
59
static
QFont getFont(
bool
*ok, QWidget *parent =
nullptr
);
60
static
QFont getFont(
bool
*ok,
const
QFont &initial, QWidget *parent =
nullptr
,
const
QString &title = QString(),
61
FontDialogOptions options = FontDialogOptions());
62
63
Q_SIGNALS:
64
void
currentFontChanged(
const
QFont &font);
65
void
fontSelected(
const
QFont &font);
66
67
protected
:
68
void
changeEvent(QEvent *event) override;
69
void
done(
int
result) override;
70
bool
eventFilter(QObject *object, QEvent *event) override;
71
72
private
:
73
Q_DISABLE_COPY(QFontDialog)
74
};
75
76
Q_DECLARE_OPERATORS_FOR_FLAGS(QFontDialog::FontDialogOptions)
77
78
QT_END_NAMESPACE
79
80
#
endif
// QFONTDIALOG_H
QFontDialog
\inmodule QtWidgets
Definition
qfontdialog.h:21
QFontListView
Definition
qfontdialog.cpp:34
QFontListView::model
QStringListModel * model() const
Definition
qfontdialog.cpp:38
QFontListView::count
int count() const
Definition
qfontdialog.cpp:47
QFontListView::setCurrentItem
void setCurrentItem(int item)
Definition
qfontdialog.cpp:41
QFontListView::currentChanged
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override
This slot is called when a new item becomes the current item.
Definition
qfontdialog.cpp:54
QFontListView::currentText
QString currentText() const
Definition
qfontdialog.cpp:50
QFontListView::currentItem
int currentItem() const
Definition
qfontdialog.cpp:44
QFontListView::text
QString text(int i) const
Definition
qfontdialog.cpp:59
QFontPolishFilter
Definition
qfontdialog.cpp:119
QFontPolishFilter::QFontPolishFilter
QFontPolishFilter(QFontDialog *fd)
Definition
qfontdialog.cpp:121
QFontPolishFilter::eventFilter
bool eventFilter(QObject *obj, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
Definition
qfontdialog.cpp:126
QPainter::QWidget
friend class QWidget
Definition
qpainter.h:432
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qfd_DefaultWindowFlags
static const Qt::WindowFlags qfd_DefaultWindowFlags
Definition
qfontdialog.cpp:73
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(liburing)
qtbase
src
widgets
dialogs
qfontdialog.h
Generated on
for Qt by
1.18.0