Commit Graph

107 Commits

Author SHA1 Message Date
wmayer
eced0cb568 Qt5: QDesktopWidget is deprecated use QScreen [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
1ee3d79d7c Qt5: 'int QFontMetrics::width' is deprecated since Qt 5.11: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
6c80d8df0d Qt5: 'QString QFileInfo::readLink() const' is deprecated: Use QFileInfo::symLinkTarget() instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02: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
triplus
ff5a903250 Support for grouped dragging of dockwidgets
Forum discussion:
https://forum.freecadweb.org/viewtopic.php?f=9&t=45697
2020-04-27 11:42:01 +02:00
wmayer
063ca70afe Gui: [skip ci] add slot to update editor related commands 2020-03-17 10:03:32 +01:00
0penBrain
62406e0ce4 Add ability to remember which workbench is active for each tab of the viewport
Can be enabled/disabled through preferences => Connected to 'SaveWBbyTab' parameter
Workbench is saved when it is changed or when a new subwindow is created
It is restored when subwindow is activated if one was previously saved
2020-03-02 11:59:30 -03:00
wmayer
85aeef9384 Gui: ComboView always must be created because it includes the task view. 2020-02-08 14:52:28 +01:00
wmayer
832d175377 Gui: fix naming inconsistency and rename 'combi' to 'combo' 2020-02-08 13:43:44 +01:00
Zheng, Lei
a8e048ec1f Gui: fix tree view mode option in general preference 2020-02-08 13:12:30 +01:00
wmayer
5c17f71a21 Gui: [skip-ci] rename Sequencer to SequencerBar 2020-01-25 16:06:29 +01:00
wmayer
625d252cb1 Gui: implementation classes don't inherit from UI classes any more 2020-01-09 14:30:45 +01:00
Zheng, Lei
004d6061e0 Fix copy/paste objects through temp file 2019-12-06 14:43:02 -03:00
Zheng, Lei
63edea3ea4 Do not reserve memory when copy/paste objects through file 2019-12-06 14:43:02 -03:00
wmayer
2251f53eb5 trigger update of action when activating MDI view 2019-10-29 22:19:43 +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
wmayer
b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
4141242e9d Gui: minor adjustment on command status update 2019-09-10 14:17:07 +02:00
wmayer
cb19453921 re-activate DAG view 2019-09-08 16:00:08 +02:00
Zheng, Lei
c2254a64aa Gui: expose MainWindow:showStatus()
Tree view now uses this to show error on hovering over object in error.
2019-08-30 14:33:31 +02:00
wmayer
c4e34ed9be Fix bug in MainWindow::setActiveWindow
The method MainWindow::setActiveWindow() must not automatically add a view to the mdi area if it's not part of it because this causes a crash when trying to make a fullscreen window or undock a view.
Instead the calling instance must explicitly call MainWindow::addWindow where needed.
2019-08-23 23:44:19 +02:00
wmayer
5172c3bc08 Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
+ fix -Wunused-variable
+ fix -Wbraced-scalar-init
+ fix -Wparentheses (View3DInventorViewer::checkGroupOnTop: operator '?:' has lower precedence than '+'; '+' will be evaluated first)
+ fix -Wundefined-bool-conversion (MainWindow::updateActions)
+ suppress -Woverloaded-virtual but fix later
2019-08-17 19:52:12 +02:00
Zheng, Lei
bd2f5191c9 Gui: Application/Document/MainWindow changes following App namespace
Application:

* signalNewDocument, check the extra argument, isMainDoc, the decide
  whether to create view of the new document. This is so that external
  linked document can be opened in background without crowding the tab
  list.

* slotDeleteDocument, calls Document::beforeDelete()

* slotActiveDocument, creates view if none, because external document
  is now opened without view.

* onLastWindowClosed(), switch to next active document, and creates view
  if none.

* send(Has)MsgToFocusView(), new API to send message to the active view
  in focus. This is to solve the ambiguity of things like pressing
  delete key, copy, paste handling when the active new is not in focus.
  For example, when spread sheet view is active, delete/copy/paste
  handling should be different when the focus on the spread sheet view
  or focus on tree view.

* tryClose(), delegate to MainWindow for close confirmation

* reopen(), new API to reload a partial document in full

Document/DocumentP:

* _CoinMap, new internal map for quick access view provider from its
  root node.

* slotNewObject, modified to support view provider override from
  App::FeaturePython, through new API
  DocumentObject::getViewProviderNameOverride().

* slotDeletedObject/slotTransactionRemove, improve handling of geo group
  children rebuild

* slotSkipRecompute, add special handling of document with skip
  recompute. Some command cannot work when skip recompute is active.
  For example, sketcher command will check if recompute is successful
  on many commands, and will undo if not. New 'PartialCompute' flag is
  added to allow recompute only the editing object and all its
  dependencies if 'SkipRecompute' is active.

* slotTouchedObject, new signal handling of manually touched object.

* setModified(), do nothing if already modified. This is a critical
  performance improvement, because marking tab window as modified turns
  out to be a relatively expensive operation, and will cause massive
  slow down if calling it on every property change.

* getViewProviderByPathFromHead/getViewProvidersByPath(), new APIs to
  obtain view provider(s) from coin SoPath.

* save/saveAll/saveCopy, modified to support external document saving.

* Save/RestoreDocFile(), save and restore tree item recursive expansion
  status.

* slotFinishRestoreObject(), handle new signal
  signalFinishRestoreObject(), unifies postprocessing in restore and
  import operation.

* createView/setActiveView(), add support of delayed view creations

* canClose(), delegate to MainWindows to ask for confirmation

* undo/redo(), support grouped transaction undo/redo. Transactions may
  be grouped by the same transaction ID if they are triggered by a
  single operation but involves objects from multiple documents.

* toggleInSceneGraph(), new API to add or remove root node from or to
  scenegraph without deleting the view object.

MainWindow:

* Update command status using a single shot timer instead of periodical
  one.

* Improve message display is status bar. Give error and warning message
  higher priority (using QStatusBar::showMessage()) than normal status
  message (using actionLabel), reversed from original implementation.

* confirmSave(), new API to check for modification, and ask user to save
  the document before closing. The confirmation dialog allows user to
  apply the answer to all document for convenience.

* saveAll(), new API to save all document with correct ordering in case
  of external linking.

* createMimeDataFromSelection/insertFromMimeData(), support copy paste
  object with external linking. A new dialog DlgObjectSelection is used
  to let user select exactly which object to export.

CommandDoc/CommandWindow:

* Related changes to object delete, document import, export, and save.
2019-08-17 15:08:33 +02:00
wmayer
53f51db8ae eliminate some bad old-style casts which hide an obscure error 2019-07-21 17:51:29 +02:00
mwganson
3cc93d1961 [enable report view on warnings/erros] add reportoutputobserver class, manage report view visibility via QDocketWidget toggleViewAction() rather than directly with show(), remove unnecessary variables 2019-07-21 15:58:12 +02:00
triplus
54c6537a21 Set QMdiArea tabs movable 2019-06-20 17:30:47 +02:00
wmayer
c3fb5edc41 allow to define custom background images 2019-03-06 11:09:14 +01:00
wmayer
2e8412f684 fix position of version number in splash screen 2019-02-20 14:05:13 +01:00
wmayer
b29209d523 enhance capabilities to render text in splashscreen 2019-02-12 13:09:51 +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
af36a78f7f harmonize settings for DAGView with other dockable windows 2018-11-15 10:58:14 +01:00
wmayer
d86c83d6c5 Enable again the standalone tree and property view by default 2018-11-15 10:24:53 +01:00
wmayer
3d8b815834 by default disable old tree view & property view 2018-11-09 17:44:51 +01:00
wmayer
f898eafd64 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
mwganson
876c65157d issue 3443, suppress generation of new document when documents are loaded via command line 2018-10-07 23:27:44 +02:00
wmayer
c8cfc15e3c fix build failure on Linux 2018-09-15 21:38:15 +02:00
wmayer
f809a50be8 when loading file by drag and drop then create the objects in the active document
if no document exists then use i18n to translate the document name
2018-09-15 19:14:46 +02:00
wmayer
3b9a9e02bc close all top-level widgets when about to quit event loop 2018-09-10 12:32:14 +02:00
wmayer
fb1a0be846 exit application when running unit tests raised a system exception 2018-08-31 22:21:15 +02:00
wmayer
1d83e15e3f quit event loop after closing main window if not started by an extern host application 2018-08-09 17:03:01 +02:00
wmayer
6e8b60589f add brnading option to show full version number in splash screen 2018-07-25 22:26:54 +02:00
wmayer
fa89e3b951 add url handler to handle certains protocols differently 2018-07-25 21:48:55 +02:00
wmayer
c75d1cd777 handle exception when running unit tests in GUI mode 2018-03-30 18:38:58 +02:00
wmayer
8f868f778e handle disabled dock windows when setting up main window 2018-01-11 16:14:05 +01:00
wmayer
4d9416f1cf fixes #0002959: GUI tests aren't run when tests are started via command line 2017-10-09 19:17:31 +02:00
wmayer
e260f9dabd improve whitespaces 2017-09-09 18:07:46 +02:00
Stefan Tröger
70692cddb4 Update Group/Part Icons and copy/paste behaviour 2017-09-09 16:55:55 +02:00
Ian Rees
a3c4c6016d Remove warnings about Qt4 + OpenGL + MacOS issues 2017-03-23 21:06:46 +13:00
Zheng, Lei
f852e6b789 Gui: increase pre-select information display
The pre-select sub-element string maybe clipped depending on the main
window size. This patch increased sub-element display width by
increasing MainWindow::showMessage text width and shortening pre-select
coordinate information.
2017-03-21 10:05:52 +01:00