/*! * * Copyright (c) 2019-2020 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 * \date 8/21/2020 * \author Behrouz NematiPour * */ #pragma once // Qt #include #include #include // Project #include "main.h" // define #define _VEventSpy View::VEventSpy::I() // namespace namespace View { class VEventSpy : public QObject { Q_OBJECT // singleton SINGLETON(VEventSpy) // 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()) // coco end private: void initConnections(); void mouseEventSpy(QEvent *vEvent, const QString &vTypeName); void touchEventSpy(QEvent *vEvent, const QString &vTypeName); signals : void countChanged(int vCount); signals: void eventSpy(QEvent::Type vType ); private slots: void onEventSpy(QEvent *vEvent); public slots: void doMouseReset(); void doTouchReset(); }; }