Commit Graph

116 Commits

Author SHA1 Message Date
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
B0cho
05517d2ff4 Core: Fix 'Result' message text not wrapped in Expression editor 2025-09-02 00:36:16 +02:00
Max Wilfinger
1850c5dc0f Fix missed strings for UI consistency
Fix ellipsis rendering
2025-08-08 06:37:59 -05:00
Krzysztof
f5a5fb6411 Core: Fix 'Expression' and 'Vector' editor outhanging the screen (#22426)
* Core: Fix Expression dialog outhanging main window

Expression dialog is now fully shown inside main window, even if opened from model panel positioned on right side. If Model panel is outside main window, dialog is opened over this panel.

* Core: Fix Vectors dialog outhanging main window

Vectors dialog is now fully shown inside main window, even if opened from model panel positioned on right side. If Model panel is outside main window, dialog is opened over this panel.

* Core: Simplify 'adjustDialogPosition()'

Change suggested and authored by @hyarion
2025-08-07 19:22:28 +02:00
Max Wilfinger
6692dacc0a Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
wmayer
55a9123040 Gui: Make AccelLineEdit a subclass of QKeySequenceEdit
The class QKeySequenceEdit already implements the relevant
functionality and properly handles shortcuts using the Shift key.

This fixes issue 19320
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
Benjamin Bræstrup Sayoc
d2a55a0f17 Gui: fix centering in color button 2025-03-17 15:19:00 +01:00
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
Benjamin Bræstrup Sayoc
8d2d0a47f4 Gui: Use QStringLiteral 2025-02-10 18:34:57 +01: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
Ladislav Michl
e62b91ada4 Base: Drop QString-std::string conversion functions from Tools
Convenience helpers function Tools::toStdString and Tools::fromStdString
were implemented for Qt4 or older to perform utf8 aware conversion as
QString::toStdString/QString::fromStdString were using toAscii/fromAscii
internally (see https://dreamswork.github.io/qt4/classQString.html).

Since Qt5 QString uses toUtf8/fromUTf8, which makes the helper functions
obsolete (see https://doc.qt.io/qt-5/qstring.html#fromStdString).
2024-12-02 23:30:53 -05:00
Benjamin Bræstrup Sayoc
18c463bcbb [Gui] Center expression icon 2024-11-11 18:32:34 +01:00
Frank Martinez
3a6462ad54 Change fixed selection colors to style based palette. Issue #16454 2024-09-20 08:10:21 -05:00
Frank Martinez
e11ed53a31 Issue 16454 workaround: PropertyEditor selection colors 2024-09-20 08:10:21 -05:00
Chris Hennes
ea9f0c7a67 GUI: Update MacOS detection macros
For GUI-specific things use Q_OS_MACOS, and for other things use
Q_OS_APPLE.
2024-08-12 11:34:39 -04:00
ppphp
8863b9ac4c fix: c++20 deprecate [=] 2024-03-31 10:47:32 +02:00
wmayer
91aa75fb18 Gui: fix some important linting warnings:
* cppcoreguidelines-explicit-virtual-functions
* google-explicit-constructor
2023-10-12 11:48:16 +02:00
Zheng, Lei
ba6b2a4375 Gui: add support for transparent overlay docking widget 2023-10-11 09:58:53 +02:00
wmayer
d9d7bf87ae MSVC: fix several compiler warnings 2023-09-12 22:57:26 +02:00
wmayer
6beace8da6 Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
fa8978ce99 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
Chris Hennes
1ea981c34a Gui: Don't show raw exception to user 2023-05-24 20:57:43 +02:00
xtemp09
d32d699e1c Setting initial color of QColorDialog
This commit fixes issue #7322
2023-04-16 13:56:19 +07:00
wmayer
9604f94fdc Core: add functions setPackedARGB and fromPackedRGBA 2023-02-26 10:11:53 +01:00
wmayer
8d42b6f93c Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
wmayer
3f615bbe05 Gui: fix possible problems with new style connect
* In UIntSpinBox rename the signal to not overwrite the signal of the base class
* In UIntSpinBox use the (ambiguous) signal 'valueChanged' of the base class QSpinBox
* To avoid that connect() fails use the function pointer of the Qt class where the signal is defined
2023-01-12 17:02:59 +01:00
Uwe
5ad737ccdc [Gui] modernize some connect() settings
- addresses #6166
2023-01-12 15:13:16 +01:00
Zheng, Lei
5d0402321e Gui: fix transparency saving in PrefColorButton 2022-12-03 17:08:17 -06:00
wmayer
bc3c81e138 Gui: fix warnings reported by GH Actions:
* Fix trailing spaces
* Replace tabs
* Mark constructors with one argument explicit
* Fix typos
* Include FCGlobal.h to fix parsing errors
2022-11-11 09:56:43 +01:00
Zheng, Lei
057f6773b0 Gu: fix readonly AccelLineEdit 2022-11-10 23:20:18 +01:00
Zheng, Lei
bd2f9fd0e0 Gui: fix shortcut editor 2022-11-10 23:20:18 +01:00
wmayer
4b08850edb Qt6 port:
* QApplication::setFallbackSessionManagementEnabled has been removed
* QString::medRef() has been removed. Use QString::mid() again.
* QTextStream::setCodec has been removed
* Use operator QVariant of the QFont class to make code Qt5 and Qt6 compatible
* Signature of QTreeWidget::mimeData() has changed in Qt6. Remove TreeWidget::mimeData() because it doesn't change the implementation
* QLayout::setMargin() is deprecated in Qt5 and has been removed in Qt6. Use QLayout::setContentsMargins()
* QDateTime::toTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::toSecsSinceEpoch()
* QDesktopWidget is deprecated in Qt5 and has been removed in Qt6. Use QScreen
2022-11-01 16:55:40 +01:00
wmayer
42b8c7ad5a Gui: create modal color dialog on the heap if its parent widget is used in the property editor
For more details see: https://forum.freecadweb.org/viewtopic.php?f=23&t=70655
2022-10-22 21:42:21 +02:00
wmayer
e0eb6054c4 Gui: create modal dialog on the heap if its parent widget is used in the property editor
For more details see: https://forum.freecadweb.org/viewtopic.php?f=23&t=70655
2022-10-22 18:36:52 +02:00
wmayer
2f377a5782 Gui: fix regression of 9414a6572 2022-09-25 10:36:08 +02:00
Uwe
3e8330fda2 [Gui] fix some CI warnings
- narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined
- floating point literal has suffix 'f', which is not uppercase
- narrowing conversion from 'double' to 'float'
- Slots named on_foo_bar are error prone
- also tome Clang style fixes

(see here for the reports: https://github.com/FreeCAD/FreeCAD/pull/7522/commits/d9c2efcc)
2022-09-24 19:58:11 +02:00
berniev
ae53c9b0a4 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
berniev
75fa455c5d Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
wmayer
85bd6b5c6b Fix several clazy issues:
* C++11 range-loop might detach Qt container [-Wclazy-range-loop-detach]
2022-07-24 23:48:37 +02:00
andrea
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
82a6241fc5 fix (Qt) issues found by clang's clazy tool:
+ -Wclazy-incorrect-emit
+ -Wclazy-strict-iterators
+ -Wclazy-overloaded-signal
+ -Wclazy-qstring-arg
+ -Wclazy-unused-non-trivial-variable
+ -Wclazy-container-anti-pattern
+ -Wclazy-range-loop-reference
+ -Wclazy-const-signal-or-slot
+ -Wclazy-detaching-temporary
+ -Wclazy-qfileinfo-exists
2022-06-29 21:00:54 +02:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
e28f2a0c47 Qt: remove some more leftovers of Qt4 2022-03-19 23:27:28 +01:00
Uwe
aa78832048 [Gui] Widgets and Window: remove unused includes 2022-02-21 00:39:24 +01:00
Uwe
08a43f03ed [Gui] remove unused headers 2022-02-19 03:41:28 +01:00
0penBrain
73f2c1434a Modernize signal/slot connection for real :) 2022-02-08 17:51:36 +01:00
wmayer
d3a516850b Gui: [skip ci] change placeholder text of ModifierLineEdit 2022-01-24 17:23:37 +01:00