Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
card_picture_loader_status_bar.h
Go to the documentation of this file.
1#ifndef PICTURE_LOADER_STATUS_BAR_H
2#define PICTURE_LOADER_STATUS_BAR_H
3
4#include <QString>
5#include <QWidget>
6#include <qtmetamacros.h>
7
8class ExactCard;
9class QHBoxLayout;
10class QProgressBar;
11class QTimer;
12class QUrl;
14
25class CardPictureLoaderStatusBar : public QWidget
26{
27 Q_OBJECT
28public:
33 explicit CardPictureLoaderStatusBar(QWidget *parent);
34
35public slots:
42 void addQueuedImageLoad(const QUrl &url, const ExactCard &card, const QString &setName);
43
49 void addSuccessfulImageLoad(const QUrl &url);
50
55 void cleanOldEntries();
56
57private:
58 QHBoxLayout *layout;
59 QProgressBar *progressBar;
61 QTimer *cleaner;
62};
63
64#endif // PICTURE_LOADER_STATUS_BAR_H
void addSuccessfulImageLoad(const QUrl &url)
Marks an image as successfully loaded. Updates the progress bar and marks the corresponding log entry...
Definition card_picture_loader_status_bar.cpp:59
QTimer * cleaner
Timer for periodically cleaning old log entries.
Definition card_picture_loader_status_bar.h:61
void cleanOldEntries()
Cleans up old entries from the log that have finished more than 10 seconds ago. Adjusts the progress ...
Definition card_picture_loader_status_bar.cpp:36
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.
Definition card_picture_loader_status_bar.cpp:53
QHBoxLayout * layout
Horizontal layout containing progress bar and log button.
Definition card_picture_loader_status_bar.h:58
SettingsButtonWidget * loadLog
Popup log showing individual request statuses.
Definition card_picture_loader_status_bar.h:60
QProgressBar * progressBar
Progress bar showing overall download progress.
Definition card_picture_loader_status_bar.h:59
CardPictureLoaderStatusBar(QWidget *parent)
Constructs a status bar with progress bar and log button.
Definition card_picture_loader_status_bar.cpp:17
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:24
Definition settings_button_widget.h:21