Freeciv21
Develop your civilization from humble roots to a global empire
turn_done_button Class Reference

The "Turn Done" button in the main view. More...

#include <turn_done_button.h>

+ Inheritance diagram for turn_done_button:
+ Collaboration diagram for turn_done_button:

Public Member Functions

 turn_done_button (QWidget *parent=nullptr)
 Constructor. More...
 
virtual ~turn_done_button ()=default
 Destructor. More...
 
void update_timeout_label ()
 Updates the timeout text according to the current state of the game. More...
 
QSize sizeHint () const override
 Returns the size hint for this widget. More...
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 Paints the widget. More...
 

Private Attributes

QString m_timeout_label
 

Detailed Description

The "Turn Done" button in the main view.

Definition at line 13 of file turn_done_button.h.

Constructor & Destructor Documentation

◆ turn_done_button()

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

Constructor.

Definition at line 40 of file turn_done_button.cpp.

◆ ~turn_done_button()

virtual turn_done_button::~turn_done_button ( )
virtualdefault

Destructor.

Member Function Documentation

◆ paintEvent()

void turn_done_button::paintEvent ( QPaintEvent *  event)
overrideprotected

Paints the widget.

Definition at line 83 of file turn_done_button.cpp.

◆ sizeHint()

QSize turn_done_button::sizeHint ( ) const
override

Returns the size hint for this widget.

Definition at line 65 of file turn_done_button.cpp.

◆ update_timeout_label()

void turn_done_button::update_timeout_label ( )

Updates the timeout text according to the current state of the game.

Definition at line 198 of file turn_done_button.cpp.

Referenced by turn_done_button().

Member Data Documentation

◆ m_timeout_label

QString turn_done_button::m_timeout_label
private

Definition at line 30 of file turn_done_button.h.

Referenced by paintEvent(), and update_timeout_label().