Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fontpanel_p.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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of the Qt tools. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef FONTPANEL_H
16#define FONTPANEL_H
17
18#include <QtWidgets/QGroupBox>
19#include <QtGui/QFont>
20#include <QtGui/QFontDatabase>
21
23
24class QComboBox;
25class QFontComboBox;
26class QTimer;
27class QLineEdit;
28
29class FontPanel: public QGroupBox
30{
32public:
34
35 QFont selectedFont() const;
36 void setSelectedFont(const QFont &);
37
39 void setWritingSystem(QFontDatabase::WritingSystem ws);
40
41private slots:
43 void slotFamilyChanged(const QFont &);
44 void slotStyleChanged(int);
45 void slotPointSizeChanged(int);
46 void slotUpdatePreviewFont();
47
48private:
49 QString family() const;
50 QString styleString() const;
51 int pointSize() const;
52 int closestPointSizeIndex(int ps) const;
53
54 void updateWritingSystem(QFontDatabase::WritingSystem ws);
55 void updateFamily(const QString &family);
56 void updatePointSizes(const QString &family, const QString &style);
57 void delayedPreviewFontUpdate();
58
59 QLineEdit *m_previewLineEdit;
60 QComboBox *m_writingSystemComboBox;
61 QFontComboBox* m_familyComboBox;
62 QComboBox *m_styleComboBox;
63 QComboBox *m_pointSizeComboBox;
64 QTimer *m_previewFontUpdateTimer;
65};
66
67QT_END_NAMESPACE
68
69#endif // FONTPANEL_H
static CentralWidget * instance()
QFont selectedFont() const
Definition fontpanel.cpp:61
void setWritingSystem(QFontDatabase::WritingSystem ws)
QFontDatabase::WritingSystem writingSystem() const
void setSelectedFont(const QFont &)
Definition fontpanel.cpp:78
void setStartOption(int option)
static HelpEngineWrapper & instance()
void setUseBrowserFont(bool useBrowserFont)
bool documentationManagerEnabled() const
bool filterFunctionalityEnabled() const
void setUseAppFont(bool useAppFont)