2022-10-12 16:00:12 +00:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: 2022 by Devin Lin <devin@kde.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
#include <QVariantMap>
|
2025-04-18 20:13:55 +00:00
|
|
|
#include <qqmlregistration.h>
|
2022-10-12 16:00:12 +00:00
|
|
|
|
|
|
|
|
class RecordUtil : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2025-04-18 20:13:55 +00:00
|
|
|
QML_ELEMENT
|
|
|
|
|
QML_SINGLETON
|
2022-10-12 16:00:12 +00:00
|
|
|
|
|
|
|
|
public:
|
2022-10-12 16:06:11 +00:00
|
|
|
RecordUtil(QObject *parent = nullptr);
|
2022-10-12 16:00:12 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Allows us to get a filename in the standard videos directory (~/Videos by default)
|
|
|
|
|
* with a name that starts with @p name
|
|
|
|
|
*
|
|
|
|
|
* @returns a non-existing path that can be written into
|
|
|
|
|
*
|
|
|
|
|
* @see QStandardPaths::writableLocation()
|
|
|
|
|
* @see KFileUtil::suggestName()
|
|
|
|
|
*/
|
|
|
|
|
Q_INVOKABLE QString videoLocation(const QString &name);
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE void showNotification(const QString &title, const QString &text, const QString &filePath);
|
|
|
|
|
};
|