Login  Register

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


If you reply to this email, your message will be added to the discussion below:
http://librecad.1049103.n5.nabble.com/LibreCAD-modified-for-the-interface-of-a-laser-machine-tp5113327p5118532.html
To start a new topic under LibreCAD-dev, email [hidden email]
To unsubscribe from LibreCAD-dev, click here.
NAML



--
Dongxu Li, Ph.D.