![]() |
Qt 6.x
The Qt SDK
|
#include <qfontdialog_p.h>
Static Public Member Functions | |
static QFont | getFont (bool *ok, const QFont &initial, QWidget *parent, const QString &title, QFontDialog::FontDialogOptions options) |
![]() | |
static QWidgetPrivate * | get (QWidget *w) |
static const QWidgetPrivate * | get (const QWidget *w) |
static void | checkRestoredGeometry (const QRect &availableGeometry, QRect *restoredGeometry, int frameHeight) |
static void | adjustFlags (Qt::WindowFlags &flags, QWidget *w=nullptr) |
static QWidget * | parentGraphicsView (const QWidget *widget) |
static QRect | screenGeometry (const QWidget *widget) |
static QRect | availableScreenGeometry (const QWidget *widget) |
static QScreen * | screen (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | screenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | availableScreenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static void | sendComposeStatus (QWidget *w, bool end) |
static void | setWidgetParentHelper (QObject *widgetAsObject, QObject *newParent) |
![]() | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Private Member Functions | |
virtual void | initHelper (QPlatformDialogHelper *) override |
virtual void | helperPrepareShow (QPlatformDialogHelper *) override |
Definition at line 39 of file qfontdialog_p.h.
QFontDialogPrivate::QFontDialogPrivate | ( | ) |
Definition at line 75 of file qfontdialog.cpp.
QFontDialogPrivate::~QFontDialogPrivate | ( | ) |
Definition at line 81 of file qfontdialog.cpp.
void QFontDialogPrivate::_q_familyHighlighted | ( | int | i | ) |
Definition at line 664 of file qfontdialog.cpp.
References family, familyEdit, familyList, i, QLineEdit::selectAll(), QLineEdit::setText(), QStyle::SH_FontDialog_SelectAssociatedText, QFontListView::text(), and updateStyles().
Referenced by init().
void QFontDialogPrivate::_q_runNativeAppModalPanel | ( | ) |
This slot is called if the user changes the font size. The size is passed in the s argument as a string.
Definition at line 719 of file qfontdialog.cpp.
References _q_updateSample(), QAbstractItemView::clearSelection(), QFontListView::count(), i, QFontListView::setCurrentItem(), size, sizeList, QFontListView::text(), this, and QString::toInt().
Referenced by init().
void QFontDialogPrivate::_q_sizeHighlighted | ( | int | index | ) |
Definition at line 700 of file qfontdialog.cpp.
References _q_updateSample(), QWidget::hasFocus(), QLineEdit::selectAll(), QLineEdit::setText(), QStyle::SH_FontDialog_SelectAssociatedText, sizeEdit, sizeList, and QFontListView::text().
Referenced by init().
void QFontDialogPrivate::_q_styleHighlighted | ( | int | index | ) |
Definition at line 681 of file qfontdialog.cpp.
References QLineEdit::selectAll(), QLineEdit::setText(), QStyle::SH_FontDialog_SelectAssociatedText, style, styleEdit, styleList, QFontListView::text(), and updateSizes().
Referenced by init().
void QFontDialogPrivate::_q_updateSample | ( | ) |
Definition at line 628 of file qfontdialog.cpp.
References QLineEdit::clear(), QFontListView::currentText(), familyList, QFontDatabase::font(), QAbstractButton::isChecked(), QString::isEmpty(), sampleEdit, QFont::setStrikeOut(), QFont::setUnderline(), sizeEdit, strikeout, style, QLineEdit::text, QString::toInt(), underline, and updateSampleFont().
Referenced by _q_sizeChanged(), _q_sizeHighlighted(), init(), and updateSizes().
void QFontDialogPrivate::_q_writingSystemHighlighted | ( | int | index | ) |
Definition at line 654 of file qfontdialog.cpp.
References sampleEdit, QLineEdit::setText(), updateFamilies(), writingSystem, and QFontDatabase::writingSystemSample().
Referenced by init().
|
overridevirtual |
Reimplemented from QDialogPrivate.
Definition at line 1006 of file qfontdialog.cpp.
References Qt::AA_DontUseNativeDialogs, className, QFontDialog::DontUseNativeDialog, QDialogPrivate::nativeDialogInUse, QFontDialogOptions::options(), options, QObjectData::q_ptr, QCoreApplication::testAttribute(), and Qt::WA_DontShowOnScreen.
|
static |
Definition at line 363 of file qfontdialog.cpp.
References QDialog::exec(), QString::isEmpty(), QFontDialog::NoButtons, ok, options, QObjectData::parent, ret, QFontDialog::selectedFont(), QFontDialog::setCurrentFont(), QFontDialog::setOptions(), QWidget::setWindowTitle(), and title.
Referenced by QFontDialog::getFont(), and QFontDialog::getFont().
|
overrideprivatevirtual |
Reimplemented from QDialogPrivate.
Definition at line 437 of file qfontdialog.cpp.
References options, QFontDialogOptions::setWindowTitle(), and windowTitle().
void QFontDialogPrivate::init | ( | ) |
Definition at line 140 of file qfontdialog.cpp.
References _q_familyHighlighted(), _q_sizeChanged(), _q_sizeHighlighted(), _q_styleHighlighted(), _q_updateSample(), _q_writingSystemHighlighted(), QDialogButtonBox::addButton(), QComboBox::addItem(), QBoxLayout::addWidget(), QGridLayout::addWidget(), Qt::AlignCenter, button, buttonBox, QDialogButtonBox::Cancel, Qt::ClickFocus, QObject::connect(), QFontListView::count(), effects, familyAccel, familyEdit, familyList, QLayout::getContentsMargins(), i, QSizePolicy::Ignored, QObject::installEventFilter(), QString::isEmpty(), QDialogButtonBox::Ok, retranslateStrings(), sample, sampleEdit, QLineEdit::setAlignment(), QLabel::setBuddy(), QGridLayout::setColumnMinimumWidth(), QGridLayout::setColumnStretch(), QFontListView::setCurrentItem(), QPushButton::setDefault(), QWidget::setFocusPolicy(), QWidget::setFocusProxy(), QLabel::setIndent(), QObject::setObjectName(), QLineEdit::setReadOnly(), QGridLayout::setRowMinimumHeight(), QWidget::setSizePolicy(), QGridLayout::setSpacing(), QLineEdit::setText(), QLineEdit::setValidator(), SIGNAL, sizeAccel, sizeEdit, sizeList, SLOT, smoothScalable, spacing, QGridLayout::spacing(), strikeout, styleAccel, styleEdit, styleList, textChanged(), underline, updateFamilies(), writingSystemAccel, writingSystemCombo, QFontDatabase::writingSystemName(), and QFontDatabase::WritingSystemsCount.
|
overrideprivatevirtual |
Reimplemented from QDialogPrivate.
Definition at line 427 of file qfontdialog.cpp.
References QObject::connect(), options, QPlatformFontDialogHelper::setOptions(), and SIGNAL.
|
inline |
Definition at line 47 of file qfontdialog_p.h.
References QDialogPrivate::platformHelper().
void QFontDialogPrivate::retranslateStrings | ( | ) |
Definition at line 742 of file qfontdialog.cpp.
References effects, familyAccel, sample, QLabel::setText(), QAbstractButton::setText(), QGroupBox::setTitle(), sizeAccel, strikeout, styleAccel, underline, and writingSystemAccel.
Referenced by init().
void QFontDialogPrivate::updateFamilies | ( | ) |
Definition at line 447 of file qfontdialog.cpp.
References QFontListView::currentText(), QFontDatabase::families(), family, familyEdit, familyList, QString::first(), i, QFontDatabase::isFixedPitch(), QFontDatabase::isPrivateFamily(), QFontDatabase::isSmoothlyScalable(), it, QFontListView::model(), QFontDialog::MonospacedFonts, QFontDialog::NonScalableFonts, QFontDialogOptions::options(), options, QFontDatabasePrivate::parseFontName(), QFontDialog::ProportionalFonts, QStringLiteral, QFontDialog::ScalableFonts, QLineEdit::selectAll(), QFontListView::setCurrentItem(), QStringListModel::setStringList(), QLineEdit::setText(), QStyle::SH_FontDialog_SelectAssociatedText, updateStyles(), and writingSystem.
Referenced by _q_writingSystemHighlighted(), and init().
Definition at line 642 of file qfontdialog.cpp.
References emit, QWidget::font, sampleEdit, and QWidget::setFont().
Referenced by _q_updateSample().
void QFontDialogPrivate::updateSizes | ( | ) |
Updates the contents of the "font size" list box. This function can be reimplemented if you have special requirements.
Definition at line 595 of file qfontdialog.cpp.
References _q_updateSample(), QLineEdit::clear(), QSet< T >::constBegin(), QSet< T >::constEnd(), QFontListView::currentText(), familyList, i, QString::isEmpty(), it, QFontListView::model(), QString::number(), QFontDatabase::pointSizes(), QLineEdit::selectAll(), QFontListView::setCurrentItem(), QStringListModel::setStringList(), QLineEdit::setText(), QStyle::SH_FontDialog_SelectAssociatedText, sizeEdit, sizeList, smoothScalable, and styleList.
Referenced by _q_styleHighlighted(), and updateStyles().
void QFontDialogPrivate::updateStyles | ( | ) |
Definition at line 530 of file qfontdialog.cpp.
References QLineEdit::clear(), QString::contains(), QFontListView::count(), QFontListView::currentText(), familyList, i, QString::isEmpty(), QFontDatabase::isSmoothlyScalable(), QFontListView::model(), QString::replace(), QLineEdit::selectAll(), QFontListView::setCurrentItem(), QStringListModel::setStringList(), QLineEdit::setText(), QStyle::SH_FontDialog_SelectAssociatedText, smoothScalable, style, styleEdit, styleList, QFontDatabase::styles(), QFontListView::text(), and updateSizes().
Referenced by _q_familyHighlighted(), and updateFamilies().
QDialogButtonBox* QFontDialogPrivate::buttonBox |
Definition at line 95 of file qfontdialog_p.h.
Referenced by init().
QBoxLayout* QFontDialogPrivate::buttonLayout |
Definition at line 90 of file qfontdialog_p.h.
QComboBox* QFontDialogPrivate::color |
Definition at line 82 of file qfontdialog_p.h.
QGroupBox* QFontDialogPrivate::effects |
Definition at line 79 of file qfontdialog_p.h.
Referenced by init(), and retranslateStrings().
QBoxLayout* QFontDialogPrivate::effectsLayout |
Definition at line 91 of file qfontdialog_p.h.
QString QFontDialogPrivate::family |
Definition at line 97 of file qfontdialog_p.h.
Referenced by _q_familyHighlighted(), and updateFamilies().
QLabel* QFontDialogPrivate::familyAccel |
Definition at line 67 of file qfontdialog_p.h.
Referenced by init(), and retranslateStrings().
QLineEdit* QFontDialogPrivate::familyEdit |
Definition at line 68 of file qfontdialog_p.h.
Referenced by _q_familyHighlighted(), init(), and updateFamilies().
QFontListView* QFontDialogPrivate::familyList |
Definition at line 69 of file qfontdialog_p.h.
Referenced by _q_familyHighlighted(), _q_updateSample(), init(), updateFamilies(), updateSizes(), and updateStyles().
QByteArray QFontDialogPrivate::memberToDisconnectOnClose |
Definition at line 105 of file qfontdialog_p.h.
QSharedPointer<QFontDialogOptions> QFontDialogPrivate::options |
Definition at line 103 of file qfontdialog_p.h.
Referenced by canBeNativeDialog(), getFont(), helperPrepareShow(), initHelper(), and updateFamilies().
Definition at line 104 of file qfontdialog_p.h.
QGroupBox* QFontDialogPrivate::sample |
Definition at line 84 of file qfontdialog_p.h.
Referenced by init(), and retranslateStrings().
QLineEdit* QFontDialogPrivate::sampleEdit |
Definition at line 85 of file qfontdialog_p.h.
Referenced by _q_updateSample(), _q_writingSystemHighlighted(), init(), and updateSampleFont().
QBoxLayout* QFontDialogPrivate::sampleEditLayout |
Definition at line 93 of file qfontdialog_p.h.
QBoxLayout* QFontDialogPrivate::sampleLayout |
Definition at line 92 of file qfontdialog_p.h.
QFont QFontDialogPrivate::selectedFont |
Definition at line 102 of file qfontdialog_p.h.
int QFontDialogPrivate::size |
Definition at line 100 of file qfontdialog_p.h.
Referenced by _q_sizeChanged().
QLabel* QFontDialogPrivate::sizeAccel |
Definition at line 75 of file qfontdialog_p.h.
Referenced by init(), and retranslateStrings().
QLineEdit* QFontDialogPrivate::sizeEdit |
Definition at line 76 of file qfontdialog_p.h.
Referenced by _q_sizeHighlighted(), _q_updateSample(), init(), and updateSizes().
QFontListView* QFontDialogPrivate::sizeList |
Definition at line 77 of file qfontdialog_p.h.
Referenced by _q_sizeChanged(), _q_sizeHighlighted(), init(), and updateSizes().
bool QFontDialogPrivate::smoothScalable |
Definition at line 101 of file qfontdialog_p.h.
Referenced by init(), updateSizes(), and updateStyles().
QCheckBox* QFontDialogPrivate::strikeout |
Definition at line 80 of file qfontdialog_p.h.
Referenced by _q_updateSample(), init(), and retranslateStrings().
QString QFontDialogPrivate::style |
Definition at line 99 of file qfontdialog_p.h.
Referenced by _q_styleHighlighted(), _q_updateSample(), and updateStyles().
QLabel* QFontDialogPrivate::styleAccel |
Definition at line 71 of file qfontdialog_p.h.
Referenced by init(), and retranslateStrings().
QLineEdit* QFontDialogPrivate::styleEdit |
Definition at line 72 of file qfontdialog_p.h.
Referenced by _q_styleHighlighted(), init(), and updateStyles().
QFontListView* QFontDialogPrivate::styleList |
Definition at line 73 of file qfontdialog_p.h.
Referenced by _q_styleHighlighted(), init(), updateSizes(), and updateStyles().
QCheckBox* QFontDialogPrivate::underline |
Definition at line 81 of file qfontdialog_p.h.
Referenced by _q_updateSample(), init(), and retranslateStrings().
QFontDatabase::WritingSystem QFontDialogPrivate::writingSystem |
Definition at line 98 of file qfontdialog_p.h.
Referenced by _q_writingSystemHighlighted(), and updateFamilies().
QLabel* QFontDialogPrivate::writingSystemAccel |
Definition at line 87 of file qfontdialog_p.h.
Referenced by init(), and retranslateStrings().
QComboBox* QFontDialogPrivate::writingSystemCombo |
Definition at line 88 of file qfontdialog_p.h.
Referenced by init().