mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-04-03 05:05:06 +08:00
24 lines
781 B
C++
24 lines
781 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QtQml/qqml.h>
|
|
#include <QDir>
|
|
#include "src/singleton.h"
|
|
|
|
class InitializrHelper : public QObject {
|
|
Q_OBJECT
|
|
private:
|
|
[[maybe_unused]] explicit InitializrHelper(QObject *parent = nullptr);
|
|
bool copyDir(const QDir &fromDir, const QDir &toDir, bool coverIfFileExists = true);
|
|
static void copyFile(const QString &source, const QString &dest);
|
|
template <typename... Args>
|
|
void templateToFile(const QString &source, const QString &dest, Args &&...args);
|
|
|
|
public:
|
|
SINGLETON(InitializrHelper)
|
|
~InitializrHelper() override;
|
|
[[maybe_unused]] Q_INVOKABLE void generate(const QString &name, const QString &path);
|
|
Q_SIGNAL void error(const QString &message);
|
|
Q_SIGNAL void success(const QString &path);
|
|
};
|