29 setAutoFillBackground(
true);
30 setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
61 size = std::max(bounds.width(), bounds.height());
85 const auto origin = bounds.topLeft();
86 bounds.moveCenter(QPoint(width() / 2, height() / 2));
89 p.translate(bounds.topLeft() - origin);
91 for (
const auto sprite : sprs) {
93 p.drawPixmap(QPointF(sprite.offset), *sprite.sprite);
std::vector< drawn_sprite > fill_sprite_array_no_flag(const city *pcity, bool show_occupied) const
Fill in the given sprite array with any city sprites.
QRect sprite_array_bounds(const std::vector< drawn_sprite > &sprs)
Calculates the bounding rectangle of the given sprite array.
struct city * game_city_by_number(int id)
Often used function to get a city pointer from a city ID.
const freeciv::layer_city * tileset_layer_city(const struct tileset *t)
Returns the layer_city of the tileset.
QEvent::Type TilesetChanged
An event type sent to all widgets when the current tileset changes.
int tileset_tile_height(const struct tileset *t)
Return the tile height of the current tileset.
int tileset_tile_width(const struct tileset *t)
Return the tile width of the current tileset.