Initial commit

This commit is contained in:
alexpete
2021-03-05 11:26:34 -08:00
commit a10351f38d
27091 changed files with 5521199 additions and 0 deletions
@@ -0,0 +1,41 @@
/*
* 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.
*
*/
#include <Source/Window/StatusBar/StatusBarWidget.h>
#include <Source/Window/StatusBar/ui_StatusBarWidget.h>
namespace MaterialEditor
{
StatusBarWidget::StatusBarWidget(QWidget* parent)
: QWidget(parent)
, m_ui(new Ui::StatusBarWidget)
{
m_ui->setupUi(this);
}
StatusBarWidget::~StatusBarWidget() = default;
void StatusBarWidget::UpdateStatusInfo(const QString& status)
{
m_ui->m_statusLabel->setText(QString("<font color=\"White\">%1</font>").arg(status));
}
void StatusBarWidget::UpdateStatusWarning(const QString& status)
{
m_ui->m_statusLabel->setText(QString("<font color=\"Yellow\">%1</font>").arg(status));
}
void StatusBarWidget::UpdateStatusError(const QString& status)
{
m_ui->m_statusLabel->setText(QString("<font color=\"Red\">%1</font>").arg(status));
}
} // namespace MaterialEditor
#include <Source/Window/StatusBar/moc_StatusBarWidget.cpp>
@@ -0,0 +1,46 @@
/*
* 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.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <AzCore/Memory/SystemAllocator.h>
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
#include <QWidget>
AZ_POP_DISABLE_WARNING
#endif
namespace Ui
{
class StatusBarWidget;
}
namespace MaterialEditor
{
//! Status bar for MaterialEditor.
class StatusBarWidget
: public QWidget
{
Q_OBJECT
public:
StatusBarWidget(QWidget* parent = nullptr);
~StatusBarWidget();
void UpdateStatusInfo(const QString& status);
void UpdateStatusWarning(const QString& status);
void UpdateStatusError(const QString& status);
private:
QScopedPointer<Ui::StatusBarWidget> m_ui;
};
} // namespace MaterialEditor
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>StatusBarWidget</class>
<widget class="QWidget" name="StatusBarWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>691</width>
<height>165</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Status Bar</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="m_statusLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../MaterialEditor.qrc"/>
</resources>
<connections/>
</ui>