From 8b76b861ad4d8d75db26d0f042c0d470d5f919ca Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 12 Oct 2017 12:26:50 -0300 Subject: [PATCH] Code-formatting, add (unused for now) overload of getLocationPosition() --- .../locale/timezonewidget/timezonewidget.h | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/modules/locale/timezonewidget/timezonewidget.h b/src/modules/locale/timezonewidget/timezonewidget.h index 27256fabe..62475e20f 100644 --- a/src/modules/locale/timezonewidget/timezonewidget.h +++ b/src/modules/locale/timezonewidget/timezonewidget.h @@ -48,14 +48,17 @@ class TimeZoneWidget : public QWidget { Q_OBJECT public: - explicit TimeZoneWidget(QWidget* parent = 0); + explicit TimeZoneWidget( QWidget* parent = 0 ); - LocaleGlobal::Location getCurrentLocation() { return currentLocation; } - void setCurrentLocation(QString region, QString zone); - void setCurrentLocation(LocaleGlobal::Location location); + LocaleGlobal::Location getCurrentLocation() + { + return currentLocation; + } + void setCurrentLocation( QString region, QString zone ); + void setCurrentLocation( LocaleGlobal::Location location ); signals: - void locationChanged(LocaleGlobal::Location location); + void locationChanged( LocaleGlobal::Location location ); private: QFont font; @@ -63,10 +66,14 @@ private: QList timeZoneImages; LocaleGlobal::Location currentLocation; - QPoint getLocationPosition(double longitude, double latitude); + QPoint getLocationPosition( const LocaleGlobal::Location& l ) + { + return getLocationPosition( l.longitude, l.latitude ); + } + QPoint getLocationPosition( double longitude, double latitude ); - void paintEvent(QPaintEvent* event); - void mousePressEvent(QMouseEvent* event); + void paintEvent( QPaintEvent* event ); + void mousePressEvent( QMouseEvent* event ); }; #endif // TIMEZONEWIDGET_H