refactor
This commit is contained in:
+29
@@ -13,6 +13,7 @@
|
||||
#include <QTableWidget>
|
||||
#include "timerinfo.h"
|
||||
#include "webserverchat.h"
|
||||
#include "webservernotify.h"
|
||||
|
||||
struct ChatSettings {
|
||||
int id;
|
||||
@@ -35,6 +36,28 @@ struct ChatSettings {
|
||||
bool deleteByTime;
|
||||
};
|
||||
|
||||
struct NotificationSettings {
|
||||
int id;
|
||||
QString name;
|
||||
QString type;
|
||||
int port;
|
||||
QString blockColor;
|
||||
QString borderColor;
|
||||
int borderSize;
|
||||
int transparency;
|
||||
QString pageBackgroundColor;
|
||||
QString titleFamily;
|
||||
int titleSize;
|
||||
QString titleColor;
|
||||
QString contentFamily;
|
||||
int contentSize;
|
||||
QString contentColor;
|
||||
int duration;
|
||||
QDateTime createdAt;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class uDataBase : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -84,6 +107,12 @@ public:
|
||||
bool deleteChat(int port);
|
||||
QList<ChatSettings> loadAllChats();
|
||||
|
||||
// Методы для уведомлений
|
||||
bool createNotificationsTable();
|
||||
bool saveNotification(const QString &name, HttpServer *server);
|
||||
bool updateNotification(const QString &name, HttpServer *server, int oldPort);
|
||||
QList<NotificationSettings> loadAllNotifications();
|
||||
bool deleteNotification(int port);
|
||||
|
||||
// Проверка подключения к БД
|
||||
bool isConnected() const;
|
||||
|
||||
Reference in New Issue
Block a user