Freeciv21
Develop your civilization from humble roots to a global empire
city_label Class Reference

#include <citydlg.h>

+ Inheritance diagram for city_label:
+ Collaboration diagram for city_label:

Public Member Functions

 city_label (QWidget *parent=0)
 city_label is used only for showing citizens icons and was created only to catch mouse events More...
 
void set_city (struct city *pcity)
 Just sets target city for city_label. More...
 
void set_type (int)
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event) override
 Mouse handler for city_label. More...
 
QSize minimumSizeHint () const override
 
QSize sizeHint () const override
 

Private Member Functions

QSize get_pixmap_size () const
 

Private Attributes

struct citypcity {nullptr}
 
int type
 

Detailed Description

Definition at line 246 of file citydlg.h.

Constructor & Destructor Documentation

◆ city_label()

city_label::city_label ( QWidget *  parent = 0)

city_label is used only for showing citizens icons and was created only to catch mouse events

Definition at line 572 of file citydlg.cpp.

Member Function Documentation

◆ get_pixmap_size()

QSize city_label::get_pixmap_size ( ) const
private

Definition at line 620 of file citydlg.cpp.

Referenced by minimumSizeHint(), and sizeHint().

◆ minimumSizeHint()

QSize city_label::minimumSizeHint ( ) const
overrideprotected

Definition at line 630 of file citydlg.cpp.

◆ mousePressEvent()

void city_label::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Mouse handler for city_label.

Definition at line 581 of file citydlg.cpp.

◆ set_city()

void city_label::set_city ( struct city pcity)

Just sets target city for city_label.

Definition at line 637 of file citydlg.cpp.

Referenced by city_dialog::update_citizens().

◆ set_type()

void city_label::set_type ( int  x)

Definition at line 577 of file citydlg.cpp.

Referenced by city_dialog::city_dialog().

◆ sizeHint()

QSize city_label::sizeHint ( ) const
overrideprotected

Definition at line 632 of file citydlg.cpp.

Member Data Documentation

◆ pcity

struct city* city_label::pcity {nullptr}
private

Definition at line 255 of file citydlg.h.

Referenced by mousePressEvent(), and set_city().

◆ type

int city_label::type
private

Definition at line 256 of file citydlg.h.

Referenced by city_label(), and set_type().