A widget to display the set name and collectors number with adjustable font size.
More...
#include <set_name_and_collectors_number_display_widget.h>
|
| void | adjustFontSize (int scalePercentage) |
| | Adjusts the font size of the labels based on the slider value.
|
A widget to display the set name and collectors number with adjustable font size.
This widget displays the set name and collectors number on two separate labels. The font size is resized dynamically when the card size is changed.
◆ SetNameAndCollectorsNumberDisplayWidget()
| SetNameAndCollectorsNumberDisplayWidget::SetNameAndCollectorsNumberDisplayWidget |
( |
QWidget * | parent, |
|
|
const QString & | setName, |
|
|
const QString & | collectorsNumber, |
|
|
QSlider * | cardSizeSlider ) |
◆ adjustFontSize
| void SetNameAndCollectorsNumberDisplayWidget::adjustFontSize |
( |
int | scalePercentage | ) |
|
|
slot |
Adjusts the font size of the labels based on the slider value.
This method adjusts the font size of the set name and collectors number labels according to the scale percentage provided by the slider. The font size is clamped to a range between the defined minimum and maximum font sizes.
- Parameters
-
| scalePercentage | The scale percentage from the slider. |
◆ resizeEvent()
| void SetNameAndCollectorsNumberDisplayWidget::resizeEvent |
( |
QResizeEvent * | event | ) |
|
|
override |
Handles resize events to adjust the height of the set name label.
This method calculates the height required to display the set name label with word wrapping. It adjusts the minimum height of the set name label to fit the text.
- Parameters
-
◆ cardSizeSlider
| QSlider* SetNameAndCollectorsNumberDisplayWidget::cardSizeSlider |
|
private |
◆ collectorsNumber
| QLabel* SetNameAndCollectorsNumberDisplayWidget::collectorsNumber |
|
private |
◆ layout
| QVBoxLayout* SetNameAndCollectorsNumberDisplayWidget::layout |
|
private |
◆ setName
| QLabel* SetNameAndCollectorsNumberDisplayWidget::setName |
|
private |
The documentation for this class was generated from the following files: