Atlas Game Manager
A game manager for f95 and dlsite written in c++
Loading...
Searching...
No Matches
notifications.hpp
Go to the documentation of this file.
1//
2// Created by kj16609 on 7/21/23.
3//
4
5#pragma once
6#ifndef ATLASGAMEMANAGER_NOTIFICATIONS_HPP
7#define ATLASGAMEMANAGER_NOTIFICATIONS_HPP
8
9#include <QJsonArray>
10#include <QString>
11
18
20{
21 void initNotifications( QWidget* parent );
23
29 void createMessage(
30 QString user_message, QString full_message, const MessageLevel level = MessageLevel::ATLAS_INFO );
31
32 inline void createMessage(
33 const format_ns::string_view user_message,
34 const std::string_view full_message,
36 {
38 QString::fromLocal8Bit( user_message.data(), static_cast< qsizetype >( user_message.size() ) ),
39 QString::fromLocal8Bit( full_message.data(), static_cast< qsizetype >( full_message.size() ) ),
40 level );
41 }
42
43 inline void createUserMessage( const QString str )
44 {
45 createMessage( str, {} );
46 }
47
49
50} // namespace atlas::notifications
51
52#endif //ATLASGAMEMANAGER_NOTIFICATIONS_HPP
MessageLevel
Definition MessageNotification.hpp:21
@ ATLAS_INFO
Definition MessageNotification.hpp:24
Definition NotificationManagerUI.hpp:25
Definition notifications.cpp:14
NotificationManagerUI & handle()
Definition notifications.cpp:29
void createMessage(QString user_message, QString full_message, const MessageLevel level)
Definition notifications.cpp:36
bool isNotificationsReady()
Definition notifications.cpp:81
void createUserMessage(const QString str)
Definition notifications.hpp:43
void initNotifications(QWidget *parent)
Definition notifications.cpp:20