mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix '+' sign for time on the planer, plus code cleanup.
The plus sign for time was in a very strange position, this puts it back to where it belongs, plus a bit of code cleanup since the planner was in heavily modifications, this will be needed quite a bit. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
72807017ae
commit
959bdbbca7
1 changed files with 1 additions and 5 deletions
|
@ -128,7 +128,7 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent)
|
||||||
connect(obj, SIGNAL(clicked()), this, SLOT(slot));
|
connect(obj, SIGNAL(clicked()), this, SLOT(slot));
|
||||||
|
|
||||||
ADDBTN(plusDepth, ":plus", "" , 5, 5, tr("Increase maximum depth by 10m"), increaseDepth());
|
ADDBTN(plusDepth, ":plus", "" , 5, 5, tr("Increase maximum depth by 10m"), increaseDepth());
|
||||||
ADDBTN(plusTime, ":plus", "" , 95, 5, tr("Increase minimum time by 10m"), increaseTime());
|
ADDBTN(plusTime, ":plus", "" , 95, 95, tr("Increase minimum time by 10m"), increaseTime());
|
||||||
ADDBTN(lessDepth, ":minimum","" , 2, 5, tr("Decreases maximum depth by 10m"), decreaseDepth());
|
ADDBTN(lessDepth, ":minimum","" , 2, 5, tr("Decreases maximum depth by 10m"), decreaseDepth());
|
||||||
ADDBTN(lessTime, ":minimum","" , 92, 95, tr("Decreases minimum time by 10m"), decreaseTime());
|
ADDBTN(lessTime, ":minimum","" , 92, 95, tr("Decreases minimum time by 10m"), decreaseTime());
|
||||||
#undef ADDBTN
|
#undef ADDBTN
|
||||||
|
@ -169,11 +169,7 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent)
|
||||||
|
|
||||||
void DivePlannerGraphics::pointInserted(const QModelIndex& parent, int start , int end)
|
void DivePlannerGraphics::pointInserted(const QModelIndex& parent, int start , int end)
|
||||||
{
|
{
|
||||||
divedatapoint point = plannerModel->at(start);
|
|
||||||
DiveHandler *item = new DiveHandler ();
|
DiveHandler *item = new DiveHandler ();
|
||||||
double xpos = timeLine->posAtValue(point.time / 60);
|
|
||||||
double ypos = depthLine->posAtValue(point.depth / 1000);
|
|
||||||
item->setPos(QPointF(xpos, ypos));
|
|
||||||
scene()->addItem(item);
|
scene()->addItem(item);
|
||||||
handles << item;
|
handles << item;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue