Added graphics and removed auto centering notifications
authorKatri Kaikkonen <katri.kaikkonen@ixonos.com>
Tue, 27 Jul 2010 09:06:25 +0000 (12:06 +0300)
committerKatri Kaikkonen <katri.kaikkonen@ixonos.com>
Tue, 27 Jul 2010 09:06:25 +0000 (12:06 +0300)
Reviewed by: Henri Lampela

src/common.h
src/engine/engine.cpp
src/network/networkaccessmanager.h
src/ui/indicatorbutton.cpp
src/ui/indicatorbutton.h
src/ui/mainwindow.cpp
src/ui/mainwindow.h
src/ui/panelcommon.h
src/ui/zoombuttonpanel.cpp

index 0f400bd..6e54c44 100644 (file)
@@ -41,6 +41,7 @@ const QString USER_UNSEND_MESSAGE_PUBLISH = "UNSEND_MESSAGE_PUBLISH_POLICITY";
 // Misc values
 const int DEFAULT_SCREEN_WIDTH = 800;    ///< Default N900 screen width
 const int DEFAULT_SCREEN_HEIGHT = 480;   ///< Default N900 screen height
+const int SCREEN_HEIGHT_DIFFERENCE = 56; ///< Difference between fullscreen height and non fs
 
 const QColor COLOR_GRAY = QColor(152, 152, 152);                        ///< Gray color
 const QFont NOKIA_FONT_NORMAL = QFont("Nokia Sans", 18, QFont::Normal); ///< Normal font
index 821bd96..3ddfb8d 100644 (file)
@@ -158,7 +158,6 @@ void SituareEngine::disableAutoCentering()
     qDebug() << __PRETTY_FUNCTION__;
 
     changeAutoCenteringSetting(false);
-    m_ui->buildInformationBox(tr("Auto centering disabled"));
 }
 
 void SituareEngine::enableAutoCentering(bool enabled)
@@ -382,7 +381,6 @@ void SituareEngine::initializeGpsAndAutocentering()
             enableGPS(true);
 
             m_ui->buildInformationBox(tr("GPS enabled"));
-            m_ui->buildInformationBox(tr("Auto centering enabled"));
 
         } else { // Normal start
             changeAutoCenteringSetting(autoCenteringEnabled.toBool());
@@ -390,9 +388,6 @@ void SituareEngine::initializeGpsAndAutocentering()
 
             if (gpsEnabled.toBool())
                 m_ui->buildInformationBox(tr("GPS enabled"));
-
-            if (gpsEnabled.toBool() && autoCenteringEnabled.toBool())
-                m_ui->buildInformationBox(tr("Auto centering enabled"));
         }
     } else {
         enableGPS(false);
index 8ddd510..d5c96ac 100644 (file)
@@ -74,7 +74,7 @@ public:
     *
     * @param request QNetworkRequest
     * @param data QByteArray
-    * @param onlineRequestOnly bool
+    * @param onlineRequestsOnly bool
     * @return QNetworkReply
     */
     QNetworkReply *post(const QNetworkRequest &request, QByteArray &data,
index 2e3a9a9..9b3bfdc 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
    USA.
 */
+
 #include <QDebug>
 #include <QPainter>
 #include <QSettings>
 
-#include "indicatorbutton.h"
 #include "math.h"
 #include "common.h"
 #include "panelcommon.h"
+#include "indicatorbutton.h"
+
+enum State {OFF, ON};                    ///< Enumerator for led state
 
-const int ROUNDING_RADIUS = 9;  ///< Roundness of the rounded edge
-const qreal OPACITY = 0.13;     ///< Opacity of the background in percents
-const int BUTTON_WIDTH = 66;    ///< Button width
-const int BUTTON_HEIGHT = 66;   ///< Button height
-const int DRAGGABLE_BUTTON_WIDTH = 85;
-const int DRAGGABLE_BUTTON_HEIGHT = 85;
+const qreal OPACITY = 0.50;              ///< Opacity of the background in percents
+const int ROUNDING_RADIUS = 9;           ///< Roundness of the rounded edge
+const int BUTTON_WIDTH = 66;             ///< Button width
+const int BUTTON_HEIGHT = 66;            ///< Button height
 
 IndicatorButton::IndicatorButton(QWidget *parent)
     : QToolButton(parent),
       m_isDraggable(false)
 {
-    setIcon(QIcon::fromTheme(QLatin1String("general_fullsize")));
+    m_indicatorLeds[OFF].load(":res/images/led_red.png");
+    m_indicatorLeds[ON].load(":res/images/led_red_s.png");
     setFixedSize(BUTTON_WIDTH, BUTTON_HEIGHT);
 
     QSettings settings(DIRECTORY_NAME, FILE_NAME);
@@ -47,13 +49,21 @@ IndicatorButton::IndicatorButton(QWidget *parent)
                         QPoint(DIRECTION_INDICATOR_POSITION_X,
                                DIRECTION_INDICATOR_POSITION_Y)).toPoint());
 
-    QPalette pal = palette();
-    QColor backgroundColor = pal.color(backgroundRole());
-    backgroundColor.setAlpha(floor(OPACITY * 255));
-    pal.setColor(backgroundRole(), backgroundColor);
-    setPalette(pal);
+    // Normal background
+    m_normalColor = new QColor(Qt::black);
+    m_normalColor->setAlpha(floor(OPACITY * 255));
 
-    setAutoFillBackground(true);
+    // Selected bakcground
+    m_selectedGradient = new QLinearGradient(0, 0, 0, this->height());
+    m_selectedGradient->setColorAt(0.02, QColor(0, 113, 181));
+    m_selectedGradient->setColorAt(0.25, QColor(24, 142, 214));
+    m_selectedGradient->setColorAt(0.5, QColor(41, 162, 239));
+    m_selectedGradient->setColorAt(0.75, QColor(82, 195, 255));
+    m_selectedGradient->setColorAt(0.98, QColor(115, 215, 255));
+
+    // Item shape path
+    m_backgroundPath.addRoundedRect(0, 0, this->rect().width(), this->rect().height(),
+                                    ROUNDING_RADIUS, ROUNDING_RADIUS);
 
     m_dragStartTimer = new QTimer(this);
     m_dragStartTimer->setSingleShot(true);
@@ -65,11 +75,13 @@ IndicatorButton::IndicatorButton(QWidget *parent)
 
     connect(this, SIGNAL(pressed()),
             m_dragStartTimer, SLOT(start()));
+
     connect(this, SIGNAL(released()),
             m_dragStartTimer, SLOT(stop()));
 
     connect(m_dragStartTimer, SIGNAL(timeout()),
             this, SLOT(timerExpired()));
+
     connect(m_forceReleaseTimer, SIGNAL(timeout()),
             this, SLOT(forceMouseRelease()));
 
@@ -88,7 +100,6 @@ void IndicatorButton::mousePressEvent(QMouseEvent *event)
     }
     m_eventPosition = mapToParent(event->pos());
     m_dragStartTimer->start();
-//    QToolButton::mousePressEvent(event);
 }
 
 void IndicatorButton::mouseMoveEvent(QMouseEvent *event)
@@ -101,13 +112,13 @@ void IndicatorButton::mouseMoveEvent(QMouseEvent *event)
 
             if (newLocation.x() < SIDEBAR_WIDTH)
                 newLocation.rx() = SIDEBAR_WIDTH;
-//             else if (newLocation.x() > m_screenSize.width() - width() - SIDEBAR_WIDTH)
-//                newLocation.rx() =  m_screenSize.width() - width() - SIDEBAR_WIDTH;
+             else if (newLocation.x() > m_screenSize.width() - width() - SIDEBAR_WIDTH)
+                newLocation.rx() =  m_screenSize.width() - width() - SIDEBAR_WIDTH;
 
             if (newLocation.y() < 0)
                 newLocation.ry() = 0;
-//            else if (newLocation.y() > m_screenSize.height() - height())
-//                newLocation.ry() = m_screenSize.height() - height();
+            else if (newLocation.y() > m_screenSize.height() - height())
+                newLocation.ry() = m_screenSize.height() - height();
 
             move(newLocation);
         }
@@ -141,6 +152,7 @@ void IndicatorButton::mouseReleaseEvent(QMouseEvent *event)
             emit autoCenteringTriggered(true);
         }
     }
+
     QToolButton::mouseReleaseEvent(event);
 }
 
@@ -151,17 +163,31 @@ void IndicatorButton::setDraggable(bool mode, QPoint eventPosition)
     m_isDraggable = mode;
 
     if(mode) {
-        setFixedSize(DRAGGABLE_BUTTON_WIDTH, DRAGGABLE_BUTTON_HEIGHT);
-        setAutoFillBackground(true);
         grabMouse();
         m_forceReleaseTimer->start();
         m_dragPosition = eventPosition;
     } else {
-        setFixedSize(BUTTON_WIDTH, BUTTON_HEIGHT);
-        setAutoFillBackground(true);
         releaseMouse();
         m_forceReleaseTimer->stop();
     }
+
+    update();
+}
+
+void IndicatorButton::screenResized(const QSize &newSize)
+{
+    qDebug() << __PRETTY_FUNCTION__;
+
+    m_screenSize = newSize;
+
+    QPoint resizedPosition = pos();
+
+    if(newSize.height() < DEFAULT_SCREEN_HEIGHT)
+        resizedPosition.ry() -= SCREEN_HEIGHT_DIFFERENCE;
+    else
+        resizedPosition.ry() += SCREEN_HEIGHT_DIFFERENCE;
+
+    move(resizedPosition);
 }
 
 const QPoint& IndicatorButton::eventPosition()
@@ -179,6 +205,32 @@ void IndicatorButton::forceMouseRelease()
     setDraggable(false);
 }
 
+void IndicatorButton::paintEvent(QPaintEvent *event)
+{
+    qDebug() << __PRETTY_FUNCTION__;
+
+    Q_UNUSED(event);
+
+    QPainter painter(this);
+    painter.setRenderHint(QPainter::Antialiasing);
+
+    if(m_isDraggable)
+        painter.fillPath(m_backgroundPath, QBrush(Qt::Dense4Pattern));
+    else if (isDown())
+        painter.fillPath(m_backgroundPath, QBrush(*m_selectedGradient));
+    else
+        painter.fillPath(m_backgroundPath, QBrush(*m_normalColor));
+
+    if(isChecked())
+        painter.drawPixmap((this->width() / 2) - (m_indicatorLeds[ON].width() / 2),
+                           (this->height() / 2) - (m_indicatorLeds[ON].height() / 2),
+                           m_indicatorLeds[ON]);
+    else
+        painter.drawPixmap((this->width() / 2) - (m_indicatorLeds[OFF].width() / 2),
+                           (this->height() / 2) - (m_indicatorLeds[OFF].height() / 2),
+                           m_indicatorLeds[OFF]);
+}
+
 void IndicatorButton::timerExpired()
 {
     qDebug() << __PRETTY_FUNCTION__;
@@ -189,10 +241,4 @@ void IndicatorButton::timerExpired()
     setDraggable(true, m_dragPosition);
 }
 
-//void IndicatorButton::paintEvent(QPaintEvent *event)
-//{
-//    qDebug() << __PRETTY_FUNCTION__;
-
-//    QToolButton::paintEvent(event);
 
-//}
index a1a1b02..2663607 100644 (file)
 #include <QToolButton>
 #include <QTimer>
 #include <QMouseEvent>
-#include <QPaintEvent>
 #include "../user/user.h"
 
 /**
 * @brief Indicator button class
 *
 * @class IndicatorButton indicatorbutton.h "ui/indicatorbutton.h"
+* @author Katri Kaikkonen - katri.kaikkonen (at) ixonos.com
 */
 class IndicatorButton : public  QToolButton
 {
    Q_OBJECT
 
 public:
+
    /**
     * @brief Constructor
     *
@@ -55,14 +56,14 @@ protected:
    /**
     * @brief Move event for the distance indicator button
     *
-    * @param event Event
+    * @param event Mouse event
     */
    void mouseMoveEvent(QMouseEvent *event);
 
    /**
     * @brief Press event for the distance indicator button
     *
-    * @param event Event
+    * @param event Mouse event
     */
    void mousePressEvent(QMouseEvent *event);
 
@@ -73,13 +74,17 @@ protected:
     */
    void mouseReleaseEvent(QMouseEvent *event);
 
-//   void paintEvent(QPaintEvent *event);
-
+    /**
+     * @brief Event handler for paint events
+     *
+     * Paints the button and its icon
+     * @param event Paint event
+     */
+    void paintEvent(QPaintEvent *event);
 
 /*******************************************************************************
 * MEMBER FUNCTIONS AND SLOTS
 ******************************************************************************/
-
 public slots:
 
     /**
@@ -88,11 +93,19 @@ public slots:
     const QPoint& eventPosition();
 
     /**
+    * @brief Slot to redraw the panel after window resize event
+    *
+    * @param size Size of the new screen
+    */
+    void screenResized(const QSize &size);
+
+    /**
      * @brief Toggle distance indicator button draggability
      */
     void setDraggable(bool mode, QPoint eventPosition = QPoint(0,0));
 
 private slots:
+
     /**
      * @brief Safeguard slot to release mouse grab if something goes horribly wrong
      */
@@ -107,6 +120,7 @@ private slots:
  * SIGNALS
  ******************************************************************************/
 signals:
+
     /**
     * @brief Automatic centering setting changed by user
     *
@@ -118,15 +132,21 @@ signals:
 * DATA MEMBERS
 ******************************************************************************/
 private:
-   bool m_isDraggable;             ///< Boolean for tracking the draggability state
 
-   QPoint m_dragPosition;          ///< Location from where the widget is grabbed
-   QPoint m_eventPosition;         ///< Position of mousePressEvent
+    bool m_isDraggable;             ///< Boolean for tracking the draggability state
+
+    QPoint m_dragPosition;          ///< Location from where the widget is grabbed
+    QPoint m_eventPosition;         ///< Position of mousePressEvent
+
+    QSize m_screenSize;             ///< Store for the screen size
 
-   QSize m_screenSize;             ///< Store for the screen size
+    QTimer *m_dragStartTimer;       ///< Timer to init draggability of the distance indicator button
+    QTimer *m_forceReleaseTimer;    ///< Timer to run forceMouseRelease;
 
-   QTimer *m_dragStartTimer;       ///< Timer to init draggability of the distance indicator button
-   QTimer *m_forceReleaseTimer;    ///< Timer to run forceMouseRelease;
+    QColor *m_normalColor;
+    QLinearGradient *m_selectedGradient;
+    QPainterPath m_backgroundPath;
+    QPixmap m_indicatorLeds[2];
 
 };
 
index 3d065c6..531bca2 100644 (file)
@@ -60,9 +60,9 @@ MainWindow::MainWindow(QWidget *parent)
     m_ownLocationCrosshair(0),
     m_email(),
     m_password(),
+    m_webView(0),
     m_fullScreenButton(0),
     m_indicatorButton(0),
-    m_webView(0),
     m_mapScale(0),
     m_cookieJar(0)
 {
@@ -185,6 +185,9 @@ void MainWindow::buildIndicatorButton()
 
     connect(m_indicatorButton, SIGNAL(autoCenteringTriggered(bool)),
         this, SIGNAL(autoCenteringTriggered(bool)));
+
+    connect(m_mapView, SIGNAL(viewResized(QSize)),
+            m_indicatorButton, SLOT(screenResized(QSize)));
 }
 
 void MainWindow::buildInformationBox(const QString &message, bool modal)
@@ -386,6 +389,7 @@ void MainWindow::buildZoomButtonPanel()
 
     connect(m_mapView, SIGNAL(viewResized(QSize)),
             m_zoomButtonPanel, SLOT(screenResized(QSize)));
+
 }
 
 void MainWindow::clearCookieJar()
@@ -493,6 +497,8 @@ void MainWindow::drawFullScreenButton(const QSize &size)
 
 void MainWindow::drawMapScale(const QSize &size)
 {
+    qDebug() << __PRETTY_FUNCTION__;
+
     const int LEFT_SCALE_MARGIN = 10;
     const int BOTTOM_SCALE_MARGIN = 2;
     qDebug() << __PRETTY_FUNCTION__ << size.width() << "x" << size.height();
@@ -894,7 +900,6 @@ void MainWindow::showPanels()
         if(!m_friendsListPanel->isVisible()) {
             m_friendsListPanel->show();
             m_friendsListPanelSidebar->show();
-            m_indicatorButton->show();
         }
 
         if(!m_userPanel->isVisible()) {
index eba1003..6302ba6 100644 (file)
@@ -5,6 +5,7 @@
       Henri Lampela - henri.lampela@ixonos.com
       Kaj Wallin - kaj.wallin@ixonos.com
       Sami Rämö - sami.ramo@ixonos.com
+      Katri Kaikkonen - katri.kaikkonen@ixonos.com
 
    Situare is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -635,12 +636,11 @@ private:
     QString m_email;                        ///< Placeholder for email
     QString m_password;                     ///< Placeholder for password
 
-    FullScreenButton *m_fullScreenButton;   ///< Instance of the fullscreen toggle button
-    IndicatorButton * m_indicatorButton;    ///< Instance of direction indicator button
-
     QWebView *m_webView;                    ///< Shows facebook login page
 
     FriendListPanel *m_friendsListPanel;    ///< Instance of friends list panel
+    FullScreenButton *m_fullScreenButton;   ///< Instance of the fullscreen toggle button
+    IndicatorButton *m_indicatorButton;    ///< Instance of direction indicator button
     MapScale *m_mapScale;                   ///< Instance of the map scale
     MapView *m_mapView;                     ///< Instance of the map view
     NetworkCookieJar *m_cookieJar;          ///< Placeholder for QNetworkCookies
index 7011f40..cff836a 100644 (file)
@@ -3,6 +3,7 @@
     Copyright (C) 2010  Ixonos Plc. Authors:
 
         Kaj Wallin - kaj.wallin@ixonos.com
+        Katri Kaikkonen - katri.kaikkonen@ixonos.com
 
     Situare is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License
@@ -53,22 +54,49 @@ const int FRIENDPANEL_WIDTH  = 426;                     ///< Width of the friend
 const int FRIENDPANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
                                - PANEL_BOTTOM_PADDING;  ///< Height of the friends list panel
 
+/**
+* @brief Friend list panel inner margin (left)
+*
+* @var FRIENDPANEL_MARGIN_LEFT
+*/
 const int FRIENDPANEL_MARGIN_LEFT = SLIDER_BUTTON_OFFSET
-                                    + MAEMO5_SCROLLBAR_WIDTH; ///< Friend list panel inner margin (left)
-const int FRIENDPANEL_MARGIN_RIGHT = SIDEBAR_WIDTH;         ///< Friend list panel inner margin (right)
-const int FRIENDPANEL_MARGIN_TOP = 0;                       ///< Friend list panel inner margin (top)
-const int FRIENDPANEL_MARGIN_BOTTOM = 0;                    ///< Friend list panel inner margin (bottom)
-
-const int FRIENDPANEL_FILTER_MARGIN_LEFT = FRIENDPANEL_MARGIN_LEFT + 4; ///< Friend list filter bar margin (left)
+                                    + MAEMO5_SCROLLBAR_WIDTH;
+const int FRIENDPANEL_MARGIN_RIGHT = SIDEBAR_WIDTH;     ///< Friend list panel inner margin (right)
+const int FRIENDPANEL_MARGIN_TOP = 0;                   ///< Friend list panel inner margin (top)
+const int FRIENDPANEL_MARGIN_BOTTOM = 0;                ///< Friend list panel inner margin (bottom)
+
+/**
+* @brief Friend list filter bar margin (left)
+*
+* @var FRIENDPANEL_FILTER_MARGIN_LEFT
+*/
+const int FRIENDPANEL_FILTER_MARGIN_LEFT = FRIENDPANEL_MARGIN_LEFT + 4;
+
+/**
+* @brief Friend list filter bar margin (right)
+*
+* @var FRIENDPANEL_FILTER_MARGIN_RIGHT
+*/
 const int FRIENDPANEL_FILTER_MARGIN_RIGHT = FRIENDPANEL_MARGIN_RIGHT
-                                            + MAEMO5_SCROLLBAR_WIDTH + 4; ///< Friend list filter bar margin (right)
+                                            + MAEMO5_SCROLLBAR_WIDTH + 4;
 
 const int SHOW_ALL_BUTTON_RIGHT_MARGIN = SIDEBAR_WIDTH * 2 - 7; ///< Show all button right margin
 
+/**
+* @brief Horizontal position of a closed friend list panel
+*
+* @var FRIENDPANEL_CLOSED_X
+*/
 const int FRIENDPANEL_CLOSED_X = DEFAULT_SCREEN_WIDTH - SLIDER_BUTTON_OFFSET
-                                 - PANEL_PEEK_AMOUNT; ///< Horizontal position of a closed friend list panel
+                                 - PANEL_PEEK_AMOUNT;
+
+/**
+* @brief Horizontal position of a open friend list panel
+*
+* @var FRIENDPANEL_OPENED_X
+*/
 const int FRIENDPANEL_OPENED_X = DEFAULT_SCREEN_WIDTH - SLIDER_BUTTON_OFFSET - SLIDER_BAR_WIDTH
-                                 - FRIENDPANEL_WIDTH; ///< Horizontal position of a open friend list panel
+                                 - FRIENDPANEL_WIDTH;
 
 // User info panel settings
 const int USERPANEL_WIDTH  = 298;                       ///< Width of the user panel
@@ -77,24 +105,35 @@ const int USERPANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
 
 const int USERPANEL_MARGIN_LEFT = SIDEBAR_WIDTH
                                   + MAEMO5_SCROLLBAR_WIDTH; ///< User info panel inner margin (left)
-const int USERPANEL_MARGIN_RIGHT = SLIDER_BUTTON_OFFSET;    ///< User info panel inner margin (right)
-const int USERPANEL_MARGIN_TOP = 0;                         ///< User info panel inner margin (top)
-const int USERPANEL_MARGIN_BOTTOM = 0;                      ///< User info panel inner margin (bottom)
-
+const int USERPANEL_MARGIN_RIGHT = SLIDER_BUTTON_OFFSET;  ///< User info panel inner margin (right)
+const int USERPANEL_MARGIN_TOP = 0;                       ///< User info panel inner margin (top)
+const int USERPANEL_MARGIN_BOTTOM = 0;                    ///< User info panel inner margin (bottom)
+
+/**
+* @brief Horizontal position of a closed user info panel
+*
+* @var USERPANEL_CLOSED_X
+*/
 const int USERPANEL_CLOSED_X = - USERPANEL_WIDTH + PANEL_PEEK_AMOUNT
-                               - SLIDER_BAR_WIDTH;  ///< Horizontal position of a closed user info panel
-const int USERPANEL_OPENED_X = 0;                   ///< Horizontal position of a open user info panel
+                               - SLIDER_BAR_WIDTH;
+const int USERPANEL_OPENED_X = 0;                 ///< Horizontal position of a open user info panel
 
 // Zoom button panel settings
-const int ZOOM_BUTTON_PANEL_POSITION_X = 10 + PANEL_PEEK_AMOUNT; ///< Horizontal position of zoom panel
+const int ZOOM_BUTTON_PANEL_POSITION_X = 10 +
+                                         PANEL_PEEK_AMOUNT; ///< Horizontal position of zoom panel
 const int ZOOM_BUTTON_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
 const int ZOOM_BUTTON_PANEL_BUTTON_SPACING = 4; ///< Size of a zoom button spacing
 
 const QString ZOOMPANEL_POSITION = "Zoom_Panel_Position";
 
 // Direction indicator button settings
-const int DIRECTION_INDICATOR_POSITION_X = 10 + PANEL_PEEK_AMOUNT; ///< Horizontal position of direction indicator button
-const int DIRECTION_INDICATOR_POSITION_Y = 342; ///< Vertical position of direction indicator button
+/**
+* @brief Horizontal position of direction indicator button
+*
+* @var DIRECTION_INDICATOR_POSITION_X
+*/
+const int DIRECTION_INDICATOR_POSITION_X = 10 + PANEL_PEEK_AMOUNT;
+const int DIRECTION_INDICATOR_POSITION_Y = 315; ///< Vertical position of direction indicator button
 
 const QString DIRECTION_INDICATOR_BUTTON_POSITION = "Direction_Indicator_Position";
 
index d89cc4c..e232593 100644 (file)
@@ -210,7 +210,7 @@ void ZoomButtonPanel::setDraggable(bool mode, QPoint eventPosition)
 void ZoomButtonPanel::screenResized(const QSize &newSize)
 {
     qDebug() << __PRETTY_FUNCTION__;
-    
+
     m_screenSize = newSize;
 
     QPoint resizedPosition = pos();