QmlDesigner: Add navigator preview tooltip for materials

Request 3D preview image for material instances from puppet
to show on tooltip.

Support for effect previews is also done, but handler for it is not
registered, as effects cannot be shared between windows due to
issue QTBUG-86616.

Also refactored the preview image support out of navigator
to make it more accessible by other components.

Change-Id: Ie08ba218f929660c2e43d39578997a5a1a883efd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2020-09-10 16:02:31 +03:00
parent f849bd1105
commit 90d9cb36f3
47 changed files with 848 additions and 103 deletions

View File

@@ -67,6 +67,7 @@
#include "update3dviewstatecommand.h"
#include "valueschangedcommand.h"
#include "view3dactioncommand.h"
#include "requestmodelnodepreviewimagecommand.h"
#include <enumeration.h>
@@ -213,6 +214,9 @@ void NodeInstanceServerInterface::registerCommands()
qRegisterMetaType<View3DActionCommand>("View3DActionCommand");
qRegisterMetaTypeStreamOperators<View3DActionCommand>("View3DActionCommand");
qRegisterMetaType<RequestModelNodePreviewImageCommand>("RequestModelNodePreviewImageCommand");
qRegisterMetaTypeStreamOperators<RequestModelNodePreviewImageCommand>("RequestModelNodePreviewImageCommand");
qRegisterMetaType<QPair<int, int>>("QPairIntInt");
qRegisterMetaTypeStreamOperators<QPair<int, int>>("QPairIntInt");