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

#include <hudwidget.h>

+ Inheritance diagram for hud_battle_log:

Public Member Functions

 hud_battle_log (QWidget *parent)
 
 ~hud_battle_log ()
 
void add_combat_info (hud_unit_combat *huc)
 
void set_scale (float s)
 

Data Fields

float scale
 

Protected Member Functions

void paintEvent (QPaintEvent *event)
 
void moveEvent (QMoveEvent *event)
 
void timerEvent (QTimerEvent *event)
 
void showEvent (QShowEvent *event)
 

Private Member Functions

void update_size ()
 
void te_inner ()
 

Private Attributes

QVBoxLayoutmain_layout
 
QList< hud_unit_combat * > lhuc
 
scale_widgetsw
 
move_widgetmw
 
QElapsedTimer m_timer
 

Detailed Description

Definition at line 356 of file hudwidget.h.

Constructor & Destructor Documentation

◆ hud_battle_log()

hud_battle_log::hud_battle_log ( QWidget *  parent)

Hud battle log constructor

Definition at line 1991 of file hudwidget.cpp.

◆ ~hud_battle_log()

hud_battle_log::~hud_battle_log ( )

Hud battle log destructor

Definition at line 2005 of file hudwidget.cpp.

Member Function Documentation

◆ add_combat_info()

void hud_battle_log::add_combat_info ( hud_unit_combat huc)

Adds comabt information to battle log

Definition at line 2048 of file hudwidget.cpp.

◆ moveEvent()

void hud_battle_log::moveEvent ( QMoveEvent event)
protected

Move event, saves current position

Definition at line 2089 of file hudwidget.cpp.

◆ paintEvent()

void hud_battle_log::paintEvent ( QPaintEvent event)
protected

Paint event for hud battle log

Definition at line 2076 of file hudwidget.cpp.

◆ set_scale()

void hud_battle_log::set_scale ( float  s)

Set scale

Definition at line 2039 of file hudwidget.cpp.

Referenced by fc_game_tab_widget::resizeEvent().

◆ showEvent()

void hud_battle_log::showEvent ( QShowEvent event)
protected

Show event, restart fading timer

Definition at line 2139 of file hudwidget.cpp.

◆ te_inner()

void hud_battle_log::te_inner ( )
private

Timer event inner foreach() loop. Implemented as separate method to avoid compiler shadow warning about internal variables of foreach() inside foreach().

Definition at line 2105 of file hudwidget.cpp.

Referenced by timerEvent().

◆ timerEvent()

void hud_battle_log::timerEvent ( QTimerEvent event)
protected

Timer event. Starts/stops fading

Definition at line 2117 of file hudwidget.cpp.

◆ update_size()

void hud_battle_log::update_size ( )
private

Updates size when scale has changed

Definition at line 2014 of file hudwidget.cpp.

Referenced by paintEvent().

Field Documentation

◆ lhuc

QList<hud_unit_combat*> hud_battle_log::lhuc
private

Definition at line 360 of file hudwidget.h.

Referenced by add_combat_info(), showEvent(), te_inner(), timerEvent(), and update_size().

◆ m_timer

QElapsedTimer hud_battle_log::m_timer
private

Definition at line 378 of file hudwidget.h.

Referenced by add_combat_info(), moveEvent(), showEvent(), timerEvent(), and update_size().

◆ main_layout

QVBoxLayout* hud_battle_log::main_layout
private

Definition at line 359 of file hudwidget.h.

Referenced by add_combat_info(), hud_battle_log(), and update_size().

◆ mw

move_widget* hud_battle_log::mw
private

Definition at line 377 of file hudwidget.h.

Referenced by hud_battle_log(), paintEvent(), and ~hud_battle_log().

◆ scale

float hud_battle_log::scale

Definition at line 366 of file hudwidget.h.

Referenced by add_combat_info(), paintEvent(), set_scale(), and update_size().

◆ sw

scale_widget* hud_battle_log::sw
private

Definition at line 376 of file hudwidget.h.

Referenced by hud_battle_log(), paintEvent(), set_scale(), and ~hud_battle_log().