Freeciv-3.3
|
#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 1712 of file hudwidget.cpp.
hud_unit_combat::~hud_unit_combat | ( | ) |
Hud unit combat destructor
Definition at line 1816 of file hudwidget.cpp.
|
protected |
Leave event for hud unit combat. Shows highlight.
Definition at line 1925 of file hudwidget.cpp.
bool hud_unit_combat::get_focus | ( | ) |
Returns true if widget has focus (used to prevent hiding parent)
Definition at line 1832 of file hudwidget.cpp.
Draws images of units to pixmaps for later use
Definition at line 1740 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 1915 of file hudwidget.cpp.
|
protected |
Mouse press event, centers on highlighted combat
Definition at line 1907 of file hudwidget.cpp.
|
protected |
Paint event for hud_unit combat
Definition at line 1840 of file hudwidget.cpp.
Sets widget fading
Definition at line 1823 of file hudwidget.cpp.
Referenced by hud_battle_log::showEvent(), and hud_battle_log::te_inner().
Sets scale for images
Definition at line 1807 of file hudwidget.cpp.
|
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().
Definition at line 323 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().
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().
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().
Definition at line 325 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().
Definition at line 326 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().