38261d0800
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines Signed-off-by: Steve Pham <spham@amazon.com>
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
/*
|
|
* 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
|
|
|
|
// Graph Canvas
|
|
#include <GraphCanvas/Components/NodePropertyDisplay/NumericDataInterface.h>
|
|
|
|
// Graph Model
|
|
#include <GraphModel/Model/Slot.h>
|
|
|
|
namespace GraphModelIntegration
|
|
{
|
|
//! Satisfies GraphCanvas API requirements for showing int property widgets in nodes.
|
|
class IntegerDataInterface
|
|
: public GraphCanvas::NumericDataInterface
|
|
{
|
|
public:
|
|
AZ_CLASS_ALLOCATOR(IntegerDataInterface, AZ::SystemAllocator, 0);
|
|
|
|
IntegerDataInterface(GraphModel::SlotPtr slot);
|
|
~IntegerDataInterface() = default;
|
|
|
|
double GetNumber() const override;
|
|
void SetNumber(double value) override;
|
|
|
|
int GetDecimalPlaces() const override;
|
|
int GetDisplayDecimalPlaces() const override;
|
|
double GetMin() const override;
|
|
double GetMax() const override;
|
|
|
|
private:
|
|
AZStd::weak_ptr<GraphModel::Slot> m_slot;
|
|
};
|
|
}
|