mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Show the profile again.
This patch re-enables a few items on the profile, most notably, the profile itself. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ed72aabde5
commit
0ad2a69c42
5 changed files with 43 additions and 20 deletions
|
@ -20,16 +20,26 @@ static QPen gridPen(){
|
|||
return pen;
|
||||
}
|
||||
|
||||
void DiveCartesianAxis::setup(double minimum, double maximum, double interval, DiveCartesianAxis::Orientation o, qreal tickSize, const QPointF& pos)
|
||||
void DiveCartesianAxis::setup(double minimum, double maximum, double interval, DiveCartesianAxis::Orientation o, qreal tick_size, const QPointF& pos)
|
||||
{
|
||||
setMinimum(minimum);
|
||||
setMaximum(maximum);
|
||||
setTickInterval(interval);
|
||||
setOrientation(o);
|
||||
setTickSize(tickSize);
|
||||
setTickSize(tick_size);
|
||||
setPos(pos);
|
||||
}
|
||||
|
||||
double DiveCartesianAxis::tickInterval() const
|
||||
{
|
||||
return interval;
|
||||
}
|
||||
|
||||
double DiveCartesianAxis::tickSize() const
|
||||
{
|
||||
return tick_size;
|
||||
}
|
||||
|
||||
void DiveCartesianAxis::setMaximum(double maximum)
|
||||
{
|
||||
if (max == maximum)
|
||||
|
@ -121,9 +131,9 @@ void DiveCartesianAxis::updateTicks()
|
|||
|
||||
labels[i]->setText(textForValue(currValue));
|
||||
if ( orientation == LeftToRight || orientation == RightToLeft) {
|
||||
labels[i]->animateMoveTo(childPos, m.y1() + tickSize);
|
||||
labels[i]->animateMoveTo(childPos, m.y1() + tick_size);
|
||||
} else {
|
||||
labels[i]->animateMoveTo(m.x1() - tickSize, childPos);
|
||||
labels[i]->animateMoveTo(m.x1() - tick_size, childPos);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,14 +157,14 @@ void DiveCartesianAxis::updateTicks()
|
|||
if (orientation == RightToLeft || orientation == LeftToRight) {
|
||||
if(showText){
|
||||
label->setAlignment(Qt::AlignBottom | Qt::AlignHCenter);
|
||||
label->setPos(scene()->sceneRect().width() + 10, m.y1() + tickSize); // position it outside of the scene);
|
||||
label->animateMoveTo(childPos, m.y1() + tickSize);
|
||||
label->setPos(scene()->sceneRect().width() + 10, m.y1() + tick_size); // position it outside of the scene);
|
||||
label->animateMoveTo(childPos, m.y1() + tick_size);
|
||||
}
|
||||
} else {
|
||||
if(showText){
|
||||
label->setAlignment(Qt::AlignVCenter| Qt::AlignLeft);
|
||||
label->setPos(m.x1() - tickSize, scene()->sceneRect().height() + 10);
|
||||
label->animateMoveTo(m.x1() - tickSize, childPos);
|
||||
label->setPos(m.x1() - tick_size, scene()->sceneRect().height() + 10);
|
||||
label->animateMoveTo(m.x1() - tick_size, childPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -186,7 +196,7 @@ QString DiveCartesianAxis::textForValue(double value)
|
|||
|
||||
void DiveCartesianAxis::setTickSize(qreal size)
|
||||
{
|
||||
tickSize = size;
|
||||
tick_size = size;
|
||||
}
|
||||
|
||||
void DiveCartesianAxis::setTickInterval(double i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue