Commit Graph

5762 Commits

Author SHA1 Message Date
Chris Hennes
f679823c6e Merge pull request #8955 from wwmayer/issue_8556
Move image loading to core
2023-03-22 16:00:43 -05:00
Abdullah Tahiri
d4eaf7a90b NotificationBox: Clang format 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
36a35c6c37 NotificationArea: Clang format 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
f0077e5f8a NotificationArea: Change Icon color to indicate missed notifications 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
ad3ccd9ec1 Resources: New Intray icon 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
60c2026f6d NotificationArea: Preference dialog add preferences to control inactive window behaviour 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
c5710055b5 NotificationArea: Parameters to control inactive notification show behaviour 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
6e3bdd8f2a NotificationBox: Convert options to enum class 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
1e3b728f35 NotificationBox: Add option to hide notification if reference widget is deactivated 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
2f8be2c77b NotificationBox: Enable options to not show if reference widget is not active and refactor restricttoarea 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
05dcc0bac8 NotificationBox: Hide notification if FreeCAD is deactivated 2023-03-22 19:13:32 +01:00
wmayer
6ae787cc6b Gui: fix image handling:
* Change FileHandlder to accepts all image format supported by Qt
* Make sure image object is not touched after accepting or rejecting changes
* Make option 'Keep aspect ratio' the default
* Fix WhatThis text of command
2023-03-22 17:55:55 +01:00
luzpaz
fc844ebac9 Migrate tabs to spaces in src/Gui/3Dconnexion/* 2023-03-22 17:06:47 +01:00
wmayer
5871c2bb46 Gui: add function to scale image 2023-03-22 16:24:51 +01:00
wmayer
9dc2eefca8 Gui: set size of plane from loaded image file 2023-03-22 16:16:30 +01:00
wmayer
9b38980b7a Gui: allow to change orientation of image plane, implement two-side rendering 2023-03-22 16:15:35 +01:00
wmayer
4d6b2c4a14 Gui: move class Camera to own source files 2023-03-22 16:13:38 +01:00
wmayer
ea93a2f76d Gui: add image icon resources 2023-03-22 16:08:09 +01:00
wmayer
d76e22702f Gui: send message events for zoom in/out commands to also support the image view 2023-03-22 16:03:14 +01:00
wmayer
d0bc719b23 Gui: improve loading file by drag and drop 2023-03-22 16:02:28 +01:00
wmayer
1b698b3e6b Gui: fix printing from ImageView 2023-03-22 15:47:25 +01:00
wmayer
3cd81b9bb3 Gui: add an image view 2023-03-22 15:45:38 +01:00
wmayer
771315cfdc Core: use FileHandler in Application::sOpen and Application::sInsert 2023-03-22 15:14:45 +01:00
wmayer
e8d2f9527e Core: implement class FileHandler 2023-03-22 14:06:17 +01:00
wmayer
13a6c3d2dc Core: move image plane to core system 2023-03-22 13:44:00 +01:00
wmayer
66047f7daa Gui: issue #8939: timers are moved between non-QThreads 2023-03-22 13:27:00 +01:00
Abdullah Tahiri
b04ef3a351 NotificationBox/NotificationArea: Restrict rendering area to main frame
========================================================================

The NotificationBox is extended to take the QRect in global coordinates. Then
it will try to dimension the label within this area. If a fixed width is provided, that
is enforced (take precedence).

The NotificationArea passes the QRect of the main window to the NotificationBox.

This is intended to fix:
https://github.com/FreeCAD/FreeCAD/issues/8940
2023-03-20 15:43:42 +01:00
wmayer
cc49ba60ee Gui: fix some lint warnings 2023-03-19 03:19:49 +00:00
wmayer
c7d637d677 Gui: solves #8939: timers are moved between non-QThreads
For more details see: https://github.com/FreeCAD/FreeCAD/issues/8939#issuecomment-1474888902
2023-03-18 22:41:48 +01:00
Paddle
56c3aea705 Sketcher: Stylesheets: Taskbox buttons revert margin and padding. 2023-03-18 18:22:21 +01:00
Alexander Golubev
f047b1b6eb Gui: add a tooltip about how to modify shortcuts into DlgKeyboard 2023-03-18 17:59:50 +01:00
Alexander Golubev
35ae3750b9 Gui: Prevent UiLoader from loading 3rd-party Qt plugins.
Due to a flaw in the QUiLoader, UiLoader were loading all designer plugins
it can find in QApplication::libraryPaths(). This in general a bad
practice and leads to bugs due to some plugins may perform some unexpected
actions upon load which may interfere with FreeCAD's functionality.

To avoid such problems reset the libraryPaths before creation of a
UiLoader object.

Also move setLanguageChangeEnabled(true) into constructor due to it's
called every time it's being instanced anyway.

See: https://github.com/FreeCAD/FreeCAD/issues/8708
2023-03-18 17:59:50 +01:00
Abdullah Tahiri
0b94640128 Notifications: Extend translated notification to include caption
===============================================================

For translated notifications now the caption is included in the
message, as the translation is already done, and this improves
the semantics of existing messages.
2023-03-18 09:07:39 +01:00
wmayer
608521d9f5 Gui: add missing include for Qt6 build 2023-03-18 00:08:40 +01:00
Paddle
98b97d7c68 Core: Add possibility to change the unit in the sizeLabel. 2023-03-17 14:04:24 +00:00
Abdullah Tahiri
6e29309a82 NotificationArea: Preferences - width 2023-03-17 11:29:30 +01:00
Abdullah Tahiri
a2bd55109d NotificationArea: Convert plain text to HTML to perserve format 2023-03-17 11:29:30 +01:00
Abdullah Tahiri
4b7a44739f NotificationArea: Use fixed size notifications 2023-03-17 11:29:30 +01:00
Abdullah Tahiri
eb590aed5d NotificationBox: Allow to set a fixed notification width 2023-03-17 11:29:30 +01:00
Abdullah Tahiri
3ece84fd9d NotificationArea: Allow wrapping of message text to avoid rendering issues with long messages 2023-03-17 11:29:30 +01:00
wmayer
a62d01ea2a Gui: set-up a logging category filter to suppress the most annoying Qt warnings 2023-03-16 20:40:00 +01:00
Paddle
71a94da497 Sketcher: Stylesheet, fix manualUpdate button style. 2023-03-14 16:28:14 +01:00
Paddle
00ffa67cbd Sketcher: Solver Message simplification 2023-03-14 16:28:14 +01:00
Adrian Insaurralde Avalos
38901f194b fix #8847 sketcher dialog tool buttons bad styling 2023-03-14 13:32:21 +01:00
wmayer
6ee8ee3c73 Gui: [skip ci] fix whitespaces 2023-03-13 22:38:54 +01:00
Syres916
223f0b4b35 [Gui] Add TODO reference hack 2023-03-13 22:34:58 +01:00
Syres916
7e57d539ff [Gui] Improve comments regarding move of widget 2023-03-13 22:34:58 +01:00
Syres916
5e6cd8d51f [Gui] Fix regressions from PR7771...
specifically c24a50f486 fixes #7965 #8440
2023-03-13 22:34:58 +01:00
Ronny Standtke
9878ecf3a2 use standard Close button for consistency with other task dialogs 2023-03-13 11:56:27 -05:00
Abdullah Tahiri
48ef9c794b Gui: Notifications - Convenience functions to send intrusive/non-intrusive notifications
========================================================================================

Functions to transparently send errors, warnings, notifications and translatednotifications, either
as intrusive messages (modal pop-up QMessageBox style) or as non-intrusive messages (notificationarea),
depending on the preferences of the user.

It is intended to substitute calls to QMessageBox with these functions in WBs, including the Sketcher WB.

Example:

QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
                      QObject::tr("Cannot add a constraint between two external geometries."));

Can be rewritten as:

 Gui::TranslatedNotification(obj,
               QObject::tr("Wrong selection"),
               QObject::tr("Cannot add a constraint between two external geometries."));

or

 Gui::TranslatedNotification("Sketcher",
               QObject::tr("Wrong selection"),
               QObject::tr("Cannot add a constraint between two external geometries."));

where the first parameter (obj or "Sketcher") is the notifier string. If obj is an App::DocumentObject
(or a derived class of it), internally the function transparently calls getFullLabel() to get the notifier
string.
2023-03-12 18:44:55 +01:00