Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wimleers/qeventlogger
Event Logger for Qt: has the ability to intercept *all* events in a Qt application.
https://github.com/wimleers/qeventlogger
Last synced: 6 days ago
JSON representation
Event Logger for Qt: has the ability to intercept *all* events in a Qt application.
- Host: GitHub
- URL: https://github.com/wimleers/qeventlogger
- Owner: wimleers
- License: unlicense
- Created: 2010-10-29T18:43:52.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2017-10-29T13:50:52.000Z (about 7 years ago)
- Last Synced: 2023-03-10T20:08:20.814Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 463 KB
- Stars: 11
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
How to use in your Qt application
---------------------------------1) Add the QEventLogger.h and QEventLogger.cpp files to your project, and add
them to your .pro file.
2) Subclass QApplication, e.g. in the MyApplication class.
3) Include QEventLogger.h in MyApplication.h and add a QEventLogger member:
QEventLogger * eventLogger;
4) In the MyApplication constructor, initialize the event logger and install
it as an event filter (the first parameter is the basename of the
resulting log files, the second parameter is a pointer to the app's
main window, the dimensions of which will be logged as well, the third
parameter disables/enables screenshots to be taken for each logged event):
this->eventLogger = new QEventLogger("./events", this->mainWindow, true);
this->installEventFilter(this->eventLogger);
5) When you now build your application, you will get .csv files in the same
directory as the application binary, with filenames such as
"events 2010-10-29T20-29-17.csv".
If the screenshot mode is enabled, a directory with a filename such as
"screenshots 2010-10-29T20-29-17" will be created in the current directory.
Within that directory, PNG files can be found with filenames such as
"12345.png", where the number in the filename indicates the relative time
at which the screenshot is made.