Re: scripting
Posted by
dxli on
Dec 08, 2015; 9:59pm
URL: https://forum.librecad.org/scripting-tp5711935p5712690.html
let's try to handle this "Super long mainwindow" syndrome:
I'm thinking about moving your Gui work to another class:
conceptually:
class GuiHelper {
private:
/** all buttons, menus, toolbars managed here */
void createButtons();
void createMenus();
void connectActions();
public:
// set up Gui for appWin
GuiHelper(QC_ApplicationWindow* appWin);
};
ravas wrote
If I remove it all in one commit then that can serve (actually more efficiently) as a way to look at the code.
Honestly, I'm skeptical if this code would actually help a person capable of implementing scripting.
It would be nice to get things cleaned up so we could use Doxygen at some point;
and obviously we don't want dead code exposed.
Reducing the number of functions in qc_applicationwindow will also help make it easier to read and find things.