planner: remove global model instances

The only user of the DivePlannerPointsModel and the
GasSelectionModel is the planner. Let's keep these models
there.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-11-07 19:50:37 +01:00 committed by bstoeger
parent 3dd09b31e3
commit b5682369f8
6 changed files with 33 additions and 29 deletions

View file

@ -369,7 +369,7 @@ void AirTypesDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
model->setData(index, QVariant(combo->currentIndex()));
}
AirTypesDelegate::AirTypesDelegate(QObject *parent) : ComboBoxDelegate(GasSelectionModel::instance(), parent, false)
AirTypesDelegate::AirTypesDelegate(QAbstractItemModel *model, QObject *parent) : ComboBoxDelegate(model, parent, false)
{
}
@ -385,7 +385,7 @@ void DiveTypesDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
model->setData(index, QVariant(combo->currentIndex()));
}
DiveTypesDelegate::DiveTypesDelegate(QObject *parent) : ComboBoxDelegate(DiveTypeSelectionModel::instance(), parent, false)
DiveTypesDelegate::DiveTypesDelegate(QAbstractItemModel *model, QObject *parent) : ComboBoxDelegate(model, parent, false)
{
}