aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profilegraphics.h')
-rw-r--r--qt-ui/profilegraphics.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h
index b6df52dec..0bcbf7529 100644
--- a/qt-ui/profilegraphics.h
+++ b/qt-ui/profilegraphics.h
@@ -1,6 +1,7 @@
#ifndef PROFILEGRAPHICS_H
#define PROFILEGRAPHICS_H
+#include "graphicsview-common.h"
#include "../display.h"
#include <QGraphicsView>
#include <QGraphicsItem>
@@ -34,7 +35,6 @@ public:
void expand();
void clear();
void addToolTip(const QString& toolTip, const QIcon& icon = QIcon());
- void removeToolTip(const QString& toolTip);
void refresh(struct graphics_context* gc, QPointF pos);
bool isExpanded();
void persistPos();
@@ -47,7 +47,7 @@ public slots:
private:
typedef QPair<QGraphicsPixmapItem*, QGraphicsSimpleTextItem*> ToolTip;
- QMap<QString, ToolTip > toolTips;
+ QList<ToolTip> toolTips;
QGraphicsPathItem *background;
QGraphicsLineItem *separator;
QGraphicsSimpleTextItem *title;
@@ -60,12 +60,15 @@ private:
class EventItem : public QGraphicsPolygonItem
{
public:
- explicit EventItem(QGraphicsItem* parent = 0);
+ explicit EventItem(QGraphicsItem* parent = 0, bool grayscale = FALSE);
private:
ToolTipItem *controller;
QString text;
QIcon icon;
+ bool isGrayscale;
+
+ QColor getColor(const color_indice_t i);
};
class GraphicsTextEditor : public QGraphicsTextItem{
@@ -92,6 +95,7 @@ public:
void plot(struct dive *d, bool forceRedraw = FALSE);
bool eventFilter(QObject* obj, QEvent* event);
void clear();
+ void setPrintMode(bool mode, bool grayscale = FALSE);
protected:
void resizeEvent(QResizeEvent *event);
@@ -124,6 +128,7 @@ private:
void plot_pp_text();
void plot_depth_scale();
+ QColor getColor(const color_indice_t i);
QColor get_sac_color(int sac, int avg_sac);
void scrollViewTo(const QPoint pos);
@@ -134,6 +139,8 @@ private:
struct dive *dive;
struct divecomputer *diveDC;
int zoomLevel;
+ bool printMode;
+ bool isGrayscale;
// Top Level Items.
QGraphicsItem* profileGrid;