Code/Framework/AzToolsFramework
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -236,7 +236,7 @@ namespace AzToolsFramework
|
||||
{
|
||||
AZStd::string commandLineArgs = Platform::GetListFilesInArchiveCommand(archivePath);
|
||||
|
||||
auto parseOutput = [respCallback, taskHandle, &fileEntries](bool exitCode, AZStd::string consoleOutput)
|
||||
auto parseOutput = [respCallback, &fileEntries](bool exitCode, AZStd::string consoleOutput)
|
||||
{
|
||||
Platform::ParseConsoleOutputFromListFilesInArchive(consoleOutput, fileEntries);
|
||||
AZ::TickBus::QueueFunction(respCallback, exitCode, AZStd::move(consoleOutput));
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ namespace AzToolsFramework
|
||||
|
||||
mainLayout->addWidget(m_viewStack);
|
||||
|
||||
connect(actionGroup, &QActionGroup::triggered, this, [this, thumbnailViewAction, listViewAction, sizeComboBox](QAction* action) {
|
||||
connect(actionGroup, &QActionGroup::triggered, this, [this, thumbnailViewAction, sizeComboBox](QAction* action) {
|
||||
if (action == thumbnailViewAction)
|
||||
{
|
||||
m_viewStack->setCurrentWidget(m_thumbnailView);
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace AzToolsFramework
|
||||
{
|
||||
using AssetCheckoutCallback = AZStd::function<void(bool, const AZStd::string&, const AZStd::string&)>;
|
||||
|
||||
void AssetCheckoutCommon(const AZ::Data::AssetId& id, AZ::Data::Asset<AZ::Data::AssetData> asset, AZ::SerializeContext* serializeContext, AssetCheckoutCallback assetCheckoutAndSaveCallback)
|
||||
void AssetCheckoutCommon(const AZ::Data::AssetId& id, AZ::Data::Asset<AZ::Data::AssetData> asset, [[maybe_unused]] AZ::SerializeContext* serializeContext, AssetCheckoutCallback assetCheckoutAndSaveCallback)
|
||||
{
|
||||
AZStd::string assetPath;
|
||||
AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetPath, &AZ::Data::AssetCatalogRequests::GetAssetPathById, id);
|
||||
@@ -74,7 +74,7 @@ namespace AzToolsFramework
|
||||
{
|
||||
using SCCommandBus = SourceControlCommandBus;
|
||||
SCCommandBus::Broadcast(&SCCommandBus::Events::RequestEdit, assetFullPath.c_str(), true,
|
||||
[id, asset, assetFullPath, serializeContext, assetCheckoutAndSaveCallback](bool /*success*/, const SourceControlFileInfo& info)
|
||||
[id, asset, assetFullPath, assetCheckoutAndSaveCallback](bool /*success*/, const SourceControlFileInfo& info)
|
||||
{
|
||||
if (!info.IsReadOnly())
|
||||
{
|
||||
@@ -360,7 +360,7 @@ namespace AzToolsFramework
|
||||
if (savedCallback)
|
||||
{
|
||||
auto conn = AZStd::make_shared<QMetaObject::Connection>();
|
||||
*conn = connect(this, &AssetEditorWidget::OnAssetSavedSignal, this, [this, conn, savedCallback]()
|
||||
*conn = connect(this, &AssetEditorWidget::OnAssetSavedSignal, this, [conn, savedCallback]()
|
||||
{
|
||||
disconnect(*conn);
|
||||
savedCallback();
|
||||
|
||||
@@ -657,7 +657,6 @@ namespace AzToolsFramework
|
||||
// if we have any elements, the last element is top right aligned:
|
||||
QLayoutItem* pItem = m_children[m_children.size() - 1];
|
||||
QSize lastItemSize = pItem->minimumSize();
|
||||
QPoint topRight = effectiveRect.topRight();
|
||||
QRect topRightCorner(effectiveRect.topRight() - QPoint(lastItemSize.width(), 0), lastItemSize);
|
||||
pItem->setGeometry(topRightCorner);
|
||||
}
|
||||
|
||||
+1
-1
@@ -397,7 +397,7 @@ namespace AzToolsFramework
|
||||
AzQtComponents::CardNotification * notification = CreateNotification(message);
|
||||
const QPushButton * featureButton = notification->addButtonFeature(tr("Continue"));
|
||||
|
||||
connect(featureButton, &QPushButton::clicked, this, [this, notification]()
|
||||
connect(featureButton, &QPushButton::clicked, this, [notification]()
|
||||
{
|
||||
notification->close();
|
||||
});
|
||||
|
||||
@@ -135,7 +135,6 @@ namespace AzToolsFramework
|
||||
QIcon m_warningIcon;
|
||||
|
||||
ReflectedPropertyEditor* m_propertyEditor = nullptr;
|
||||
QVBoxLayout* m_mainLayout = nullptr;
|
||||
|
||||
AZ::SerializeContext* m_serializeContext;
|
||||
|
||||
|
||||
+8
-8
@@ -93,24 +93,24 @@ namespace AzToolsFramework
|
||||
|
||||
void BoolPropertyComboBoxHandler::ConsumeAttribute(PropertyBoolComboBoxCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName)
|
||||
{
|
||||
(void)GUI;
|
||||
(void)attrib;
|
||||
(void)attrValue;
|
||||
(void)debugName;
|
||||
AZ_UNUSED(GUI);
|
||||
AZ_UNUSED(attrib);
|
||||
AZ_UNUSED(attrValue);
|
||||
AZ_UNUSED(debugName);
|
||||
}
|
||||
|
||||
void BoolPropertyComboBoxHandler::WriteGUIValuesIntoProperty(size_t index, PropertyBoolComboBoxCtrl* GUI, property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
bool val = GUI->value();
|
||||
instance = static_cast<property_t>(val);
|
||||
}
|
||||
|
||||
bool BoolPropertyComboBoxHandler::ReadValuesIntoGUI(size_t index, PropertyBoolComboBoxCtrl* GUI, const property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
bool val = instance;
|
||||
GUI->setValue(val);
|
||||
return false;
|
||||
|
||||
+4
-4
@@ -173,16 +173,16 @@ namespace AzToolsFramework
|
||||
|
||||
void U32CRCHandler::WriteGUIValuesIntoProperty(size_t index, PropertyCRCCtrl* GUI, AZ::u32& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
AZ::u32 val = GUI->value();
|
||||
instance = static_cast<property_t>(val);
|
||||
}
|
||||
|
||||
bool U32CRCHandler::ReadValuesIntoGUI(size_t index, PropertyCRCCtrl* GUI, const AZ::u32& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
GUI->setValue(instance);
|
||||
return false;
|
||||
}
|
||||
|
||||
+8
-8
@@ -373,8 +373,8 @@ namespace AzToolsFramework
|
||||
|
||||
void AZColorPropertyHandler::WriteGUIValuesIntoProperty(size_t index, PropertyColorCtrl* GUI, property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
QColor val = GUI->value();
|
||||
AZ::Color asAZColor((float)val.redF(), (float)val.greenF(), (float)val.blueF(), (float)val.alphaF());
|
||||
instance = static_cast<property_t>(asAZColor);
|
||||
@@ -382,8 +382,8 @@ namespace AzToolsFramework
|
||||
|
||||
bool AZColorPropertyHandler::ReadValuesIntoGUI(size_t index, PropertyColorCtrl* GUI, const property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
AZ::Vector4 asVector4 = static_cast<AZ::Vector4>(instance);
|
||||
QColor asQColor;
|
||||
asQColor.setRedF((qreal)asVector4.GetX());
|
||||
@@ -410,8 +410,8 @@ namespace AzToolsFramework
|
||||
}
|
||||
void Vector3ColorPropertyHandler::WriteGUIValuesIntoProperty(size_t index, PropertyColorCtrl* GUI, property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
QColor val = GUI->value();
|
||||
AZ::Vector3 asVector3((float)val.redF(), (float)val.greenF(), (float)val.blueF());
|
||||
instance = static_cast<property_t>(asVector3);
|
||||
@@ -419,8 +419,8 @@ namespace AzToolsFramework
|
||||
|
||||
bool Vector3ColorPropertyHandler::ReadValuesIntoGUI(size_t index, PropertyColorCtrl* GUI, const property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
AZ::Vector3 asVector3 = static_cast<AZ::Vector3>(instance);
|
||||
QColor asQColor;
|
||||
asQColor.setRedF((qreal)asVector3.GetX());
|
||||
|
||||
+8
-8
@@ -305,24 +305,24 @@ namespace AzToolsFramework
|
||||
|
||||
void doublePropertySliderHandler::WriteGUIValuesIntoProperty(size_t index, PropertyDoubleSliderCtrl* GUI, property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
double val = GUI->value();
|
||||
instance = static_cast<property_t>(val);
|
||||
}
|
||||
|
||||
void floatPropertySliderHandler::WriteGUIValuesIntoProperty(size_t index, PropertyDoubleSliderCtrl* GUI, property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
double val = GUI->value();
|
||||
instance = static_cast<property_t>(val);
|
||||
}
|
||||
|
||||
bool doublePropertySliderHandler::ReadValuesIntoGUI(size_t index, PropertyDoubleSliderCtrl* GUI, const property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
GUI->blockSignals(true);
|
||||
GUI->setValue(instance);
|
||||
GUI->blockSignals(false);
|
||||
@@ -331,8 +331,8 @@ namespace AzToolsFramework
|
||||
|
||||
bool floatPropertySliderHandler::ReadValuesIntoGUI(size_t index, PropertyDoubleSliderCtrl* GUI, const property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
GUI->blockSignals(true);
|
||||
GUI->setValue(instance);
|
||||
GUI->blockSignals(false);
|
||||
|
||||
+8
-8
@@ -363,32 +363,32 @@ namespace AzToolsFramework
|
||||
|
||||
void doublePropertySpinboxHandler::WriteGUIValuesIntoProperty(size_t index, PropertyDoubleSpinCtrl* GUI, property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
double val = GUI->value() / GUI->multiplier();
|
||||
instance = static_cast<property_t>(val);
|
||||
}
|
||||
|
||||
void floatPropertySpinboxHandler::WriteGUIValuesIntoProperty(size_t index, PropertyDoubleSpinCtrl* GUI, property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
double val = GUI->value() / GUI->multiplier();
|
||||
instance = static_cast<property_t>(val);
|
||||
}
|
||||
|
||||
bool doublePropertySpinboxHandler::ReadValuesIntoGUI(size_t index, PropertyDoubleSpinCtrl* GUI, const property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
GUI->setValue(instance * GUI->multiplier());
|
||||
return false;
|
||||
}
|
||||
|
||||
bool floatPropertySpinboxHandler::ReadValuesIntoGUI(size_t index, PropertyDoubleSpinCtrl* GUI, const property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
GUI->setValue(instance * GUI->multiplier());
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-2
@@ -518,8 +518,8 @@ namespace AzToolsFramework
|
||||
|
||||
void EntityIdPropertyHandler::WriteGUIValuesIntoProperty(size_t index, PropertyEntityIdCtrl* GUI, property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
instance = GUI->GetEntityId();
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -142,16 +142,16 @@ namespace AzToolsFramework
|
||||
|
||||
void StringPropertyLineEditHandler::WriteGUIValuesIntoProperty(size_t index, PropertyStringLineEditCtrl* GUI, property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
AZStd::string val = GUI->value();
|
||||
instance = static_cast<property_t>(val);
|
||||
}
|
||||
|
||||
bool StringPropertyLineEditHandler::ReadValuesIntoGUI(size_t index, PropertyStringLineEditCtrl* GUI, const property_t& instance, InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
AZStd::string val = instance;
|
||||
GUI->setValue(val);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user