Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
FontSelectionDialog Class Reference

A dialog for picking a font, built on FontSelectionWidget. More...

#include <font_selection_dialog.h>

Inheritance diagram for FontSelectionDialog:

Public Member Functions

 FontSelectionDialog (QWidget *parent=nullptr)
 Constructs a new FontSelectionDialog.
 ~FontSelectionDialog ()
 Destroys the dialog and its UI form.
void setSelectedFont (const QFont &font)
 Set the font shown in the dialog.
QFont selectedFont () const
 Get the font currently selected in the dialog.
void setFeatures (FontSelectionWidget::Features features)
 Choose which editing features the dialog offers.

Static Public Member Functions

static QFont getFont (QWidget *parent, const QFont &initial, FontSelectionWidget::Features features, bool *ok=nullptr)
 Run the dialog modally and return the chosen font.

Detailed Description

A dialog for picking a font, built on FontSelectionWidget.

Used instead of QFontDialog so that macOS shows the same Qt widgets as the other platforms rather than the native font panel.

Constructor & Destructor Documentation

◆ FontSelectionDialog()

FontSelectionDialog::FontSelectionDialog ( QWidget * parent = nullptr)
explicit

Constructs a new FontSelectionDialog.

Parameters
parentThe parent widget.

Member Function Documentation

◆ getFont()

QFont FontSelectionDialog::getFont ( QWidget * parent,
const QFont & initial,
FontSelectionWidget::Features features,
bool * ok = nullptr )
static

Run the dialog modally and return the chosen font.

Mirrors QFontDialog::getFont.

Parameters
parentThe parent widget.
initialThe font shown initially.
featuresThe editing features to offer.
okSet to true if the user accepted the dialog and false if the user cancelled it. May be null.
Returns
The selected font if the user accepted, otherwise initial.

◆ selectedFont()

QFont FontSelectionDialog::selectedFont ( ) const

Get the font currently selected in the dialog.

Returns
The selected font.

◆ setFeatures()

void FontSelectionDialog::setFeatures ( FontSelectionWidget::Features features)

Choose which editing features the dialog offers.

Parameters
featuresThe features to enable.

◆ setSelectedFont()

void FontSelectionDialog::setSelectedFont ( const QFont & font)

Set the font shown in the dialog.

Parameters
fontThe font to show.

The documentation for this class was generated from the following files: