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
Zheng, Lei
c5a0db5e47
Gui: fix crash on editing PropertyVectorList in property view
2022-03-10 15:31:45 +01:00
wmayer
4ae1ca58d1
App: use forward declaration to reduce compile time
2022-03-04 17:27:53 +01:00
Uwe
57fe294c3e
[Gui] PropertyEditor: remove unused includes
2022-03-03 03:59:48 +01:00
wmayer
de56e1b6d8
Gui: cleanup of PR #5516
...
* instead of breaking encapsulation of PropertyItem apply the attorney idiom
* refactoring of PropertyItemDelegate::createEditor by moving the code to PropertyItem::createPropertyEditorWidget
2022-03-01 17:19:12 +01:00
wmayer
9955c64752
Mod: add string header to dxf.h
2022-03-01 17:18:29 +01:00
Noah
d0b0756cbf
Gui: fix use of deprecated Qt::TextColorRole
...
Qt::TextColorRole (enum ItemDataRole) is deprecated as of Qt 5.13 and will be removed in Qt 6:
- https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qnamespace.h?h=v5.13.0#n1511
It's replaced with `Qt::ForegroundRole` which is available since at least Qt 5.0 (FreeCAD 0.20 will require Qt 5.9 or later).
- https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qnamespace.h?h=v5.0.0#n1374
- https://wiki.freecadweb.org/0.20_Development_Cycle
2022-02-23 17:53:33 +01:00
Zheng Lei
b42462ba14
Gui: improve PropertyEditor refresh ( #3535 )
...
* Gui: fix PropertyView 'Add property' action
* Gui: fix property view font color for linked property
* Gui: improve PropertyEditor refresh
* Gui: show real property name in property view tool tip
* Gui: improve property view tool tip
* Gui: fix auto recompute in property view
* Gui: remove duplicated PropertyModel signal of dataChanged()
* Gui: fix property view update on property change
Including changes in document properties
* Gui: fix transaction closing on property editor change
On editing row removal and on model reset.
* Gui: fix property view auto expansion of previous selected item
* Gui: improve property editor navigation using tab/shift+tab
2022-02-21 12:26:21 +01:00
Mateusz Skowroński
2f7b919671
Qt::TextColorRole is obsolete. Use ForegroundRole instead.
2022-01-27 14:37:50 -06:00
Zheng, Lei
ccf10b8867
Minor code changes according to suggestions
2021-12-21 21:41:02 -07:00
Zheng, Lei
1f604ec632
Gui: fix property view linked property highlight
2021-12-21 21:41:02 -07:00
Zheng, Lei
b76509bfea
Gui: handle exception in property item display
2021-12-21 21:41:02 -07:00
Zheng, Lei
72ae26dfee
App/Gui: improve expression binding of PropertyEnumeration
...
The enumeration items are exposed through sub path '.Enum'. When
'ShowAll' is enabled in property view, this sub path is exposed as a
sub property item named 'Enum', and can be either manually edited or
bound with an expression.
2021-11-14 20:45:09 -06:00
wmayer
7a35afdd8e
Gui: add class RotationHelper to reduce code duplication of PropertyRotationItem and PropertyPlacementItem
2021-10-29 15:59:55 +02:00
wmayer
61de191771
Gui: implement editor for PropertyRotation
2021-10-29 12:41:03 +02:00
Yorik van Havre
f3ccc6d660
Merge pull request #5023 from marioalexis84/gui-encoding
...
Gui: Harmonize encoding/decoding between view, property editor and command line.
2021-10-14 12:24:49 +02:00
Zheng, Lei
51d814d222
Gui: handle exception in property item display
2021-10-12 14:49:15 -05:00
marioalexis
6d51083240
Gui: Fix Unicode and UTF-8 encoding character behavior
2021-09-23 21:21:24 -03:00
Syres916
dddf76b47f
[Gui] PropertyItem change Base Quantity Format
2021-08-12 10:52:25 +01:00
wmayer
ab247acd0d
Gui: properly handle small quantities in property editor
2021-04-20 17:10:33 +02:00
Chris Hennes
b1f8184858
Remove unneeded Qt version checks
2021-03-28 17:41:27 +02:00
Chris Hennes
b15f134038
Remove deprecated Qt constants
...
Qt has deprecated the following constants, this commit replaces them
with their new equivalent/replacement:
Qt::TextColorRole -> Qt::ForegroundRole
Qt::BackgroundColorRole -> Qt::BackgroundRole
QPainter::HighQualityAntialiasing -> QPainter::Antialiasing
QPalette::Foreground -> QPalette::WindowText
2021-03-28 17:03:09 +02:00
wmayer
a3e3487f74
Gui: [skip ci] handle number of decimals in PropertyUnitItem, PropertyVectorDistanceItem and PropertyPlacementItem
2021-03-27 18:31:49 +01:00
Benjamin Nauck
f9ac51b6a6
[Gui] Use std::shared_ptr instead of boost::shared_ptr
...
There's no need to use boost version when stl has support for shared_ptr
2021-03-06 19:32:03 +01:00
wmayer
72b3354a28
Gui: [skip ci] Fix coverity warning
...
Coverity warnings fixed:
CID 305123 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach the expression this->linked inside this statement: if (role == Qt::TextColorRole && linked)
2021-02-21 16:53:23 +01:00
wmayer
9a49453802
Gui: [skip ci] fix crash on macOS in editor of vector list property
2021-02-18 21:43:53 +01:00
wmayer
6b2b6a4868
PyCXX: [skip ci] fix compiler warnings due to changes on PyCXX
2020-11-25 16:52:46 +01:00
wmayer
44f42a8e2c
LGTM: [skip ci] fix: Declaration hides parameter
...
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
wmayer
864483d550
PVS: V560 A part of conditional expression is always true
2020-07-18 10:59:28 +02:00
wmayer
0a8f4b5103
Gui: [skip ci] improve usability of VectorListEditor
2020-06-29 21:29:12 +02:00
wmayer
602a9a1633
Gui: [skip ci] fix -Wrange-loop-construct
2020-06-22 22:50:55 +02:00
wmayer
771b4738a1
Gui: implement property editor for vector list
2020-06-22 22:28:15 +02:00
wmayer
f9984a0ab1
Gui: [skip ci] fix regression by using UTF-8 encoding in PropertyItem::setPropertyValue
2020-04-03 16:22:35 +02:00
wmayer
110ea2c68e
[skip ci] improve whitespaces
2020-04-03 16:19:24 +02:00