mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: whitespace fixes in profile-widget/divetooltipitem.cpp
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
646aead629
commit
d66d1e2a3b
1 changed files with 9 additions and 12 deletions
|
@ -48,9 +48,8 @@ void ToolTipItem::clear()
|
||||||
|
|
||||||
void ToolTipItem::setRect(const QRectF &r)
|
void ToolTipItem::setRect(const QRectF &r)
|
||||||
{
|
{
|
||||||
if( r == rect() ) {
|
if (r == rect())
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
QGraphicsRectItem::setRect(r);
|
QGraphicsRectItem::setRect(r);
|
||||||
updateTitlePosition();
|
updateTitlePosition();
|
||||||
|
@ -97,7 +96,7 @@ void ToolTipItem::expand()
|
||||||
}
|
}
|
||||||
|
|
||||||
const int sp2 = iconMetrics.spacing * 2;
|
const int sp2 = iconMetrics.spacing * 2;
|
||||||
// pixmap left padding, icon, pixmap right padding, right padding */
|
// pixmap left padding, icon, pixmap right padding, right padding
|
||||||
width += sp2 + iconMetrics.sz_small + sp2 + sp2 * 2;
|
width += sp2 + iconMetrics.sz_small + sp2 + sp2 * 2;
|
||||||
// bottom padding
|
// bottom padding
|
||||||
height += sp2;
|
height += sp2;
|
||||||
|
@ -201,9 +200,8 @@ void ToolTipItem::persistPos()
|
||||||
void ToolTipItem::readPos()
|
void ToolTipItem::readPos()
|
||||||
{
|
{
|
||||||
QPointF value = qPrefDisplay::tooltip_position();
|
QPointF value = qPrefDisplay::tooltip_position();
|
||||||
if (!scene()->sceneRect().contains(value)) {
|
if (!scene()->sceneRect().contains(value))
|
||||||
value = QPointF(0, 0);
|
value = QPointF(0, 0);
|
||||||
}
|
|
||||||
setPos(value);
|
setPos(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,9 +257,8 @@ void ToolTipItem::refresh(const dive *d, const QPointF &pos)
|
||||||
painter.drawLine(0, lrint(60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure / 2),
|
painter.drawLine(0, lrint(60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure / 2),
|
||||||
16, lrint(60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure /2));
|
16, lrint(60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure /2));
|
||||||
painter.setPen(QColor(0, 0, 0, 127));
|
painter.setPen(QColor(0, 0, 0, 127));
|
||||||
for (int i=0; i<16; i++) {
|
for (int i = 0; i < 16; i++)
|
||||||
painter.drawLine(i, 60, i, 60 - entry->percentages[i] / 2);
|
painter.drawLine(i, 60, i, 60 - entry->percentages[i] / 2);
|
||||||
}
|
|
||||||
entryToolTip.second->setText(QString::fromUtf8(mb.buffer, mb.len));
|
entryToolTip.second->setText(QString::fromUtf8(mb.buffer, mb.len));
|
||||||
}
|
}
|
||||||
entryToolTip.first->setPixmap(tissues);
|
entryToolTip.first->setPixmap(tissues);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue