Files
o3de/Gems/LyShine/Code/Editor/AlignToolbarSection.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

39 lines
1.2 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
#include "ViewportAlign.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
//! AlignToolbarSection is a part of the ModeToolbar that only shows up when in move mode.
//! It has buttons that, when clicked, perform different align operations.
class AlignToolbarSection
{
public: //methods
explicit AlignToolbarSection();
//! Used to grey out the buttons when the selection is not valid for align operations
void SetIsEnabled(bool enabled);
//! Used to hide the section when not in the correct mode
void SetIsVisible(bool visible);
//! Adds the buttons, called by the parent toolbar to add them in the right place as toolbar is built
void AddButtons(QToolBar* parent);
private: // methods
void AddButton(QToolBar* parent, ViewportAlign::AlignType alignType, const QString& iconName, const QString& toolTip);
private: // data
QAction* m_separator = nullptr;
AZStd::vector<QAction*> m_buttons;
};