diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-11-10 07:06:26 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-10 07:07:59 +0900 |
commit | aa4931e8c613f742cb05da77dfdad73c6f3008c9 (patch) | |
tree | 596c0158e465931a9539abac643c42139f869d56 /qt-ui/models.cpp | |
parent | 44c9316f14f9be21837583739e8d54e9c6d29569 (diff) | |
download | subsurface-aa4931e8c613f742cb05da77dfdad73c6f3008c9.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; |