summaryrefslogtreecommitdiffstats
path: root/src/runtime/api/q3dswidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix documentation issuesTopi Reinio2019-04-101-1/+1
| | | | | | | | | | | | | | | | | | This commit fixes multiple documentation warnings and problems: - Add missing documentation for Presentation. - Add missing 'QT += 3dstudioruntime2' class info by introducing a \module page. - Add missing import statements info for QML types by introducing a \qmlmodule page. - Make the documented QML import statements follow module versioning. - Add missing documentation dependencies. - Omit internal classes/orphaned doc comments from the build. - Fix minor language issues. Change-Id: I854fc0646bfed9282c9a4159890b5fa6f40d46d0 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add variant filteringPasi Keränen2019-02-061-10/+11
| | | | | | | | | | | Add variant filtering to loading of presentations. [ChangeLog][QtStudio3D][Support for variants] Qt 3D Studio runtime now supports loading presentations containing variant tags. Task-number: QT3DS-2662 Change-Id: Id5637d23f5e9d178b8c40a3bb7c8b8950297548f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Dragon: Replace public API to enable Dragon with environment variableSvenn-Arne Dragly2018-11-271-1/+1
| | | | | | | | | | | | This API will not make any sense in the future, when there is only one aspect to choose from. The Dragon render aspect can in the meantime be enabled by setting the environment variable Q3DS_DRAGON to a non-zero number (like 1). Change-Id: I9e95347a1eb9d75bbeaa6f813260ce5e718230b4 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add support for the alternative renderer in Q3DSWidgetLaszlo Agocs2018-10-181-8/+29
| | | | | Change-Id: Ibaf7d7917b998ef55fc2cac8ad4771dfb48a0bee Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Avoid using public API in the engine and viewerLaszlo Agocs2018-06-181-1/+1
| | | | | | | | | | Q3DSViewerSettings gets replaced by Q3DSViewportSettings in the engine since dependencies to the "old" public API (runtime/api) are not desirable. Task-number: QT3DS-1795 Change-Id: I40224ffcf591e69fe36953fa9958513a94bcd207 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Clarify docs for the running propertyLaszlo Agocs2018-05-301-4/+4
| | | | | | | | | The meaning of running and presentationReady or presentationLoaded is basically the same in 2.0. Task-number: QT3DS-413 Change-Id: I97bfd585fce673ed9d7d470bda8a5a3d80c0b2f1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add support for using Q3DSViewerSettings in Q3DSEngineAndy Nichols2018-05-251-7/+1
| | | | | | | | | | | | Q3DSEngine has a reference to the Q3DSViewerSettings for usage in generating the viewport for the main presentation. This is used to make sure that the scene is rendered with the correct scale mode and matte if requested on the main presentation. Adds Menu items for scale modes and matte to Q3DSViewer Change-Id: I9f468c42fe846be8170dac01fcdf6d692aae19ab Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* doc: finish up the C++ docsLaszlo Agocs2018-05-231-0/+56
| | | | | Change-Id: I26abc856bba4c150b918e1800a2eb34b44bc9f81 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* more API docsLaszlo Agocs2018-05-141-3/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also pull in the property name table (the up-to-dateness of which is questionable). The version number in the generated docs should be 2.0, not the Qt version. Will need to figure out later how to maintain this. Not everything is documented yet. Less important functions will get covered later. Many bits here and there are revised compared to the 1.1 docs. There are however chunks that have been taken as-is. These need to be cleaned up later on. Most importantly, an initial Getting Started page has been added. This, like the mobile/embedded page needs to be extended signficiantly later on. A set of unused constructors (the ones taking no presentation) are removed from Q3DSElement/SceneElement/DataInput. This is because the QML API does not use them while it is impossible to utilize these in a meaningful way from C++ (where are require setting the presentation up-front with no setter afterwards). There were a few qdoc warnings from the internal implementations due to useless /*! or backslashes that confused qdoc. These are removed. Task-number: QT3DS-1606 Change-Id: I141bdc774e5be3e4fed5c1d729cac9b68a02be3b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Doc setupLaszlo Agocs2018-05-111-0/+10
| | | | | | | | | | | | | make docs will now generate a Qt3DStudioRuntime2 qch and html pages. Studio3D and Q3DSWidget have some dummy content to test this. Template pages for getting started, mobile, and embedded are also present. We can now move on to moving/adding the API docs in-source. Change-Id: I470c6832d9f53c53a743f49706050d793acd4a6a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Move logging categories to a single central placeLaszlo Agocs2018-05-041-2/+1
| | | | | | | | | | | Also add a new category for the animation manager. The behavior does not change (debug prints are enabled). Not sure if we really want to change this at all (unless it affects performance). But the option to do so by a single function call is now there. Change-Id: Idf0973f37c35475c03405b0e56b2f1b6fb63cd84 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Make ViewerSettings available in all public APIsLaszlo Agocs2018-05-041-4/+19
| | | | | | | | | The original plan of making it available only for Studio3D is probably not a good one now that it turns out scale modes are to be implemented in the engine, not just as a Studio3D-only feature. Change-Id: I25f95c92e40b6b4048ab3acfbb2c011dc44eac25 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* SubPresentationSettings and QmlStreamLaszlo Agocs2018-04-271-2/+5
| | | | | | | | | It is now possible to define QML subpresentation contents in-line inside a SubPresentationSettings/QmlStream element inside the Studio3D. Task-number: QT3DS-1487 Change-Id: I31665d939eb0e1c804c7ce54febe7df475e9ccba Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add Q3DSDataInputLaszlo Agocs2018-04-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Exposed as DataInput in the QML API. Also fixes a parsing issue with controlledproperty attributes in the Logic section. (namely that the attribute as not parsed if it was in an Add/Set). This involves some reorganizing of how the data is collected since we now need to accumulate both from the Scene and Logic sections. Also fixes cloning (Alias node) of controlledproperty data. Also adds a presentationLoaded() signal to Q3DSWidget and Q3DSSurfaceViewer because applications may want to act whenever a new scene is loaded (e.g. call setValue on some Q3DSDataInput object). Studio3D handles this internally and DataInputs magically just work, setting the values even when doing a reload or changing the source filename. Also adds a command 'datainput' to the console to allow quicker investigation of data input connections in the scene. Task-number: QT3DS-1404 Change-Id: Id2436490721e3386ba8604ca29ad4bda785521d2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add API for toggling profile UI and disable the implicit togglesLaszlo Agocs2018-03-261-5/+3
| | | | | | | | | | | | | | | | | | | | | In the viewer profiling is enabled by default and the built-in toggles (F10, backtick, double double click) or the menu item (when using widgets) can be used to bring up the UI. For applications none of these is ideal. Instead, provide a Q3DSPresentation property that can be used to toggle the UI. Therefore, an application will typically do profilingEnabled: true on its Presentation and then set profileUiVisible to true when it wants to. This way we are not tied to the sometimes not ideal keyboard and mouse shortcuts in real applications. Rename Q3DSEngine::profileUiEnabled to autoToggleProfileUi because that's what it really is. It merely enables or disables the built-in keyboard and mouse shortcuts for toggling, nothing more. Change-Id: If49ed7bc2575b7e81c2f6101dba307a639c3c011 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Q3DSPresentation: add profilingEnabled propertyLaszlo Agocs2018-03-261-2/+12
| | | | | | | | | | | | Have a way in the public API to enable the profile UI and to load presentations with QObject tracking enabled. The private API separates these two but for simplicity the public API has a single flag for both. Defaults to disabled which is what applications need in production. During development one can just do profilingEnabled: true. Change-Id: I228d7936897b6891bf4727ade126b4dbda72f73f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Implement slideEntered/Exited signals in the public APILaszlo Agocs2018-03-201-2/+1
| | | | | | | | Needs some rework internally since this needs passing around more data in our internal event struct. Change-Id: I879f11a279bea424b981358f27115969e5980c55 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Q3DSPresentation public API: fireEvent and a few enablersLaszlo Agocs2018-03-201-50/+1
| | | | | | | | | | | | | Some of the to-be-added APIs involve the silly element path concept which we cannot avoid now. So move the lookup function to Q3DSEngine and add the opposite that constructs a Scene.Layer.BlahBlah type of path from an object. The duplication of overrides for Q3DSPresentationController functions is now avoided by implemented some of the handleXxxxx functions in the base class (the ones that just forward to Q3DSEngine). Change-Id: I67cca6c0f56e545c1ba4dbf040dff26273bf823f Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Add support for EmitSignal in actionsLaszlo Agocs2018-03-191-0/+2
| | | | | | | | | | | | | This is just a way to notify the user application code about something happening. Hook it up to a signal in Q3DSEngine (for private API users) and Q3DSPresentation (public API). The node path is omitted since the concept of 3DS1 horrible absolute paths is not desirable in 2.0 and there is nothing one can do with it in the public API anyway. Demonstrate it in the simpleqml example and actionevent.uip. Change-Id: I3096ffc20ab5a401195a4da4e4f37208e571ab6c Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Revert "Follow Qt3D api change"Laszlo Agocs2018-03-121-1/+1
| | | | | | | | | This reverts commit fc8176ca6cdd53865116074628158478ba6b061e. Because Qt 3D reverted the corresponding change. Change-Id: If79373dc7576bbbc42beed5c184b5ba5aa7960c8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add public API for data inputLaszlo Agocs2018-02-261-0/+6
| | | | | | Task-number: QT3DS-1121 Change-Id: I410fb5ef96bb1c3c4de738a918c082734c85591c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Follow Qt3D api changeLaszlo Agocs2018-02-261-1/+1
| | | | | Change-Id: I4af8b341fc61e1cc3da2d936e1547b5fce1a7ca5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Q3DSWidget: Roll back defaultFbo override correctlyLaszlo Agocs2018-02-191-1/+3
| | | | | Change-Id: I219eeee97920e65159ab6ad15633e66cbc31b856 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add Q3DSWidgetLaszlo Agocs2018-02-121-0/+355
There is one tiny little issue: for reasons only Qt3D knows it is locked to 30 FPS (at best, it even flickers when getting busy). Let's revisit this once the Qt3D renderer fixes are in place. Task-number: QT3DS-839 Change-Id: I6c315914523106e17a39f2e601a9b51f236fc318 Reviewed-by: Andy Nichols <andy.nichols@qt.io>