Commit Graph

165 Commits

Author SHA1 Message Date
Chris Hennes
78208bb227 Gui: Ensure Quit menu item is QAction::QuitRole 2025-11-10 17:52:31 +01:00
Florian Foinant-Willig
b75b1508d4 Core: fix Std_Placement for multiple objects 2025-10-13 22:54:31 +02:00
Markus Reitböck
a72a0d6405 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
tetektoza
4b11789f02 Sketcher: Introduce Select All (Ctrl + A) (#23289)
* Sketcher: Introduce Select All (Ctrl + A)

As the title says, this allows selecting all geometries on the sketch
with CTRL + A shortcut, plus also allows to select "Select All" option
from Edit menu.

* Sketcher: Use fmt instead of std::stringstream in selectAll

* Sketcher: Fix typo in selectAll

Co-authored-by: João Matos <joao@tritao.eu>

---------

Co-authored-by: João Matos <joao@tritao.eu>
2025-08-29 16:52:43 +02:00
Max Wilfinger
03c7b2c36a Gui: Fix crash with navlib
Co-authored-by: @hyarion
2025-08-07 12:11:14 +02:00
Max Wilfinger
6692dacc0a Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
theo-vt
b8e8b57411 Core: Remember export information on a per document basis (#22067)
* Use a new struct ExportInfo to hold export information on a per document basis
2025-07-16 02:43:57 +00:00
wmayer
2a7498c930 Helper function to get preferred delete key depending on platform 2025-06-09 18:10:52 +02:00
wmayer
c21b330a98 Gui: Fix command StdCmdProperties
The command is only able to show the property view in case it's
invisible. But it fails to raise the widget. And if in the preferences
'Combined' mode is set it fails completely.

Solution:
The method DockWindowManager::activate already does everything what's
needed. Now the command only must be changed to access the right
docked widget.
2025-05-30 18:04:33 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Kacper Donat
ef357aa07a Gui: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Chris Hennes
9a77120e82 Merge pull request #20142 from bofdahof/ranges
Apply C++20 std::ranges (mainly to std::find)
2025-03-17 03:08:27 -05:00
Chris Hennes
e0aa5f3c30 Merge pull request #19917 from tritao/refactor-document-recompute
Core: Refactor code around document and feature recompute
2025-03-16 23:59:12 -05:00
bofdahof
cb5caf6765 Gui: apply std::ranges 2025-03-16 17:15:14 -05:00
Syres916
7f3632ba8e [Gui] Trigger the same checks for Drag & Drop files as File > Open 2025-03-04 20:45:15 -06:00
Joao Matos
16c035bc38 Gui: Refactor StdCmdRefresh::activated. 2025-03-03 21:22:22 +00:00
Benjamin Bræstrup Sayoc
8d2d0a47f4 Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
xtemp09
6fa5ec9843 Assembly: Fix the crash described in #18475 2025-02-07 17:39:03 -06:00
tritao
02ab2deac7 Gui: Reorganize the navigation files into a top Navigation folder. 2025-02-05 20:21:00 -06:00
Benjamin Nauck
6f535f19fb Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
tritao
4c93a14fea Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06:00
Boots
e87459904e File export: generate a default filename if the selected object chang… (#18907)
* File export: generate a default filename if the selected object changed since the last export

* Renamed variable to be more clear as per PR review feedback
2025-01-14 16:20:09 -06:00
Benjamin Nauck
74f3aee9a7 Add template based SelectionSingleton::countObjectsOfType
Also convert code to use this new method
2025-01-13 18:55:15 +01:00
wmayer
19d4fd6753 Gui: Remove migration warning 2025-01-02 13:34:26 +01:00
wmayer
0d4e7ac27f Core: Move LCS migration warning to Std_Open command 2024-12-16 11:34:39 -05:00
Snow Faerie
8ac3800666 Fix and add menu accelerators (#15532)
* Fix and add menu accelerators: menus common to all workbenches

I use menu accelerators fairly often, so I find it very frustrating when
they are missing, or worse, they don't work due to the same letter being
assigned to several commands.

This patch adds accelerators to lots of menu entries missing them and
fixes broken accelerators.

Wherever possible, standard accelerator keys are used:
https://doc.qt.io/qt-5/accelerators.html

This commit covers accelerator fixes that are common to all workbenches.
Accelerator fixes for specific workbenches will be done in separate
commits.

* Add missing accelerators: Spreadsheet workbench
2024-12-13 10:39:30 -06:00
Florian Foinant-Willig
326a439d5b [Core] Fix for frozen status
A frozen object prevents the document to be saved
The frozen status propagates into object inheritance
A frozen sketch is no more editable
Transform and Placement can't be changed for a frozen object
The freeze icon is reduced
2024-12-06 11:56:48 -05:00
Max Wilfinger
665bee5e5a Merge pull request #15957 from hasecilu/fix/capitalization
TechDraw: Fix capitalization of 2D and 3D
2024-11-15 18:37:47 +01:00
Snow Faerie
1ff4b2020b Add Ctrl+{B,I,U} to Spreadsheet; remap File/Import
Adds hotkeys for Bold, Italic and Underline in Spreadsheet.

Ctrl+I was taken by File/Import... This patch remaps that to Ctrl+Shift+I.
2024-11-15 11:57:18 -05:00
Michael Fuchs
a94ae50d27 Switch back to default filename for exports after the active document changes. Fixes #16839 2024-10-21 18:10:42 +02:00
Benjamin Nauck
01bedeaa6f Use backspace as default to delete on mac
Only full size mac keyboards has a specific delete key, most doesn't.
2024-09-21 10:37:30 -05:00
hasecilu
2e7a04f4e2 Fix some typos on several files
- Missing spaces
- Missing commas
- 3D, G-code, Git, SPOOLES, Python capitalization
2024-09-14 12:07:51 -06:00
wmayer
6f245c0103 Core: Change placement dialog to operate on passed selection objects 2024-09-05 17:43:09 +02:00
Paddle
2a3284808f Assembly: Replace Tangent+Parallel+Planar by 'Distance'. 2024-02-13 08:25:45 +01:00
Paddle
21905c0d62 Core: add property command, that shows property view. 2024-01-19 10:26:00 +01:00
André Caldas
89dbab9b0e Avoids using getNameInDocument() to test if DocumentObject is attached to a Document.
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.

The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).

Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".

The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
2023-12-11 17:37:58 +01:00
luzpaz
5c21351608 Fix various typos 2023-11-30 14:58:06 +01:00
Max Wilfinger
2fb91c5a93 Fixes "Project Information" is Misleading #11296 - replace project with document (#11367)
* project to document on information, merge, util

* change project to document in unit system dialog

---------

Co-authored-by: WandererFan <WandererFan@gmail.com>
2023-11-20 10:03:22 -07:00
Florian Foinant-Willig
741296b82e Core: modernize type checking 2023-10-23 18:07:07 +02:00
wmayer
f17790eb24 Gui: fixes issue #9422: Dependency Graph: export to .dot/.gv 2023-09-07 08:40:05 +02:00
wmayer
6beace8da6 Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
Chris Hennes
847ae47497 Gui: Adjust tooltips for improved translation
Tooltips should not be identical to the command menu entry, it prevents translators from translating them separately.
2023-04-29 13:03:02 -05:00
Chris Hennes
ee47e614e1 Gui: Fix translation of Export error dialog 2023-04-16 21:27:28 -05:00
wmayer
8d42b6f93c Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
Abdullah Tahiri
4ac0702bb3 Gui: Set status bit when restoring is initiated by the user from the UI 2022-12-21 16:01:23 +01:00
wmayer
6118dfd7bd Qt: replace deprecated methods of QMessageBox 2022-11-03 09:54:00 +01:00
wmayer
b0633f455b Gui: bind spin boxes of Placement dialog when opening it via menu 2022-10-27 19:30:24 +02:00
wmayer
1f7618cafa Gui: [skip ci] include header 2022-10-25 22:21:19 +02:00
Kuzemko Alexsandr
2eb55d48c7 [App] Fix of untranslated first document's name (#7156)
* Change no need function newDocument("Unnamed") call to variant without parameter. "Unnamed" set in App newDocument function instead.
* Refactor New Document command to run without parameter.
* Translate new document's userName. Internal name = "Unnamed".
* Crowdin Add to updatets.py App.ts. Create new file App.ts
* Fix error where document name is set with one function parameter. In this situation set internal and user name to string variable. For default function call (without parameter) set internal name to Unnamed, userName = translate ("Unnamed")
2022-10-20 21:35:09 -05:00