/*! * * Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file VEventSpy.h * \author (last) Behrouz NematiPour * \date (last) 18-Apr-2022 * \author (original) Behrouz NematiPour * \date (original) 23-Aug-2020 * */ #pragma once // Qt #include #include #include // Project #include "main.h" // Doxygen : do not remove // define #define _VEventSpy View::VEventSpy::I() // namespace namespace View { /*! * \brief The VEventSpy class * \details event filter for all the events goes to / comes from UI. * currently is only used for debugging and HW support. */ class VEventSpy : public QObject { Q_OBJECT // singleton SINGLETON(VEventSpy) // disabled 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. PROPERTY( quint64 , touchCount , 0 ) PROPERTY( quint64 , touchPoints , 0 ) PROPERTY( quint64 , mouseCount , 0 ) PROPERTY( QPoint , mousePoint , QPoint() ) // disabled coco end private: void initConnections(); void mouseEventSpy(QEvent *vEvent, const QString &vTypeName); void touchEventSpy(QEvent *vEvent, const QString &vTypeName); void keybdEventSpy(QEvent *vEvent ); signals : void countChanged(int vCount); signals: void eventSpy(QEvent::Type vType ); private slots: void onEventSpy(QEvent *vEvent); public slots: void doMouseReset(); void doTouchReset(); }; }