You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
3.3 KiB
C++
106 lines
3.3 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.
|
|
*
|
|
*/
|
|
// Original file Copyright Crytek GMBH or its affiliates, used under license.
|
|
|
|
#pragma once
|
|
|
|
#include <QIcon>
|
|
#include <AudioControl.h>
|
|
|
|
namespace AudioControls
|
|
{
|
|
//-------------------------------------------------------------------------------------------//
|
|
inline QIcon GetControlTypeIcon(EACEControlType type)
|
|
{
|
|
QString iconFile;
|
|
|
|
switch (type)
|
|
{
|
|
case AudioControls::eACET_TRIGGER:
|
|
iconFile = ":/Icons/Trigger_Icon.svg";
|
|
break;
|
|
case AudioControls::eACET_RTPC:
|
|
iconFile = ":/Icons/RTPC_Icon.svg";
|
|
break;
|
|
case AudioControls::eACET_SWITCH:
|
|
iconFile = ":/Icons/Switch_Icon.svg";
|
|
break;
|
|
case AudioControls::eACET_SWITCH_STATE:
|
|
iconFile = ":/Icons/Property_Icon.svg";
|
|
break;
|
|
case AudioControls::eACET_ENVIRONMENT:
|
|
iconFile = ":/Icons/Environment_Icon.svg";
|
|
break;
|
|
case AudioControls::eACET_PRELOAD:
|
|
iconFile = ":/Icons/Preload_Icon.svg";
|
|
break;
|
|
default:
|
|
// should make a "default"/empty icon...
|
|
iconFile = ":/Icons/RTPC_Icon.svg";
|
|
}
|
|
|
|
QIcon icon(iconFile);
|
|
icon.addFile(iconFile, QSize(), QIcon::Selected);
|
|
return icon;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------------------//
|
|
inline QIcon GetFolderIcon()
|
|
{
|
|
QIcon icon = QIcon(":/Icons/Folder_Icon.svg");
|
|
icon.addFile(":/Icons/Folder_Icon_Selected.svg", QSize(), QIcon::Selected);
|
|
return icon;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------------------//
|
|
inline QIcon GetSoundBankIcon()
|
|
{
|
|
QIcon icon = QIcon(":/Icons/Preload_Icon.svg");
|
|
icon.addFile(":/Icons/Preload_Icon.svg", QSize(), QIcon::Selected);
|
|
return icon;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------------------//
|
|
inline QIcon GetGroupIcon(int group)
|
|
{
|
|
const int numberOfGroups = 5;
|
|
group = group % numberOfGroups;
|
|
QString path;
|
|
switch (group)
|
|
{
|
|
case 0:
|
|
path = ":/Icons/folder purple.svg";
|
|
break;
|
|
case 1:
|
|
path = ":/Icons/folder blue.svg";
|
|
break;
|
|
case 2:
|
|
path = ":/Icons/folder green.svg";
|
|
break;
|
|
case 3:
|
|
path = ":/Icons/folder red.svg";
|
|
break;
|
|
case 4:
|
|
path = ":/Icons/folder yellow.svg";
|
|
break;
|
|
default:
|
|
path = "Icons/folder red.svg";
|
|
break;
|
|
}
|
|
|
|
QIcon icon;
|
|
icon.addFile(path);
|
|
icon.addFile(path, QSize(), QIcon::Selected);
|
|
return icon;
|
|
}
|
|
} // namespace AudioControls
|