New profile: create new class for DiveHeartrateItem

This allows us to give it a different color (red) and make it a smaller
size.

While implementing this I also fixed the size of the temperature text in
the new profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-02-23 15:28:31 -08:00
parent 76393a2f53
commit b5a02e50aa
7 changed files with 86 additions and 4 deletions

View file

@ -88,6 +88,16 @@ private:
void createTextItem(int seconds, int mkelvin);
};
class DiveHeartrateItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveHeartrateItem();
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
private:
void createTextItem(int seconds, int hr);
};
class DiveGasPressureItem : public AbstractProfilePolygonItem{
Q_OBJECT