Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
maki::LongNotificationWidget Class Reference

A notification widget that can display long content. More...

#include <long_notification.h>

Inheritance diagram for maki::LongNotificationWidget:
NotificationWidget StyledFrame

Public Member Functions

 LongNotificationWidget (const QString &id, const QString &title, logging::LogLevel level, QWidget *parent=nullptr)
 Constructs a new LongNotificationWidget.
void updateContent (QWidget *content)
 Updates the content of the notification widget.
QString id () const
 Retrieves the unique identifier for the widget.
bool disappearing () const override
 Checks if the notification is set to disappear automatically.
Public Member Functions inherited from NotificationWidget
 NotificationWidget (const QString &title, const QString &text, logging::LogLevel level, QWidget *parent=nullptr)
 Constructs a notification widget.
qreal opacity () const
 Returns the current opacity of the widget.
void setOpacity (qreal o)
 Sets the opacity of the widget.
Public Member Functions inherited from StyledFrame
 StyledFrame (QWidget *parent=nullptr)
 Constructs a StyledFrame with the given parent.
void setBackgroundRole (BackgroundRole role)
 Sets the background role of the frame.
void setBorderRole (BorderRole role)
 Sets the border role of the frame.
void setCustomBackgroundColor (const QColor &color)
 Sets a custom background color for the frame.
void setCustomBorderColor (const QColor &color)
 Sets a custom border color for the frame.
void setBorderWidth (int width)
 Sets the width of the border.
void setRadius (qreal radius)
 Sets the radius for rounded corners.

Private Attributes

const QString mId
 Unique identifier for the widget.

Additional Inherited Members

Public Slots inherited from NotificationWidget
void showAnimated ()
 Shows the notification with a fade-in animation.
void hideAnimated ()
 Hides the notification with a fade-out animation.
Signals inherited from NotificationWidget
void dismissed (NotificationWidget *self)
 Emitted when the notification is dismissed.
Protected Member Functions inherited from StyledFrame
void paintEvent (QPaintEvent *event) override
 Handles the paint event to draw the styled frame.
Protected Attributes inherited from NotificationWidget
QTimer mAutoCloseTimer
 Timer used to automatically dismiss the notification.
QPropertyAnimation * mFadeAnim
 Animation used to control opacity transitions.
Properties inherited from NotificationWidget
qreal opacity
 Controls the visual opacity of the widget.

Detailed Description

A notification widget that can display long content.

Constructor & Destructor Documentation

◆ LongNotificationWidget()

maki::LongNotificationWidget::LongNotificationWidget ( const QString & id,
const QString & title,
logging::LogLevel level,
QWidget * parent = nullptr )

Constructs a new LongNotificationWidget.

Parameters
idThe unique identifier for the widget.
titleThe title of the notification.
levelThe logging level associated with the notification.
parentThe parent widget, if any.

Member Function Documentation

◆ disappearing()

bool maki::LongNotificationWidget::disappearing ( ) const
overridevirtual

Checks if the notification is set to disappear automatically.

Returns
True if the notification will disappear, false otherwise.

Reimplemented from NotificationWidget.

◆ id()

QString maki::LongNotificationWidget::id ( ) const

Retrieves the unique identifier for the widget.

Returns
The ID as a QString.

◆ updateContent()

void maki::LongNotificationWidget::updateContent ( QWidget * content)

Updates the content of the notification widget.

Parameters
contentThe new content to display.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/widgets/long_notification.h
  • /__w/maki/maki/app/widgets/long_notification.cpp