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

A simple city bar that draws simple text on the map. More...

#include <citybar.h>

+ Inheritance diagram for simple_citybar_painter:
+ Collaboration diagram for simple_citybar_painter:

Public Member Functions

QRect paint (QPainter &painter, const QPointF &position, const city *pcity) const override
 Draws a simple city bar. More...
 
bool has_flag () const override
 Returns whether the flag is shown in the bar. More...
 
bool has_units () const override
 Returns whether the units inside are shown in the bar. More...
 
bool has_size () const override
 Returns whether the city size is shown in the bar. More...
 
- Public Member Functions inherited from citybar_painter
virtual ~citybar_painter ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from citybar_painter
static QStringList available ()
 Returns the list of all available city bar styles. More...
 
static const QVector< QString > * available_vector (const option *)
 Returns the list of all available city bar styles. More...
 
static void option_changed (option *opt)
 Called by the option code when the option has changed. More...
 
static citybar_paintercurrent ()
 Returns the current painter (never null). More...
 

Detailed Description

A simple city bar that draws simple text on the map.

Definition at line 72 of file citybar.h.

Member Function Documentation

◆ has_flag()

bool simple_citybar_painter::has_flag ( ) const
inlineoverridevirtual

Returns whether the flag is shown in the bar.

Reimplemented from citybar_painter.

Definition at line 77 of file citybar.h.

◆ has_size()

bool simple_citybar_painter::has_size ( ) const
inlineoverridevirtual

Returns whether the city size is shown in the bar.

Reimplemented from citybar_painter.

Definition at line 79 of file citybar.h.

◆ has_units()

bool simple_citybar_painter::has_units ( ) const
inlineoverridevirtual

Returns whether the units inside are shown in the bar.

Reimplemented from citybar_painter.

Definition at line 78 of file citybar.h.

◆ paint()

QRect simple_citybar_painter::paint ( QPainter &  painter,
const QPointF &  position,
const city pcity 
) const
overridevirtual

Draws a simple city bar.

Implements citybar_painter.

Definition at line 334 of file citybar.cpp.