Add gas text to tank bars

Also restructures the code a bit to make it a little more sane and changes
the colors slightly.

With these changes I think we can claim that this
Fixes #557

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-08-14 21:40:47 -06:00
parent fa3c18d83b
commit 87ca15c5c3
4 changed files with 51 additions and 36 deletions

View file

@ -3,6 +3,7 @@
#include <QGraphicsItem>
#include <QModelIndex>
#include <QBrush>
#include "divelineitem.h"
#include "divecartesianaxis.h"
#include "dive.h"
@ -23,11 +24,14 @@ public slots:
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
private:
void createBar(qreal x, qreal w, struct gasmix *gas);
DivePlotDataModel *dataModel;
DiveCartesianAxis *hAxis;
int hDataColumn;
struct dive *dive;
struct plot_info *pInfo;
qreal yPos, height;
QBrush air, nitrox, trimix;
QList<QGraphicsRectItem *> rects;
};