Commit Graph

258 Commits

Author SHA1 Message Date
wmayer
91e4e468dd Base: move ILogger sub-classes to their own source files in order to reduce including stream classes in client code 2022-03-06 10:13:47 +01:00
Uwe
eaaeef80e1 [Gui] Application and Document: remove unused headers 2022-02-19 05:37:40 +01:00
marioalexis
21d7fd92c5 Gui: Add option to enable/disable text cursor blinking 2022-01-29 11:05:31 +01:00
wmayer
a87e33258d Gui: remove support of using deprecated Qt OpenGL API 2022-01-26 14:46:41 +01:00
wmayer
ce8c6a58bb Gui: improve safety of Application::getViewProvider()
This is a suggestion offered by realthunder at https://forum.freecadweb.org/viewtopic.php?p=560433#p560433
and this commit https://github.com/realthunder/FreeCAD/commit/0e20656ffae

This commit additionally moves the relevant code into a separate class.
2022-01-12 14:39:05 +01:00
luz paz
fd3f2b0092 Fix various typos and refinements 2022-01-06 20:22:34 +01:00
wmayer
88c015e007 Gui: encoding/decoding of system specific error message 2021-12-30 00:48:57 +01:00
wmayer
cda8545a29 Gui: in catch blocks first write the error message before cleaning the resources 2021-12-20 16:10:01 +01:00
wmayer
060f3bf8f3 Gui: boost 1.76 provides an overloaded version of file_lock that accepts a wchar_t string 2021-12-19 21:24:17 +01:00
wmayer
9b8731a326 0004807: Freecad crashes when windows username contains special characters 2021-12-19 17:02:19 +01:00
wmayer
1c6b7cca9d App: save version number of the most important libraries 2021-11-23 12:55:49 +01:00
wmayer
c8fcb9405e Gui: extend PySide2 wrapper of MainWindow with extra functions 2021-11-19 15:45:56 +01:00
wmayer
3bd3f20e32 Gui: [skip ci] add sub-classes of the MDIView to the type system 2021-11-19 12:51:13 +01:00
wmayer
867870e113 Gui: allow to configure the checks of the cache directory 2021-11-16 15:37:04 +01:00
wmayer
54b139cb29 Gui: periodically check cache directory and offer a way to clean it up if it exceeds the limit 2021-11-15 22:53:41 +01:00
wmayer
387661360c App: standard path handling
* distinguish between temp and cache location
* document's transident directory is created in the cache location
* add functions to access temp and cache location via Python
2021-11-15 16:26:25 +01:00
wmayer
f36126770c 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
wmayer
c6db46f359 Gui: [skip ci] fix minor memory leak 2021-10-26 13:31:55 +02:00
wmayer
ebb9f4723f Gui: code-refactoring of document recovery handling to reduce code duplication 2021-10-21 21:45:52 +02:00
Yorik van Havre
13b8b05a9a Merge pull request #4787 from chennes/addThemeSupport
[GUI] Add Preference Pack support
2021-10-14 12:41:06 +02:00
0penBrain
f6f5182bc3 Gui : susbtitute dot with local decimal separator for spin boxes
Main goal is to improve user-friendlyness for several locales
 Substitution of dot is performed :
 * Always if dot is neither decimal nor group/thousand separator of current locale
 * Only on NUMPAD dot if dot is not decimal but is group separator of current locale
2021-09-27 15:06:36 +02:00
Chris Hennes
cc53377985 Merge branch 'master' into addThemeSupport 2021-09-24 07:51:04 -05:00
wmayer
bc5c585c8b Gui: move Ui loader classes to their own source files 2021-09-22 20:31:01 +02:00
Yorik van Havre
10c684cfab Merge pull request #4788 from 0penBrain/UserEditMode
Gui: add user edit mode (default edit mode set by user)
2021-09-02 11:50:03 +02:00
Chris Hennes
8c875a0098 Merge branch 'master' into addThemeSupport 2021-08-19 09:51:12 -05:00
Chris Hennes
9af48f2709 [GUI] Add autoload option to Workbench preferences page (#4957)
* Add autoload option to Workbench preferences page

* Address bugs identified in the forum.

* Add forward declaration of QCheckBox
2021-08-10 20:33:03 -05:00
0penBrain
ef22c6ba1e [Gui] Introducing user edit mode 2021-05-14 09:23:04 +02:00
Chris Hennes
40171d7858 [GUI] Add PreferencePack support
Preference Packs are collections of preferences that can be applied en
mass to the user's current setup. Any preference that can be stored in
user.cfg can be stored in a preference pack, and they are designed to be
easy to distribute.

Support is also added for saving a subset of current preferences into a
new preference pack in order to facilitate easy creation of new
"themes", etc.
2021-05-13 09:08:33 -05:00
Matthijs Kooijman
fdc6890f4e Gui: Enable compression of tablet motion events
By default (on platforms that support it, X11 and Windows currently) QT
applies compression for high frequency events (mouse move, touch, window
resizes) to keep things smooth even when handling the event takes a
while (e.g. to calculate snapping).

However, tablet pen move events (and mouse move events synthesised from
those, which is what FreeCAD uses) are not compressed by default (to
allow maximum precision when e.g. hand-drawing curves), leading to
unacceptable slowdowns using a tablet pen.

This commit enable compression for tablet events here to solve that and
make use of a tablet just as smooth as a mouse with FreeCAD.

This can (and likely will) lead to some movement events being dropped,
but since there is no freeform curve drawing tool, that should not be
problematic (and if it is ever added, it could still work without
compression if the mouse movement event handler is written to be fast
enough).
2021-03-29 12:08:46 +02:00
donovaly
0d43fd4d0f [Gui] fix HiDPI rounding bug
As reported in https://forum.freecadweb.org/viewtopic.php?f=10&t=56425&start=20#p485809
this PR fixes the problem reported here: https://forum.freecadweb.org/viewtopic.php?f=10&t=56425&start=20#p485759
2021-03-10 15:25:04 +01:00
Chris Hennes
c39764e395 [GUI] Migrate Application to std::bind 2021-03-07 08:47:01 +01:00
Chris Hennes
dc96a08201 [GUI] Remove deprecated code from Application
Strip out anything that was only active for Qt <5.9 or Python <3.6.
2021-03-07 08:47:01 +01:00
wmayer
dd4dd204d0 App/Gui: fix memory leaks:
+ add function to cleanup units and quantities in debug build
+ fix reference leak in PropertyVector::getPyPathValue()
+ fix reference leak in PropertyPlacement::getPyPathValue()
+ in InterpreterSingleton::init() use a static std::vector<wchar_t*> instead of a C array
  to free memory at program end
+ in MainWindow::closeEvent() explicitly delete all task watchers
+ in ReportOutputObserver constructor pass parent to QObject
+ in PropertyEditor destructor explicitly delete QItemEditorFactory
2021-02-27 10:56:19 +01:00
wmayer
88d49cd982 Gui: [skip ci] improve exception handling:
* handle all exceptions in Application::onLastWindowClosed because this method can be (indirectly)  called from ~BaseView and would otherwise trigger std::terminate()
* handle exceptions in PropertyEditor::closeTransaction() because when recomputing a document while closing it leaves the editor in a bad state
2021-02-25 12:23:13 +01:00
wmayer
a4aea3f480 Gui: [skip ci] add convenience function updateActions() to Application
Use updateActions() in ViewProvider::onChanged() to also trigger an update on pure view property changes
2021-02-09 15:21:17 +01:00
Chris Hennes
15afa3ae59 Remove extraneous lines from export
Corrects a merge issue from an earlier PR: the removed lines are
redundant.
2021-02-01 13:38:21 +01:00
Chris Hennes
279ca4d660 Add parameters to user.cfg file when used
The two parameters are now added to the user.cfg file once they are
accessed in the code. So the first time you export a file, the
parameeter RecentIncludesExported is created and defaulted to false, and
the first time you import a file the parameter RecentIncludesImported is
created and defaults to true. Once that is done the parameters can be
edited from the Parameter Editor, even though they do not have entries
in the Preferences dialog.
2021-01-10 15:40:10 -06:00
Chris Hennes
e653e6710c Merge branch 'master' into addImportExportRecentFilesPrefs 2021-01-10 13:17:29 -06:00
Mateusz Skowroński
98f63ba60f Fix build warnings from deprecated Boost headers (they are used internally by Boost). Thanks @wwmayer for the hint. 2020-12-29 10:20:53 +01:00
Chris Hennes
aec977765e Add prefs for import/export in Recent Files
Add two (currently hidden) preferences controlling whether imported and
exported files are included in the recent files list.

RecentIncludesImported defaults to true, and RecentIncludesExported
defaults to false.
2020-12-18 13:43:23 -06:00
wmayer
b7bd7d229b Gui: [skip ci] add option to use software OpenGL 2020-12-17 16:27:36 +01:00
wmayer
d9a3cd6956 Gui: [skip ci] make parameter to control High DPI scaling available for all platforms 2020-12-02 22:38:04 +01:00
wmayer
5009699e79 Gui: [skip ci] add user parameter to disable High DPI scaling on Windows (by default off) 2020-12-02 13:15:01 +01:00
ADDIREKT\Apeltauer
aa5ac86b87 (Windows only) Improve the dpi handling with different dpi screens on windows 2020-12-02 13:08:46 +01:00
luz paz
c93bf6cbae Gui: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the src/Gui code.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
67e80c7d6a Qt5: fix deprecation warnings for Qt 5.15
+ QByteArray::append is deprecated
+ QPixmap* QLabel::pixmap() is deprecated
+ overloaded version of QString::split is deprecated
+ QSysInfo::windowsVersion()/QSysInfo::MacVersion() is deprecated
2020-10-18 14:45:31 +02:00
wmayer
ed60bb7618 Gui: [skip ci] workaround to allow to define the link color of the application's palette 2020-10-08 11:32:17 +02:00
wmayer
804ed5115d Gui: [skip ci] fix appearance of TaskGroups when a style sheet is set 2020-10-06 18:20:34 +02:00
wmayer
863c5a2700 Gui: [skip ci] fix handling of active document when importing a file 2020-10-06 12:33:35 +02:00