- Implement `cleanupOldData` in `DatabaseManager` to remove outdated entries and optimize storage. - Introduce `unlockScreen` in `AdbUtils` and integrate it into common scripts for screen unlocking. - Enhance `GeneralLogDAO` to support screenshot storage and retrieval. - Expand `FileLogWindow` with screenshot viewer and horizontal layout. - Add device ID migration logic in `BankProfileDAO` and `MaterialDAO`. - Improve error handling in `EventHandler` by saving and logging screenshots for critical events.
26 lines
787 B
C++
26 lines
787 B
C++
#pragma once
|
|
#include <QList>
|
|
#include <QString>
|
|
#include <QStringList>
|
|
#include <QDateTime>
|
|
|
|
struct GeneralLogEntry {
|
|
int id = -1;
|
|
QString level;
|
|
QString source;
|
|
QString message;
|
|
QDateTime timestamp;
|
|
QByteArray screenshot;
|
|
};
|
|
|
|
class GeneralLogDAO {
|
|
public:
|
|
static bool insert(const QString &level, const QString &source, const QString &message);
|
|
static bool insert(const QString &level, const QString &source, const QString &message,
|
|
const QByteArray &screenshot);
|
|
|
|
[[nodiscard]] static QList<GeneralLogEntry> getLogs(int page, int pageSize,
|
|
const QStringList &levels = {});
|
|
[[nodiscard]] static int getTotalCount(const QStringList &levels = {});
|
|
};
|