37 lines
787 B
C++
37 lines
787 B
C++
#pragma once
|
|
#include <QWidget>
|
|
#include <QPointer>
|
|
#include <QHash>
|
|
#include <QVector>
|
|
#include <QQueue>
|
|
|
|
namespace Psc::Message {
|
|
|
|
enum Type { success, error, warning, info };
|
|
enum Corner { Top_Left, Top_Right, Bottom_Left, Bottom_Right };
|
|
enum class Theme_Mode { Light, Dark, Auto };
|
|
|
|
struct Config {
|
|
Corner default_corner = Top_Right;
|
|
int default_duration = 3000;
|
|
int max_count = 5;
|
|
int max_width = 360;
|
|
int queue_interval = 120;
|
|
|
|
Theme_Mode theme = Theme_Mode::Auto;
|
|
|
|
bool enable_blur = true;
|
|
bool acrylic_mode = false;
|
|
|
|
double animation_speed = 1.0;
|
|
};
|
|
|
|
void set_config(const Config& cfg);
|
|
|
|
void show(Type type,
|
|
const QString& text,
|
|
QWidget* parent,
|
|
int duration_ms = -1,
|
|
Corner corner = Top_Right);
|
|
|
|
} // namespace Message
|