#include <deck_preview_card_picture_widget.h>
|
| | DeckPreviewCardPictureWidget (QWidget *parent, bool hoverToZoomEnabled=false, bool raiseOnEnter=false, const QColor &textColor=Qt::white, const QColor &outlineColor=Qt::black, int fontSize=12, Qt::Alignment alignment=Qt::AlignCenter) |
| | Constructs a CardPictureWithTextOverlay widget.
|
| | CardInfoPictureWithTextOverlayWidget (QWidget *parent=nullptr, bool hoverToZoomEnabled=false, bool raiseOnEnter=false, const QColor &textColor=Qt::white, const QColor &outlineColor=Qt::black, int fontSize=12, Qt::Alignment alignment=Qt::AlignCenter) |
| | Constructs a CardPictureWithTextOverlay widget.
|
| void | setOverlayText (const QString &text) |
| | Sets the overlay text to be displayed on the card.
|
| void | setTextColor (const QColor &color) |
| | Sets the color of the overlay text.
|
| void | setOutlineColor (const QColor &color) |
| | Sets the outline color around the overlay text.
|
| void | setFontSize (int size) |
| | Sets the font size for the overlay text.
|
| void | setTextAlignment (Qt::Alignment alignment) |
| | Sets the alignment of the overlay text within the widget.
|
| void | setHighlighted (bool _highlighted) |
| QSize | sizeHint () const override |
| | Provides the recommended size for this widget.
|
| | CardInfoPictureWidget (QWidget *parent=nullptr, bool hoverToZoomEnabled=false, bool raiseOnEnter=false) |
| | Constructs a CardInfoPictureWidget.
|
| ExactCard | getCard () |
| QSize | sizeHint () const override |
| | Provides the recommended size for the widget based on the scale factor.
|
|
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseDoubleClickEvent (QMouseEvent *event) override |
| void | paintEvent (QPaintEvent *event) override |
| | Paints the widget, including both the card image and the text overlay.
|
| void | mousePressEvent (QMouseEvent *event) override |
| QSize | minimumSizeHint () const override |
| | Provides the minimum recommended size for this widget.
|
| void | resizeEvent (QResizeEvent *event) override |
| | Handles widget resizing by updating the pixmap size.
|
| void | paintEvent (QPaintEvent *) override |
| | Custom paint event that draws the card image with rounded corners.
|
| void | enterEvent (QEnterEvent *event) override |
| | Starts the hover timer to show the enlarged pixmap on hover.
|
| void | leaveEvent (QEvent *event) override |
| | Stops the hover timer and hides the enlarged pixmap when the mouse leaves.
|
| void | moveEvent (QMoveEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| | Moves the enlarged pixmap widget to follow the mouse cursor.
|
| void | mousePressEvent (QMouseEvent *event) override |
| void | hideEvent (QHideEvent *event) override |
| void | loadPixmap () |
| | Loads the appropriate pixmap based on the current card info.
|
| const QPixmap & | getResizedPixmap () const |
| void | showEnlargedPixmap () const |
| | Displays the enlarged version of the card's pixmap near the cursor.
|
◆ DeckPreviewCardPictureWidget()
| DeckPreviewCardPictureWidget::DeckPreviewCardPictureWidget |
( |
QWidget * | parent, |
|
|
bool | hoverToZoomEnabled = false, |
|
|
bool | raiseOnEnter = false, |
|
|
const QColor & | textColor = Qt::white, |
|
|
const QColor & | outlineColor = Qt::black, |
|
|
int | fontSize = 12, |
|
|
Qt::Alignment | alignment = Qt::AlignCenter ) |
|
explicit |
Constructs a CardPictureWithTextOverlay widget.
- Parameters
-
| parent | The parent widget. |
| hoverToZoomEnabled | If this widget will spawn a larger widget when hovered over. |
| textColor | The color of the overlay text. |
| outlineColor | The color of the outline around the text. |
| fontSize | The font size of the overlay text. |
| alignment | The alignment of the text within the overlay. |
| _deckLoader | The Deck Loader holding the Deck associated with this preview. |
Sets the widget's size policy and default border style.
◆ imageClicked
◆ imageDoubleClicked
◆ mouseDoubleClickEvent()
| void DeckPreviewCardPictureWidget::mouseDoubleClickEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotected |
◆ mousePressEvent()
| void DeckPreviewCardPictureWidget::mousePressEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotected |
◆ lastMouseEvent
| QMouseEvent* DeckPreviewCardPictureWidget::lastMouseEvent = nullptr |
|
private |
◆ singleClickTimer
| QTimer* DeckPreviewCardPictureWidget::singleClickTimer |
|
private |
The documentation for this class was generated from the following files: