Index: sources/view/VEventSpy.cpp =================================================================== diff -u -r12e7b6dda53cf8db7707c7fa55dcf6137e7d6997 -r9d8a60eb984003d3f7814cbe507b1b37f519bc80 --- sources/view/VEventSpy.cpp (.../VEventSpy.cpp) (revision 12e7b6dda53cf8db7707c7fa55dcf6137e7d6997) +++ sources/view/VEventSpy.cpp (.../VEventSpy.cpp) (revision 9d8a60eb984003d3f7814cbe507b1b37f519bc80) @@ -7,7 +7,7 @@ * * \file VEventSpy.cpp * \author (last) Behrouz NematiPour - * \date (last) 23-Aug-2020 + * \date (last) 16-Oct-2020 * \author (original) Behrouz NematiPour * \date (original) 23-Aug-2020 * @@ -22,6 +22,11 @@ #include "GuiGlobals.h" #include "Logger.h" +// if needs to spy on the mouse events +// (which is happening on the desktop only since there is not mouse attached to the device) +// remove the #define comment line below. +// #define SPY_MOUSE_EVENT + using namespace View; VEventSpy::VEventSpy(QObject *) @@ -74,15 +79,22 @@ } /*! - * \brief VEventSpy::mouseEventSpy + * \brief VEventSpy::mouseEventSpy * \details Mouse event spy - * \param vEvent - mouse event - * \param typeName - mouse button type name + * if needs to spy on the mouse events + * (which is happening on the desktop only since there is not mouse attached to the device) + * Remove comment of the #define SPY_MOUSE_EVENT + * \param vEvent - mouse event + * \param vTypeName - mouse button type name */ // coco begin validated: this code has been manually tested. // the only intention of this code is to be used for EMC testing and has been tested and is working fine. -void VEventSpy::mouseEventSpy(QEvent *vEvent, const QString &typeName) +void VEventSpy::mouseEventSpy(QEvent *vEvent, const QString &vTypeName) { +#ifndef SPY_MOUSE_EVENT + Q_UNUSED(vEvent) + Q_UNUSED(vTypeName) +#else QMouseEvent *mouseEvent = static_cast(vEvent); int x = mouseEvent->x(); int y = mouseEvent->y(); @@ -110,10 +122,11 @@ default : break; } - LOG_DEBUG( btn + typeName + mdf + + LOG_DEBUG( btn + vTypeName + mdf + QString(",%1,%2") .arg(x, 4, 10, QChar('0')) .arg(y, 4, 10, QChar('0'))); +#endif } // coco end @@ -129,7 +142,7 @@ /*! * \brief VEventSpy::touchEventSpy * \param vEvent - touch event - * \param typeName - The type of the QEvent which has been shortened e.g. tB: TouchBegin + * \param vTypeName - The type of the QEvent which has been shortened e.g. tB: TouchBegin */ // coco begin validated: this code has been manually tested. // the only intention of this code is to be used for EMC testing and has been tested and is working fine.