Commit Graph

99 Commits

Author SHA1 Message Date
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
wmayer
34c9415929 Gui: harmonize AccelLineEdit and ModifierLineEdit 2022-01-24 17:07:25 +01:00
0penBrain
61de8577b7 [Macro] Use a key catcher line edit to get modifier(s) for recent macros 2022-01-24 17:00:36 +01:00
0penBrain
9e2883d322 Inline documentation fix 2022-01-24 17:00:36 +01:00
wmayer
43b06fe431 Gui: in AccelLineEdit use the provided placeholder text and enable the clear button 2022-01-24 15:46:53 +01:00
Dirk Olbrich
1f32cae256 [Core] set Backspace key as shortcut 2022-01-24 15:07:54 +01:00
wmayer
edd1d3e8e5 Gui: move options to use native or Qt dialogs to class DialogOptions 2021-12-30 17:31:00 +01:00
mwganson
9976b4cf84 [core] Add new parameter to BaseApp/Preferences/Dialog called DontUseNativeColorDialog, default to true 2021-12-30 17:07:25 +01:00
wmayer
b787f05d66 Gui: add button group that allows to uncheck all buttons in exclusive mode 2021-11-22 23:00:30 +01:00
wmayer
8b7dadc1ab Gui: do not include generated ui file inside header file 2021-11-22 16:50:21 +01:00
Chris Hennes
1a7b8cd379 [Gui] Refactor StatefulLabel coloring 2021-10-12 11:23:13 -05:00
Chris Hennes
3e8d84ce9b Merge branch 'master' into sketcherMoveColorsToPrefs 2021-10-11 12:31:08 -05:00
Chris Hennes
94d6a6e0f0 Gui: Add option to show alpha in QColorDialog 2021-10-10 20:17:44 -05:00
Chris Hennes
5c2aece9de [Gui] Migrate UrlLabel to use QDesktopServices
UrlLabel predates QDesktopServices' ability to ask the host OS to launch
a URL, and resorted to a Python workaround that on Windows resulted in
launchin Internet Explorer regardless of the default system browser.
2021-10-10 11:12:36 -05:00
Chris Hennes
3c463d8b78 [Gui] Add ability for stylesheet to override prefs 2021-10-06 11:43:06 -05:00
Chris Hennes
5a51cc9103 [Gui] New widget supporting per-state styles
The new StatefulLabel widget is designed to be customizable by optional
preferences entries, Qt stylesheets, and default styles, set on a
per-state basis, where "state" is a Qt property that can be changed
dynamically at runtime.
2021-10-05 23:20:29 -05:00
Chris Hennes
8f1cf9496f [Gui] Add StatefulLabel 2021-10-02 22:15:47 -05:00
wmayer
f5063af183 Gui: Change label type to ExpressionLabel in ExpressionBinding
* Add function ExpressionBinding::makeLabel() and use it in subclasses to reduce code duplication
2021-04-02 17:46:42 +02:00