Freeciv-3.3: city_production_model Class Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Private Attributes
city_production_model Class Reference

`#include <citydlg.h>`

Inheritance diagram for city_production_model:

## Public Member Functions

| city_production_model (struct city *pcity, bool f, bool su, bool sw, bool sb, QObject *parent=nullptr)
| ~city_production_model ()
int | rowCount (const QModelIndex &index=QModelIndex()) const
int | columnCount (const QModelIndex &parent=QModelIndex()) const
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::DisplayRole)
QPoint | size_hint ()
void | populate ()

## Data Fields

QPoint | sh

## Private Attributes

QList< production_item * > | city_target_list
struct city * | mcity
bool | future_t
bool | show_units
bool | show_buildings
bool | show_wonders

## Detailed Description

Definition at line 348 of file citydlg.h.

## Constructor & Destructor Documentation

## ◆ city_production_model()

city_production_model::city_production_model | ( | struct city * | pcity,
|  | bool | f,
|  | bool | su,
|  | bool | sw,
|  | bool | sb,
|  | QObject * | parent = `nullptr`
| ) |  |

Constructor for city production model

Definition at line 4248 of file citydlg.cpp.

## ◆ ~city_production_model()

city_production_model::~city_production_model | ( |  | ) |

Destructor for city production model

Definition at line 4264 of file citydlg.cpp.

## Member Function Documentation

## ◆ columnCount()

int city_production_model::columnCount | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const

inline

Definition at line 360 of file citydlg.h.

Referenced by data(), and setData().

## ◆ data()

QVariant city_production_model::data | ( | const QModelIndex & | index,
|  | int | role = `Qt::DisplayRole`
| ) |  | const

Returns data from model

Definition at line 4273 of file citydlg.cpp.

Referenced by data().

## ◆ populate()

void city_production_model::populate | ( |  | ) |

Fills model with data

Definition at line 4305 of file citydlg.cpp.

Referenced by city_production_model().

## ◆ rowCount()

int city_production_model::rowCount | ( | const QModelIndex & | index = `QModelIndex()` | ) | const

inline

Definition at line 356 of file citydlg.h.

Referenced by data(), production_widget::production_widget(), and setData().

## ◆ setData()

bool city_production_model::setData | ( | const QModelIndex & | index,
|  | const QVariant & | value,
|  | int | role = `Qt::DisplayRole`
| ) |  |

Sets data in model

Definition at line 4368 of file citydlg.cpp.

## ◆ size_hint()

QPoint city_production_model::size_hint | ( |  | ) |

## Field Documentation

## ◆ city_target_list

QList<production_item *> city_production_model::city_target_list

private

Definition at line 372 of file citydlg.h.

Referenced by data(), populate(), rowCount(), setData(), and ~city_production_model().

## ◆ future_t

bool city_production_model::future_t

private

Definition at line 374 of file citydlg.h.

Referenced by city_production_model(), and populate().

## ◆ mcity

struct city* city_production_model::mcity

private

Definition at line 373 of file citydlg.h.

Referenced by city_production_model(), and populate().

## ◆ sh

QPoint city_production_model::sh

Definition at line 369 of file citydlg.h.

Referenced by populate(), and production_widget::production_widget().

## ◆ show_buildings

bool city_production_model::show_buildings

private

Definition at line 376 of file citydlg.h.

Referenced by city_production_model(), and populate().

## ◆ show_units

bool city_production_model::show_units

private

Definition at line 375 of file citydlg.h.

Referenced by city_production_model(), and populate().

## ◆ show_wonders

bool city_production_model::show_wonders

private

Definition at line 377 of file citydlg.h.

Referenced by city_production_model(), and populate().