Qt 4.8
qfontdialog_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui 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 Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QFONTDIALOG_P_H
43 #define QFONTDIALOG_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists purely as an
50 // implementation detail. This header file may change from version to
51 // version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 //
56 
57 #include "private/qdialog_p.h"
58 #include "qfontdatabase.h"
59 #include "qfontdialog.h"
60 
61 #ifndef QT_NO_FONTDIALOG
62 
64 
65 class QBoxLayout;
66 class QCheckBox;
67 class QComboBox;
68 class QDialogButtonBox;
69 class QFontListView;
70 class QGroupBox;
71 class QLabel;
72 class QLineEdit;
73 
75 {
77 
78 public:
81  { }
82 
83  void updateFamilies();
84  void updateStyles();
85  void updateSizes();
86 
87  static QFont getFont(bool *ok, const QFont &initial, QWidget *parent,
88  const QString &title, QFontDialog::FontDialogOptions options);
89 
90  void init();
91  void _q_sizeChanged(const QString &);
92  void _q_familyHighlighted(int);
94  void _q_styleHighlighted(int);
95  void _q_sizeHighlighted(int);
96  void _q_updateSample();
97  void updateSampleFont(const QFont &newFont);
98  void retranslateStrings();
99 
103 
107 
111 
116 
119 
122 
127 
129 
134  int size;
137  QFontDialog::FontDialogOptions opts;
140 
141 #ifdef Q_WS_MAC
142  static void setFont(void *delegate, const QFont &font);
143 
144  inline void done(int result) { q_func()->done(result); }
145  inline QFontDialog *fontDialog() { return q_func(); }
146 
147  void *delegate;
148  void closeCocoaFontPanel();
150  bool canBeNativeDialog();
151  bool setVisible_sys(bool visible);
155  bool showCocoaFontPanel();
156  bool hideCocoaFontPanel();
157 
159 #endif
160 };
161 
162 #endif // QT_NO_FONTDIALOG
163 
165 
166 #endif // QFONTDIALOG_P_H
QBoxLayout * sampleEditLayout
The QBoxLayout class lines up child widgets horizontally or vertically.
Definition: qboxlayout.h:60
QBoxLayout * buttonLayout
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QGroupBox * effects
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
QLabel * writingSystemAccel
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
void _q_sizeHighlighted(int)
QLineEdit * sampleEdit
static QFont getFont(bool *ok, const QFont &initial, QWidget *parent, const QString &title, QFontDialog::FontDialogOptions options)
The QString class provides a Unicode character string.
Definition: qstring.h:83
void _q_macRunNativeAppModalPanel()
void done(int result)
QBoxLayout * effectsLayout
QFontDatabase::WritingSystem writingSystem
bool setVisible_sys(bool visible)
QLineEdit * familyEdit
static bool sharedFontPanelAvailable
QFontDatabase fdb
QLineEdit * styleEdit
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QGroupBox * sample
The QFontDatabase class provides information about the fonts available in the underlying window syste...
Definition: qfontdatabase.h:66
void _q_writingSystemHighlighted(int)
QByteArray memberToDisconnectOnClose
QPointer< QObject > receiverToDisconnectOnClose
QBoxLayout * sampleLayout
void _q_styleHighlighted(int)
QFontListView * sizeList
The QComboBox widget is a combined button and popup list.
Definition: qcombobox.h:62
QCheckBox * underline
void _q_familyHighlighted(int)
The QGroupBox widget provides a group box frame with a title.
Definition: qgroupbox.h:57
QFontListView * familyList
The QFontDialog class provides a dialog widget for selecting a font.
Definition: qfontdialog.h:59
QLineEdit * sizeEdit
QFontDialog * fontDialog()
static void setFont(void *delegate, const QFont &font)
void _q_sizeChanged(const QString &)
This slot is called if the user changes the font size.
void updateSizes()
Updates the contents of the "font size" list box.
#define Q_DECLARE_PUBLIC(Class)
Definition: qglobal.h:2477
The QFont class specifies a font used for drawing text.
Definition: qfont.h:64
The QDialogButtonBox class is a widget that presents buttons in a layout that is appropriate to the c...
The QLabel widget provides a text or image display.
Definition: qlabel.h:55
The QLineEdit widget is a one-line text editor.
Definition: qlineedit.h:66
QObject * parent
Definition: qobject.h:92
QDialogButtonBox * buttonBox
QFontListView * styleList
The QCheckBox widget provides a checkbox with a text label.
Definition: qcheckbox.h:56
QFontDialog::FontDialogOptions opts
QCheckBox * strikeout
QComboBox * writingSystemCombo
void updateSampleFont(const QFont &newFont)