From fc30667795ed8bd6f1108abb5d9c89d0ec07438e Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Wed, 1 Dec 2021 11:04:03 -0800 Subject: [PATCH] Removes ThumbnailDelegate from AzToolsFramework Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Thumbnails/ThumbnailDelegate.h | 48 ------------------- .../Thumbnails/ThumbnailWidget.h | 2 +- 2 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailDelegate.h diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailDelegate.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailDelegate.h deleted file mode 100644 index d21b6d7699..0000000000 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailDelegate.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -#include - -class QWidget; -class QPainter; -class QStyleOptionViewItem; -class QAbstractItemModel; -class QModelIndex; - -namespace AzToolsFramework -{ - namespace Thumbnailer - { - //! Thumbnail delegate can be used as within item views to draw thumbnails - class ThumbnailDelegate - : public QStyledItemDelegate - { - Q_OBJECT - public: - explicit ThumbnailDelegate(QWidget* parent = nullptr); - ~ThumbnailDelegate() override; - - ////////////////////////////////////////////////////////////////////////// - // QStyledItemDelegate - ////////////////////////////////////////////////////////////////////////// - void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; - QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override; - void setEditorData(QWidget* editor, const QModelIndex& index) const override; - void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override; - //! Set location where thumbnails are searched - void SetThumbnailContext(const char* thumbnailContext); - - private: - AZStd::string m_thumbnailContext; - }; - } // namespace Thumbnailer -} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailWidget.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailWidget.h index 0674726155..6dab575af5 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailWidget.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailWidget.h @@ -22,7 +22,7 @@ namespace AzToolsFramework { namespace Thumbnailer { - //! A widget used to display thumbnail. To display thumbnails within item views, use ThumbnailDelegate + //! A widget used to display thumbnail class ThumbnailWidget : public QWidget {