Cockatrice/cockatrice/src/interface/widgets/playmat/playmat_preview_widget.h
BruebachL 9eafd90a91
[Game] Playmats (#7101)
* [Game] Playmats

Took 19 seconds

Took 1 minute

* [Playmats] Add fixed override and configurable fallbacks to settings.

Took 29 minutes

Took 43 seconds

* Add main to test.

Took 1 minute

Took 29 seconds

* Move settings to own group

Took 11 minutes

* Some attempts to refresh macOS compositor

Took 2 minutes

* Try something else

Took 17 minutes

* Don't manipulate live list

Took 11 minutes

* Change things about resolution, address comments.

Took 45 minutes

Took 12 minutes

* Comments.

Took 14 minutes

Took 8 seconds

* Re-order settings menu location

Took 2 minutes

* Rename PlaymatResolution to Info and add enums

Took 8 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-21 10:40:49 +02:00

35 lines
917 B
C++

#ifndef COCKATRICE_PLAYMAT_PREVIEW_WIDGET_H
#define COCKATRICE_PLAYMAT_PREVIEW_WIDGET_H
#include <QPixmap>
#include <QWidget>
#include <libcockatrice/deck_list/deck_list.h>
/**
* @brief Preview widget that shows how a playmat card art will appear
* across the combined table + stack play area.
*
* Renders a miniature mockup with the card art applied using the
* given PlaymatParams, including faint zone divider lines.
*/
class PlaymatPreviewWidget : public QWidget
{
Q_OBJECT
public:
explicit PlaymatPreviewWidget(QWidget *parent = nullptr);
void setPixmap(const QPixmap &pixmap);
void setParams(const PlaymatParams &params);
void setAttribution(const QString &attribution);
protected:
void paintEvent(QPaintEvent *event) override;
private:
QPixmap sourcePixmap;
PlaymatParams params;
QString attributionText;
};
#endif // COCKATRICE_PLAYMAT_PREVIEW_WIDGET_H