Freeciv-3.3
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
city_item Class Reference

#include <cityrep.h>

+ Inheritance diagram for city_item:

Public Member Functions

 city_item (struct city *pcity)
 
int columnCount () const
 
QVariant data (int column, int role=Qt::DisplayRole) const
 
bool setData (int column, const QVariant &value, int role=Qt::DisplayRole)
 
struct cityget_city ()
 

Private Attributes

struct cityi_city
 

Detailed Description

Definition at line 86 of file cityrep.h.

Constructor & Destructor Documentation

◆ city_item()

city_item::city_item ( struct city pcity)

Constructor for city item

Definition at line 121 of file cityrep.cpp.

Member Function Documentation

◆ columnCount()

int city_item::columnCount ( ) const
inline

Definition at line 91 of file cityrep.h.

◆ data()

QVariant city_item::data ( int  column,
int  role = Qt::DisplayRole 
) const

Returns data from city item (or city pointer from Qt::UserRole)

Definition at line 145 of file cityrep.cpp.

◆ get_city()

city * city_item::get_city ( )

Returns used city pointer for city item creation

Definition at line 129 of file cityrep.cpp.

◆ setData()

bool city_item::setData ( int  column,
const QVariant value,
int  role = Qt::DisplayRole 
)

Sets nothing, but must be declared

Definition at line 137 of file cityrep.cpp.

Field Documentation

◆ i_city

struct city* city_item::i_city
private

Definition at line 96 of file cityrep.h.

Referenced by city_item(), data(), and get_city().