43 lines
830 B
C++
43 lines
830 B
C++
#pragma once
|
|
#include <unordered_map>
|
|
#include <QPointer>
|
|
#include <queue>
|
|
#include <vector>
|
|
#include <QWidget>
|
|
namespace Flex_Qt::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);
|
|
}
|