ORE Studio 0.0.4
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
CountryHistoryDialog Class Reference

Widget for displaying country version history. More...

#include <CountryHistoryDialog.hpp>

Inherits QWidget.

Collaboration diagram for CountryHistoryDialog:
Collaboration graph

Signals

void statusChanged (const QString &message)
 
void errorOccurred (const QString &error_message)
 
void openVersionRequested (const refdata::domain::country &country, int versionNumber)
 Emitted when user requests to open a version in read-only mode.
 
void revertVersionRequested (const refdata::domain::country &country)
 Emitted when user requests to revert to a selected version.
 

Public Member Functions

 CountryHistoryDialog (QString alpha2_code, ClientManager *clientManager, QWidget *parent=nullptr)
 
void loadHistory ()
 
void setImageCache (ImageCache *imageCache)
 Set the image cache for displaying country flags.
 
QSize sizeHint () const override
 
void markAsStale ()
 Mark the history data as stale and reload.
 
QString alpha2Code () const
 Returns the alpha-2 code of the country.
 
const std::vector< refdata::domain::country > & getHistory () const
 Returns the loaded history vector for version navigation.
 

Detailed Description

Widget for displaying country version history.

Member Function Documentation

◆ markAsStale()

void markAsStale ( )

Mark the history data as stale and reload.

Called when a notification is received indicating this country has changed on the server. Automatically reloads the history data.

◆ openVersionRequested

void openVersionRequested ( const refdata::domain::country country,
int  versionNumber 
)
signal

Emitted when user requests to open a version in read-only mode.

Parameters
countryThe country data at the selected version.
versionNumberThe version number being viewed.

◆ revertVersionRequested

void revertVersionRequested ( const refdata::domain::country country)
signal

Emitted when user requests to revert to a selected version.

Parameters
countryThe country data to revert to.