ia-dev / opensimQt

CPP GUI for OpenSim
Apache License 2.0
5 stars 6 forks source link

MS0401_T03 Python: GUI macro recording #28

Closed riteshsv closed 4 years ago

riteshsv commented 4 years ago

GUI Macro recording and Playback

riteshsv commented 4 years ago

@idhamari I have completed & tested the Macro recording. Below is the sequence of tests: Testing Sequence:

riteshsv commented 4 years ago

@idhamari Below mentioned features implemented

GUI Macro Recording Functionality

openSimQt provides Macro recording functionality which allows users to record the GUI actions (commands) in form of a script. By this way users can record a script for repeating steps and automate the process. Such script could be saved to disk and loaded at any time through the openSimQt GUI, to run.

Caution: The script is a python script and uses openSimQt python api. Hence it's usage outside the openSimQt GUI is not supported.

Below are the features provided by GUI Macro Recording Module:

riteshsv commented 4 years ago

@idhamari : Code committed. Will work on one pending task from another issue.

idhamari commented 4 years ago

@riteshsv thanks for your effort, this sounds great. :watermelon:

I still don't see any new commits. It would be nice if you push your work then write here a summary of the progress and add a link to the related commit.

I also noticed that the simulation setting part is still missing from the previous task. Is there a difficulty to implement it? if so, we can meet online next week and discuss some solutions.

idhamari commented 4 years ago

@riteshsv ok, I see you already pushed the code :) I will test and feedback if needed.

idhamari commented 4 years ago

@riteshsv

I found some bugs:

vsMacroManager.h:71:17: error: ‘mutex’ in namespace ‘std’ does not name a type static std::mutex _mutex;

solved by adding this line to vsMacroManager.h:

   #include <mutex>

vsMacroManager.cpp:130:130: error: ‘endl’ is not a member of ‘Qt’ out << "#################################################################################################" << Qt::endl;

still investigating, if you know a solution please share.

riteshsv commented 4 years ago

@idhamari QTextStream endl is deprecated since 5.15. Q_CORE_EXPORT QT_DEPRECATED_VERSION_X(5, 15, "Use Qt::endl") QTextStream &endl(QTextStream &s);

so its a version issue. I will test it by replacing it with '\n' and report back

idhamari commented 4 years ago

@riteshsv

After a long fight, I was able to win and solve the bugs :) please check the last commit in the master.

It seem cmake has problem handling multiple versions of python. For now I used an older cmake functions and set python manually. Please check the updated cmake and code and see if it works on your mac (you may modify it in away that works also in my machine as well).