Commit Graph

59 Commits

Author SHA1 Message Date
captain0xff
d4de12061e Gui: make BitmapFactory::pixmapFromSvg dpi aware
added getMaximumDPR method and removed a overload of pixmapFromSvg with dpr parameter

update
2025-04-03 19:55:27 +05:30
Andrea
da66720d3a REMOVE old QT<= 5.14 code
Ubuntu 22.04  use qt 1.15.3.
In the code is still used qt code <5.10.
A cleanup was done by removing qT code version used in ubuntu 18.04.
2025-03-05 09:32:06 +01:00
Benjamin Bræstrup Sayoc
f647d4a1eb Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
wmayer
63ad7d3fea Gui: Do not ignore alpha channel when converting QImage to SoSFImage
Fixes #18213: Sketcher constraints have black box backgrounds
2024-12-01 20:14:00 -05:00
wmayer
a372678e98 Gui: Support of converting 64-bit images 2024-11-28 19:41:18 +01:00
Chris Mayo
fbeaeee7e7 Remove xpmMap from BitmapFactory
No longer used since:
6ca8b2daae ("update hardcoded XPMs to .svg files. Updated .svg icons for clarity.", 2024-03-23)
2024-11-15 12:05:57 -05:00
Kacper Donat
b4923d1c58 Gui: Use FreeCAD Theme only for FreeCAD stuff 2024-09-14 17:38:47 +02:00
Max Wilfinger
6ca8b2daae update hardcoded XPMs to .svg files. Updated .svg icons for clarity. 2024-03-30 11:25:13 +01:00
wmayer
1eea88a8b7 Gui: add overloaded method pixmapFromSvg() to pass the device pixel ratio of a widget 2024-03-28 07:27:29 +01:00
wmayer
54bb9c9c62 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +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
wmayer
ea5a0371a3 Gui: [skip ci] fix UTF-8 handling of icon resources 2022-08-20 15:47:07 +02:00
berniev
656ef8961f Gui: redundant void 2 2022-08-08 10:21:44 +02:00
Uwe
1d95c26e2e [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
Uwe
316a869b26 [Gui] remove superfluous nullptr checks 2022-07-18 03:17:42 +02:00
0penBrain
95a98669a4 Gui: implement temporary blocker for console observer 2022-07-05 13:35:18 +02:00
0penBrain
3fe4e4b6a6 [BUGFIX] Gui: correctly save and restore warning type enabling in report view 2022-07-05 13:35:18 +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
Uwe
7cc9261182 [Gui] Application, command etc: remove unused includes 2022-02-20 22:41:34 +01:00
wmayer
09da245af9 App: harmonize API of App::Application
* make getHomePath() static and return a std::string
* make getExecutableName() static and return a std::string
2021-11-04 10:50:09 +01:00
Chris Hennes
50c7ee36bf [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
Vanuan
7a0aec1210 High DPI support: Convert sketcher cursors to SVG
Remove xpm
2020-08-19 19:59:13 +02:00
wmayer
48f9085746 LGTM: [skip ci] fix: Local variable hides global variable
A local variable or parameter that hides a global variable of the same name.
This may be confusing. Consider renaming one of the variables.
2020-07-26 19:30:24 +02:00
wmayer
eced6aaed1 Qt5: 'int QImage::byteCount() const' is deprecated since Qt 5.10: Use sizeInBytes [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
3490adf7da [skip ci] when converting from SoSFImage to QImage check that the internal buffer is not null 2019-12-09 17:53:52 +01:00
ezzieyguywuf
f27e4590a6 Refactor and rename ConsoleObserver...
...Renamed to "ILogger", to designate that this is an Interface for a
Logger. This "Interface" is pure virtual, so that it cannot be
instantiated directly. This makes it clear that it is intended to be
derived.

Finally, got rid of all the individual log-style methods and replaced
with SendLog. The idea here is that day-to-day users will only interact
with ILogger through ConsoleSingleton (or, likely, LoggerSingleton in
the future). This singleton will manage an arbirtary collection of
ILogger, and call SendLog with the appropriate parameters based on what
the user requests.

Therefore, the singleton itself will have the individual Log, Message,
Error, etc... methods, while stil allowing us to simplify the code base
of ILogger and its derived classes.
2019-10-20 11:46:15 +02:00
Abdullah Tahiri
db5ef314bf Gui: BitmapFactory new static function to make icon overlays with pixmaps 2019-06-23 01:03:35 +02:00
wmayer
a14b99e774 improve drawing of overlay pixmaps for high DPI screens 2019-03-14 18:32:21 +01:00
wmayer
337c9c936f fix various flaws detected by PVS 2019-03-01 22:52:41 +01:00
Mateusz Skowroński
317bcd59c9 Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg] Thanks Clazy! 2019-02-11 15:39:14 +01:00
wmayer
57e71e5d55 port C++ code to Qt5 2016-12-13 14:22:59 +01:00
wmayer
40bba1b2e0 activate new icons and remove old icons 2016-08-19 17:08:02 +02:00
wmayer
747bae61dc activate new icons and remove old icons 2016-08-19 16:21:37 +02:00
maurerpe
e1f3fe1be4 Change numBytes() to byteCount()
numBytes() is obsolete in Qt 4.8 and removed in Qt5.  byteCount() is a
drop in replacement that works in 4.8 and 5.
2016-02-24 23:56:25 +01:00
Mateusz Skowroński
cd2db00f22 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
433efbc115 + fix possible crash in debug mode 2015-09-20 16:59:17 +02:00
wmayer
26b424e776 + support of exclusive Python command groups 2015-09-02 22:52:04 +02:00
wmayer
cd0b369425 + issue #0002053: Support of themes 2015-06-28 23:30:42 +02:00
wmayer
0e91902e74 + move to Qt's built-in search system for icon resources 2015-04-14 11:37:24 +02:00
wmayer
f19fe1f8ed + improve loading SVG files in debug mode 2015-02-01 11:14:00 +01:00
wmayer
b172e069a1 + fix conversion from Qi image to Inventor when image uses a color table 2014-12-27 13:51:36 +01:00
wmayer
5aefd2d346 + fixes #0001859: Unable to select PNG files for icons for macros in Tools-Customize 2014-12-22 03:07:26 +01:00
wmayer
f233a50a00 + harmonize API 2014-10-19 14:25:51 +02:00
wmayer
8f54360226 + minor fix 2014-09-02 17:43:25 +02:00
wmayer
3b5cdda879 + fix flaws found with code analyzer tool 2014-05-07 13:09:44 +02:00
wmayer
017d6e4fb1 + Workaround for crash in webkit engine for Qt 4.8.5 2013-12-07 22:03:17 +01:00
wmayer
476f609e04 * Remove some old XPM icons 2013-11-08 14:20:49 +01:00
wmayer
5a8caa6d06 Use Webkit's SVG renderer for icons on macro page 2012-09-11 11:32:58 +02:00