#pragma once /* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ #include #include #include #include #include #include #include #include #include namespace AZ { namespace SceneAPI { namespace DataTypes { class ISceneNodeSelectionList; } namespace UI { // QT space namespace Ui { class NodeTreeSelectionWidget; } class SCENE_UI_API NodeTreeSelectionWidget : public QWidget { Q_OBJECT public: AZ_CLASS_ALLOCATOR_DECL explicit NodeTreeSelectionWidget(QWidget* parent); ~NodeTreeSelectionWidget() override; void SetList(const DataTypes::ISceneNodeSelectionList& list); void CopyListTo(DataTypes::ISceneNodeSelectionList& target); void SetFilterName(const AZStd::string& name); void SetFilterName(AZStd::string&& name); void AddFilterType(const Uuid& idProperty); void AddFilterVirtualType(Crc32 name); void UseNarrowSelection(bool enable); void UpdateSelectionLabel(); signals: void valueChanged(); protected: void SelectButtonClicked(); void ListChangesAccepted(); void ListChangesCanceled(); virtual void ResetNewTreeWidget(const Containers::Scene& scene); size_t CalculateSelectedCount(); size_t CalculateTotalCount(); AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING AZStd::set m_filterTypes; AZStd::set m_filterVirtualTypes; AZStd::string m_filterName; QScopedPointer ui; AZStd::unique_ptr m_treeWidget; AZStd::unique_ptr m_list; AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING bool m_narrowSelection; }; } // UI } // SceneAPI } // AZ