Freeciv-3.2
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Private Attributes
unit_actions Class Reference

#include <hudwidget.h>

+ Inheritance diagram for unit_actions:

Public Member Functions

 unit_actions (QWidget *parent, unit *punit)
 
 ~unit_actions ()
 
void init_layout ()
 
int update_actions ()
 
void clear_layout ()
 

Data Fields

QHBoxLayoutlayout
 
QList< hud_action * > actions
 

Private Attributes

unitcurrent_unit
 

Detailed Description

Definition at line 187 of file hudwidget.h.

Constructor & Destructor Documentation

◆ unit_actions()

unit_actions::unit_actions ( QWidget *  parent,
unit punit 
)

Units action constructor, holds possible hud_actions

Definition at line 932 of file hudwidget.cpp.

◆ ~unit_actions()

unit_actions::~unit_actions ( )

Destructor for unit_actions

Definition at line 945 of file hudwidget.cpp.

Member Function Documentation

◆ clear_layout()

void unit_actions::clear_layout ( )

Cleans layout - run it before layout initialization

Definition at line 1180 of file hudwidget.cpp.

Referenced by update_actions().

◆ init_layout()

void unit_actions::init_layout ( )

Initializes layout ( layout needs to be changed after adding units )

Definition at line 954 of file hudwidget.cpp.

Referenced by unit_actions().

◆ update_actions()

int unit_actions::update_actions ( )

Updates available actions, returns actions count

Definition at line 967 of file hudwidget.cpp.

Referenced by hud_units::update_actions().

Field Documentation

◆ actions

QList<hud_action *> unit_actions::actions

Definition at line 197 of file hudwidget.h.

Referenced by clear_layout(), update_actions(), and ~unit_actions().

◆ current_unit

unit* unit_actions::current_unit
private

Definition at line 199 of file hudwidget.h.

Referenced by unit_actions(), and update_actions().

◆ layout

QHBoxLayout* unit_actions::layout

Definition at line 196 of file hudwidget.h.

Referenced by clear_layout(), init_layout(), unit_actions(), and update_actions().