Freeciv-3.4
|
#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 290 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 1708 of file hudwidget.cpp.
hud_unit_combat::~hud_unit_combat | ( | ) |
Hud unit combat destructor
Definition at line 1812 of file hudwidget.cpp.
|
protected |
Leave event for hud unit combat. Shows highlight.
Definition at line 1920 of file hudwidget.cpp.
bool hud_unit_combat::get_focus | ( | ) |
Returns true if widget has focus (used to prevent hiding parent)
Definition at line 1828 of file hudwidget.cpp.
Draws images of units to pixmaps for later use
Definition at line 1736 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 1911 of file hudwidget.cpp.
|
protected |
Mouse press event, centers on highlighted combat
Definition at line 1903 of file hudwidget.cpp.
|
protected |
Paint event for hud_unit combat
Definition at line 1836 of file hudwidget.cpp.
Sets widget fading
Definition at line 1819 of file hudwidget.cpp.
Referenced by hud_battle_log::showEvent(), and hud_battle_log::te_inner().
Sets scale for images
Definition at line 1803 of file hudwidget.cpp.
|
private |
Definition at line 323 of file hudwidget.h.
Referenced by init_images(), and paintEvent().
|
private |
Definition at line 309 of file hudwidget.h.
Referenced by hud_unit_combat().
|
private |
Definition at line 311 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
|
private |
Definition at line 313 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
Definition at line 315 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().
Definition at line 319 of file hudwidget.h.
Referenced by hud_unit_combat(), and mousePressEvent().
|
private |
Definition at line 310 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
|
private |
Definition at line 312 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
|
private |
Definition at line 314 of file hudwidget.h.
Referenced by hud_unit_combat(), and paintEvent().
Definition at line 316 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().
|
private |
Definition at line 323 of file hudwidget.h.
Referenced by init_images(), and paintEvent().
|
private |
Definition at line 321 of file hudwidget.h.
Referenced by paintEvent(), and set_fading().
|
private |
Definition at line 320 of file hudwidget.h.
Referenced by enterEvent(), get_focus(), init_images(), leaveEvent(), and paintEvent().
|
private |
Definition at line 322 of file hudwidget.h.
Referenced by hud_unit_combat(), init_images(), paintEvent(), and set_scale().
Definition at line 317 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().
Definition at line 318 of file hudwidget.h.
Referenced by hud_unit_combat(), and init_images().