Shared background for profile and planner.

Share the background for profile and planner. Those are not the same
class, but they should behave somwheat the same.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-07-02 10:13:06 -03:00
parent 2df0b398f3
commit ca517f1bf8
2 changed files with 8 additions and 2 deletions

View file

@ -1,4 +1,6 @@
#include "diveplanner.h"
#include "graphicsview-common.h"
#include "../dive.h"
#include <cmath>
#include <QMouseEvent>
@ -15,6 +17,8 @@
DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent), activeDraggedHandler(0),
lastValidPos(0.0, 0.0)
{
fill_profile_color();
setBackgroundBrush(profile_color[BACKGROUND].at(0));
setMouseTracking(true);
setScene(new QGraphicsScene());
scene()->setSceneRect(0,0,200,200);