Commit Graph

91 Commits

Author SHA1 Message Date
ezzieyguywuf
9fcc18b08e 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
9fa56345cf 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
f55b4ca7f7 Gui: minor adjustment on command status update 2019-09-10 14:17:07 +02:00
wmayer
a0811878c2 re-activate DAG view 2019-09-08 16:00:08 +02:00
Zheng, Lei
a6da78b4e5 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
b0fac402ad 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
4068df6483 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
0c6b1a5d69 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
c92fe4e368 eliminate some bad old-style casts which hide an obscure error 2019-07-21 17:51:29 +02:00
mwganson
89a62366ab [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
46d1095816 Set QMdiArea tabs movable 2019-06-20 17:30:47 +02:00
wmayer
25f180e4d3 allow to define custom background images 2019-03-06 11:09:14 +01:00
wmayer
529ea97cfa fix position of version number in splash screen 2019-02-20 14:05:13 +01:00
wmayer
3771f1dbc3 enhance capabilities to render text in splashscreen 2019-02-12 13:09:51 +01:00
Mateusz Skowroński
ac508516da Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg] Thanks Clazy! 2019-02-11 15:39:14 +01:00
wmayer
f2d963edce harmonize settings for DAGView with other dockable windows 2018-11-15 10:58:14 +01:00
wmayer
0b60a64395 Enable again the standalone tree and property view by default 2018-11-15 10:24:53 +01:00
wmayer
acb8946de4 by default disable old tree view & property view 2018-11-09 17:44:51 +01:00
wmayer
36271b4052 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
mwganson
5109f51b2d issue 3443, suppress generation of new document when documents are loaded via command line 2018-10-07 23:27:44 +02:00
wmayer
c6949dceef fix build failure on Linux 2018-09-15 21:38:15 +02:00
wmayer
506f50788b 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
e214315d93 close all top-level widgets when about to quit event loop 2018-09-10 12:32:14 +02:00
wmayer
6d315fceb7 exit application when running unit tests raised a system exception 2018-08-31 22:21:15 +02:00
wmayer
49e9154b40 quit event loop after closing main window if not started by an extern host application 2018-08-09 17:03:01 +02:00
wmayer
bf7867a6e6 add brnading option to show full version number in splash screen 2018-07-25 22:26:54 +02:00
wmayer
446029adc4 add url handler to handle certains protocols differently 2018-07-25 21:48:55 +02:00
wmayer
d9be5bf578 handle exception when running unit tests in GUI mode 2018-03-30 18:38:58 +02:00
wmayer
c172b80701 handle disabled dock windows when setting up main window 2018-01-11 16:14:05 +01:00
wmayer
ca9f583ff0 fixes #0002959: GUI tests aren't run when tests are started via command line 2017-10-09 19:17:31 +02:00
wmayer
3a0c3499e5 improve whitespaces 2017-09-09 18:07:46 +02:00
Stefan Tröger
5da7aed8e1 Update Group/Part Icons and copy/paste behaviour 2017-09-09 16:55:55 +02:00
Ian Rees
0861041f3e Remove warnings about Qt4 + OpenGL + MacOS issues 2017-03-23 21:06:46 +13:00
Zheng, Lei
772827b49b 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
Kunda
cfa03cd86f Cleanup non-short-url wiki links in translations
...to avoid translators translating the url varable names
2017-02-21 12:35:25 -05:00
Kurt Kremitzki
f60dd25fb8 Add persistence to Python console word wrap 2017-02-07 10:58:38 -02:00
wmayer
b19a4246ab fix typos 2016-12-19 14:07:35 +01:00
wmayer
5096f55ccb port C++ code to Qt5 2016-12-13 14:22:59 +01:00
wmayer
e17c5d21ce Qt4/Qt5 neutral changes:
+ add missing header files/remove old headers
+ fix flaws in use of timer
2016-12-12 16:28:28 +01:00
wmayer
d420c154c0 Qt4/Qt5 neutral changes:
+ remove class DownloadDialog
+ remove class HelpView
+ remove class DlgTipOfTheDay
2016-12-12 14:35:52 +01:00
wmayer
a34c441373 Qt4/Qt5 neutral changes:
+ replace Q_WS_WIN with Q_OS_WIN
+ replace Q_WS_X11 with Q_OS_LINUX
+ replace Q_WS_MACX with Q_OS_MACX
+ set explicit cast to HWND
2016-12-12 14:09:21 +01:00
wmayer
bfc23d591e issue #0002631: Ctrl-W Doesn't Close Window 2016-10-20 09:46:28 +02:00
wmayer
7fdf39244d set directory of file dialog when opening file by double-click, recent files list or drag and drop 2016-10-16 14:47:13 +02:00
wmayer
1e6dcabefc fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
wmayer
39ab11c701 + issue #0002578: Duplicate objects copied and exported 2016-06-16 14:40:28 +02:00
Sergo
6665ae2460 filter objects to exclude duplicates during copy 2016-06-16 14:33:42 +02:00
Mateusz Skowroński
a8d37dabbe QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-04-15 11:55:12 +02:00
blobfish
32744adf76 Core: Gui: DAGView: skeleton implemented
Need to enable through parameter BaseApp/Preferences/DAGView
2016-04-12 18:12:10 +02:00
wmayer
628acdc84b + skip FreeCAD version when saving&reading main window state 2016-04-09 17:06:50 +02:00
Mateusz Skowroński
f48f0f69be Qt::WFlags is obsolete in Qt5. Replace it with Qt::WindowFlags.
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:58 +01:00