Commit Graph

42 Commits

Author SHA1 Message Date
Markus Reitböck
6ef07bb358 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
Benjamin Bræstrup Sayoc
f647d4a1eb Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Max
f79a230db1 Change default to not include the icon file to the file thumbnail on save.
Windows renders the application image on top so it appears twice.
Update example file thumbnails on start page to have a consistent background (classic theme) and remove the old FreeCAD logos.
2024-08-12 11:37:38 -04:00
wmayer
7c33d7d473 Gui: Initial save of a document doesn't have the expected thumbnail
When saving the thumbnail there is a check if the 3D window is the active window. This check fails if a document is saved for the first time because
the appearing file dialog causes the 3D window to not be active any more. Thus, no snapshot of the 3D window will be created and the program logo will be
saved instead. A workaround is to save the document twice.

This PR removes the check for the active window so that the snapshot can be created. The issue might be related to #10937.
2023-10-10 13:08:29 +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
Matthias Melcher
f33be68703 [macOS] Adding QuickLook feature (#7491)
* [macOS] Adding QuickLook feature
* [macOS] Adding QuickLook support for Conda and Homebrew.
* [macOS] Support non-square app icons in thumbnails.
* [macOS] adding icon for .FCScript files
2022-11-04 12:32:19 -05: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
Matthias Melcher
cfe9b1a70c Updating oversampling call to keep bold line style. 2022-09-28 16:49:57 +02:00
Matthias Melcher
c656abe21d Better Thumbnails by oversampling hires screenshot 2022-09-28 16:49:57 +02:00
berniev
656ef8961f Gui: redundant void 2 2022-08-08 10:21:44 +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
Uwe
c23a30b916 [Gui] remove unnecessary Boolean comparisons 2022-06-19 15:17:01 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
042f0ee8c6 [Gui] Tool* etc.:remove unused includes 2022-03-05 18:08:13 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
a3603911bd Gui: [skip ci] when embedding app icon into thumbnail then only scale it if the offscreen image could be created from the active view 2020-11-25 19:43:46 +01:00
Rafael Villar Burke
981b9b6214 Reduce appicon size when generating thumbnail
This smaller size is less intrusive but still can be recognized, and makes the thumbnail more generally useful.
2020-11-25 19:35:59 +01:00
wmayer
eaedcfea4c Gui: [skip ci] fix some thread issues:
avoid to crash the application when trying to create thumbnail from worker thread
avoid that application behaves weirdly when triggering an action update from worker thread
2020-06-12 12:20:20 +02:00
wmayer
22ed0bce51 code reduction w.r.t offscreen rendering 2018-01-07 17:12:50 +01:00
Yorik van Havre
d28bae3f52 Added pref option to disable the FreeCAD logo in the FCStd file thumbnail 2017-06-16 00:25:42 -03:00
wmayer
3ac834c734 Qt5OpenGL: use OpenGL debug logger to locate problems, fix a couple of errors 2017-03-21 20:37:03 +01:00
wmayer
2c6f1fd56a Qt5OpenGL: fix transparency issue with framebuffer objects with old OpenGL API 2017-03-21 20:37:03 +01:00
wmayer
ed33adc35d Qt5OpenGL: make off-screen renderer working 2017-03-21 20:37:03 +01:00
wmayer
5bf326c1fb Qt5OpenGL: fix creating thumbnals, pdf, print preview and snapshot 2017-03-21 20:37:03 +01:00
wmayer
6638ff90d9 Qt5OpenGL: do not use pixel buffer for the moment 2017-03-21 20:37:03 +01:00
wmayer
a1dd462de9 move QuarterWidget to QOpenGLWidget 2017-03-21 20:37:03 +01:00
wmayer
f19d424d8b fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02: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
wmayer
e2369996e2 if offscreen rendering for thumbnail fails then only write out application icon 2015-12-31 17:04:56 +01:00
wmayer
97987db462 + fix problems on unit tests, open transaction when creating distance object, layout warning, ... 2015-01-25 14:04:33 +01:00
wmayer
d4a5249b4b + when creating picture check whether pbuffer is supported 2014-12-09 14:18:44 +01:00
wmayer
99caf6d015 + support of arbitrary background colors in snapshot function 2014-11-08 18:23:41 +01:00
jriegel
30b189c1da Merge branch 'refs/heads/double-precision-werner'
Conflicts:
	src/App/Document.cpp
	src/App/PropertyGeo.cpp
	src/App/PropertyStandard.cpp
	src/Base/Reader.cpp
	src/Base/Reader.h
	src/Gui/propertyeditor/PropertyItem.cpp
	src/Mod/Fem/Gui/ViewProviderFemMesh.cpp
	src/Mod/Inspection/Gui/ViewProviderInspection.cpp
	src/Mod/Mesh/App/MeshProperties.cpp
	src/Mod/Part/App/TopoShapeFacePyImp.cpp
	src/Mod/PartDesign/App/FeatureRevolution.cpp
2013-09-26 00:05:05 +02:00
jriegel
68078487c7 Add SchemaVersion to RestoreDocFile to distinquish double from float binary 2013-09-24 11:01:09 +02:00
wmayer
c6b02da648 Use framebuffer object as fallback for off-screen rendering 2013-06-19 17:42:28 +02:00
wmayer
420d10face Add a GLPainter class to do all the OpenGL drawing stuff 2013-04-27 19:24:39 +02:00
wmayer
b24f0efbc1 Remove FileVersion from RestoreDocFile, convert point data back to floats 2013-03-29 15:23:51 +01:00
jrheinlaender
fdc3e50811 Added FileVersion attribute to XML format to distinguish legacy float binary files from new double binary files 2013-03-27 11:47:18 +04:30
wmayer
de1543b5fe Fix build error 2012-07-03 01:18:44 +02:00
wmayer
1b45282e90 Enhance Branding 2012-07-02 17:04:13 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00