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

A polished city bar, more like certain commercial game. More...

#include <citybar.h>

+ Inheritance diagram for polished_citybar_painter:
+ Collaboration diagram for polished_citybar_painter:

Public Member Functions

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

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 polished city bar, more like certain commercial game.

Definition at line 94 of file citybar.h.

Member Function Documentation

◆ paint()

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

Draws the "polished" city bar.

It uses a single line and semitransparent colored background.

Most of the info is on a single line. The only exception is trade.

Implements citybar_painter.

Definition at line 603 of file citybar.cpp.