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

Status bar widget showing what the card database updater (Oracle) is doing. More...

#include <card_database_update_status_bar.h>

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

Public Slots

void updateStarted ()
 Shows the widget and resets it to the indeterminate state.
void updateProgress (const CardUpdateProgress &progress)
 Shows the progress of one update stage.
void updateFinished ()
 Hides the widget and clears the reported progress.

Public Member Functions

 CardDatabaseUpdateStatusBar (QWidget *parent=nullptr)
 Constructs a hidden progress widget.
QString statusText () const
 Human readable description of the running stage, e.g. "Downloading (42%)".

Protected Member Functions

void changeEvent (QEvent *event) override

Private Member Functions

void refresh ()

Private Attributes

QHBoxLayout * layout
 Horizontal layout holding the stage label and the progress bar.
QLabel * stageLabel
 Name of the stage currently running.
QProgressBar * progressBar
 Progress within the current stage.
CardUpdateProgress progress
 Last reported progress.
bool active = false
 Whether an update is currently running.

Detailed Description

Status bar widget showing what the card database updater (Oracle) is doing.

The updater runs as a separate process, so this widget is the in-client view of its progress: it appears when an update starts, tracks the download/scan/import stages reported by the updater, and disappears when the update finishes.

Constructor & Destructor Documentation

◆ CardDatabaseUpdateStatusBar()

CardDatabaseUpdateStatusBar::CardDatabaseUpdateStatusBar ( QWidget * parent = nullptr)
explicit

Constructs a hidden progress widget.

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

Member Function Documentation

◆ changeEvent()

void CardDatabaseUpdateStatusBar::changeEvent ( QEvent * event)
overrideprotected
Here is the call graph for this function:

◆ refresh()

void CardDatabaseUpdateStatusBar::refresh ( )
private
Here is the caller graph for this function:

◆ statusText()

QString CardDatabaseUpdateStatusBar::statusText ( ) const

Human readable description of the running stage, e.g. "Downloading (42%)".

Returns
the description, or an empty string when no update is running
Here is the caller graph for this function:

◆ updateFinished

void CardDatabaseUpdateStatusBar::updateFinished ( )
slot

Hides the widget and clears the reported progress.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateProgress

void CardDatabaseUpdateStatusBar::updateProgress ( const CardUpdateProgress & progress)
slot

Shows the progress of one update stage.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateStarted

void CardDatabaseUpdateStatusBar::updateStarted ( )
slot

Shows the widget and resets it to the indeterminate state.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ active

bool CardDatabaseUpdateStatusBar::active = false
private

Whether an update is currently running.

◆ layout

QHBoxLayout* CardDatabaseUpdateStatusBar::layout
private

Horizontal layout holding the stage label and the progress bar.

◆ progress

CardUpdateProgress CardDatabaseUpdateStatusBar::progress
private

Last reported progress.

◆ progressBar

QProgressBar* CardDatabaseUpdateStatusBar::progressBar
private

Progress within the current stage.

◆ stageLabel

QLabel* CardDatabaseUpdateStatusBar::stageLabel
private

Name of the stage currently running.


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