[software development] 关于LibreCAD源码的重写和重构,初学者应该循序渐进
Tofloor
poster avatar
deepin
2023-10-12 04:13
Author

image.png
如果你下载了LibreCAD的源代码,想要去重写并实现LibreCAD的相关功能,那么我建议其主要学习路线:

1.熟悉C++11的基本编程规范,以及Qt应用开发的基础内容

2.熟悉qmake的项目构建方式,因为libreCAD的源代码就是采用qmake而不是现在流行的cmake,如果坚持比较激进的方式去使用cmake构建会出现很多问题,后期会耽误自己重写libreCAD源代码的进度;

3.要熟悉一些第三方库的使用和配置,比如boost库

4.熟悉一些C++11的智能指针使用及特性,比如智能指针unique_ptr的特性,这个在LibreCA对于QC_ApplicationWindow这个唯一对象采用了智能指针unique_ptr的使用。

......

说了这么多,很多基础技术内容主要还是集中在C++11的编程掌握以及Qt应用开发的基础,希望你在上手LibreCAD源代码的时候能够上心应手。如果确实有不太懂的代码内容,也可以借助 UOS AI这种工具进行代码解读,希望参与librecad源码重写的开源程序员有更多人加入。


QT基础部分内容视频教程,我比较推荐B站传志教育的课程,链接:

最新QT从入门到实战完整版|传智教育

最后,关于LibreCAD源码,不太建议初学者一开始就用Cmake方式去参与其代码的构建,主要是LibreCAD源码中的action库与Ui库之间会互相进行头文件调用,需要前期进行代码的重构才能让核心库与界面UI类进行彻底分离。

Reply Favorite View the author
All Replies
统信和深度
deepin
2023-10-12 12:07
#1
先抛建议再等提问者?
Reply View the author
把一切操作变成GUI
deepin
Backbone of ecological co-construction group
2023-10-12 14:30
#2

加油,等你重构了。

Reply View the author
软件技术就是生产力
deepin
2023-10-12 23:27
#3
The user is banned, and the content is hidden.
deepin
2023-10-12 23:30
#4
软件技术就是生产力
The user is banned, and the content is hidden.

我不太会写Qt,只是分享一些LibreCAD的源码功能实现技巧,LibreCAD的整个项目重写需要更多开发者、测试者共同参与进来才行,也就是CAD的社区文化。

Reply View the author
软件技术就是生产力
deepin
2023-10-12 23:36
#5
The user is banned, and the content is hidden.
deepin
2023-10-13 00:24
#6
软件技术就是生产力
The user is banned, and the content is hidden.

pyqt,可以重构FreeCAD,但是FreeCAD采用CMake方式管理源码,cmake其实学习成本也不低。

Reply View the author
软件技术就是生产力
deepin
2023-10-13 00:32
#7
The user is banned, and the content is hidden.
deepin
2023-10-13 00:51
#8
软件技术就是生产力
The user is banned, and the content is hidden.

现在硬件都不差,如果只考虑性能,产品其实根本做不到完美。

Reply View the author
软件技术就是生产力
deepin
2023-10-13 00:58
#9
The user is banned, and the content is hidden.
deepin
2023-10-13 01:12
#10
软件技术就是生产力
The user is banned, and the content is hidden.

Rust,实际上是一些科技企业过滤码农的工具。

Reply View the author
软件技术就是生产力
deepin
2023-10-13 01:16
#11
The user is banned, and the content is hidden.
deepin
2023-10-13 02:09
#12
软件技术就是生产力
The user is banned, and the content is hidden.

有这方面的一些说法,rust确实解决了C++的一些问题,但也带来了新问题。

Reply View the author