Commit Graph

27 Commits

Author SHA1 Message Date
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
9160f06e1c Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +01:00
wmayer
d69defaa3c Py: replace BaseExceptionFreeCADError with more suitable exception types 2022-03-17 13:54:23 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
wmayer
58a719e207 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
5f9020b09a [Gui] Document and Download: remove unused includes 2022-03-04 04:37:36 +01:00
marioalexis
ce7b27d93f Gui: Clean up code in DocumentPyImp.cpp 2022-02-14 14:16:36 +01:00
marioalexis
e77df533b8 Gui: Remove unused error message 2022-01-24 14:52:42 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
donovaly
2a8fe51038 [App/Gui] improve coding style
inspired by the changes made with https://github.com/FreeCAD/FreeCAD/commit/dc65b055e514
2020-07-30 12:05:22 +02:00
wmayer
1e7628f436 convert enum to enum class to fix -Wgnu-redeclared-enum 2019-11-13 22:39:27 +01:00
Zheng, Lei
71c54272a0 Fix various Py::Object leak 2019-10-08 17:53:20 +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
28b195d6e2 PVS issues:
consistently define copy constructor and assignment operator
remove superfluous casts
initialize member variables in constructor
avoid double assignment
2019-03-04 11:53:49 +01:00
wmayer
4e973324ae when restoring object then only expand single items, not its parent items 2019-02-24 00:37:53 +01:00
wmayer
941cc68efc add signal to scroll to view object 2017-10-06 16:28:30 +02:00
wmayer
f19d424d8b fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
wmayer
06d3926603 + extend interface of Document.setEdit() according to the doc string 2015-11-03 12:36:29 +01:00
wmayer
9257e9471f + allow that an object cannot be set to edit mode 2015-10-18 16:09:25 +02:00
Sebastian Hoogen
ed66ada1cf issue #1700 replace PyExc_Exception 2014-09-17 11:15:57 +02:00
wmayer
5917d21395 + implement hexagon sketch 2014-06-03 14:54:27 +02:00
wmayer
83caf9d67b + detect from Python whether a document is modified, give option to suppress warning from SendMsgToActiveView 2014-02-24 11:30:27 +01:00
wmayer
7e7dc80a7f Fix typos 2013-04-28 17:33:48 +02:00
jriegel
d739a2e41b Add all base system changes from the Assembly branch 2013-02-10 20:02:33 +01:00
wmayer
e499e33444 Expose merge project function to python 2012-05-23 15:03:48 +02:00
wmayer
2e3e3f0467 0000672: Loading Example Drawing extraction crashes at Baseclass.cpp line 115 2012-04-16 15:57:10 +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