Merge remote-tracking branch 'upstream/master' into wiring-manager

Conflicts resolved in 24 files. Notable decisions:

- ico/icon-themes.qrc: upstream's icon folder restructure kept; the 36
  cable icon entries re-added under the new qet/qet-dark path scheme
  (XML valid, every referenced file exists).
- Toolbar system: upstream's DiagramToolbarSettings now owns the
  toolbar filling. The cable tool is registered as
  diagrameditor.add_cable (generic group loop) and listed on the
  "diagram" toolbar right after the auto-break conductor action,
  separated by a divider, exactly like before the merge.
- Paste: the cable lines of a copy are handed to
  PasteNumberingImport::push() as extra commands, so paste + cable
  lines + the numbering question stay ONE undo step on both paste
  paths (DiagramView::paste and DiagramEventAddPaste::commit).
- PDF links: upstream's deterministic link sorting kept together with
  the cable cross-reference injector (injectLinkTo -> links list).
- Element renumbering: upstream's ElementAutoNumSchemeCommand::renumber
  replaces the old formula-based body of
  QETProject::renumberElementsBySchemeTitle; the cable numbering rule
  API (cableAutoNum, axis priority, rule name) is kept in full.
- Auto-numbering pages: upstream's scheme management kept, the Câbles
  tab added as index 4 (changeToCableTab), both entry points
  changeToCable() and changeToElement() kept side by side.
- SelectAutonumW: dirty tracking and the contextEdited signal moved
  into upstream's insertPartRow() row API, so single-rule mode, the
  rule-removable button and "confirm without change leaves the project
  alone" keep working.
- xrefpropertieswidget: upstream's offset clamping kept; the cable
  branch (Texte field, Police button, hidden display options) kept;
  the stack-overlapping checkbox is hidden for cables.

Verified after the merge: build green (515/515, no errors), ctest
85/86 (only the pre-existing headless tst_menubarkeyboard failure),
offscreen smoke exit 124.
This commit is contained in:
Kellermorph
2026-10-09 14:09:08 +02:00
1767 changed files with 194544 additions and 72846 deletions
+84 -32
View File
@@ -41,7 +41,12 @@
#include "ui/aboutqetdialog.h"
#include "ui/configpage/generalconfigurationpage.h"
#include "ui/configpage/shortcutsconfigpage.h"
#include "ui/configpage/gesturesconfigpage.h"
#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"
@@ -658,6 +663,15 @@ QString QETApp::commonElementsDir()
{
m_common_element_dir_is_set = true;
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
//A folder given on the command line, for this run, comes
//before the one saved in the settings.
if (m_overrided_common_elements_dir != QString()) {
m_common_element_dir = m_overrided_common_elements_dir;
return(m_common_element_dir);
}
#endif
//Check if user define a custom path
//for the common collection
QSettings settings;
@@ -674,12 +688,6 @@ QString QETApp::commonElementsDir()
}
}
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
if (m_overrided_common_elements_dir != QString()) {
m_common_element_dir = m_overrided_common_elements_dir;
return(m_common_element_dir);
}
#endif
#ifndef QET_COMMON_COLLECTION_PATH
/* in the absence of a compilation option,
* we use the elements folder, located next to the executable binary
@@ -2313,6 +2321,9 @@ void QETApp::configureQET()
cd.addPage(new PrintConfigPage());
cd.addPage(new ShortcutsConfigPage());
cd.addPage(new ShortcutBarConfigPage());
cd.addPage(new GesturesConfigPage());
cd.addPage(new ToolbarsConfigPage());
cd.addPage(new ToolbarCommandsConfigPage());
#ifdef QET_SPACEMOUSE_SUPPORT
cd.addPage(new SpaceMouseConfigPage());
#endif
@@ -2340,6 +2351,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
@@ -2480,6 +2521,42 @@ QList<QWidget *> QETApp::floatingToolbarsAndDocksForMainWindow(
}
/**
@brief QETApp::applyDirectoryArguments
Apply the folder options (--common-elements-dir=, --common-tbt-dir=,
--config-dir=, --data-dir=, --lang-dir=) of @p arguments. Static, so
the headless export and --run in main() can apply them too: they
return before a QETApp exists.
*/
void QETApp::applyDirectoryArguments(const QETArguments &arguments)
{
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
if (arguments.commonElementsDirSpecified()) {
overrideCommonElementsDir(arguments.commonElementsDir());
}
#endif
#ifdef QET_ALLOW_OVERRIDE_CTBTD_OPTION
if (arguments.commonTitleBlockTemplatesDirSpecified()) {
overrideCommonTitleBlockTemplatesDir(
arguments.commonTitleBlockTemplatesDir());
}
#endif
#ifdef QET_ALLOW_OVERRIDE_CD_OPTION
if (arguments.configDirSpecified()) {
overrideConfigDir(arguments.configDir());
}
#endif
#ifdef QET_ALLOW_OVERRIDE_DD_OPTION
if (arguments.dataDirSpecified()) {
overrideDataDir(arguments.dataDir());
}
#endif
if (arguments.langDirSpecified()) {
overrideLangDir(arguments.langDir());
}
}
/**
@brief QETApp::parseArguments
Parse the following arguments:
@@ -2521,32 +2598,7 @@ void QETApp::parseArguments()
// analyze the arguments
// analyse les arguments
qet_arguments_ = QETArguments(arguments_list);
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
if (qet_arguments_.commonElementsDirSpecified()) {
overrideCommonElementsDir(qet_arguments_.commonElementsDir());
}
#endif
#ifdef QET_ALLOW_OVERRIDE_CTBTD_OPTION
if (qet_arguments_.commonTitleBlockTemplatesDirSpecified()) {
overrideCommonTitleBlockTemplatesDir(
qet_arguments_.commonTitleBlockTemplatesDir());
}
#endif
#ifdef QET_ALLOW_OVERRIDE_CD_OPTION
if (qet_arguments_.configDirSpecified()) {
overrideConfigDir(qet_arguments_.configDir());
}
#endif
#ifdef QET_ALLOW_OVERRIDE_DD_OPTION
if (qet_arguments_.dataDirSpecified()) {
overrideDataDir(qet_arguments_.dataDir());
}
#endif
if (qet_arguments_.langDirSpecified()) {
overrideLangDir(qet_arguments_.langDir());
}
applyDirectoryArguments(qet_arguments_);
if (qet_arguments_.printLicenseRequested()) {
printLicense();