Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
DlgSharedDecksPreview Class Reference

Non-modal preview of the decks contained in a shared-deck link. More...

#include <dlg_shared_decks_preview.h>

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

Public Slots

void setDownloading (bool downloading)

Signals

void openRequested (const QList< int > &itemIds)
void cancelled ()

Public Member Functions

 DlgSharedDecksPreview (QWidget *parent, const CardDatabaseQuerier *querier, const QString &shareName, qint64 expiresAt, const QString &serverText, const QList< ServerInfo_DeckShareItem > &items)
void setDownloadProgress (int done, int total, const QString &currentDeckName)

Protected Member Functions

void closeEvent (QCloseEvent *event) override

Private Slots

void openSelected ()
void openAll ()
void updateOpenSelectedEnabled ()
void onCancel ()

Private Member Functions

QList< int > selectedItemIds () const

Private Attributes

FlowWidget * flowWidget
QList< SharedDeckPreviewWidget * > tiles
QList< int > itemIds
QPushButton * openSelectedButton
QPushButton * openAllButton
QLabel * downloadStatusLabel
bool resultEmitted = false
bool downloadInProgress = false

Detailed Description

Non-modal preview of the decks contained in a shared-deck link.

Lets the user pick which of the shared decks to open before anything is downloaded. Emits openRequested with the ids of the chosen decks, or cancelled when the user closes the dialog without choosing. Once the user picks, the dialog switches into a "downloading" state: the tiles and open buttons are disabled, a progress label shows the current download and Cancel stays functional so the download can be aborted.

Constructor & Destructor Documentation

◆ DlgSharedDecksPreview()

DlgSharedDecksPreview::DlgSharedDecksPreview ( QWidget * parent,
const CardDatabaseQuerier * querier,
const QString & shareName,
qint64 expiresAt,
const QString & serverText,
const QList< ServerInfo_DeckShareItem > & items )
explicit
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ cancelled

void DlgSharedDecksPreview::cancelled ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ closeEvent()

void DlgSharedDecksPreview::closeEvent ( QCloseEvent * event)
overrideprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onCancel

void DlgSharedDecksPreview::onCancel ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openAll

void DlgSharedDecksPreview::openAll ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openRequested

void DlgSharedDecksPreview::openRequested ( const QList< int > & itemIds)
signal
Here is the caller graph for this function:

◆ openSelected

void DlgSharedDecksPreview::openSelected ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectedItemIds()

QList< int > DlgSharedDecksPreview::selectedItemIds ( ) const
private
Here is the caller graph for this function:

◆ setDownloading

void DlgSharedDecksPreview::setDownloading ( bool downloading)
slot
Here is the caller graph for this function:

◆ setDownloadProgress()

void DlgSharedDecksPreview::setDownloadProgress ( int done,
int total,
const QString & currentDeckName )
Here is the caller graph for this function:

◆ updateOpenSelectedEnabled

void DlgSharedDecksPreview::updateOpenSelectedEnabled ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ downloadInProgress

bool DlgSharedDecksPreview::downloadInProgress = false
private

◆ downloadStatusLabel

QLabel* DlgSharedDecksPreview::downloadStatusLabel
private

◆ flowWidget

FlowWidget* DlgSharedDecksPreview::flowWidget
private

◆ itemIds

QList<int> DlgSharedDecksPreview::itemIds
private

◆ openAllButton

QPushButton* DlgSharedDecksPreview::openAllButton
private

◆ openSelectedButton

QPushButton* DlgSharedDecksPreview::openSelectedButton
private

◆ resultEmitted

bool DlgSharedDecksPreview::resultEmitted = false
private

◆ tiles

QList<SharedDeckPreviewWidget *> DlgSharedDecksPreview::tiles
private

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