Use the correct font for the Air Types Model.

The air types model had a font bigger than the
other models, this patch creates a data() method
that correctly delivers the correct font.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-11-14 17:43:28 -02:00 committed by Dirk Hohndel
parent 96d5687ab8
commit a07c3d62af
2 changed files with 9 additions and 0 deletions

View file

@ -1683,3 +1683,11 @@ void GasSelectionModel::repopulate()
{
setStringList(DivePlannerPointsModel::instance()->getGasList());
}
QVariant GasSelectionModel::data(const QModelIndex& index, int role) const
{
if(role == Qt::FontRole){
return defaultModelFont();
}
return QStringListModel::data(index, role);
}

View file

@ -304,6 +304,7 @@ class GasSelectionModel : public QStringListModel{
public:
static GasSelectionModel* instance();
Qt::ItemFlags flags(const QModelIndex& index) const;
virtual QVariant data(const QModelIndex& index, int role) const;
public slots:
void repopulate();
};