Freeciv-3.2
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes
city_map Class Reference

#include <citydlg.h>

+ Inheritance diagram for city_map:

Public Member Functions

 city_map (QWidget *parent)
 
 ~city_map ()
 
void set_pixmap (struct city *pcity, float z)
 

Protected Member Functions

QSize sizeHint () const
 
QSize minimumSizeHint () const
 

Private Slots

void context_menu (QPoint point)
 

Private Member Functions

void mousePressEvent (QMouseEvent *event)
 
void paintEvent (QPaintEvent *event)
 

Private Attributes

canvasview
 
canvasminiview
 
QPixmap zoomed_pixmap
 
struct citymcity
 
int radius
 
float zoom
 
int wdth
 
int height
 
int cutted_width
 
int cutted_height
 
int delta_x
 
int delta_y
 

Detailed Description

Definition at line 270 of file citydlg.h.

Constructor & Destructor Documentation

◆ city_map()

city_map::city_map ( QWidget *  parent)

Used for showing tiles and workers view in city dialog

Definition at line 1227 of file citydlg.cpp.

◆ ~city_map()

city_map::~city_map ( )

Destructor for city map

Definition at line 1249 of file citydlg.cpp.

Member Function Documentation

◆ context_menu

void city_map::context_menu ( QPoint  point)
privateslot

Context menu for setting worker tasks

Definition at line 1356 of file citydlg.cpp.

Referenced by city_map().

◆ minimumSizeHint()

QSize city_map::minimumSizeHint ( ) const
protected

Minimum size hint for city map

Definition at line 1326 of file citydlg.cpp.

◆ mousePressEvent()

void city_map::mousePressEvent ( QMouseEvent event)
private

Used to change workers on view

Definition at line 1334 of file citydlg.cpp.

◆ paintEvent()

void city_map::paintEvent ( QPaintEvent event)
private

Redraws whole view in city_map

Definition at line 1258 of file citydlg.cpp.

◆ set_pixmap()

void city_map::set_pixmap ( struct city pcity,
float  z 
)

Calls function to put pixmap on view ( it doesn't draw on screen )

Definition at line 1282 of file citydlg.cpp.

◆ sizeHint()

QSize city_map::sizeHint ( ) const
protected

Size hint for city map

Definition at line 1318 of file citydlg.cpp.

Field Documentation

◆ cutted_height

int city_map::cutted_height
private

Definition at line 291 of file citydlg.h.

Referenced by city_map(), and set_pixmap().

◆ cutted_width

int city_map::cutted_width
private

Definition at line 290 of file citydlg.h.

Referenced by city_map(), and set_pixmap().

◆ delta_x

int city_map::delta_x
private

Definition at line 292 of file citydlg.h.

Referenced by city_map(), context_menu(), mousePressEvent(), and set_pixmap().

◆ delta_y

int city_map::delta_y
private

Definition at line 293 of file citydlg.h.

Referenced by city_map(), context_menu(), mousePressEvent(), and set_pixmap().

◆ height

int city_map::height
private

Definition at line 289 of file citydlg.h.

Referenced by city_map(), and set_pixmap().

◆ mcity

struct city* city_map::mcity
private

Definition at line 285 of file citydlg.h.

Referenced by context_menu(), mousePressEvent(), paintEvent(), and set_pixmap().

◆ miniview

canvas* city_map::miniview
private

Definition at line 275 of file citydlg.h.

Referenced by city_map(), set_pixmap(), and ~city_map().

◆ radius

int city_map::radius
private

Definition at line 286 of file citydlg.h.

Referenced by city_map(), and set_pixmap().

◆ view

canvas* city_map::view
private

Definition at line 274 of file citydlg.h.

◆ wdth

int city_map::wdth
private

Definition at line 288 of file citydlg.h.

Referenced by city_map(), and set_pixmap().

◆ zoom

float city_map::zoom
private

Definition at line 287 of file citydlg.h.

Referenced by context_menu(), mousePressEvent(), and set_pixmap().

◆ zoomed_pixmap

QPixmap city_map::zoomed_pixmap
private

Definition at line 276 of file citydlg.h.

Referenced by minimumSizeHint(), paintEvent(), set_pixmap(), and sizeHint().