#include <card_info_picture_enlarged_widget.h>
|
| void | paintEvent (QPaintEvent *event) override |
| | Custom paint event that draws the enlarged card image with rounded corners.
|
|
| void | loadPixmap (const QSize &size) |
| | Loads the pixmap based on the given size and card information.
|
◆ CardInfoPictureEnlargedWidget()
| CardInfoPictureEnlargedWidget::CardInfoPictureEnlargedWidget |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Constructs a CardPictureEnlargedWidget.
- Parameters
-
Sets the widget's window flags to keep it displayed as a tooltip overlay.
◆ loadPixmap()
| void CardInfoPictureEnlargedWidget::loadPixmap |
( |
const QSize & | size | ) |
|
|
private |
Loads the pixmap based on the given size and card information.
- Parameters
-
| size | The desired size for the loaded pixmap. |
If card information is available, it loads the card's specific pixmap. Otherwise, it loads a default card back pixmap.
◆ paintEvent()
| void CardInfoPictureEnlargedWidget::paintEvent |
( |
QPaintEvent * | event | ) |
|
|
overrideprotected |
Custom paint event that draws the enlarged card image with rounded corners.
- Parameters
-
| event | The paint event (unused). |
Checks if the pixmap is valid. Then, calculates the size and position for centering the scaled pixmap within the widget, applies rounded corners, and draws the pixmap.
◆ setCardPixmap()
| void CardInfoPictureEnlargedWidget::setCardPixmap |
( |
const ExactCard & | _card, |
|
|
QSize | size ) |
Sets the pixmap for the widget based on a provided card.
- Parameters
-
| _card | The card information to load. |
| size | The desired size for the pixmap. |
Sets the widget's pixmap to the card image and resizes the widget to match the specified size. Triggers a repaint.
◆ card
| ExactCard CardInfoPictureEnlargedWidget::card |
|
private |
◆ enlargedPixmap
| QPixmap CardInfoPictureEnlargedWidget::enlargedPixmap |
|
private |
◆ pixmapDirty
| bool CardInfoPictureEnlargedWidget::pixmapDirty |
|
private |
The documentation for this class was generated from the following files: