From 3c32595e2524738259d11d904b9e539d25898b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Tue, 27 Nov 2018 10:31:54 +0100 Subject: [PATCH] AppFwk: Moved PdmUi3dObjectEditorHandle and PdmUiSelection3dEditorVisualizer into correct place in PdmUiCore --- .../RicPointTangentManipulator.cpp | 122 +---------------- .../RicPointTangentManipulator.h | 90 +------------ ApplicationCode/UserInterface/RiuViewer.cpp | 3 +- .../cafPdmUiCore/CMakeLists.txt | 5 + .../cafPdmUi3dObjectEditorHandle.cpp | 72 ++++++++++ .../cafPdmUi3dObjectEditorHandle.h | 89 ++++++++++++ .../cafPdmUiSelection3dEditorVisualizer.cpp | 127 ++++++++++++++++++ .../cafPdmUiSelection3dEditorVisualizer.h | 77 +++++++++++ 8 files changed, 376 insertions(+), 209 deletions(-) create mode 100644 Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUi3dObjectEditorHandle.cpp create mode 100644 Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUi3dObjectEditorHandle.h create mode 100644 Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiSelection3dEditorVisualizer.cpp create mode 100644 Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiSelection3dEditorVisualizer.h diff --git a/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulator.cpp b/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulator.cpp index 2442280b7c..8527080a7b 100644 --- a/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulator.cpp +++ b/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulator.cpp @@ -566,129 +566,8 @@ cvf::ref RicPointTangentManipulatorPartMgr::createPart(cvf::DrawableG return part; } -//================================================================================================== -/// -/// -/// -//================================================================================================== -namespace caf -{ -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -PdmUi3dObjectEditorHandle::PdmUi3dObjectEditorHandle() -{ -} -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -PdmUi3dObjectEditorHandle::~PdmUi3dObjectEditorHandle() -{ - -} - -//-------------------------------------------------------------------------------------------------- -/// Not allowed to change viewer. Should be constructor argument, but makes factory stuff difficult. -//-------------------------------------------------------------------------------------------------- -void PdmUi3dObjectEditorHandle::setViewer(QWidget* ownerViewer) -{ - CAF_ASSERT(m_ownerViewer.isNull()); - m_ownerViewer = ownerViewer; -} -} - -//================================================================================================== -/// -/// -/// -//================================================================================================== - -#include "cafSelectionManager.h" -#include "RimWellPathGeometryDef.h" - -namespace caf -{ -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -PdmUiSelection3dEditorVisualizer::PdmUiSelection3dEditorVisualizer(QWidget* ownerViewer) - : m_ownerViewer(ownerViewer) -{ - this->setParent(ownerViewer); // Makes this owned by the viewer. -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -PdmUiSelection3dEditorVisualizer::~PdmUiSelection3dEditorVisualizer() -{ - for (auto editor: m_active3DEditors) - { - delete editor; - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void PdmUiSelection3dEditorVisualizer::updateVisibleEditors() -{ - for (auto editor: m_active3DEditors) - { - if (editor) editor->updateUi(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void PdmUiSelection3dEditorVisualizer::onSelectionManagerSelectionChanged( const std::set& changedSelectionLevels ) -{ - if (!changedSelectionLevels.count(0)) return; - - for (auto editor: m_active3DEditors) - { - delete editor; - } - - m_active3DEditors.clear(); - - if (!m_ownerViewer) return; - - std::vector wellPathGeomDefs; - caf::SelectionManager::instance()->objectsByType(&wellPathGeomDefs); - - std::set totalSelection; - for ( int selLevel: changedSelectionLevels ) - { - std::vector items; - caf::SelectionManager::instance()->selectedItems(items, selLevel ); - totalSelection.insert(items.begin(), items.end()); - } - - for (PdmUiItem* item: totalSelection) - { - QString editor3dTypeName = item->ui3dEditorTypeName(m_configName); - if (!editor3dTypeName.isEmpty()) - { - PdmObjectHandle* itemObject = dynamic_cast(item); - if (itemObject) - { - PdmUi3dObjectEditorHandle* editor3d = caf::Factory::instance()->create(editor3dTypeName); - editor3d->setViewer(m_ownerViewer); - editor3d->setPdmObject(itemObject); - m_active3DEditors.push_back(editor3d); - editor3d->updateUi(); - } - } - } - - m_ownerViewer->update(); -} - -} // caf //================================================================================================== /// @@ -697,6 +576,7 @@ void PdmUiSelection3dEditorVisualizer::onSelectionManagerSelectionChanged( const //================================================================================================== #include "RimWellPathTarget.h" +#include "RimWellPathGeometryDef.h" CAF_PDM_UI_3D_OBJECT_EDITOR_SOURCE_INIT(RicWellPathGeometry3dEditor); diff --git a/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulator.h b/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulator.h index f26cc77d45..326a9711f8 100644 --- a/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulator.h +++ b/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulator.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2018- Statoil ASA +// Copyright (C) 2018- equinor ASA // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -171,88 +171,7 @@ private: /// /// //================================================================================================== - - -#include "cafSelectionChangedReceiver.h" -#include "cafPdmUiObjectEditorHandle.h" -#include "cafFactory.h" -#include - -// PdmUiObjectEditorHandle -<| PdmUiWidgetObjectEditorHandle --<| PdmUiFormLayoutObjectEditor -// -<| PdmUi3dObjectEditorHandle -namespace caf -{ - -//================================================================================================== -/// Macros helping in development of PDM UI 3d editors -//================================================================================================== - -/// CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT assists the factory used when creating editors -/// Place this in the header file inside the class definition of your PdmUiEditor - -#define CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT \ -public: \ - static QString uiEditorTypeName() - -/// CAF_PDM_UI_3D_OBJECT_EDITOR_SOURCE_INIT implements editorTypeName() and registers the field editor in the field editor factory -/// Place this in the cpp file, preferably above the constructor - -#define CAF_PDM_UI_3D_OBJECT_EDITOR_SOURCE_INIT(EditorClassName) \ - QString EditorClassName::uiEditorTypeName() { return #EditorClassName; } \ - CAF_FACTORY_REGISTER(caf::PdmUi3dObjectEditorHandle, EditorClassName, QString, EditorClassName::uiEditorTypeName()) - - -class PdmUi3dObjectEditorHandle : public caf::PdmUiObjectEditorHandle -{ -public: - PdmUi3dObjectEditorHandle(); - ~PdmUi3dObjectEditorHandle() override; - - void setViewer(QWidget* ownerViewer); - -protected: - QWidget* ownerViewer() { return m_ownerViewer;} - -private: - - QPointer m_ownerViewer; -}; - -//================================================================================================== -/// -/// -/// -//================================================================================================== - - -// Selected object 3D editor visualizer -class PdmUiSelection3dEditorVisualizer : public QObject, caf::SelectionChangedReceiver -{ - Q_OBJECT -public: - PdmUiSelection3dEditorVisualizer(QWidget* ownerViewer); - ~PdmUiSelection3dEditorVisualizer() override; - - void setConfigName(const QString& configName) { m_configName = configName; } - - void updateVisibleEditors(); - -private: - void onSelectionManagerSelectionChanged( const std::set& changedSelectionLevels ) override; - - std::vector< QPointer > m_active3DEditors; - QPointer m_ownerViewer; - QString m_configName; -}; - - -} - -//================================================================================================== -/// -/// -/// -//================================================================================================== +#include "cafPdmUi3dObjectEditorHandle.h" class RicWellTarget3dEditor; @@ -277,6 +196,7 @@ private: /// /// //================================================================================================== +#include "cafPdmUi3dObjectEditorHandle.h" class RicWellTarget3dEditor : public caf::PdmUi3dObjectEditorHandle @@ -299,7 +219,3 @@ private: QPointer m_manipulator; cvf::ref m_cvfModel; }; - -class RiuViewer; - -// 3D editor manager diff --git a/ApplicationCode/UserInterface/RiuViewer.cpp b/ApplicationCode/UserInterface/RiuViewer.cpp index 5bde89251c..2920d795a2 100644 --- a/ApplicationCode/UserInterface/RiuViewer.cpp +++ b/ApplicationCode/UserInterface/RiuViewer.cpp @@ -41,6 +41,8 @@ #include "RiuSimpleHistogramWidget.h" #include "RiuViewerCommands.h" +#include "cafPdmUiSelection3dEditorVisualizer.h" + #include "cafTitledOverlayFrame.h" #include "cafCategoryLegend.h" #include "cafOverlayScalarMapperLegend.h" @@ -68,7 +70,6 @@ #include "WindowEdgeAxesOverlayItem/RivWindowEdgeAxesOverlayItem.h" #include -#include "WellPathCommands/PointTangentManipulator/RicPointTangentManipulator.h" using cvf::ManipulatorTrackball; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt index e259cdf815..f86b860a53 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt @@ -13,6 +13,7 @@ include_directories ( # These headers need to go through Qt's MOC compiler set( QOBJECT_HEADERS cafPdmUiFieldEditorHandle.h + cafPdmUiSelection3dEditorVisualizer.h ) if ( NOT CMAKE_AUTOMOC ) @@ -41,6 +42,8 @@ set( PROJECT_FILES cafPdmUiObjectEditorHandle.h cafPdmUiWidgetObjectEditorHandle.cpp cafPdmUiWidgetObjectEditorHandle.h + cafPdmUi3dObjectEditorHandle.cpp + cafPdmUi3dObjectEditorHandle.h cafPdmUiObjectHandle.cpp cafPdmUiObjectHandle.h cafPdmUiOrdering.cpp @@ -58,6 +61,8 @@ set( PROJECT_FILES cafSelectionChangedReceiver.h cafSelectionChangedReceiver.cpp cafSelectionManagerTools.h + cafPdmUiSelection3dEditorVisualizer.h + cafPdmUiSelection3dEditorVisualizer.cpp ) add_library( ${PROJECT_NAME} diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUi3dObjectEditorHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUi3dObjectEditorHandle.cpp new file mode 100644 index 0000000000..7c5b63fe31 --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUi3dObjectEditorHandle.cpp @@ -0,0 +1,72 @@ +//################################################################################################## +// +// Custom Visualization Core library +// Copyright (C) Ceetron Solutions AS +// +// This library may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU General Public License at <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU Lesser General Public License at <> +// for more details. +// +//################################################################################################## + +#include "cafPdmUi3dObjectEditorHandle.h" + +//================================================================================================== +/// +/// +/// +//================================================================================================== +namespace caf +{ +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +PdmUi3dObjectEditorHandle::PdmUi3dObjectEditorHandle() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +PdmUi3dObjectEditorHandle::~PdmUi3dObjectEditorHandle() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// The viewer widget set here is provided by the PdmUiSelection3dEditorVisualizer and is expected +/// to be cast able to whatever is needed in subclasses. +/// Not allowed to change. Should be constructor argument, but makes factory stuff difficult. +//-------------------------------------------------------------------------------------------------- +void PdmUi3dObjectEditorHandle::setViewer(QWidget* ownerViewer) +{ + CAF_ASSERT(m_ownerViewer.isNull()); + m_ownerViewer = ownerViewer; +} +} \ No newline at end of file diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUi3dObjectEditorHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUi3dObjectEditorHandle.h new file mode 100644 index 0000000000..1a6a2ba15b --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUi3dObjectEditorHandle.h @@ -0,0 +1,89 @@ +//################################################################################################## +// +// Custom Visualization Core library +// Copyright (C) Ceetron Solutions AS +// +// This library may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU General Public License at <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU Lesser General Public License at <> +// for more details. +// +//################################################################################################## +#pragma once + +#include "cafPdmUiObjectEditorHandle.h" + +#include "cafFactory.h" + +#include +#include + +// PdmUiObjectEditorHandle -<| PdmUiWidgetObjectEditorHandle --<| PdmUiFormLayoutObjectEditor +// -<| PdmUi3dObjectEditorHandle +namespace caf +{ + +//================================================================================================== +/// Macros helping in development of PDM UI 3d editors +//================================================================================================== + +/// CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT assists the factory used when creating editors +/// Place this in the header file inside the class definition of your PdmUiEditor + +#define CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT \ +public: \ + static QString uiEditorTypeName() + +/// CAF_PDM_UI_3D_OBJECT_EDITOR_SOURCE_INIT implements editorTypeName() and registers the field editor in the field editor factory +/// Place this in the cpp file, preferably above the constructor + +#define CAF_PDM_UI_3D_OBJECT_EDITOR_SOURCE_INIT(EditorClassName) \ + QString EditorClassName::uiEditorTypeName() { return #EditorClassName; } \ + CAF_FACTORY_REGISTER(caf::PdmUi3dObjectEditorHandle, EditorClassName, QString, EditorClassName::uiEditorTypeName()) + +//================================================================================================== +/// Abstract class for 3D editors editing complete PdmObjects +//================================================================================================== + +class PdmUi3dObjectEditorHandle : public caf::PdmUiObjectEditorHandle +{ +public: + PdmUi3dObjectEditorHandle(); + ~PdmUi3dObjectEditorHandle() override; + + void setViewer(QWidget* ownerViewer); + +protected: + QWidget* ownerViewer() { return m_ownerViewer;} + +private: + + QPointer m_ownerViewer; +}; + +} + diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiSelection3dEditorVisualizer.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiSelection3dEditorVisualizer.cpp new file mode 100644 index 0000000000..3fda2397e8 --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiSelection3dEditorVisualizer.cpp @@ -0,0 +1,127 @@ +//################################################################################################## +// +// Custom Visualization Core library +// Copyright (C) Ceetron Solutions AS +// +// This library may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU General Public License at <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU Lesser General Public License at <> +// for more details. +// +//################################################################################################## + +#include "cafPdmUiSelection3dEditorVisualizer.h" + +//================================================================================================== +/// +/// +/// +//================================================================================================== + +#include "cafSelectionManager.h" + +namespace caf +{ + +//-------------------------------------------------------------------------------------------------- +/// The ownerViewer will take over ownership of this class. The ownerViewer is also the viewer distributed to +/// the 3dEditors created by this class to make them know where to exist. +//-------------------------------------------------------------------------------------------------- +PdmUiSelection3dEditorVisualizer::PdmUiSelection3dEditorVisualizer(QWidget* ownerViewer) + : m_ownerViewer(ownerViewer) +{ + this->setParent(ownerViewer); // Makes this owned by the viewer. +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +PdmUiSelection3dEditorVisualizer::~PdmUiSelection3dEditorVisualizer() +{ + for (auto editor: m_active3DEditors) + { + delete editor; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiSelection3dEditorVisualizer::updateVisibleEditors() +{ + for (auto editor: m_active3DEditors) + { + if (editor) editor->updateUi(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiSelection3dEditorVisualizer::onSelectionManagerSelectionChanged( const std::set& changedSelectionLevels ) +{ + if (!changedSelectionLevels.count(0)) return; + + for (auto editor: m_active3DEditors) + { + delete editor; + } + + m_active3DEditors.clear(); + + if (!m_ownerViewer) return; + + std::set totalSelection; + for ( int selLevel: changedSelectionLevels ) + { + std::vector items; + caf::SelectionManager::instance()->selectedItems(items, selLevel ); + totalSelection.insert(items.begin(), items.end()); + } + + for (PdmUiItem* item: totalSelection) + { + QString editor3dTypeName = item->ui3dEditorTypeName(m_configName); + if (!editor3dTypeName.isEmpty()) + { + PdmObjectHandle* itemObject = dynamic_cast(item); + if (itemObject) + { + PdmUi3dObjectEditorHandle* editor3d = caf::Factory::instance()->create(editor3dTypeName); + editor3d->setViewer(m_ownerViewer); + editor3d->setPdmObject(itemObject); + m_active3DEditors.push_back(editor3d); + editor3d->updateUi(); + } + } + } + + m_ownerViewer->update(); +} + +} // end namespace caf + diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiSelection3dEditorVisualizer.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiSelection3dEditorVisualizer.h new file mode 100644 index 0000000000..249090f02e --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiSelection3dEditorVisualizer.h @@ -0,0 +1,77 @@ +//################################################################################################## +// +// Custom Visualization Core library +// Copyright (C) Ceetron Solutions AS +// +// This library may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU General Public License at <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU Lesser General Public License at <> +// for more details. +// +//################################################################################################## +#pragma once + +#include "cafSelectionChangedReceiver.h" +#include "cafPdmUi3dObjectEditorHandle.h" + +#include +#include +#include + +#include + +namespace caf +{ + +//================================================================================================== +/// +/// +/// +//================================================================================================== + +// Selected object 3D editor visualizer +class PdmUiSelection3dEditorVisualizer : public QObject, caf::SelectionChangedReceiver +{ + Q_OBJECT +public: + PdmUiSelection3dEditorVisualizer(QWidget* ownerViewer); + ~PdmUiSelection3dEditorVisualizer() override; + + void setConfigName(const QString& configName) { m_configName = configName; } + + void updateVisibleEditors(); + +private: + void onSelectionManagerSelectionChanged( const std::set& changedSelectionLevels ) override; + + std::vector< QPointer > m_active3DEditors; + QPointer m_ownerViewer; + QString m_configName; +}; + + +}