/* * 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 #if !defined(Q_MOC_RUN) #include // warning C4251: 'QBrush::d': class 'QScopedPointer' needs to have dll-interface to be used by clients of class 'QBrush' // warning C4800: 'uint': forcing value to bool 'true' or 'false' (performance warning) AZ_PUSH_DISABLE_WARNING(4800 4251, "-Wunknown-warning-option") #include AZ_POP_DISABLE_WARNING #include #include #include #include #include #include #include #include #endif namespace Ui { class TexturePropertyEditor; } namespace ImageProcessingAtomEditor { class TexturePropertyEditor : public AzQtComponents::StyledDialog , protected EditorInternalNotificationBus::Handler { Q_OBJECT public: AZ_CLASS_ALLOCATOR(TexturePropertyEditor, AZ::SystemAllocator); explicit TexturePropertyEditor(const AZ::Uuid& sourceTextureId, QWidget* parent = nullptr); ~TexturePropertyEditor(); bool HasValidImage(); protected: void OnHelp(); void OnSave(); //////////////////////////////////////////////////////////////////////// //EditorInternalNotificationBus void OnEditorSettingsChanged(bool needRefresh, const AZStd::string& platform) override; //////////////////////////////////////////////////////////////////////// bool event(QEvent* event) override; private: QScopedPointer m_ui; QScopedPointer m_previewWidget; QScopedPointer m_presetSelectionWidget; QScopedPointer m_resolutionSettingWidget; QScopedPointer m_mipmapSettingWidget; EditorTextureSetting m_textureSetting; bool m_validImage = true; void SaveTextureSetting(AZStd::string outputPath); void DeleteLegacySetting(); }; } //namespace ImageProcessingAtomEditor