Freeciv-3.3: unit_hud_selector Class Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes
unit_hud_selector Class Reference

`#include <hudwidget.h>`

Inheritance diagram for unit_hud_selector:

## Public Member Functions

| unit_hud_selector (QWidget *parent)
| ~unit_hud_selector ()
void | show_me ()

## Protected Member Functions

void | keyPressEvent (QKeyEvent *event)

## Private Slots

void | select_units (int x=0)
void | select_units (bool x)
void | uhs_select ()
void | uhs_cancel ()

## Private Member Functions

bool | activity_filter (struct unit *punit)
bool | hp_filter (struct unit *punit)
bool | island_filter (struct unit *punit)
bool | type_filter (struct unit *punit)

## Private Attributes

QVBoxLayout * | main_layout
QComboBox * | unit_sel_type
QPushButton * | select
QPushButton * | cancel
QRadioButton * | any_activity
QRadioButton * | fortified
QRadioButton * | idle
QRadioButton * | sentried
QRadioButton * | any
QRadioButton * | full_mp
QRadioButton * | full_hp
QRadioButton * | full_hp_mp
QRadioButton * | this_tile
QRadioButton * | this_continent
QRadioButton * | main_continent
QRadioButton * | anywhere
QRadioButton * | this_type
QRadioButton * | any_type
QLabel | result_label

## Detailed Description

Definition at line 247 of file hudwidget.h.

## Constructor & Destructor Documentation

## ◆ unit_hud_selector()

unit_hud_selector::unit_hud_selector | ( | QWidget * | parent | ) |

Constructor for unit_hud_selector

Definition at line 1306 of file hudwidget.cpp.

## ◆ ~unit_hud_selector()

unit_hud_selector::~unit_hud_selector | ( |  | ) |

Unit_hud_selector destructor

Definition at line 1457 of file hudwidget.cpp.

## Member Function Documentation

## ◆ activity_filter()

bool unit_hud_selector::activity_filter | ( | struct unit * | punit | ) |

private

Filter by activity

Definition at line 1533 of file hudwidget.cpp.

Referenced by select_units(), and uhs_select().

## ◆ hp_filter()

bool unit_hud_selector::hp_filter | ( | struct unit * | punit | ) |

private

Filter by hp/mp

Definition at line 1547 of file hudwidget.cpp.

Referenced by select_units(), and uhs_select().

## ◆ island_filter()

bool unit_hud_selector::island_filter | ( | struct unit * | punit | ) |

private

Filter by location

Definition at line 1563 of file hudwidget.cpp.

Referenced by select_units(), and uhs_select().

## ◆ keyPressEvent()

void unit_hud_selector::keyPressEvent | ( | QKeyEvent * | event | ) |

protected

Key press event for unit_hud_selector

Definition at line 1517 of file hudwidget.cpp.

## ◆ select_units [1/2]

void unit_hud_selector::select_units | ( | bool | x | ) |

privateslot

Convinient slot for ez connect

Definition at line 1509 of file hudwidget.cpp.

## ◆ select_units [2/2]

void unit_hud_selector::select_units | ( | int | x = `0` | ) |

privateslot

Shows number of selected units on label

Definition at line 1490 of file hudwidget.cpp.

Referenced by select_units(), show_me(), and unit_hud_selector().

## ◆ show_me()

void unit_hud_selector::show_me | ( |  | ) |

Shows and moves to center unit_hud_selector

Definition at line 1441 of file hudwidget.cpp.

## ◆ type_filter()

bool unit_hud_selector::type_filter | ( | struct unit * | punit | ) |

private

Filter by type

Definition at line 1596 of file hudwidget.cpp.

Referenced by select_units(), and uhs_select().

## ◆ uhs_cancel

void unit_hud_selector::uhs_cancel | ( |  | ) |

privateslot

Closes current widget

Definition at line 1482 of file hudwidget.cpp.

Referenced by unit_hud_selector().

## ◆ uhs_select

void unit_hud_selector::uhs_select | ( |  | ) |

privateslot

Selects and closes widget

Definition at line 1464 of file hudwidget.cpp.

Referenced by keyPressEvent(), and unit_hud_selector().

## Field Documentation

## ◆ any

QRadioButton* unit_hud_selector::any

private

Definition at line 276 of file hudwidget.h.

Referenced by hp_filter(), and unit_hud_selector().

## ◆ any_activity

QRadioButton* unit_hud_selector::any_activity

private

Definition at line 271 of file hudwidget.h.

Referenced by activity_filter(), and unit_hud_selector().

## ◆ any_type

QRadioButton* unit_hud_selector::any_type

private

Definition at line 287 of file hudwidget.h.

Referenced by type_filter(), and unit_hud_selector().

## ◆ anywhere

QRadioButton* unit_hud_selector::anywhere

private

Definition at line 284 of file hudwidget.h.

Referenced by island_filter(), and unit_hud_selector().

## ◆ cancel

QPushButton* unit_hud_selector::cancel

private

Definition at line 253 of file hudwidget.h.

Referenced by unit_hud_selector().

## ◆ fortified

QRadioButton* unit_hud_selector::fortified

private

Definition at line 272 of file hudwidget.h.

Referenced by activity_filter(), and unit_hud_selector().

## ◆ full_hp

QRadioButton* unit_hud_selector::full_hp

private

Definition at line 278 of file hudwidget.h.

Referenced by hp_filter(), and unit_hud_selector().

## ◆ full_hp_mp

QRadioButton* unit_hud_selector::full_hp_mp

private

Definition at line 279 of file hudwidget.h.

Referenced by hp_filter(), and unit_hud_selector().

## ◆ full_mp

QRadioButton* unit_hud_selector::full_mp

private

Definition at line 277 of file hudwidget.h.

Referenced by hp_filter(), and unit_hud_selector().

## ◆ idle

QRadioButton* unit_hud_selector::idle

private

Definition at line 273 of file hudwidget.h.

Referenced by activity_filter(), and unit_hud_selector().

## ◆ main_continent

QRadioButton* unit_hud_selector::main_continent

private

Definition at line 283 of file hudwidget.h.

Referenced by island_filter(), and unit_hud_selector().

## ◆ main_layout

QVBoxLayout* unit_hud_selector::main_layout

private

Definition at line 250 of file hudwidget.h.

Referenced by unit_hud_selector().

## ◆ result_label

QLabel unit_hud_selector::result_label

private

Definition at line 288 of file hudwidget.h.

Referenced by select_units(), and unit_hud_selector().

## ◆ select

QPushButton* unit_hud_selector::select

private

Definition at line 252 of file hudwidget.h.

Referenced by unit_hud_selector().

## ◆ sentried

QRadioButton* unit_hud_selector::sentried

private

Definition at line 274 of file hudwidget.h.

Referenced by activity_filter(), and unit_hud_selector().

## ◆ this_continent

QRadioButton* unit_hud_selector::this_continent

private

Definition at line 282 of file hudwidget.h.

Referenced by island_filter(), and unit_hud_selector().

## ◆ this_tile

QRadioButton* unit_hud_selector::this_tile

private

Definition at line 281 of file hudwidget.h.

Referenced by island_filter(), and unit_hud_selector().

## ◆ this_type

QRadioButton* unit_hud_selector::this_type

private

Definition at line 286 of file hudwidget.h.

Referenced by type_filter(), and unit_hud_selector().

## ◆ unit_sel_type

QComboBox* unit_hud_selector::unit_sel_type

private

Definition at line 251 of file hudwidget.h.

Referenced by type_filter(), and unit_hud_selector().