This is my final report for GSoC 2020. I’ve finished all my tasks laid out in my proposal and also managed to get a few more tasks done. I’d like to thank my mentors Florian and Armin for their tremendous help and swift reply to my doubts. I’d also like to thank members of the community like Rupak Bajgain, Guruprasad Rane and flywire for their help and advice.
Major PRs :-
- LibreCAD GUI shifted from Lua to C++ and GUI API implemented #304
- Customize Toolbar Widget #316
- Property Editor #326
Other PRs :-
- Replaced XML settings with JSON settings #318
- Requested changes in customizable toolbar #331
- Property Editor changes and customize toolbar changes #333
- Added Layer and MetaInfo properties to PropertyEditor #343
- Context Menu #344
- Dock Positioning #345
- Arc Operations #352
- Copy Entities #354
- Text Operation #357
- Fix dimensions modification bug #358
Important Links :-
- Dev Log
- Working Repository
- GUI API Wiki
- My Github
- Blog Introduction
- Phase 1 Blog Post
- Phase 2 Blog Post
- Phase 3 Blog Post
- Proposal Link
- GSoC Project Page
Brief description of work done
GUI shift from Lua to C++
- The GUI has been entirely shifted from lua to C++.
- Created MainWindow class, updated layer,toolbar,clicommand classes.
- All qt related code removed from qtbridge, now renamed to lua bridge.
- All lua ui files removed.
Lua GUI API
- Added Lua GUI API to allow lua plugin scripts to interact with the gui elements like the mainwindow, toolbar buttons, menu buttons, layer, clicommand etc.
- Added many dialog widget GUI classes, which allow the user to form his own gui widget for the user using a plugin.
- Lua GUI API Documentation added to the wiki.
- Updated unit tests for the widgets like layers, clicommand, toolbar and mainwindow unit tests.
- Added Lua GUI API unit tests
Loading of operation and generation and connection of the correct buttons, menu items, cli commands, context operations etc happen automatically by using the properties specified in the beginning of each lua operation file, making it easier to add new lua files without needing to change code elsewhere
Customize Toolbar Widget
- Ability to customize and order the toolbar buttons in the user’s desired order
- Order can be saved and loaded by the user (saved in json format)
- Added ui settings json file which stores ui settings and is validated by a schema on loading.
- Property editor added which allows the user to change the properties of the created entities, the change in properties updates the entity with new properties instantaneously.
- Uses the input gui widgets developed earlier in the lua gui api.
- Also contains meta info and layer properties.
- Context menu can be opened by right clicking, it has three states, active,inactive and selected.
- Can easily access create and modify tools using the context menu
- Contains undo, last command, copy, paste etc.
- Allows transition between different methods while creating an entity.
- Copying and pasting of entities among different librecadv3 windows.
- Few missing arc operations implemented.
- Added text operations lua file and a text dialog which allows adding more customized text with different style and font.
What I’ve learned
GSoC at librecad has been a great learning experience for me and I had a lot of fun working on the project. Some of the things I’ve learned
- Gained confidence in writing C++ object oriented code, as well learned the importance of writing comments and readable code.
- Learnt lua while preparing and working on my gsoc project.
- Learnt how to work with tools like CMake, which I was initially intimidated by but am now fairly comfortable with.
- Learnt the importance of approaching problems properly, like how florian pointed out that using the visitor design pattern in a certain problem was better than the approach I was going for.
- Gained confidence in using git and github, learning how to work with branches, squash commits, merge etc.
- Learnt how to use the Qt framework and about qt’s signal and slots system, model/view programming etc.
- Importance of discussing the task and problem, instead of diving head first into implementing it, and to also take into account the user’s perspective.
- Learned how to properly debug and track down problems.
I was lucky to have great mentors to help guide me through the summer, Florian has been extremely helpful and responsive from the very start when I started contributing at the end of December. Armin too has been very helpful and made the setting up of the required accounts for wiki and the blog a breeze.
Thanks for taking the time to read my final report, I’d again like to thank everyone involved for their help and advice. GSoC was a great experience and has helped me gain confidence to continue contributing to LibreCAD and other open source organizations in the future.