QtBase  v6.3.1
qfontdialog_p.h
Go to the documentation of this file.
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 QtWidgets module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
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 Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 
40 #ifndef QFONTDIALOG_P_H
41 #define QFONTDIALOG_P_H
42 
43 //
44 // W A R N I N G
45 // -------------
46 //
47 // This file is not part of the Qt API. It exists purely as an
48 // implementation detail. This header file may change from version to
49 // version without notice, or even be removed.
50 //
51 // We mean it.
52 //
53 //
54 
55 #include <QtWidgets/private/qtwidgetsglobal_p.h>
56 #include "private/qdialog_p.h"
57 #include "qfontdatabase.h"
58 #include "qfontdialog.h"
59 #include <qpa/qplatformdialoghelper.h>
60 #include "qsharedpointer.h"
61 
62 QT_REQUIRE_CONFIG(fontdialog);
63 
65 
66 class QBoxLayout;
67 class QCheckBox;
68 class QComboBox;
69 class QDialogButtonBox;
70 class QFontListView;
71 class QGroupBox;
72 class QLabel;
73 class QLineEdit;
74 
76 {
77  Q_DECLARE_PUBLIC(QFontDialog)
78 
79 public:
82 
84  { return static_cast<QPlatformFontDialogHelper *>(platformHelper()); }
85 
86  void updateFamilies();
87  void updateStyles();
88  void updateSizes();
89 
90  static QFont getFont(bool *ok, const QFont &initial, QWidget *parent,
91  const QString &title, QFontDialog::FontDialogOptions options);
92 
93  void init();
94  void _q_sizeChanged(const QString &);
95  void _q_familyHighlighted(int);
96  void _q_writingSystemHighlighted(int);
97  void _q_styleHighlighted(int);
98  void _q_sizeHighlighted(int);
99  void _q_updateSample();
100  void updateSampleFont(const QFont &newFont);
101  void retranslateStrings();
102 
106 
110 
114 
119 
122 
125 
130 
132 
136  int size;
142 
143  bool canBeNativeDialog() const override;
145 
146 private:
147  virtual void initHelper(QPlatformDialogHelper *) override;
148  virtual void helperPrepareShow(QPlatformDialogHelper *) override;
149 };
150 
152 
153 #endif // QFONTDIALOG_P_H
The QBoxLayout class lines up child widgets horizontally or vertically.
Definition: qboxlayout.h:57
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:85
The QCheckBox widget provides a checkbox with a text label.
Definition: qcheckbox.h:55
The QComboBox widget is a combined button and popup list.
Definition: qcombobox.h:60
The QDialogButtonBox class is a widget that presents buttons in a layout that is appropriate to the c...
QPlatformDialogHelper * platformHelper() const
Definition: qdialog.cpp:113
virtual bool canBeNativeDialog() const
Definition: qdialog.cpp:135
The QFontDialog class provides a dialog widget for selecting a font.
Definition: qfontdialog.h:56
QFontListView * familyList
QLineEdit * styleEdit
QBoxLayout * sampleLayout
QByteArray memberToDisconnectOnClose
QLineEdit * sizeEdit
QBoxLayout * effectsLayout
QPlatformFontDialogHelper * platformFontDialogHelper() const
Definition: qfontdialog_p.h:83
QGroupBox * effects
QLineEdit * familyEdit
QGroupBox * sample
void _q_runNativeAppModalPanel()
QLabel * writingSystemAccel
QSharedPointer< QFontDialogOptions > options
QComboBox * writingSystemCombo
QDialogButtonBox * buttonBox
QFontListView * sizeList
QFontListView * styleList
QLineEdit * sampleEdit
QCheckBox * underline
QBoxLayout * buttonLayout
QPointer< QObject > receiverToDisconnectOnClose
QCheckBox * strikeout
QFontDatabase::WritingSystem writingSystem
QBoxLayout * sampleEditLayout
The QFont class specifies a query for a font used for drawing text.
Definition: qfont.h:56
The QGroupBox widget provides a group box frame with a title.
Definition: qgroupbox.h:53
The QLabel widget provides a text or image display.
Definition: qlabel.h:56
The QLineEdit widget is a one-line text editor.
Definition: qlineedit.h:64
The QString class provides a Unicode character string.
Definition: qstring.h:388
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:133
void init(QWidget *desktopWidget, Qt::WindowFlags f)
Definition: qwidget.cpp:978
QT_REQUIRE_CONFIG(fontdialog)
#define Q_AUTOTEST_EXPORT
Definition: qglobal.h:579
QString title
[35]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent