Files
o3de/Code/Tools/SceneAPI/SceneUI/CommonWidgets/ExpandCollapseToggler.h
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

52 lines
1.5 KiB
C++

#pragma once
/*
* 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
*
*/
#if !defined(Q_MOC_RUN)
#include <QAbstractButton>
#include <QImage>
#include <SceneAPI/SceneUI/SceneUIConfiguration.h>
#endif
class QPaintEvent;
namespace AZ
{
namespace SceneAPI
{
namespace SceneUI
{
/**
ExpandCollapseToggler - Button that shows expand & collapse images and aliases
"checked" state & signals with "Expanded" functions & signals
**/
class SCENE_UI_API ExpandCollapseToggler : public QAbstractButton
{
Q_OBJECT
public:
explicit ExpandCollapseToggler(QWidget* parent = nullptr);
~ExpandCollapseToggler() override = default;
void SetExpanded(bool isExpanded);
bool IsExpanded() const;
signals:
void ExpandedChanged(bool isExpanded);
protected:
QSize sizeHint() const override;
void paintEvent(QPaintEvent* evt) override;
const QImage* CurrentTargetImage() const;
protected:
QImage m_expandActionImage;
QImage m_collapseActionImage;
};
} // SceneUI
} // SceneAPI
} // AZ