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

#include <repodlgs.h>

+ Inheritance diagram for units_reports:

Public Member Functions

 ~units_reports ()
 
void clear_layout ()
 
void init_layout ()
 
void update_units (bool show=false)
 
void add_item (unittype_item *item)
 
virtual void update_menu ()
 

Static Public Member Functions

static units_reportsinstance ()
 
static void drop ()
 

Data Fields

QHBoxLayoutlayout
 
QList< unittype_item * > unittype_list
 
- Data Fields inherited from fcwidget
bool was_destroyed
 

Protected Member Functions

void paintEvent (QPaintEvent *event)
 

Private Member Functions

 Q_DISABLE_COPY (units_reports)
 
 units_reports ()
 

Private Attributes

close_widgetcw
 
QHBoxLayoutscroll_layout
 
QScrollAreascroll
 
QWidget scroll_widget
 

Static Private Attributes

static units_reportsm_instance = nullptr
 

Detailed Description

Definition at line 85 of file repodlgs.h.

Constructor & Destructor Documentation

◆ units_reports()

units_reports::units_reports ( )
explicitprivate

Class representing list of unit types ( unit_items )

Definition at line 327 of file repodlgs.cpp.

Referenced by instance().

◆ ~units_reports()

units_reports::~units_reports ( )

Destructor for unit_report

Definition at line 341 of file repodlgs.cpp.

Member Function Documentation

◆ add_item()

void units_reports::add_item ( unittype_item item)

Adds one unit to list

Definition at line 351 of file repodlgs.cpp.

Referenced by update_units().

◆ clear_layout()

void units_reports::clear_layout ( )

Cleans layout - run it before layout initialization

Definition at line 519 of file repodlgs.cpp.

Referenced by update_units().

◆ drop()

void units_reports::drop ( )
static

Deletes units_reports instance

Definition at line 371 of file repodlgs.cpp.

Referenced by popdown_units_report(), toggle_units_report(), and update_menu().

◆ init_layout()

void units_reports::init_layout ( )

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

Definition at line 391 of file repodlgs.cpp.

Referenced by units_reports().

◆ instance()

units_reports * units_reports::instance ( )
static

◆ paintEvent()

void units_reports::paintEvent ( QPaintEvent event)
protected

Paint event

Definition at line 412 of file repodlgs.cpp.

◆ Q_DISABLE_COPY()

units_reports::Q_DISABLE_COPY ( units_reports  )
private

◆ update_menu()

void units_reports::update_menu ( )
virtual

Called when close button was pressed

Implements fcwidget.

Definition at line 382 of file repodlgs.cpp.

◆ update_units()

void units_reports::update_units ( bool  show = false)

Updates units

Definition at line 420 of file repodlgs.cpp.

Referenced by real_units_report_dialog_update(), and units_report_dialog_popup().

Field Documentation

◆ cw

close_widget* units_reports::cw
private

Definition at line 90 of file repodlgs.h.

Referenced by paintEvent(), units_reports(), and ~units_reports().

◆ layout

QHBoxLayout* units_reports::layout

Definition at line 106 of file repodlgs.h.

Referenced by clear_layout(), init_layout(), units_reports(), and update_units().

◆ m_instance

units_reports * units_reports::m_instance = nullptr
staticprivate

Definition at line 95 of file repodlgs.h.

Referenced by drop(), and instance().

◆ scroll

QScrollArea* units_reports::scroll
private

Definition at line 93 of file repodlgs.h.

Referenced by init_layout().

◆ scroll_layout

QHBoxLayout* units_reports::scroll_layout
private

Definition at line 92 of file repodlgs.h.

Referenced by init_layout(), and units_reports().

◆ scroll_widget

QWidget units_reports::scroll_widget
private

Definition at line 94 of file repodlgs.h.

Referenced by init_layout().

◆ unittype_list

QList<unittype_item *> units_reports::unittype_list

Definition at line 107 of file repodlgs.h.

Referenced by add_item(), clear_layout(), update_units(), and ~units_reports().