2024-03-04 16:22:40 +08:00
|
|
|
#ifndef TOOL_H
|
|
|
|
#define TOOL_H
|
2024-12-24 03:51:48 +08:00
|
|
|
#include "TimeSlider.h"
|
2024-03-04 16:22:40 +08:00
|
|
|
#include <QString>
|
2024-08-12 11:26:42 +08:00
|
|
|
#include <functional>
|
2024-03-04 16:22:40 +08:00
|
|
|
|
|
|
|
class Tool {
|
|
|
|
public:
|
|
|
|
Tool();
|
|
|
|
|
|
|
|
static QStringList getFileList(QString path);
|
2024-08-12 11:26:42 +08:00
|
|
|
|
2024-03-04 16:22:40 +08:00
|
|
|
static bool removeFile(QString path);
|
2024-08-12 11:26:42 +08:00
|
|
|
|
2024-03-04 16:22:40 +08:00
|
|
|
#ifdef Q_OS_LINUX
|
|
|
|
static QString writeCom(QString path);
|
|
|
|
#endif
|
|
|
|
static int64_t getAvailableStorage(QString mountedPath);
|
2024-08-12 11:26:42 +08:00
|
|
|
|
|
|
|
static double getCostTime(std::function<void(void)> callback, const char* callbackName = "");
|
2024-12-24 03:51:48 +08:00
|
|
|
|
|
|
|
static QList<TimeSlider::TimeSegment> calTimeSegments(QVariantMap params);
|
2024-03-04 16:22:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TOOL_H
|