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 Called when direction and distance from current map center point to current GPS
* location is changed
*
*/
void updateValues(qreal direction, qreal distance, bool draw);
- /**
- * @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
- */
- void forceMouseRelease();
-
- /**
- * @brief Slot that handles drag initialization once timer has timed out
- */
- void timerExpired();
/*******************************************************************************
* SIGNALS
* DATA MEMBERS
******************************************************************************/
private:
- bool m_drawTriangle; ///< Should the direction triange be drawn
- bool m_isDraggable; ///< Boolean for tracking the draggability state
+ bool m_drawTriangle; ///< Should the direction triange be drawn
- qreal m_direction; ///< Direction to the GPS position (in degrees)
+ qreal m_direction; ///< Direction to the GPS position (in degrees)
qreal m_distance;
QColor *m_normalColor; ///< Normal background color
QPixmap m_indicatorLeds[2]; ///< Placeholder for images
- QPoint m_dragPosition; ///< Location from where the widget is grabbed
- QPoint m_eventPosition; ///< Position of mousePressEvent
-
- QSize m_screenSize; ///< Store for the screen size
-
- QString m_distanceText;
-
- QTimer *m_dragStartTimer; ///< Timer to init draggability of the distance indicator button
- QTimer *m_forceReleaseTimer; ///< Timer to run forceMouseRelease
+ QPoint m_dragPosition; ///< Location from where the widget is grabbed
+ QPoint m_eventPosition; ///< Position of mousePressEvent
};
#endif // INDICATORBUTTON_H