bf29b27937
* LYN-3601: Provide skeleton classes for AWS Attribution (#31) Provide skeleton classes for AWS Attribution, along with some basic unit tests * Add AWS Attribution UI and settings (#56) * Adding AWS Attributions UX and corresponding editor preference s setting * Fix serialized field description * Fixed update frequency to be a day * Handling editor startup with default values for AWSAttribution * Add missing header and remove AWSCoreSystemComponentMock fron test * Generate and post AWSAttribution metric (#69) * Adding AWS Attribution Api service job * Adding support for config endpoint override * Update Api endpoint formatting, fix default region * Remove extra header * Fixes for link issues * Fix Unittest namespace * Instantiating AWSAttributionSystemComponent in AWS.Editor module * Update AttributionMetric with engine version and AWS enabled gems (#77) * Update AttributionMetric with engine version and AWS enabled gems * Fix warnings * Undoing accidental change * Saving level PrefabLevel_OpensLevelWithEntities * Remove overriding editorprefrences.setreg * Revert "Saving level PrefabLevel_OpensLevelWithEntities" This reverts commit 529af70c55ece70fc6bc29ceb83bef60413713a3. * Move AWS preferences to its own temp settings file * Undo accidental file add * Add missing string params in warning messages Co-authored-by: Pip Potter <61438964+lmbr-pip@users.noreply.github.com>
61 lines
2.1 KiB
C++
61 lines
2.1 KiB
C++
/*
|
|
* 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 <AzCore/Serialization/SerializeContext.h>
|
|
#include <AzCore/Settings/SettingsRegistryImpl.h>
|
|
#include <AzCore/RTTI/RTTI.h>
|
|
#include <QIcon>
|
|
|
|
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<AZ::SettingsRegistryImpl> 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";
|
|
};
|