Commit Graph

252 Commits

Author SHA1 Message Date
Benjamin Bræstrup Sayoc
ed4a630a43 Gui: use QStringLiteral 2 2025-02-16 19:52:30 +01:00
Benjamin Bræstrup Sayoc
f647d4a1eb Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Chris Hennes
0f7b758b1e Gui: Migrate to using App::Application::getNameWithVersion 2025-02-03 12:05:16 -05:00
Syres916
34d9ac0050 [Gui] Fix Close without Saving button size (#19342) 2025-02-02 23:24:27 +01:00
dzid26
2eca0a0367 Gui: show tooltips when window is not focused 2025-01-27 17:43:57 +01:00
tritao
8aa50c4380 Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06:00
Tobias Frost
7a5a3d1ffc spelling fixes (#18688)
* Fixes spelling of "Allow to" to "Allow one to"

and those variants:
Allows to -> Allows one to
allow to -> allow one to
allows to -> allows one to

* Fix "Let's -> Lets"

(and lower case variant.)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update src/3rdParty/salomesmesh/inc/MED_Wrapper.hxx

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Base/PyObjectBase.cpp
Update src/App/ExtensionContainer.h
Update src/App/PropertyContainer.h

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Use gerund in user-facing texts.

* Use gerund for two more user-facing strings.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Tobias Frost <tobi@debian.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-01-13 11:22:20 -06:00
mosfet80
9f0e9a2af4 Clean MainWindow.cpp
Removed unused code
2024-11-30 14:13:46 +01:00
Jiří Pinkava
800a5cffbb Gui: remove unused MDITabbar and MainWindowTabBar classes 2024-11-29 21:20:57 +01:00
Ladislav Michl
0a9e1bc9e8 Gui: refactor Splashscreen
Move About dialog class to the separate source file.
2024-11-12 07:59:44 +01:00
Ladislav Michl
cff4245a85 Gui: refactor hiddenMainWindow usage 2024-11-12 07:53:38 +01:00
Benjamin Nauck
4eb7d5d09c Add "Safe mode" which temporarily disables configs and addons (#16858)
* Add safe-mode which starts freecad in a clean environment

* Integrate safe-mode

* Show "(Safe Mode)" in main window title

* Show safe mode info when safe mode is started

* Created Safe Mode Icon

* Use new icon

* Add PreCompiled.h

* Add exports for windows

---------

Co-authored-by: Gabriel <gaz082@gmail.com>
2024-10-21 18:08:52 +02:00
wmayer
0b13ed3722 Core: Use ModuleIO in MainWindow::loadUrls 2024-10-15 14:06:36 +02:00
Jiří Pinkava
cdb1a4f8ef Gui: Workaround for crash on close of MDI window
The Qt6 (up to Qt 6.7.3 now) contains bug, which can lead, under
specific circumstances, to crash of the application, when the
MDI window is closed. The circumstances are:

* at least 2 MDI windows needs to be open
* stylesheet muset set different size (border, margin) for activated and un-activated tabBar tab
* the closed window must be inactive, but created before the window now active and open
* race condition must occur betwee the closing and resize event handlers for the tabBar
  (see qt bug for details)

So this bug only occures with Qt6 with the Dark or Light styles selected (no classic) and only if
specific sequence of steps is followed during opening and closing the MDI windows.

The bug is in Qt code path executed when QMdiArea::ActivationHistoryOrder is set.

The other possible workaround might be to change all the affected stylesheets, but this seems to me
impractical and also fragile, because the affected code path will be still active.

https://bugreports.qt.io/browse/QTBUG-129596
2024-10-14 10:32:53 -05:00
Frank Martinez
7220a77742 Revert 9b409da due to a regression in some platforms 2024-09-30 18:06:50 +02:00
Syres916
6e2cd4e733 [Gui] Qt6 OpenGLWidget - move black rectangle off screen (#16863) 2024-09-27 22:50:59 -04:00
Frank Martinez
9b409da59c Splash Screen minimal show time. Issue #16264 2024-09-23 16:06:59 -05:00
Adrián Insaurralde Avalos
a4f742a2f7 GUI: Fix splashscreen for single image (#16428)
* fix splashscreen for single image
* improve clarity of splashscreen load order logic
* fix splashscreen with no _2x variant
2024-09-12 21:49:35 -05:00
Chris Hennes
db2aa8ae93 Merge pull request #16451 from wwmayer/fix_qt6_warnings
Fix Qt6 warnings
2024-09-12 21:22:37 -05:00
Kacper Donat
781c9b6b84 Gui: Force OpenGL rendering for main window
This is big hack for Qt6 to force rendering using OpenGL from the
beginning. Since Qt6 OpenGL context is initialized only after creating
first QOpenGLWidget which results in window hiding and showing again
after some delay. This causes various timing issus as the window is not
supposed to do that.
2024-09-12 13:27:44 +02:00
wmayer
8f1a533045 MSVC: Fix several compiler warnings 2024-09-12 11:58:36 +02:00
wmayer
fe69762652 Qt6: QColor::setNamedColor is deprecated since Qt 6.6 2024-09-11 15:41:04 +02:00
qewer33
9beff61b72 Gui: Make splashscreen use multiple splash images 2024-09-02 12:44:36 -04:00
qewer33
5850c2e04b Gui: Disable splashscreen messages by default 2024-09-02 12:44:36 -04:00
bgbsww
441fbdd064 Add a command line option to keep application open after running tests 2024-08-05 10:47:59 -05:00
Chris Hennes
336a581942 Merge pull request #15451 from Ondsel-Development/fix-single-instance-windows
Core: Fix single instance windows
2024-07-29 10:42:47 -05:00
wmayer
8de6e5e8a8 Qt6: Fix MinGW build 2024-07-25 20:09:06 +02:00
Pieter Hijma
7b98eac9a0 Core: Improve communication single-instance 2024-07-22 17:39:32 +02:00
Zheng, Lei
dcfe3e8868 Gui: Add dragging support for custom ToolBarAreas
This adds dragging support for toolbars placed in custom toolbar areas.
It is achived by creating our own custom ToolBar class that handles
logic of providing custom gripper. This is required because Qt hides
gripper when toolbar is not direct child of the main window which cannot
be overriden. Custom class should allow us to create more capable
toolbars in the future so it should be great addition on its own.

Co-Authored-By: Kacper Donat <kacper@kadet.net>
2024-06-25 11:39:51 +02:00
Chris Hennes
d01ce32a1f Update for LibPack3 (#10337)
* cMake: Add base support for LibPack3

Minor changes to FreeCAD source code to support compiling with Qt 6.5 on MSVC,
and changes to cMake setup to support the new Libpack.

* NETGENPlugin: Fix compilation with MSVC and OCCT 7.8

* Material: Switch to Wrapped_ParseTupleAndKeywords for /fpermissive- on MSVC

* Base: Prevent accidental definition of MIN and MAX by MSVC

* cMake: Prevent accidentally finding an old LibPack

* Material: Wrap another ParseTuple call

* OCCT: Modify includes for 7.8.x

* Part: Change TNP code to use Wrapped_ParseTupleAndArgs

* Spreadsheet: Workaround for MSVC macro pollution

* Mesh: Workaround for MSVC macro pollution

* Base: Remove extra MSVC flag (moved to CMake)

* Tests: Fix compiling with /permissive-

* FEM: Fix Qt warnings about duplicate element names

* cMake: Ensure major version numbers are set

* Address review comments.

* cMake: Further tweaks for LibPack3

* cMake: Modify specification of compiler flags for MSVC

* Main: Remove QtQuick testing code

* cmake: Find Boost before SMESH (which uses it)

* Fixes for LibPack2

* cMake: Another try at importinhg VTK cleanly
2024-06-24 18:25:05 +02:00
wmayer
2ad397e18e Core: Remove superfluous + operator 2024-06-16 07:53:50 +02:00
wmayer
6f76ccfb83 Gui: Restore previous width when closing task dialog
This fixes #11016
2024-05-20 11:35:59 -05:00
PaddleStroke
e5780a5e3d Core / Measure: Introduce QuickMeasure 2024-05-06 18:12:14 +02:00
wmayer
9cfd437214 Gui: simplify MainWindow::showDocumentation()
The Help module is now part of FreeCAD. So, there is no need any more to run the addon manager
2024-05-06 18:04:13 +02:00
Zheng Lei
c24ace7f73 Gui: support toolbar drag and drop to status bar and menu bar (#13571)
* Gui: support toolbar drag and drop to status bar and menu bar

Closes FreeCAD/FreeCAD#12979

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Gui: improve toolbar handling in status and menu bar

* Gui: fix workbench tab bar orientation in status or menu bar

* Gui: remove workbench toolbar position settings

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-06 17:59:16 +02:00
dzid26
c6493f2ef8 Core: Bring ConfirmSave dialog to the top (#13352) 2024-04-18 22:56:28 -05:00
wmayer
1cfad41422 Gui: clear the title bar after closing the last MDI window 2024-03-22 16:08:44 +01:00
wmayer
f5baef888c Gui: fix several regressions caused by PR #12035
* fix hard crash in MainWindow::_updateActions() if no MDI view exists
* in MDIView::buildWindowTitle() use the label of the document because this changes when saving it while the name is immutable
* fix const correctness in MDIView::buildWindowTitle()
* do not set the modified flag of the main window in MDIView::buildWindowTitle() but in the calling instance
* move setting the main window title to Application::viewActivated to reduce code duplication
* fix missing application name if FreeCADGui is loaded as Python module
2024-03-18 23:27:51 +01:00
Max Wilfinger
241ce40b5f use setWindowModified() to indicate modified state and window title 2024-03-18 17:36:20 +01:00
Max Wilfinger
b4ad517ed6 display current active document in main window title 2024-03-18 17:36:20 +01:00
André Caldas
560898907b 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
bgbsww
a1c08dbf43 Move the unit schema into Project Information and remove all Project Unit System code (#11266)
* Add unit system to Project Information and store with document.

* Remove the project unit system

* Restore correct document activation signalling to fix test fail

* Remove commented out dead lines

* Restore ignore option for project unit schemas

* Whitespace fix

* Refresh after changing units

* Remove field label

* Property editor changes applied to unit system
2023-12-04 13:04:53 -06:00
Kacper Donat
2914938c72 Gui: Add ability to easily lock Toolbars from UI
This adds the Std_ToggleToolBarLock action mentioned in #4992. It is
exposed in the context menu of toolbar and also in the view -> toolbars
app menu.
2023-12-01 12:13:43 +01:00
Chris Hennes
fa65438556 Core: Enable compiling with MSVC /permissive- (#11014)
* Base: Fixes for MSVC permissive-

* App: Fixes for MSVC permissive-

* Gui: Fixes for MSVC permissive-

* Main: Fixes for MSVC permissive-

* Fem: Fixes for MSVC permissive-

* Material: Fixes for MSVC permissive-

* Part: Fixes for MSVC permissive-

* Mesh: Fixes for MSVC permissive-

* Points: Fixes for MSVC permissive-

* Robot: Fixes for MSVC permissive-

* TechDraw: Fixes for MSVC permissive-

* Path: Fixes for MSVC permissive-

* Core; Changes per review comments

* TD: Revision from wandererfan

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-27 17:37:29 +01:00
wmayer
33f08ef2fe Gui: restore old behaviour to set up main window 2023-11-13 13:55:44 -03:00
wmayer
a20a053b60 Gui: only use primary screen to restore main windows settings 2023-11-13 13:55:44 -03:00
Paddle
889c8c49f1 SplashScreen : Add "ShowSplasherMessages" parameter to disable labels from the splashscreen. 2023-11-04 21:58:00 +01:00
wmayer
19fcb32ff0 Gui: make tab position of combo view configurable and set it back to North by default 2023-10-13 16:17:25 +02:00
wmayer
46f8ad3d7f Gui: refactor MainWindow::initDockWindows
* split MainWindow::initDockWindows into smaller functions
* remove of legacy group for Tree view, Property view and DAG view
* simplify code logic
2023-10-13 16:17:25 +02:00
wmayer
27dd573101 Gui: remove trailing whitespaces (thanks luzpaz) 2023-10-12 00:58:44 +02:00