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

Displays the status of card image downloads in a horizontal progress bar with a log popup. More...

#include <card_picture_loader_status_bar.h>

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

Public Slots

void addQueuedImageLoad (const QUrl &url, const ExactCard &card, const QString &setName)
 Adds a queued image download to the log and increments the progress bar maximum.
void addSuccessfulImageLoad (const QUrl &url)
 Marks an image as successfully loaded. Updates the progress bar and marks the corresponding log entry as finished.
void cleanOldEntries ()
 Cleans up old entries from the log that have finished more than 10 seconds ago. Adjusts the progress bar accordingly.

Public Member Functions

 CardPictureLoaderStatusBar (QWidget *parent)
 Constructs a status bar with progress bar and log button.

Private Attributes

QHBoxLayout * layout
 Horizontal layout containing progress bar and log button.
QProgressBar * progressBar
 Progress bar showing overall download progress.
SettingsButtonWidgetloadLog
 Popup log showing individual request statuses.
QTimer * cleaner
 Timer for periodically cleaning old log entries.

Detailed Description

Displays the status of card image downloads in a horizontal progress bar with a log popup.

Responsibilities:

  • Shows overall progress of image downloads.
  • Maintains a log of individual requests via a popup (SettingsButtonWidget).
  • Cleans up finished request entries automatically after a delay.

Constructor & Destructor Documentation

◆ CardPictureLoaderStatusBar()

CardPictureLoaderStatusBar::CardPictureLoaderStatusBar ( QWidget * parent)
explicit

Constructs a status bar with progress bar and log button.

Parameters
parentParent widget
Here is the call graph for this function:

Member Function Documentation

◆ addQueuedImageLoad

void CardPictureLoaderStatusBar::addQueuedImageLoad ( const QUrl & url,
const ExactCard & card,
const QString & setName )
slot

Adds a queued image download to the log and increments the progress bar maximum.

Parameters
urlURL of the image
cardThe card being loaded
setNameThe set name of the card
Here is the caller graph for this function:

◆ addSuccessfulImageLoad

void CardPictureLoaderStatusBar::addSuccessfulImageLoad ( const QUrl & url)
slot

Marks an image as successfully loaded. Updates the progress bar and marks the corresponding log entry as finished.

Parameters
urlURL of the successfully loaded image
Here is the caller graph for this function:

◆ cleanOldEntries

void CardPictureLoaderStatusBar::cleanOldEntries ( )
slot

Cleans up old entries from the log that have finished more than 10 seconds ago. Adjusts the progress bar accordingly.

Here is the caller graph for this function:

Member Data Documentation

◆ cleaner

QTimer* CardPictureLoaderStatusBar::cleaner
private

Timer for periodically cleaning old log entries.

◆ layout

QHBoxLayout* CardPictureLoaderStatusBar::layout
private

Horizontal layout containing progress bar and log button.

◆ loadLog

SettingsButtonWidget* CardPictureLoaderStatusBar::loadLog
private

Popup log showing individual request statuses.

◆ progressBar

QProgressBar* CardPictureLoaderStatusBar::progressBar
private

Progress bar showing overall download progress.


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