1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 15:55:07 +00:00
serenity/Libraries/LibGUI/Notification.h
Andreas Kling faedb763ca NotificationServer: Allow showing an icon in notifications
We currently use icon paths for this because I didn't want to deal with
implementing icon bitmap sharing right now. In the future it would be
better to post a bitmap somehow instead of a path.
2020-03-26 20:38:28 +01:00

32 lines
656 B
C++

#pragma once
#include <LibCore/Object.h>
namespace GUI {
class Notification : public Core::Object {
C_OBJECT(Notification);
public:
virtual ~Notification() override;
const String& text() const { return m_text; }
void set_text(const String& text) { m_text = text; }
const String& title() const { return m_title; }
void set_title(const String& title) { m_title = title; }
const String& icon_path() const { return m_icon_path; }
void set_icon_path(const String& icon_path) { m_icon_path = icon_path; }
void show();
private:
Notification();
String m_title;
String m_text;
String m_icon_path;
};
}