git mv Code\Sandbox\Editor Code/Editor

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-06-29 12:41:59 -07:00
parent 9f0bbf3b74
commit e34e36cb35
1415 changed files with 0 additions and 0 deletions
@@ -0,0 +1,79 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "ProcessingAssetsDialog.h"
// Qt
#include <QPushButton>
#include <QStyle>
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
#include <AssetImporter/UI/ui_ProcessingAssetsDialog.h>
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
ProcessingAssetsDialog::ProcessingAssetsDialog(int numberOfProcessedFiles, QWidget* parent)
: QDialog(parent)
, m_ui(new Ui::ProcessingAssetsDialog)
{
m_ui->setupUi(this);
UpdateTextsAndTitle(numberOfProcessedFiles);
InitializeButtons();
}
ProcessingAssetsDialog::~ProcessingAssetsDialog()
{
}
void ProcessingAssetsDialog::InitializeButtons()
{
QPushButton* viewStatusButton = m_ui->buttonBox->addButton(tr("View status"), QDialogButtonBox::AcceptRole);
QPushButton* closeButton = m_ui->buttonBox->addButton(tr("Close"), QDialogButtonBox::RejectRole);
viewStatusButton->setDefault(true);
viewStatusButton->setProperty("class", "AssetImporterLargerButton");
viewStatusButton->style()->unpolish(viewStatusButton);
viewStatusButton->style()->polish(viewStatusButton);
viewStatusButton->update();
closeButton->setProperty("class", "AssetImporterButton");
closeButton->style()->unpolish(closeButton);
closeButton->style()->polish(closeButton);
closeButton->update();
connect(viewStatusButton, &QPushButton::clicked, this, &ProcessingAssetsDialog::accept);
connect(closeButton, &QPushButton::clicked, this, &ProcessingAssetsDialog::reject);
}
void ProcessingAssetsDialog::accept()
{
Q_EMIT OpenLogDialog();
QDialog::accept();
}
void ProcessingAssetsDialog::reject()
{
Q_EMIT CloseProcessingAssetsDialog();
QDialog::reject();
}
void ProcessingAssetsDialog::UpdateTextsAndTitle(int numberOfProcessedFiles)
{
if (numberOfProcessedFiles > 1)
{
setWindowTitle("Processing assets");
m_ui->label->setText("The Asset Processor will process your assets and when they are finished they will appear in the Asset Browser. You can view the status of your assets in the Asset Processor.");
}
else
{
setWindowTitle("Processing asset");
m_ui->label->setText("The Asset Processor will process your asset and when it is finished it will appear in the Asset Browser. You can view the status of your asset in the Asset Processor.");
}
}
#include <AssetImporter/UI/moc_ProcessingAssetsDialog.cpp>