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.h>
19
20#include <QtGui/qfont.h>
21#include <QtGui/qfontdatabase.h>
22
24
25class QComboBox;
26class QFontComboBox;
27class QTimer;
28class QLineEdit;
29
30class FontPanel: public QGroupBox
31{
33public:
34 explicit FontPanel(QWidget *parentWidget = nullptr);
35
36 QFont selectedFont() const;
37 void setSelectedFont(const QFont &);
38
40 void setWritingSystem(QFontDatabase::WritingSystem ws);
41
42private slots:
44 void slotFamilyChanged(const QFont &);
45 void slotStyleChanged(int);
46 void slotPointSizeChanged(int);
47 void slotUpdatePreviewFont();
48
49private:
50 QString family() const;
51 QString styleString() const;
52 int pointSize() const;
53 int closestPointSizeIndex(int ps) const;
54
55 void updateWritingSystem(QFontDatabase::WritingSystem ws);
56 void updateFamily(const QString &family);
57 void updatePointSizes(const QString &family, const QString &style);
58 void delayedPreviewFontUpdate();
59
60 QLineEdit *m_previewLineEdit;
61 QComboBox *m_writingSystemComboBox;
62 QFontComboBox* m_familyComboBox;
63 QComboBox *m_styleComboBox;
64 QComboBox *m_pointSizeComboBox;
65 QTimer *m_previewFontUpdateTimer = nullptr;
66};
67
68QT_END_NAMESPACE
69
70#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
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.