d7c8c0192f
* copy frameworks to output for loose file case Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * patching lrelease Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fix for python in loose files and bundles Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * found what the problem is, setting a version just in case Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fixup_bundle working with Python.framework and codesigning on AssetProcessor.app Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Trying to ignore other files to solve Jenkins Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Fix some qt stuff for mac Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * removal of cstemp files to prevent signature failures Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * Updating Qt with fixes to solve some qt framework issues with include paths Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
71 lines
2.4 KiB
C++
71 lines
2.4 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
|
|
*
|
|
*/
|
|
#include "ComponentEntityEditorPlugin_precompiled.h"
|
|
|
|
#include "OutlinerDisplayOptionsMenu.h"
|
|
|
|
#include <QIcon>
|
|
|
|
|
|
namespace EntityOutliner
|
|
{
|
|
DisplayOptionsMenu::DisplayOptionsMenu(QWidget* parent)
|
|
: QMenu(parent)
|
|
{
|
|
auto sortManually = addAction(QIcon(QStringLiteral(":/Outliner/sort_manually.svg")), tr("Sort: Manually"));
|
|
sortManually->setData(static_cast<int>(DisplaySortMode::Manually));
|
|
sortManually->setCheckable(true);
|
|
|
|
auto sortAtoZ = addAction(QIcon(QStringLiteral(":/Outliner/sort_a_to_z.svg")), tr("Sort: A to Z"));
|
|
sortAtoZ->setData(static_cast<int>(DisplaySortMode::AtoZ));
|
|
sortAtoZ->setCheckable(true);
|
|
|
|
auto sortZtoA = addAction(QIcon(QStringLiteral(":/Outliner/sort_z_to_a.svg")), tr("Sort: Z to A"));
|
|
sortZtoA->setData(static_cast<int>(DisplaySortMode::ZtoA));
|
|
sortZtoA->setCheckable(true);
|
|
|
|
addSeparator();
|
|
|
|
auto autoScroll = addAction(tr("Scroll to Selected"));
|
|
autoScroll->setCheckable(true);
|
|
|
|
auto autoExpand = addAction(tr("Expand Selected"));
|
|
autoExpand->setCheckable(true);
|
|
|
|
auto sortGroup = new QActionGroup(this);
|
|
sortGroup->addAction(sortManually);
|
|
sortGroup->addAction(sortAtoZ);
|
|
sortGroup->addAction(sortZtoA);
|
|
|
|
sortManually->setChecked(true);
|
|
autoScroll->setChecked(true);
|
|
autoExpand->setChecked(true);
|
|
|
|
connect(sortGroup, &QActionGroup::triggered, this, &DisplayOptionsMenu::OnSortModeSelected);
|
|
connect(autoScroll, &QAction::toggled, this, &DisplayOptionsMenu::OnAutoScrollToggle);
|
|
connect(autoExpand, &QAction::toggled, this, &DisplayOptionsMenu::OnAutoExpandToggle);
|
|
}
|
|
|
|
void DisplayOptionsMenu::OnSortModeSelected(QAction* action)
|
|
{
|
|
const auto sortMode = static_cast<DisplaySortMode>(action->data().toInt());
|
|
emit OnSortModeChanged(sortMode);
|
|
}
|
|
|
|
void DisplayOptionsMenu::OnAutoScrollToggle(bool checked)
|
|
{
|
|
emit OnOptionToggled(DisplayOption::AutoScroll, checked);
|
|
}
|
|
|
|
void DisplayOptionsMenu::OnAutoExpandToggle(bool checked)
|
|
{
|
|
emit OnOptionToggled(DisplayOption::AutoExpand, checked);
|
|
}
|
|
}
|
|
|
|
#include <UI/Outliner/moc_OutlinerDisplayOptionsMenu.cpp>
|