Commit Graph

104 Commits

Author SHA1 Message Date
Ladislav Michl
0ee3c9f8e6 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
e661774a29 [Gui] Center expression icon 2024-11-11 18:32:34 +01:00
Frank Martinez
6afc6c7757 Change fixed selection colors to style based palette. Issue #16454 2024-09-20 08:10:21 -05:00
Frank Martinez
075d30c12c Issue 16454 workaround: PropertyEditor selection colors 2024-09-20 08:10:21 -05:00
Chris Hennes
e52ef2a525 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
da7ee06d67 fix: c++20 deprecate [=] 2024-03-31 10:47:32 +02:00
wmayer
552b1f48b1 Gui: fix some important linting warnings:
* cppcoreguidelines-explicit-virtual-functions
* google-explicit-constructor
2023-10-12 11:48:16 +02:00
Zheng, Lei
bf9584a90b Gui: add support for transparent overlay docking widget 2023-10-11 09:58:53 +02:00
wmayer
89bb28239e MSVC: fix several compiler warnings 2023-09-12 22:57:26 +02:00
wmayer
5a153e50ff Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
c016f1c1fb Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
54bb9c9c62 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
Chris Hennes
ec8fe448dc Gui: Don't show raw exception to user 2023-05-24 20:57:43 +02:00
xtemp09
1e162671a2 Setting initial color of QColorDialog
This commit fixes issue #7322
2023-04-16 13:56:19 +07:00
wmayer
0d23594107 Core: add functions setPackedARGB and fromPackedRGBA 2023-02-26 10:11:53 +01:00
wmayer
2e5cb03261 Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
wmayer
103de43a4e 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
ed995b5a15 [Gui] modernize some connect() settings
- addresses #6166
2023-01-12 15:13:16 +01:00
Zheng, Lei
26e38309c8 Gui: fix transparency saving in PrefColorButton 2022-12-03 17:08:17 -06:00
wmayer
21f47cf2ec 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
b48458673c Gu: fix readonly AccelLineEdit 2022-11-10 23:20:18 +01:00
Zheng, Lei
af920dd625 Gui: fix shortcut editor 2022-11-10 23:20:18 +01:00
wmayer
af0a014cf2 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
4c6e123c00 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
c5a7654285 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
bf81c8035f Gui: fix regression of 2ef4b7a06 2022-09-25 10:36:08 +02:00
Uwe
2ef4b7a06b [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
75acacd1b7 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
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
wmayer
6ee2c7f865 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
3018985f80 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
d5921e08ec 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
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
a999a249e3 Qt: remove some more leftovers of Qt4 2022-03-19 23:27:28 +01:00
Uwe
8e6e3f47ff [Gui] Widgets and Window: remove unused includes 2022-02-21 00:39:24 +01:00
Uwe
dd5a681fd8 [Gui] remove unused headers 2022-02-19 03:41:28 +01:00
0penBrain
aed8864cd9 Modernize signal/slot connection for real :) 2022-02-08 17:51:36 +01:00
wmayer
4a18442e04 Gui: [skip ci] change placeholder text of ModifierLineEdit 2022-01-24 17:23:37 +01:00
wmayer
4f8ebf8d07 Gui: harmonize AccelLineEdit and ModifierLineEdit 2022-01-24 17:07:25 +01:00
0penBrain
fc269c6273 [Macro] Use a key catcher line edit to get modifier(s) for recent macros 2022-01-24 17:00:36 +01:00
0penBrain
410d835dfc Inline documentation fix 2022-01-24 17:00:36 +01:00
wmayer
66358a8e38 Gui: in AccelLineEdit use the provided placeholder text and enable the clear button 2022-01-24 15:46:53 +01:00
Dirk Olbrich
321c8b66ed [Core] set Backspace key as shortcut 2022-01-24 15:07:54 +01:00
wmayer
513d15886d Gui: move options to use native or Qt dialogs to class DialogOptions 2021-12-30 17:31:00 +01:00
mwganson
31175b5788 [core] Add new parameter to BaseApp/Preferences/Dialog called DontUseNativeColorDialog, default to true 2021-12-30 17:07:25 +01:00
wmayer
792277a848 Gui: add button group that allows to uncheck all buttons in exclusive mode 2021-11-22 23:00:30 +01:00
wmayer
563743e7e6 Gui: do not include generated ui file inside header file 2021-11-22 16:50:21 +01:00
Chris Hennes
23622c8e08 [Gui] Refactor StatefulLabel coloring 2021-10-12 11:23:13 -05:00
Chris Hennes
6bcda71712 Merge branch 'master' into sketcherMoveColorsToPrefs 2021-10-11 12:31:08 -05:00
Chris Hennes
70ad1396ea Gui: Add option to show alpha in QColorDialog 2021-10-10 20:17:44 -05:00