Freeciv-3.1: city_production_delegate Class Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes
city_production_delegate Class Reference

`#include <citydlg.h>`

Inheritance diagram for city_production_delegate:

## Public Member Functions

| city_production_delegate (QPoint sh, QObject *parent, struct city *city)
| ~city_production_delegate ()
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const

## Protected Member Functions

void | drawFocus (QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const

## Private Attributes

int | item_height
QPoint | pd
struct city * | pcity

## Detailed Description

Definition at line 303 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 4038 of file citydlg.cpp.

## ◆ ~city_production_delegate()

city_production_delegate::~city_production_delegate | ( |  | ) |

inline

Definition at line 309 of file citydlg.h.

## Member Function Documentation

## ◆ drawFocus()

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

protected

Draws focus for given item

Definition at line 4189 of file citydlg.cpp.

Referenced by paint().

## ◆ paint()

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

City item delgate paint event

Definition at line 4051 of file citydlg.cpp.

## ◆ sizeHint()

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

Size hint for city item delegate

Definition at line 4206 of file citydlg.cpp.

## Field Documentation

## ◆ item_height

int city_production_delegate::item_height

private

Definition at line 316 of file citydlg.h.

Referenced by city_production_delegate(), and paint().

## ◆ pcity

struct city* city_production_delegate::pcity

private

Definition at line 318 of file citydlg.h.

Referenced by city_production_delegate(), and paint().

## ◆ pd

QPoint city_production_delegate::pd

private

Definition at line 317 of file citydlg.h.

Referenced by city_production_delegate(), and sizeHint().