Moved the DivePlanner to the MainWindow.

Now, activating the dive planner will hide the profile
and show the planner on the same place. we still need
a way to 'cancel' or 'accept' the profile created.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-06-27 14:48:03 -03:00
parent de7506b44d
commit 1244438b01
5 changed files with 53 additions and 45 deletions

View file

@ -170,13 +170,13 @@ void DivePlannerGraphics::createDecoStops()
void DivePlannerGraphics::resizeEvent(QResizeEvent* event)
{
QGraphicsView::resizeEvent(event);
fitInView(sceneRect(), Qt::KeepAspectRatio);
fitInView(sceneRect(), Qt::IgnoreAspectRatio);
}
void DivePlannerGraphics::showEvent(QShowEvent* event)
{
QGraphicsView::showEvent(event);
fitInView(sceneRect(), Qt::KeepAspectRatio);
fitInView(sceneRect(), Qt::IgnoreAspectRatio);
}
void DivePlannerGraphics::mouseMoveEvent(QMouseEvent* event)
@ -349,22 +349,6 @@ qreal Ruler::posAtValue(qreal value)
return retValue;
}
DivePlanner::DivePlanner() : ui(new Ui::DivePlanner())
{
ui->setupUi(this);
}
struct dive* DivePlanner::getDive()
{
return 0;
}
DivePlanner* DivePlanner::instance()
{
static DivePlanner *self = new DivePlanner();
return self;
}
double Ruler::maximum() const
{
return max;