Commit Graph

203 Commits

Author SHA1 Message Date
Ladislav Michl
6860aab7ee Gui: propertyeditor: use std::string setPropertyValue
Avoid std::string->QString->std::string where possible.
2024-11-27 17:28:16 +01:00
Ladislav Michl
a80c87c3a7 Gui: propertyeditor: add setPropertyValue with std::string argument 2024-11-27 17:28:16 +01:00
Ladislav Michl
7c2acdbf09 Gui: propertyeditor: Reformat, fix line endings
Instead of fixing whitespaces do a full reformat according to
current rules. No other changes.
2024-11-27 17:28:16 +01: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
David Carter
695fc55c6e Materials: Reset per face when using property editor
In v0.21 changin the color using the propert editor reset the per face
colors. This recreates that behavior when settin the appearance.

fixes #15170
2024-07-29 10:56:29 -05:00
wmayer
f3327475b9 Gui: move to new-style connect() in createEditor() 2024-05-14 15:58:44 +02:00
wmayer
88216148ce Fix linter warnings 2024-05-14 12:06:15 +02:00
Johannes Wüller
0e24e121eb Fix backwards-compatible Qt6 warnings 2024-05-13 11:39:24 -05:00
wmayer
68bfbd0707 Gui: simplify singleton of PropertyItemFactory 2024-04-23 10:53:24 +02:00
wmayer
1c39969061 Gui: fix linter warnings in PropertyItem.cpp 2024-04-23 10:53:24 +02:00
wmayer
cf1eeaab19 Gui: In property editor disable widget of Placement property is not part of a DocumentObject 2024-04-17 12:28:30 +02:00
wmayer
41b3be8fb6 Gui: improve PropertyMaterialListItem 2024-02-24 23:59:58 +01:00
wmayer
c633edfe8a Gui: improve PropertyMaterialItem 2024-02-24 23:59:58 +01:00
wmayer
1187ed58ed Gui: allow to set ranges for property item editors when used as sub-items 2024-02-24 23:59:58 +01:00
Florian Foinant-Willig
773c701eec Core: modernize type checking 2023-10-23 18:07:07 +02:00
wmayer
c016f1c1fb Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
5f0ec490e6 Core: modernize C++: return braced init list 2023-08-19 11:35:41 +02:00
wmayer
54bb9c9c62 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer
2725c3a54f Gui: modernize C++: use range-based for loop 2023-08-14 19:42:18 +02:00
Jolbas
b1e521743b Save all decimals when property is edited 2023-07-20 12:56:21 -05:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
0penBrain
ba25e9a82f [Core] Add possibility to set color with tuple of integers, fixes #8344 2023-02-12 18:16:59 +01:00
wmayer
9b29c3a683 Gui: replace slots with member function pointers 2023-02-03 00:21:38 +01:00
wmayer
2e5cb03261 Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
Uwe
ed995b5a15 [Gui] modernize some connect() settings
- addresses #6166
2023-01-12 15:13:16 +01:00
wmayer
81d2361d9f Gui: Qt6 port
* QString::indexOf() is now marked as [[nodiscard]]
* Replace deprecated methods of QMessageBox
* QMouseEvent::globalPos() is deprecated, use globalPosition().toPoint()
* QWidget::enterEvent() requires a QEnterEvent as argument
* QLibraryInfo::location() is deprecated, use path()
* QVariant::Type is deprecated, use QMetaType::Type
* QVariant::canConvert(int) is deprecated, use QVariant::canConvert(QMetaType) or QVariant::canConvert<T>()
* QMessageBox::standardIcon is deprecated, use QStyle::standardIcon()
* Replace deprecated method QMessageBox::question(), ...
* QApplication::fontMetrics() is deprecated
* QDropEvent::mouseButtons() is deprecated, use buttons()
* QDropEvent::keyboardModifiers() is deprecated, use modifiers()
* Constructor of QFontDatabase is deprecated, use static methods instead
* Qt::AA_DisableHighDpiScaling is deprecated
* Qt::AA_EnableHighDpiScaling is deprecated
* Qt::AA_UseHighDpiPixmaps is deprecated
2022-12-31 21:54:45 +01:00
wmayer
9e702c016b App: handle sub-components in PropertyRotation 2022-12-14 21:21:02 +01:00
wmayer
302d3f5b95 Core: allow to set file filter from PropertyFileIncluded 2022-12-07 12:58:07 +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
4e643dcec3 Gui: refactor and modernize code of Placement dialog 2022-10-27 00:28:55 +02:00
wmayer
1143275cec Gui: [skip ci] include header 2022-10-25 22:21:19 +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
fba6a718eb Gui: [skip ci] whitespace improvements 2022-10-20 21:26:53 +02:00
wmayer
841044a00a Gui: [skip ci] do not change link property when canceling dialog 2022-10-08 18:57:59 +02:00
marioalexis
0382f276a2 Gui: Replace C cast 2022-09-18 11:06:51 -05: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
a909df7f39 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
d88729d2c4 Gui: use empty 2022-08-06 16:35:45 +02:00
Uwe
3811685826 [Gui] [skip CI] PropertyItem: some .clang spacing uniformication
- automatically done by MSVC
2022-07-30 15:32:08 +02:00
wmayer
36a6f9e2fc Fix several clazy issue:
* Use multi-arg instead [-Wclazy-qstring-arg]
* Use an empty QLatin1String instead of an empty QStringLiteral [-Wclazy-empty-qstringliteral]
* getter Gui::ProgressBar::canAbort possibly mismarked as a slot [-Wclazy-const-signal-or-slot]
* Missing emit keyword on signal call [-Wclazy-incorrect-emit]
2022-07-24 20:07:04 +02:00
Uwe
1d95c26e2e [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +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
7db925d991 App: fix memory leaks in Enumeration class and simplify code 2022-06-25 18:18:57 +02:00
Zheng, Lei
85d3abeb8b Gui: put private class to anonymous namespace 2022-04-04 04:53:52 +02:00
Zheng, Lei
03976ff333 Code change according to suggestion 2022-04-04 04:53:52 +02:00
Zheng, Lei
801ece560e Gui: fix property enumeration editor initialization 2022-04-04 04:53:52 +02:00
Zheng, Lei
1433ff166d Gui: support auto grouping editing for PropertyEnumeration
The PropertyEnumeration editor (PropertyEnumItem) will check for
separator characeter '|' in enumeration items to auto create
hierarchical groups of items using sub-menus for user to select.
2022-04-04 04:53:52 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
2dc78804b6 Core: Fix several coverity issues:
* CID 350582: Big parameter passed by value
* CID 350639: Big parameter passed by value
* CID 305234: Uncaught exception
* CID 316529: Uncaught exception
* CID 350597: Uncaught exception
* CID 350623: Uncaught exception
* CID 332690: Uncaught exception
* CID 332700: Unchecked return value
* CID 350576: Uninitialized scalar field
* CID 350587: Uninitialized scalar variable
* CID 192606: Uninitialized scalar field
* CID 332699: Uninitialized pointer field
* CID 350561: Dereference null return value
* CID 350610: Dereference null return value
* CID 350567: Dereference after null check
2022-03-13 13:53:32 +01:00