* @brief Indicator button class
*
* @author Katri Kaikkonen - katri.kaikkonen (at) ixonos.com
+ * @author Kaj Wallin - kaj.wallin (at) ixonos.com
* @author Sami Rämö - sami.ramo (at) ixonos.com
*/
class IndicatorButton : public QToolButton
{
qDebug() << __PRETTY_FUNCTION__;
- if(m_isDraggable) {
+ if (m_isDraggable) {
if (event->buttons() & Qt::LeftButton) {
QPoint newLocation = mapToParent(event->pos()) - m_dragPosition;
move(newLocation);
}
} else {
- if(!rect().contains(event->pos()))
+ if (!rect().contains(event->pos()))
m_dragStartTimer->stop();
}
}
m_distanceText.setNum(10);
m_distanceText.prepend("< ");
m_distanceText.append(UNIT_METER);
- }
- else if (m_distance < MAX_TO_METERS)
- {
+ } else if (m_distance < MAX_TO_METERS) {
m_distanceText.setNum(m_distance, 'f', 0);
m_distanceText.append(UNIT_METER);
- }
- else if (m_distance < MAX_TO_KM_WITH_DESIMAL)
- {
+ } else if (m_distance < MAX_TO_KM_WITH_DESIMAL) {
m_distanceText.setNum(m_distance / M_TO_KM, 'f', 1);
m_distanceText.append(UNIT_KILOMETER);
- }
- else {
+ } else {
m_distanceText.setNum(m_distance / M_TO_KM, 'f', 0);
m_distanceText.append(UNIT_KILOMETER);
}
update();
}
-