Freeciv-3.1
|
#include <hudwidget.h>
Public Member Functions | |
hud_unit_combat (int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_att_veteran, bool make_def_veteran, float scale, QWidget *parent) | |
~hud_unit_combat () | |
bool | get_focus () |
void | set_fading (float fade) |
void | set_scale (float scale) |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) |
void | mousePressEvent (QMouseEvent *e) |
void | leaveEvent (QEvent *event) |
void | enterEvent (QEnterEvent *event) |
Private Member Functions | |
void | init_images (bool redraw=false) |
Private Attributes | |
int | att_hp |
int | def_hp |
int | att_hp_loss |
int | def_hp_loss |
bool | att_veteran |
bool | def_veteran |
struct unit * | attacker |
struct unit * | defender |
const struct unit_type * | type_attacker |
const struct unit_type * | type_defender |
struct tile * | center_tile |
bool | focus |
float | fading |
float | hud_scale |
QImage | dimg |
QImage | aimg |
Definition at line 294 of file hudwidget.h.
hud_unit_combat::hud_unit_combat | ( | int | attacker_unit_id, |
int | defender_unit_id, | ||
int | attacker_hp, | ||
int | defender_hp, | ||
bool | make_att_veteran, | ||
bool | make_def_veteran, | ||
float | scale, | ||
QWidget * | parent | ||
) |
Hud unit combat constructor, prepares images to show as result
Definition at line 1710 of file hudwidget.cpp.
hud_unit_combat::~hud_unit_combat | ( | ) |
Hud unit combat destructor
Definition at line 1814 of file hudwidget.cpp.
|
protected |
Leave event for hud unit combat. Shows highlight.
Definition at line 1923 of file hudwidget.cpp.
bool hud_unit_combat::get_focus | ( | ) |
Returns true if widget has focus (used to prevent hiding parent)
Definition at line 1830 of file hudwidget.cpp.
Referenced by hud_battle_log::timerEvent().
Draws images of units to pixmaps for later use
Definition at line 1738 of file hudwidget.cpp.
Referenced by hud_unit_combat(), and set_scale().
|
protected |
Leave event for hud unit combat. Stops showing highlight.
Definition at line 1913 of file hudwidget.cpp.
|
protected |
Mouse press event, centers on highlighted combat
Definition at line 1905 of file hudwidget.cpp.
|
protected |
Paint event for hud_unit combat
Definition at line 1838 of file hudwidget.cpp.
void hud_unit_combat::set_fading | ( | float | fade | ) |
Sets widget fading
Definition at line 1821 of file hudwidget.cpp.
Referenced by hud_battle_log::add_combat_info(), hud_battle_log::showEvent(), hud_battle_log::te_inner(), hud_battle_log::timerEvent(), and hud_battle_log::update_size().
void hud_unit_combat::set_scale | ( | float | scale | ) |
Sets scale for images
Definition at line 1805 of file hudwidget.cpp.
Referenced by hud_battle_log::update_size().
|
private |
Definition at line 331 of file hudwidget.h.
Referenced by init_images(), and paintEvent().
|
private |
Definition at line 317 of file hudwidget.h.
Referenced by hud_unit_combat().
|
private |
Definition at line 319 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
|
private |
Definition at line 321 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
|
private |
Definition at line 323 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().
|
private |
Definition at line 327 of file hudwidget.h.
Referenced by hud_unit_combat(), and mousePressEvent().
|
private |
Definition at line 318 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
|
private |
Definition at line 320 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
|
private |
Definition at line 322 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
|
private |
Definition at line 324 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().
|
private |
Definition at line 331 of file hudwidget.h.
Referenced by init_images(), and paintEvent().
|
private |
Definition at line 329 of file hudwidget.h.
Referenced by paintEvent(), and set_fading().
|
private |
Definition at line 328 of file hudwidget.h.
Referenced by get_focus(), init_images(), leaveEvent(), and paintEvent().
|
private |
Definition at line 330 of file hudwidget.h.
Referenced by hud_unit_combat(), init_images(), paintEvent(), and set_scale().
|
private |
Definition at line 325 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().
|
private |
Definition at line 326 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().