Add a Customise window: toolbars, shortcut bar, keyboard, gestures

Configuration > Personnaliser... (also at the bottom of a toolbar's
right-click menu) opens one window with a tab for each page that sets
how the user works: Barres d'outils, Contenu des barres, Barre de
raccourcis, Raccourcis and Gestes de la souris, like SolidWorks'
Tools > Customize. The tabs are the same pages the configuration
dialog shows, which keeps them. OK applies every tab, Cancel none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ispyisail
2026-10-07 19:31:42 +13:00
parent b6bbcfdd7a
commit 0fef6b19ce
9 changed files with 293 additions and 0 deletions
+32
View File
@@ -45,6 +45,8 @@
#include "ui/configpage/shortcutbarconfigpage.h"
#include "ui/configpage/toolbarsconfigpage.h"
#include "ui/configpage/toolbarcommandsconfigpage.h"
#include "ui/customizedialog.h"
#include <QTabWidget>
#include "machine_info.h"
#include "TerminalStrip/ui/terminalstripeditorwindow.h"
#include "qetversion.h"
@@ -2258,6 +2260,36 @@ void QETApp::configureQET()
#endif
}
/**
@brief QETApp::customizeQET
Open the Customise window: the toolbar, shortcut bar, keyboard and
gesture pages of the configuration dialog, as tabs of one window.
@param tab : the tab to show first
*/
void QETApp::customizeQET(int tab)
{
QWidget *parent_widget = qApp->activeWindow();
CustomizeDialog dialog;
//Same reason as the configuration dialog (#527)
dialog.setWindowModality(Qt::ApplicationModal);
dialog.addPage(new ToolbarsConfigPage());
dialog.addPage(new ToolbarCommandsConfigPage());
dialog.addPage(new ShortcutBarConfigPage());
dialog.addPage(new ShortcutsConfigPage());
dialog.addPage(new GesturesConfigPage());
if (auto *tabs = dialog.findChild<QTabWidget *>(QStringLiteral("customizeTabs"))) {
tabs->setCurrentIndex(tab);
}
QET::trackDialogGeometry(&dialog);
if (parent_widget) {
dialog.setParent(parent_widget, dialog.windowFlags());
}
dialog.exec();
dialog.setParent(nullptr, dialog.windowFlags());
}
/**
@brief QETApp::exportConfiguration
Save the settings of QElectroTech to a file the user chooses, to keep