Hello,
Is it possible to customize the default GUI of QCAD with a plugin?
I want to:
- hide menu entries
- hide buttons / buttonbars / widgets
Result should be a customized default gui of qcad.
Best regards
Moppi
Customize Gui with Plugin
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Re: Customize Gui with Plugin
Yes, you can do that from either a plugin or a simple script.
Example script to hide the tool Draw > Line > Freehand Line:
File: scripts/Misc/MyCustomUI/MyCustomUI.js
Example script to hide the tool Draw > Line > Freehand Line:
File: scripts/Misc/MyCustomUI/MyCustomUI.js
Code: Select all
function MyCustomUI() {
}
MyCustomUI.init = function() {
// hide the tool Draw > Line > Freehand Line
// hide tool from menu:
RSettings.setValue("LineFreehand/VisibleInMenu", false);
// hide tool from line tool bar:
RSettings.setValue("LineFreehand/VisibleInToolBar", false);
// hide tool from CAD tool bar at the left:
RSettings.setValue("LineFreehand/VisibleInCadToolBar", false);
// hide tool from tool matrix (View > Toolbars and Widgets > Widgets > Tool Matrix):
RSettings.setValue("LineFreehand/VisibleInMatrixPanel", false);
};
Re: Customize Gui with Plugin
Hello,
thank you very much.
Is there any overview to take a look what you can change with "setValue"?
I used scripts-directory to take a look, but maybe there is a list for it.
Is it possible to change application name too?
Best regards
moppi
thank you very much.
Is there any overview to take a look what you can change with "setValue"?
I used scripts-directory to take a look, but maybe there is a list for it.
Is it possible to change application name too?
Best regards
moppi
-
- Premier Member
- Posts: 473
- Joined: Mon Sep 30, 2019 6:21 am
- Location: Melbourne - Australia
Re: Customize Gui with Plugin
Hi Andrew
Love the ability to be able to switch off tools I may never use or rarely use, so I'm going to
just switch off the toolbar items and leave the menu in case I need to use at some time..
I have these 2 lines that now switch off the Clip Rectangle & Edit Text but I'd like to know if
there is a list somewhere with these values as I pretty much guessed the clip rectangle one
by trying ClipRectangle then ClipRect then ClipToRectangle... is there any documentation
available for these settings on toolbars? these work for me below, added to your JS file MyCustomUI.
// hide tool Edit Text From Toolbar
RSettings.setValue("EditText/VisibleInToolBar", false);
// hide tool Clip Rectangle From Toolbar
RSettings.setValue("ClipToRectangle/VisibleInToolBar", false);
};
Cheers
John
Love the ability to be able to switch off tools I may never use or rarely use, so I'm going to
just switch off the toolbar items and leave the menu in case I need to use at some time..
I have these 2 lines that now switch off the Clip Rectangle & Edit Text but I'd like to know if
there is a list somewhere with these values as I pretty much guessed the clip rectangle one
by trying ClipRectangle then ClipRect then ClipToRectangle... is there any documentation
available for these settings on toolbars? these work for me below, added to your JS file MyCustomUI.
// hide tool Edit Text From Toolbar
RSettings.setValue("EditText/VisibleInToolBar", false);
// hide tool Clip Rectangle From Toolbar
RSettings.setValue("ClipToRectangle/VisibleInToolBar", false);
};
Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]