Freeciv21
Develop your civilization from humble roots to a global empire
turn_done_button.cpp File Reference
#include "turn_done_button.h"
#include "client_main.h"
#include "fcintl.h"
#include "fonts.h"
#include "game.h"
#include <QDateTime>
#include <QShortcut>
#include <QStyle>
#include <QStyleOptionButton>
#include <QStylePainter>
+ Include dependency graph for turn_done_button.cpp:

Go to the source code of this file.

Namespaces

 metrics
 Constants used when drawing the button.
 

Functions

QString format_simple_duration (int seconds)
 Formats a duration without switching to "until hh::mm" when more than one hour in the future. More...
 
QString format_duration (int duration)
 Format the duration until TC, given in seconds, so it comes up in minutes or hours if that would be more meaningful. More...
 

Function Documentation

◆ format_duration()

QString format_duration ( int  duration)

Format the duration until TC, given in seconds, so it comes up in minutes or hours if that would be more meaningful.

If allow_date is true, switches to displaying the date and time of TC when it's too far in the future.

Definition at line 162 of file turn_done_button.cpp.

Referenced by turn_done_button::update_timeout_label().

◆ format_simple_duration()

QString format_simple_duration ( int  seconds)

Formats a duration without switching to "until hh::mm" when more than one hour in the future.

Definition at line 135 of file turn_done_button.cpp.

Referenced by format_duration(), turn_done_button::update_timeout_label(), and units_view::update_waiting().