добавил создание, хранение, удаление действий
This commit is contained in:
+17
-1
@@ -56,7 +56,16 @@ struct NotificationSettings {
|
||||
QDateTime createdAt;
|
||||
};
|
||||
|
||||
|
||||
struct ActionData {
|
||||
int id = -1;
|
||||
int type = 0; // 0 - клавиши, 1 - звук, 2 - уведомление
|
||||
QString keyCombination;
|
||||
QString audioFile;
|
||||
QString notificationTitle;
|
||||
QString notificationDescription;
|
||||
QString notificationImage;
|
||||
QString notificationSound;
|
||||
};
|
||||
|
||||
class uDataBase : public QObject
|
||||
{
|
||||
@@ -121,6 +130,13 @@ public:
|
||||
// Получение последней ошибки
|
||||
QString lastError() const;
|
||||
|
||||
bool createActionsTable();
|
||||
bool saveAction(const ActionData &action);
|
||||
bool updateAction(int id, const ActionData &action);
|
||||
bool deleteAction(int id);
|
||||
QList<ActionData> loadAllActions();
|
||||
bool clearActionsTable();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user