[Merged] Missing Icons for Points Workbench

A forum for research and development of the user interface of FreeCAD

Moderator: agryson

User avatar
Kunda1
Posts: 9209
Joined: Thu Jan 05, 2017 9:03 pm

[Merged] Missing Icons for Points Workbench

Postby Kunda1 » Sat Nov 21, 2020 6:25 pm

Anyone interested in creating icons for these missing functions in the Points Workbench ?
Last edited by Kunda1 on Tue Dec 01, 2020 1:10 pm, edited 1 time in total.
Reason: Added [Merged]
Alone you go faster. Together we go farther
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bitacovir
Posts: 1260
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Missing Icons for Points Workbench

Postby bitacovir » Sat Nov 21, 2020 9:38 pm

Kunda1 wrote:
Sat Nov 21, 2020 6:25 pm
Anyone interested in creating icons for these missing functions in the Points Workbench ?
I just finished with Std Tool icons. Do you want me to take this?
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project
User avatar
Kunda1
Posts: 9209
Joined: Thu Jan 05, 2017 9:03 pm

Re: Missing Icons for Points Workbench

Postby Kunda1 » Sun Nov 22, 2020 5:23 am

bitacovir wrote:
Sat Nov 21, 2020 9:38 pm
I just finished with Std Tool icons. Do you want me to take this?
Nice! Thank you for your work!
If you have some time, that would be fantastic! But no rush and please pace yourself. ;)
Alone you go faster. Together we go farther
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bitacovir
Posts: 1260
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Missing Icons for Points Workbench

Postby bitacovir » Sun Nov 22, 2020 9:45 am

Proposal of icon for Convert to points command http://www.freecadweb.org/wiki/Points%20Convert
inkscape_Y67cPnQ0uc.png
inkscape_Y67cPnQ0uc.png (19.36 KiB) Viewed 367 times
.
.
Proposal of icon for Structured point cloud command http://www.freecadweb.org/wiki/Points%20Structure
inkscape_4ppvWQ35At.png
inkscape_4ppvWQ35At.png (12.77 KiB) Viewed 367 times
.
.
Proposal of icon for Merge point clouds command http://www.freecadweb.org/wiki/Points%20Merge
inkscape_9NHJr6bk8b.png
inkscape_9NHJr6bk8b.png (13.15 KiB) Viewed 367 times
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project
User avatar
Kunda1
Posts: 9209
Joined: Thu Jan 05, 2017 9:03 pm

Re: Missing Icons for Points Workbench

Postby Kunda1 » Sun Nov 22, 2020 1:11 pm

Nice work! They all look great to me.
Alone you go faster. Together we go farther
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bitacovir
Posts: 1260
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Missing Icons for Points Workbench

Postby bitacovir » Sun Nov 22, 2020 7:06 pm

Kunda1 wrote:
Sun Nov 22, 2020 1:11 pm
Nice work! They all look great to me.
Good. I'll do a PR next week.
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project
User avatar
HakanSeven12
Posts: 1065
Joined: Wed Feb 06, 2019 10:30 pm

Re: Missing Icons for Points Workbench

Postby HakanSeven12 » Sun Nov 22, 2020 8:50 pm

Hi nice work but if I remember correctly, this commands not added to toolbar. They could be added to a new toolbar.
User avatar
bitacovir
Posts: 1260
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Missing Icons for Points Workbench

Postby bitacovir » Sun Nov 22, 2020 9:57 pm

HakanSeven12 wrote:
Sun Nov 22, 2020 8:50 pm
Hi nice work but if I remember correctly, this commands not added to toolbar. They could be added to a new toolbar.
I don't know how to do that. Only I know how to link the command with the svg icon in the menus.
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project
User avatar
HakanSeven12
Posts: 1065
Joined: Wed Feb 06, 2019 10:30 pm

Re: Missing Icons for Points Workbench

Postby HakanSeven12 » Mon Nov 23, 2020 5:09 am

Me too I don't have any experience on c++ workbenches.
User avatar
Kunda1
Posts: 9209
Joined: Thu Jan 05, 2017 9:03 pm

Re: Missing Icons for Points Workbench

Postby Kunda1 » Mon Nov 23, 2020 1:09 pm

I don't have experience either but if we extrapolate from previous commits we can see that:
  • each c++ workbench has a src/Mod/Points/<Workbenchname>/Gui/ directory
  • SVG Icons are put in Gui/Resources/Icons
  • Icon names are also registered in the src/Mod/<WBname>Gui/Resources/<WBname>.qrc
  • Each command function has a sPixmap variable that needs to match the name of the svg icon in the Icons/ directory
  • The commands are then registered in src/Mod/<WBname>/Gui/Workbench.cpp in order to display then in the GUI.
    Note: We can see from src/Mod/<WBname>/Gui/Workbench.h that there are functions to add commands and their icons to

    Code: Select all

      Gui::ToolBarItem* setupToolBars() const;
      Gui::ToolBarItem* setupCommandBars() const;
      Gui::MenuItem* setupMenuBar() const;
    
    This probably means we can choose to add the commands to different parts of the GUI. ToolBar, the CommandBar(not sure what this means) and MenuBar(Drop down menu associated with the WBname)
    In more complex workbenches that have elaborate toolbars (like sketcher) it's possible to create multiple toolbars. Looks like they need to be registered in Workbench.h and then built in Workbench.cpp

    Source: https://github.com/FreeCAD/FreeCAD/comm ... 3cc94d9bfb
Alone you go faster. Together we go farther
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features