Freeciv-3.3
|
#include <cityrep.h>
Public Member Functions | |
city_model (QObject *parent=0) | |
~city_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) |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
QVariant | menu_data (int section) const |
QVariant | hide_data (int section) const |
void | populate () |
void | city_changed (struct city *pcity) |
void | all_changed () |
Private Slots | |
void | notify_city_changed (int row) |
Private Attributes | |
QList< city_item * > | city_list |
city_model::city_model | ( | QObject * | parent = 0 | ) |
Constructor for city model
Definition at line 165 of file cityrep.cpp.
city_model::~city_model | ( | ) |
Destructor for city model
Definition at line 173 of file cityrep.cpp.
void city_model::all_changed | ( | ) |
Notifies about whole model changed
Definition at line 316 of file cityrep.cpp.
Referenced by city_widget::update_model().
Notifies about changed item
Definition at line 299 of file cityrep.cpp.
Referenced by city_widget::update_city().
|
inline |
Definition at line 112 of file cityrep.h.
Referenced by data(), city_widget::display_header_menu(), city_widget::hide_columns(), notify_city_changed(), and setData().
QVariant city_model::data | ( | const QModelIndex & | index, |
int | role = Qt::DisplayRole |
||
) | const |
Returns stored data in index
Definition at line 190 of file cityrep.cpp.
Returns header data for given section(column)
Definition at line 226 of file cityrep.cpp.
Referenced by city_widget::update_model().
Hides given column if show is false
Definition at line 265 of file cityrep.cpp.
Referenced by city_widget::hide_columns().
Returns header information about section
Definition at line 251 of file cityrep.cpp.
Referenced by city_widget::display_header_menu().
Notifies about changed row
Definition at line 182 of file cityrep.cpp.
Referenced by city_changed(), and setData().
void city_model::populate | ( | ) |
Creates city model
Definition at line 279 of file cityrep.cpp.
Referenced by all_changed(), and city_model().
|
inline |
Definition at line 108 of file cityrep.h.
Referenced by data(), city_widget::gen_production_labels(), and setData().
bool city_model::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role = Qt::DisplayRole |
||
) |
Sets data in model under index
Definition at line 205 of file cityrep.cpp.
Definition at line 129 of file cityrep.h.
Referenced by all_changed(), city_changed(), data(), populate(), rowCount(), setData(), and ~city_model().