/* * 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. * */ #pragma once #include "Include/IPreferencesPage.h" #include #include #include #include class CEditorPreferencesPage_AWS : public IPreferencesPage { public: AZ_RTTI(CEditorPreferencesPage_AWS, "{51FB9557-ABA3-4FD7-803A-1784F5B06F5F}", IPreferencesPage) static void Reflect(AZ::SerializeContext& serialize); CEditorPreferencesPage_AWS(); virtual ~CEditorPreferencesPage_AWS(); // IPreferencesPage interface methods. virtual const char* GetCategory() override { return "AWS"; } virtual const char* GetTitle() override; virtual QIcon& GetIcon() override; virtual void OnApply() override; virtual void OnCancel() override {} virtual bool OnQueryCancel() override { return true; } protected: struct UsageOptions { AZ_TYPE_INFO(UsageOptions, "{2B7D9B19-D13B-4E54-B724-B2FD8D0828B3}") bool m_awsAttributionEnabled; }; const UsageOptions& GetUsageOptions(); private: void InitializeSettings(); void SaveSettingsRegistryFile(); UsageOptions m_usageOptions; QIcon m_icon; AZStd::unique_ptr m_settingsRegistry; static constexpr char AWSAttributionEnabledKey[] = "/Amazon/AWS/Preferences/AWSAttributionEnabled"; static constexpr char EditorPreferencesFileName[] = "editorpreferences.setreg"; static constexpr char EditorAWSPreferencesFileName[] = "editor_aws_preferences.setreg"; static constexpr char AWSAttributionSettingsPrefixKey[] = "/Amazon/AWS/Preferences"; };