From aa4931e8c613f742cb05da77dfdad73c6f3008c9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 10 Nov 2013 07:06:26 +0900 Subject: Show a cylinder widget in the dive planner This is intended to allow the user to provide the gases / cylinders that she will be diving with. With that information the planner can warn the user about insufficient gases, but more importantly it can show relevant gases in the gas select drop down. Right now the add cylinder button doesn't add a cylinder - that's a problem. Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-ui/models.cpp') diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index a89557570..0324fe4ba 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -62,6 +62,12 @@ CylindersModel::CylindersModel(QObject* parent): current(0), rows(0) setHeaderDataStrings( QStringList() << "" << tr("Type") << tr("Size") << tr("WorkPress") << tr("StartPress") << tr("EndPress") << tr("O2%") << tr("HE")); } +CylindersModel *CylindersModel::instance() +{ + static CylindersModel *self = new CylindersModel(); + return self; +} + static QVariant percent_string(fraction_t fraction) { int permille = fraction.permille; -- cgit v1.2.3-70-g09d2