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// Qt-Security score:significant reason:default
4
5//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of the Qt tools. This header
11// file may change from version to version without notice, or even be removed.
12//
13// We mean it.
14//
15
16#ifndef FONTPANEL_H
17#define FONTPANEL_H
18
19#include <QtWidgets/qgroupbox.h>
20
21#include <QtGui/qfont.h>
22#include <QtGui/qfontdatabase.h>
23
25
26class QComboBox;
27class QFontComboBox;
28class QTimer;
29class QLineEdit;
30
31class FontPanel: public QGroupBox
32{
34public:
35 explicit FontPanel(QWidget *parentWidget = nullptr);
36
37 QFont selectedFont() const;
38 void setSelectedFont(const QFont &);
39
41 void setWritingSystem(QFontDatabase::WritingSystem ws);
42
43private slots:
45 void slotFamilyChanged(const QFont &);
46 void slotStyleChanged(int);
47 void slotPointSizeChanged(int);
48 void slotUpdatePreviewFont();
49
50private:
51 QString family() const;
52 QString styleString() const;
53 int pointSize() const;
54 int closestPointSizeIndex(int ps) const;
55
56 void updateWritingSystem(QFontDatabase::WritingSystem ws);
57 void updateFamily(const QString &family);
58 void updatePointSizes(const QString &family, const QString &style);
59 void delayedPreviewFontUpdate();
60
61 QLineEdit *m_previewLineEdit;
62 QComboBox *m_writingSystemComboBox;
63 QFontComboBox* m_familyComboBox;
64 QComboBox *m_styleComboBox;
65 QComboBox *m_pointSizeComboBox;
66 QTimer *m_previewFontUpdateTimer = nullptr;
67};
68
69QT_END_NAMESPACE
70
71#endif // FONTPANEL_H
static CentralWidget * instance()
QFont selectedFont() const
Definition fontpanel.cpp:62
void setWritingSystem(QFontDatabase::WritingSystem ws)
QFontDatabase::WritingSystem writingSystem() const
void setSelectedFont(const QFont &)
Definition fontpanel.cpp:79
static bool applySettings(QHelpEngineCore *helpEngine, const HelpDocSettings &settings)
QHelpEngineCore * helpEngine() const
void setStartOption(int option)
void setShowTabs(bool show)
static HelpEngineWrapper & instance()
void setUseBrowserFont(bool useBrowserFont)
bool documentationManagerEnabled() const
bool filterFunctionalityEnabled() const
void setUseAppFont(bool useAppFont)
Combined button and popup list for selecting options.