cf::ui::gallery::FontCardWidget¶
Font card widget displaying a single typography token. More...
#include <MaterialTypographyMainWindow.h>
Inherits from QWidget, QWidget
Public Signals¶
| Name | |
|---|---|
| void | clicked(constQString & cssStyle) |
| void | clicked(constQString & cssStyle) |
Public Functions¶
| Name | |
|---|---|
| FontCardWidget(constQString & tokenName, constQFont & font, float lineHeight, constQString & previewText, QWidget * parent =nullptr) | |
| void | updateFont(constQFont & font, float lineHeight) |
| QSize | sizeHint() const override |
| FontCardWidget(constQString & tokenName, constQFont & font, float lineHeight, constQString & previewText, QWidget * parent =nullptr) | |
| void | updateFont(constQFont & font, float lineHeight) |
| QSize | sizeHint() const override |
Protected Functions¶
| Name | |
|---|---|
| void | paintEvent(QPaintEvent * event) override |
| void | enterEvent(QEnterEvent * event) override |
| void | leaveEvent(QEvent * event) override |
| void | mousePressEvent(QMouseEvent * event) override |
| void | paintEvent(QPaintEvent * event) override |
| void | enterEvent(QEnterEvent * event) override |
| void | leaveEvent(QEvent * event) override |
| void | mousePressEvent(QMouseEvent * event) override |
Detailed Description¶
Font card widget displaying a single typography token.
Shows:
- Font preview text
- Token name (e.g., "md.typography.displayLarge")
- Font properties (size, weight, line-height)
Click to copy CSS style to clipboard.
Public Signals Documentation¶
signal clicked¶
signal clicked¶
Public Functions Documentation¶
function FontCardWidget¶
explicit FontCardWidget(
constQString & tokenName,
constQFont & font,
float lineHeight,
constQString & previewText,
QWidget * parent =nullptr
)
function updateFont¶
function sizeHint¶
function FontCardWidget¶
explicit FontCardWidget(
constQString & tokenName,
constQFont & font,
float lineHeight,
constQString & previewText,
QWidget * parent =nullptr
)
function updateFont¶
function sizeHint¶
Protected Functions Documentation¶
function paintEvent¶
function enterEvent¶
function leaveEvent¶
function mousePressEvent¶
function paintEvent¶
function enterEvent¶
function leaveEvent¶
function mousePressEvent¶
Updated on 2026-03-09 at 10:14:00 +0000