A dialog for picking a font, built on FontSelectionWidget.
More...
#include <font_selection_dialog.h>
|
| | 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 QFont | getFont (QWidget *parent, const QFont &initial, FontSelectionWidget::Features features, bool *ok=nullptr) |
| | Run the dialog modally and return the chosen font.
|
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.
◆ FontSelectionDialog()
| FontSelectionDialog::FontSelectionDialog |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
◆ 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
-
| parent | The parent widget. |
| initial | The font shown initially. |
| features | The editing features to offer. |
| ok | Set 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
-
| features | The features to enable. |
◆ setSelectedFont()
| void FontSelectionDialog::setSelectedFont |
( |
const QFont & | font | ) |
|
Set the font shown in the dialog.
- Parameters
-
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/font_selection_dialog.h
- /builds/wireshark/wireshark/ui/qt/font_selection_dialog.cpp