Freeciv-3.3
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes
hud_message_box Class Reference

#include <hudwidget.h>

+ Inheritance diagram for hud_message_box:

Public Member Functions

 hud_message_box (QWidget *parent)
 
 ~hud_message_box ()
 
int set_text_title (QString s1, QString s2, bool return_exec=false)
 

Protected Member Functions

void paintEvent (QPaintEvent *event)
 
void timerEvent (QTimerEvent *event)
 
void keyPressEvent (QKeyEvent *event)
 

Private Attributes

QElapsedTimer m_timer
 
int m_animate_step
 
QString text
 
QString title
 
QFontMetricsfm_text
 
QFontMetricsfm_title
 
QFont f_text
 
QString cs1
 
QString cs2
 
QFont f_title
 
int top
 
int mult
 

Detailed Description

Definition at line 55 of file hudwidget.h.

Constructor & Destructor Documentation

◆ hud_message_box()

hud_message_box::hud_message_box ( QWidget *  parent)

Custom message box constructor

Definition at line 74 of file hudwidget.cpp.

◆ ~hud_message_box()

hud_message_box::~hud_message_box ( )

Custom message box destructor

Definition at line 104 of file hudwidget.cpp.

Member Function Documentation

◆ keyPressEvent()

void hud_message_box::keyPressEvent ( QKeyEvent event)
protected

Key press event for hud message box

Definition at line 113 of file hudwidget.cpp.

◆ paintEvent()

void hud_message_box::paintEvent ( QPaintEvent event)
protected

Paint event for custom message box

Definition at line 185 of file hudwidget.cpp.

◆ set_text_title()

int hud_message_box::set_text_title ( QString  s1,
QString  s2,
bool  return_exec = false 
)

Sets text and title and shows message box

Definition at line 126 of file hudwidget.cpp.

Referenced by disband_box::disband_box(), eco_report::disband_units(), eco_report::sell_buildings(), and eco_report::sell_redundant().

◆ timerEvent()

void hud_message_box::timerEvent ( QTimerEvent event)
protected

Timer event used to animate message box

Definition at line 176 of file hudwidget.cpp.

Field Documentation

◆ cs1

QString hud_message_box::cs1
private

Definition at line 76 of file hudwidget.h.

Referenced by paintEvent(), and set_text_title().

◆ cs2

QString hud_message_box::cs2
private

Definition at line 76 of file hudwidget.h.

Referenced by paintEvent(), and set_text_title().

◆ f_text

QFont hud_message_box::f_text
private

Definition at line 75 of file hudwidget.h.

Referenced by hud_message_box(), and paintEvent().

◆ f_title

QFont hud_message_box::f_title
private

Definition at line 77 of file hudwidget.h.

Referenced by hud_message_box(), and paintEvent().

◆ fm_text

QFontMetrics* hud_message_box::fm_text
private

Definition at line 73 of file hudwidget.h.

Referenced by hud_message_box(), paintEvent(), set_text_title(), and ~hud_message_box().

◆ fm_title

QFontMetrics* hud_message_box::fm_title
private

Definition at line 74 of file hudwidget.h.

Referenced by hud_message_box(), paintEvent(), set_text_title(), and ~hud_message_box().

◆ m_animate_step

int hud_message_box::m_animate_step
private

Definition at line 70 of file hudwidget.h.

Referenced by hud_message_box(), paintEvent(), and timerEvent().

◆ m_timer

QElapsedTimer hud_message_box::m_timer
private

Definition at line 58 of file hudwidget.h.

Referenced by set_text_title(), and timerEvent().

◆ mult

int hud_message_box::mult
private

Definition at line 79 of file hudwidget.h.

Referenced by hud_message_box(), paintEvent(), and set_text_title().

◆ text

QString hud_message_box::text
private

Definition at line 71 of file hudwidget.h.

Referenced by paintEvent(), and set_text_title().

◆ title

QString hud_message_box::title
private

Definition at line 72 of file hudwidget.h.

Referenced by paintEvent(), and set_text_title().

◆ top

int hud_message_box::top
private

Definition at line 78 of file hudwidget.h.

Referenced by hud_message_box(), paintEvent(), and set_text_title().