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

#include <citydlg.h>

+ Inheritance diagram for city_production_delegate:
+ Collaboration diagram for city_production_delegate:

Public Member Functions

 city_production_delegate (QPoint sh, QObject *parent, struct city *city)
 City item delegate constructor. More...
 
 ~city_production_delegate () override=default
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 City item delgate paint event. More...
 
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Size hint for city item delegate. More...
 

Protected Member Functions

void drawFocus (QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const override
 Draws focus for given item. More...
 

Private Attributes

int item_height
 
QPoint pd
 
struct citypcity
 

Detailed Description

Definition at line 125 of file citydlg.h.

Constructor & Destructor Documentation

◆ city_production_delegate()

city_production_delegate::city_production_delegate ( QPoint  sh,
QObject *  parent,
struct city city 
)

City item delegate constructor.

Definition at line 2347 of file citydlg.cpp.

◆ ~city_production_delegate()

city_production_delegate::~city_production_delegate ( )
overridedefault

Member Function Documentation

◆ drawFocus()

void city_production_delegate::drawFocus ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QRect &  rect 
) const
overrideprotected

Draws focus for given item.

Definition at line 2490 of file citydlg.cpp.

Referenced by paint().

◆ paint()

void city_production_delegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

City item delgate paint event.

Definition at line 2359 of file citydlg.cpp.

◆ sizeHint()

QSize city_production_delegate::sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Size hint for city item delegate.

Definition at line 2507 of file citydlg.cpp.

Member Data Documentation

◆ item_height

int city_production_delegate::item_height
private

Definition at line 137 of file citydlg.h.

Referenced by city_production_delegate(), and paint().

◆ pcity

struct city* city_production_delegate::pcity
private

Definition at line 139 of file citydlg.h.

Referenced by city_production_delegate(), and paint().

◆ pd

QPoint city_production_delegate::pd
private

Definition at line 138 of file citydlg.h.

Referenced by sizeHint().