Fix notification queue and add gem action (#4985)

Signed-off-by: AMZN-alexpete <26804013+AMZN-alexpete@users.noreply.github.com>
This commit is contained in:
Alex Peterson
2021-10-26 14:37:47 -07:00
committed by GitHub
parent df8cdff9f1
commit 7a0246530a
6 changed files with 95 additions and 45 deletions
@@ -22,6 +22,7 @@ namespace AzQtComponents
, m_closeOnClick(true)
, m_ui(new Ui::ToastNotification())
, m_fadeAnimation(nullptr)
, m_configuration(toastConfiguration)
{
setProperty("HasNoWindowDecorations", true);
@@ -80,7 +81,13 @@ namespace AzQtComponents
}
ToastNotification::~ToastNotification()
{
{
}
bool ToastNotification::IsDuplicate(const ToastConfiguration& toastConfiguration)
{
return toastConfiguration.m_title == m_configuration.m_title
&& toastConfiguration.m_description == m_configuration.m_description;
}
void ToastNotification::paintEvent(QPaintEvent* event)
@@ -45,6 +45,8 @@ namespace AzQtComponents
void ShowToastAtPoint(const QPoint& screenPosition, const QPointF& anchorPoint);
void UpdatePosition(const QPoint& screenPosition, const QPointF& anchorPoint);
bool IsDuplicate(const ToastConfiguration& toastConfiguration);
// QDialog
void showEvent(QShowEvent* showEvent) override;
@@ -64,7 +66,7 @@ namespace AzQtComponents
private:
QPropertyAnimation* m_fadeAnimation;
ToastConfiguration m_configuration;
bool m_closeOnClick;
QTimer m_lifeSpan;
uint32_t m_borderRadius = 0;