Commit Graph

118 Commits

Author SHA1 Message Date
Uwe
c23a30b916 [Gui] remove unnecessary Boolean comparisons 2022-06-19 15:17:01 +02:00
Zheng, Lei
3ef438eaf0 Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
bedf920702 Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
c4f5628899 [Gui] So headers: remove unused includes
- also sort out some headers to be used in precompiled headers
- also move a boost header to precompiled headers
2022-03-16 02:01:32 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
14288f9725 [Gui] View3D*: remove unused includes 2022-03-05 23:16:28 +01:00
wmayer
34c77609dd Gui: [skip ci] export PDF of 3D view in landscape orientation 2022-03-01 12:46:35 +01:00
Uwe
b4fff07d9e [App] Expression and Extension: remove unused includes 2022-02-25 18:06:57 +01:00
Uwe
1e314b0165 [Gui] improvements for PCH builds 2022-02-19 06:38:45 +01:00
wmayer
daf1269497 Gui: remove support of using deprecated Qt OpenGL API 2022-01-26 14:46:41 +01:00
wmayer
369fc153b1 Gui: code refactoring that handles printer settings, also support color mode 2022-01-24 12:45:06 +01:00
0penBrain
34ef43811c [Gui] Add corner cross size as a preference in Display/3D View/General 2021-11-23 00:07:02 +01:00
wmayer
fad2fd9568 Gui: make View3DInventorPy acting as sub-class of MDIViewPy 2021-11-21 19:44:38 +01:00
mwganson
b9a2fb2f74 [Print Preview] Save paper size and orientation to user parameters 2021-11-14 21:21:17 -06:00
Chris Hennes
b1f8184858 Remove unneeded Qt version checks 2021-03-28 17:41:27 +02:00
Chris Hennes
b15f134038 Remove deprecated Qt constants
Qt has deprecated the following constants, this commit replaces them
with their new equivalent/replacement:

Qt::TextColorRole -> Qt::ForegroundRole
Qt::BackgroundColorRole -> Qt::BackgroundRole
QPainter::HighQualityAntialiasing -> QPainter::Antialiasing
QPalette::Foreground -> QPalette::WindowText
2021-03-28 17:03:09 +02:00
wmayer
aa45875a2b Gui: modernize C++ 2021-01-28 16:22:40 +01:00
vosk
b49c523a54 [Part] - Fix View3DInventor.setCamera leaking SoCamera* 2021-01-28 16:17:33 +01:00
Mateusz Skowroński
294a2ebc9d Fix Qt deprecation warnings. QPrinter::paperSize() and QPrinter::setPaperSize() are obsolete. 2021-01-04 13:40:58 +01:00
Mateusz Skowroński
712f6c1251 Fix Qt deprecation warnings. QPrinter::orientation() and QPrinter::setOrientation() are obsolete. 2021-01-03 15:08:10 +01:00
Mateusz Skowroński
e6032b7d53 Fix Qt deprecation warnings. QPrinter::paperRect() and QPrinter::pageRect() are obsolete. 2021-01-02 10:39:16 +01:00
wmayer
0eba78d400 Gui: [skip ci] support of bitmasks for enum RotationCenterMode 2020-11-29 11:43:51 +01:00
wmayer
5e83aa8848 Gui: [skip ci] in user settings offer combo box to choose between rotation modes 2020-11-28 22:12:25 +01:00
wmayer
4c9eca5623 Gui: [skip ci] replace dragAtCursor with new enum value WindowCenter 2020-11-28 17:31:42 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
66e546042f Gui: [skip ci] move handling of parameter ShowAxisCross from Document to View3DInventor 2020-05-30 11:32:34 +02:00
wmayer
ea8d3bb242 Gui: [skip ci] add options to set one-pass and backface-pass rendering 2020-04-06 19:50:58 +02:00
wmayer
e6b3fad6e1 Gui: allow to dump only the visible part of the scene graph
Gui.ActiveDocument.ActiveView.dump("scene.iv", True)
The second parameter is optional and by default False
2020-01-16 13:28:01 +01:00
wmayer
eb4e2d2c56 Gui: add virtual method containsViewProvider to MDIView and re-implement it in some sub-classes
Improve Document::setActiveView to not always switch to the first 3D view but check the currently active view before
2019-12-29 15:00:35 +01:00
wmayer
1bfe0f3bea fixes #0004125: MDIViews not accessible correctly 2019-09-15 18:15:44 +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
Zheng, Lei
c744157e9a Gui: add support of selection context
The patch implements context-aware selection and rendering in 3D view.

Please check [here](https://git.io/fjiY5) for more details, including
the following 'Render Caching' section.

The patch also includes modification of View3DInventorViewer to support
always-on-top selection rendering using the secondary selection context
and the new coin node SoFCPathAnnotation.

Another small change in SoQtQuarterAdaptor for more responsive frame
rate display. The original implementation reports skewed frame rate
in the presence of long idle period.
2019-08-17 14:52:10 +02:00
wmayer
0871fb49c7 make print preview working for > Qt 5.9 2019-07-11 00:06:38 +02:00
wmayer
960d612547 disable ESC button support in View3DInventor::keyEvent() for Qt5 because changing MDI view mode causes rendering artifacts 2019-06-05 15:44:23 +02:00
luz.paz
c985f9ee79 Misc typos and whitespace fixes
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*`
2019-03-31 11:42:36 +02:00
wmayer
c601f4cb66 fixes 0003222: Invert zoom setting is not respected in paper/page mode 2019-01-14 11:08:17 +01:00
wmayer
abe82e00f4 harmonize functions to set camera orientations 2019-01-12 22:59:44 +01:00
wmayer
42c5b2e9ca fixes 0003657: automatic rotation disabled by default 2018-10-28 20:45:02 +01:00
wmayer
d4987d088f add option to drag at cursor instead of view center 2018-07-25 22:36:35 +02:00
wmayer
78b7510ee1 fix inconsistent default parameters, fix warnings 2018-05-31 13:47:31 +02:00
wmayer
b8fca77c5a respect settings of locatation navicube when creating a new view 2018-05-30 09:45:44 +02:00
wmayer
7c010ab9a4 implement option to change corner of navi cube 2018-05-26 18:51:53 +02:00
wmayer
d15c7d0673 + option to disable navi cube
+ handle destruction of GL context in 3d viewer class
+ fix for OpenGL error message: 'Texture is not valid in the current context. Texture has not been destroyed'
2018-05-26 15:33:45 +02:00
wmayer
22ed0bce51 code reduction w.r.t offscreen rendering 2018-01-07 17:12:50 +01:00
wmayer
868d9cc6c2 improve whitespaces 2017-11-24 15:43:28 +01:00
wmayer
d04fd16263 make retrieving view direction numerically more stable, change orientation of bottom view 2017-11-13 21:53:10 +01:00
wmayer
39e4020bdf Various fixes:
+ disable VBO rendering in split views
+ activate multi-sampling in split view for manual alignment
+ share GL widget in case a document has multiple views to make VBO rendering work correctly
2017-09-23 11:14:41 +02:00
wmayer
378a1e4f58 Qt5: workaround for undocking of mdi view
fix minor issues reported by clang static analyzer
2017-05-03 22:01:46 +02:00
wmayer
d02a34c03b Qt5 port: workaround to keep multi-sampling when undocking mdi window 2017-05-01 18:53:58 +02:00