Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
CardInfoPictureArtCropWidget Class Reference

#include <card_info_picture_art_crop_widget.h>

Inheritance diagram for CardInfoPictureArtCropWidget:
[legend]
Collaboration diagram for CardInfoPictureArtCropWidget:
[legend]

Public Member Functions

 CardInfoPictureArtCropWidget (QWidget *parent=nullptr)
QPixmap getProcessedBackground (const QSize &targetSize)
Public Member Functions inherited from CardInfoPictureWidget
 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.

Additional Inherited Members

Public Slots inherited from CardInfoPictureWidget
void setCard (const ExactCard &card)
 Sets the card to be displayed and updates the pixmap.
void setScaleFactor (int scale)
 Sets the scale factor for the widget.
void setHoverToZoomEnabled (bool enabled)
 Sets the hover to zoom feature.
void setRaiseOnEnterEnabled (bool enabled)
void updatePixmap ()
 Marks the pixmap as dirty and triggers a widget repaint.
Signals inherited from CardInfoPictureWidget
void hoveredOnCard (const ExactCard &hoveredCard)
void cardScaleFactorChanged (int _scale)
void cardChanged (const ExactCard &card)
void cardClicked ()
Protected Member Functions inherited from CardInfoPictureWidget
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.

Constructor & Destructor Documentation

◆ CardInfoPictureArtCropWidget()

CardInfoPictureArtCropWidget::CardInfoPictureArtCropWidget ( QWidget * parent = nullptr)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ getProcessedBackground()

QPixmap CardInfoPictureArtCropWidget::getProcessedBackground ( const QSize & targetSize)
Here is the call graph for this function:

The documentation for this class was generated from the following files: