Re: LibreCAD modified for the interface of a laser machine
Posted by
dxli on
Jan 04, 2012; 4:20am
URL: https://forum.librecad.org/LibreCAD-modified-for-the-interface-of-a-laser-machine-tp5113327p5118694.html
Hi Diego,
you can read the source code for a particular toolbar example, say, cadToolBar (left tool bar area, main drawing/editing toolbars).
In qc_applicationwindow.cpp, around line 1562, it reads like,
t->setAllowedAreas(Qt::LeftToolBarArea | Qt::RightToolBarArea);
// t->setVerticallyStretchable(true);
addToolBar(Qt::LeftToolBarArea, t);
cadToolBar = new QG_CadToolBar(t, "CAD Tools");
A toolbar of QG_CadToolBar() type is created and added LeftToolBarArea.
The QG_CadToolBar() class manages which cad toolbar to show. read source code in src/ui/forms/qg_cadtoolbar*
I suppose you may simply add a new cadToolBar to the system. following examples in qg_cadtoolbar* (.h, .cpp, and .ui).
For example, add a button in qg_cadtoolbarmain to open a new sub cadtoolbar, and create your own sub cadtoolbar.
Dongxu
On Tue, Jan 3, 2012 at 9:02 PM, diegoroman17_2 [via LibreCAD]
<[hidden email]> wrote:
Hi Dongxu,
Your information helps me a lot ... It could also help me with information on how to create a toolbar with 3 buttons in a LibreCAD start a stop and a specification of the machine and the text boxes for the allocation of power? As I can give functions to the buttons?
Regards Diego
--
Dongxu Li, Ph.D.