Freeciv21
Develop your civilization from humble roots to a global empire
freeciv::layer_workertask Class Reference

Draws tasks assigned by cities to autoworkers on the map. More...

#include <layer_workertask.h>

+ Inheritance diagram for freeciv::layer_workertask:
+ Collaboration diagram for freeciv::layer_workertask:

Public Member Functions

 layer_workertask (struct tileset *ts, const QPoint &activity_offset)
 Constructor. More...
 
virtual ~layer_workertask ()=default
 
std::vector< drawn_spritefill_sprite_array (const tile *ptile, const tile_edge *pedge, const tile_corner *pcorner, const unit *punit) const override
 Returns the list of sprites drawn by this layer somewhere on the map. More...
 
- Public Member Functions inherited from freeciv::layer_abstract_activities
void load_sprites () override
 Loads the sprites in memory. More...
 
void initialize_extra (const extra_type *extra, const QString &tag, extrastyle_id style) override
 Loads the extra activity and remove activity sprites. More...
 
void reset_ruleset () override
 Resets data about extras. More...
 
QPixmap * activity_sprite (unit_activity id, const extra_type *extra) const
 Returns the sprite used to represent a given activity on the map. More...
 
 layer (struct tileset *ts, mapview_layer layer)
 Inherited constructor. More...
 
- Public Member Functions inherited from freeciv::layer
 layer (struct tileset *ts, mapview_layer layer)
 Constructor. More...
 
virtual ~layer ()=default
 Destructor. More...
 
virtual void initialize_player (const player *player)
 Initializes data specific to one player. More...
 
virtual void free_player (int player_id)
 Frees data initialized by initialize_player. More...
 
virtual void initialize_city_style (const citystyle &style, int index)
 Initializes data for a city style. More...
 
virtual void initialize_terrain (const terrain *terrain)
 Initializes terrain-specific data. More...
 
mapview_layer type () const
 

Private Attributes

QPoint m_activity_offset
 

Additional Inherited Members

- Protected Member Functions inherited from freeciv::layer
struct tilesettileset () const
 
bool do_draw_unit (const tile *ptile, const unit *punit) const
 Whether a unit should be drawn. More...
 
bool solid_background (const tile *ptile, const unit *punit, const city *pcity) const
 Whether a solid background should be drawn on a tile instead of its terrain. More...
 
QPixmap * load_sprite (const QStringList &possible_names, bool required=false, bool verbose=true) const
 Shortcut to load a sprite from the tileset. More...
 

Detailed Description

Draws tasks assigned by cities to autoworkers on the map.

Definition at line 16 of file layer_workertask.h.

Constructor & Destructor Documentation

◆ layer_workertask()

freeciv::layer_workertask::layer_workertask ( struct tileset ts,
const QPoint &  activity_offset 
)
explicit

Constructor.

Definition at line 22 of file layer_workertask.cpp.

◆ ~layer_workertask()

virtual freeciv::layer_workertask::~layer_workertask ( )
virtualdefault

Member Function Documentation

◆ fill_sprite_array()

std::vector< drawn_sprite > freeciv::layer_workertask::fill_sprite_array ( const tile ptile,
const tile_edge pedge,
const tile_corner pcorner,
const unit punit 
) const
overridevirtual

Returns the list of sprites drawn by this layer somewhere on the map.

Only one of ptile, pedge, or pcorner should be non-null.

Reimplemented from freeciv::layer.

Definition at line 29 of file layer_workertask.cpp.

Member Data Documentation

◆ m_activity_offset

QPoint freeciv::layer_workertask::m_activity_offset
private

Definition at line 28 of file layer_workertask.h.

Referenced by fill_sprite_array().